|
|
@@ -1,5 +1,6 @@
|
|
|
package com.cyksj.service.order.impl;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.mapper.OrderCommentMapper;
|
|
|
@@ -88,7 +89,9 @@ public class OrderDonCommentServiceImpl implements OrderDonCommentService {
|
|
|
exists_goods_ids.add(goodsId);
|
|
|
});
|
|
|
orderCommentRewardConfigMapper.delete(Wrappers.lambdaQuery(OrderCommentRewardConfig.class)
|
|
|
- .notIn(OrderCommentRewardConfig::getGoodsId, exists_goods_ids));
|
|
|
- orderCommentRewardConfigMapper.batchInsertConfigs(configs);
|
|
|
+ .notIn(exists_goods_ids.size() > 0, OrderCommentRewardConfig::getGoodsId, exists_goods_ids));
|
|
|
+ if (CollUtil.isNotEmpty(configs)) {
|
|
|
+ orderCommentRewardConfigMapper.batchInsertConfigs(configs);
|
|
|
+ }
|
|
|
}
|
|
|
}
|