123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- //
- // SPSBRedDotModel.m
- // 我的社保
- //
- // Created by shanp on 2021/4/25.
- //
- #import "SPSBRedDotModel.h"
- #import "SPSBPurchasersModel.h"
- #import "SPSBBusinessManager.h"
- @implementation SPSBRedDotSbuIdModel
- @end
- @implementation SPSBRedDotModel
- - (instancetype)init {
- self = [super init];
- if (!self) return nil;
- _spsb_buy = @"0";
- _spsb_msg = @"0";
- _spsb_wage = @"0";
- _spsb_added = @"0";
- _spsb_material_flow = @"0";
- _spsba_all = @"0";
- _spsb_sbuids = SPSBRedDotSbuIdModel.new;
- return self;
- }
- - (id)GETspsb_sbuidsWithDictionary:(nullable NSDictionary *)dic key:(NSString *)key {
- SPSBRedDotSbuIdModel *model = SPSBRedDotSbuIdModel.new;
- NSArray *arr = @[];
- if ([dic[key] isKindOfClass:[NSArray class]]) {
- arr = dic[key];
- }
- for (id i in arr) {
- for (SPSBPurchasersModel *purchasers in spsb_purchasersArray()) {
- if ([purchasers.spsb_id isEqualToString:[NSString stringWithFormat:@"%@", i]]) {
- model.spsb_tips = [NSString stringWithFormat:@"请添加 %@ 的银行卡,否则会影响流水费返还。", purchasers.spsb_user_name];
- model.spsb_purchasers = purchasers;
- return model;
- }
- }
- }
- return model;
- }
- - (bool)handleAdditionalProperty {
- [super handleAdditionalProperty];
- NSInteger all = _spsb_buy.integerValue + _spsb_msg.integerValue + _spsb_wage.integerValue + _spsb_added.integerValue + _spsb_material_flow.integerValue;
- _spsba_all = [NSString stringWithFormat:@"%ld", (long)all];
- return true;
- }
- @end
|