bug
This commit is contained in:
parent
42afda3a8a
commit
27ccbb65f9
@ -91,6 +91,8 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
private ILJStaffService staffService;
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
@Resource
|
||||
private CardFavorableService cardFavorableService;
|
||||
|
||||
|
||||
|
||||
@ -337,6 +339,19 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
List<ActiveConsumptionChild> activeConsumptionChildList1 = activeConsumptionDTO.getActiveConsumptionChildList();
|
||||
if (CollectionUtils.isNotEmpty(activeConsumptionChildList1)){
|
||||
activeConsumptionChildList1.stream().map(s ->{
|
||||
//更新优惠券兑换券的有效期
|
||||
if(s.getActiveGift().equals("1")){
|
||||
CardFavorable cardFavorable = cardFavorableMapper.selectById(s.getVouchersId());
|
||||
cardFavorable.setValidityZero(s.getValidityZero());
|
||||
cardFavorable.setValidityOne(s.getValidityOne());
|
||||
cardFavorable.setValidityTwo(s.getValidityTwo());
|
||||
cardFavorableMapper.updateById(cardFavorable);
|
||||
}
|
||||
if(s.getActiveGift().equals("2")){
|
||||
CardExchange cardExchange = cardExchangeMapper.selectById(s.getVouchersId());
|
||||
cardExchange.setValidity(s.getGiftCardTime());
|
||||
cardExchangeMapper.updateById(cardExchange);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(s)) s.setActiveConsumptionId(activeConsumption.getId());
|
||||
return s;
|
||||
}).collect(Collectors.toList());
|
||||
|
Loading…
Reference in New Issue
Block a user