Commit cca5624b by huluobin

fix

parent c9bdcf0b
......@@ -186,7 +186,9 @@ public class MarketServiceImpl implements MarketService {
.eq(CouponCustomerRelevance::getState, 1)
.eq(CouponCustomerRelevance::getType, 0));
innerCouponCustomerRelevanceServiceList.forEach(couponCustomerRelevance -> couponCustomerRelevance.setState(CouponCustomerRelevance.STATE_USED));
couponCustomerRelevanceService.saveOrUpdateBatch(innerCouponCustomerRelevanceServiceList);
if (ListUtil.isNotEmpty(innerCouponCustomerRelevanceServiceList)) {
couponCustomerRelevanceService.saveOrUpdateBatch(innerCouponCustomerRelevanceServiceList);
}
//订单使用的外部券
List<CouponCustomerRelevance> outerCouponCustomerRelevanceServiceList = couponCustomerRelevanceService
......@@ -195,8 +197,9 @@ public class MarketServiceImpl implements MarketService {
.eq(CouponCustomerRelevance::getState, 1)
.eq(CouponCustomerRelevance::getType, 1));
outerCouponCustomerRelevanceServiceList.forEach(couponCustomerRelevance -> couponCustomerRelevance.setState(CouponCustomerRelevance.STATE_USED));
couponCustomerRelevanceService.saveOrUpdateBatch(outerCouponCustomerRelevanceServiceList);
if (ListUtil.isNotEmpty(outerCouponCustomerRelevanceServiceList)) {
couponCustomerRelevanceService.saveOrUpdateBatch(outerCouponCustomerRelevanceServiceList);
}
//订单使用的次卡
List<TimesCardUsedRecord> timesCardUsedRecordList = timesCardUsedRecordService
......@@ -204,7 +207,9 @@ public class MarketServiceImpl implements MarketService {
.eq(TimesCardUsedRecord::getOrderId, orderId)
.eq(TimesCardUsedRecord::getStatus, 1));
timesCardUsedRecordList.forEach(timesCardUsedRecord -> timesCardUsedRecord.setStatus(TimesCardUsedRecord.STATUS_USED));
timesCardUsedRecordService.saveOrUpdateBatch(timesCardUsedRecordList);
if (ListUtil.isNotEmpty(timesCardUsedRecordList)) {
timesCardUsedRecordService.saveOrUpdateBatch(timesCardUsedRecordList);
}
}
/**
......
......@@ -41,7 +41,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@EnableScheduling
//@EnableScheduling
@AllArgsConstructor
@Slf4j
@Component
......
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