ソースを参照

fix 清空评价金额配置

zoujiajian 3 年 前
コミット
20b7a811d6

+ 5 - 2
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonCommentServiceImpl.java

@@ -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);
+		}
 	}
 }