Commit bbac9510 authored by 曹云霄's avatar 曹云霄

修改项说明:

parent 7ba8658e
...@@ -214,6 +214,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -214,6 +214,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[weakSelf RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf.promotionInformationArray removeAllObjects]; [weakSelf.promotionInformationArray removeAllObjects];
[weakSelf.guidePromotionArray removeAllObjects];
[weakSelf.customerPromotionArray removeAllObjects];
NSArray *promotionalArray = returnValue[@"data"][@"actions"]; NSArray *promotionalArray = returnValue[@"data"][@"actions"];
for (NSDictionary *dict in promotionalArray) { for (NSDictionary *dict in promotionalArray) {
NSString *type = dict[@"type"]; NSString *type = dict[@"type"];
...@@ -262,6 +264,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -262,6 +264,8 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
[weakSelf RemoveMBProgressHUDLoding]; [weakSelf RemoveMBProgressHUDLoding];
if ([returnValue[@"code"] isEqualToNumber:@0]) { if ([returnValue[@"code"] isEqualToNumber:@0]) {
[weakSelf.promotionInformationArray removeAllObjects]; [weakSelf.promotionInformationArray removeAllObjects];
[weakSelf.guidePromotionArray removeAllObjects];
[weakSelf.customerPromotionArray removeAllObjects];
NSArray *promotion = returnValue[@"data"]; NSArray *promotion = returnValue[@"data"];
for (NSDictionary *dict in promotion) { for (NSDictionary *dict in promotion) {
TOOrderPromotionEntity *oldPromotion = [[TOOrderPromotionEntity alloc]initWithDictionary:dict error:nil]; TOOrderPromotionEntity *oldPromotion = [[TOOrderPromotionEntity alloc]initWithDictionary:dict error:nil];
...@@ -295,13 +299,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -295,13 +299,13 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
model.total = [oldPromotion.jdecardDenomation integerValue]; model.total = [oldPromotion.jdecardDenomation integerValue];
model.body = GUIDE; model.body = GUIDE;
model.type = JDECardAction; model.type = JDECardAction;
[weakSelf.promotionInformationArray addObject:model]; [weakSelf.guidePromotionArray addObject:model];
} else if (![BaseViewController isBlankString:[oldPromotion.redPackageCount stringValue]]) { } else if (![BaseViewController isBlankString:[oldPromotion.redPackageCount stringValue]]) {
// 导购抽奖数 // 导购抽奖数
PromotionLuckyDrawModel *model = [[PromotionLuckyDrawModel alloc]init]; PromotionLuckyDrawModel *model = [[PromotionLuckyDrawModel alloc]init];
model.body = GUIDE; model.body = GUIDE;
[weakSelf.promotionInformationArray addObject:model]; [weakSelf.guidePromotionArray addObject:model];
} else if (![BaseViewController isBlankString:[oldPromotion.discountRate stringValue]]) { } else if (![BaseViewController isBlankString:[oldPromotion.discountRate stringValue]]) {
// 抽奖折扣 // 抽奖折扣
PromotionLuckyDrawModel *model = [[PromotionLuckyDrawModel alloc]init]; PromotionLuckyDrawModel *model = [[PromotionLuckyDrawModel alloc]init];
...@@ -706,7 +710,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -706,7 +710,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
- (void)queryGuideLuckyDrawChanceisTrue:(void(^)())finish - (void)queryGuideLuckyDrawChanceisTrue:(void(^)())finish
{ {
// 查询是否有导购抽奖机会 // 查询是否有导购抽奖机会
for (id object in self.promotionInformationArray) { for (id object in self.guidePromotionArray) {
if ([object isKindOfClass:[PromotionLuckyDrawModel class]]) { if ([object isKindOfClass:[PromotionLuckyDrawModel class]]) {
PromotionLuckyDrawModel *model = (PromotionLuckyDrawModel *)object; PromotionLuckyDrawModel *model = (PromotionLuckyDrawModel *)object;
if ([model.body isEqualToString:GUIDE]) { if ([model.body isEqualToString:GUIDE]) {
...@@ -750,7 +754,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息"; ...@@ -750,7 +754,7 @@ NSString *const PROMOTIONALSTRING = @"促销信息";
/// 刷新数据成功 /// 刷新数据成功
[weakSelf getOrderDetailsData:^{ [weakSelf getOrderDetailsData:^{
// 先判断促销中有无京东E卡,有则认为发放成功 // 先判断促销中有无京东E卡,有则认为发放成功
for (id object in weakSelf.promotionInformationArray) { for (id object in weakSelf.guidePromotionArray) {
if ([object isKindOfClass:[PromotionJDECardModel class]]) { if ([object isKindOfClass:[PromotionJDECardModel class]]) {
PromotionJDECardModel *model = (PromotionJDECardModel *)object; PromotionJDECardModel *model = (PromotionJDECardModel *)object;
if ([model.body isEqualToString:GUIDE] && [model.type isEqualToString:JDECardAction]) { if ([model.body isEqualToString:GUIDE] && [model.type isEqualToString:JDECardAction]) {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
}else if ([promotionModel isMemberOfClass:[PromotionalDeductionModel class]]) { }else if ([promotionModel isMemberOfClass:[PromotionalDeductionModel class]]) {
//抵扣 //抵扣
PromotionalDeductionModel *deductionModel = (PromotionalDeductionModel *)promotionModel; PromotionalDeductionModel *deductionModel = (PromotionalDeductionModel *)promotionModel;
self.promotionalTitleLabel.text = [NSString stringWithFormat:@"抵扣: %@",deductionModel.descriptionString]; self.promotionalTitleLabel.text = [NSString stringWithFormat:@"抵扣金额: %ld元",deductionModel.total];
}else if ([promotionModel isMemberOfClass:[PromotionLuckyDrawModel class]]) { }else if ([promotionModel isMemberOfClass:[PromotionLuckyDrawModel class]]) {
//抽奖 //抽奖
self.promotionalTitleLabel.text = [NSString stringWithFormat:@"转盘抽奖: %@",self.model.descriptionString]; self.promotionalTitleLabel.text = [NSString stringWithFormat:@"转盘抽奖: %@",self.model.descriptionString];
......
...@@ -414,8 +414,8 @@ ...@@ -414,8 +414,8 @@
} }
} }
order.jdCardDenomation = totalNumber; order.jdCardDenomation = totalNumber;
// 查询是否有客户抽奖 // 查询是否有消费者抽奖
for (id object in self.guidePromotionArray) { for (id object in self.consumerPromotionalArray) {
if ([object isKindOfClass:[PromotionLuckyDrawModel class]]) { if ([object isKindOfClass:[PromotionLuckyDrawModel class]]) {
PromotionLuckyDrawModel *model = (PromotionLuckyDrawModel *)object; PromotionLuckyDrawModel *model = (PromotionLuckyDrawModel *)object;
if ([model.body isEqualToString:CONSUMER]) { if ([model.body isEqualToString:CONSUMER]) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment