Commit 980315e5 by huluobin

update

parent 333b385e
...@@ -150,8 +150,15 @@ public class MarketServiceImpl implements MarketService { ...@@ -150,8 +150,15 @@ public class MarketServiceImpl implements MarketService {
throw new RRException(); throw new RRException();
} }
//删除订单已经绑定的次卡 //删除订单已经绑定的次卡
timesCardUsedRecordService.remove(new LambdaQueryWrapper<TimesCardUsedRecord>() List<TimesCardUsedRecord> removeTimesCardUsedRecordList = timesCardUsedRecordService.list(
.eq(TimesCardUsedRecord::getOrderId, cmd.getOrderId())); new LambdaQueryWrapper<TimesCardUsedRecord>()
.eq(TimesCardUsedRecord::getOrderId, cmd.getOrderId()));
removeTimesCardUsedRecordList.forEach(timesCardUsedRecord -> {
TimesCardCustomerRelevance timesCardCustomerRelevance = timesCardCustomerRelevanceMapper.selectById(timesCardUsedRecord.getCardRelevanceCustomerId());
timesCardCustomerRelevance.setUsedTimes(timesCardCustomerRelevance.getUsedTimes() - 1);
timesCardCustomerRelevanceMapper.updateById(timesCardCustomerRelevance);
timesCardUsedRecordService.removeById(timesCardUsedRecord.getId());
});
cmd.getTimesCardIds().forEach(id -> { cmd.getTimesCardIds().forEach(id -> {
//用户次卡 //用户次卡
......
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