【修复】mall:配送模版更新时,diff 比较的 id 不正确,导致未完全使用增量更新

This commit is contained in:
YunaiV 2024-04-24 13:06:34 +08:00
parent da5425da2f
commit 9ae7001095

View File

@ -88,7 +88,7 @@ public class DeliveryExpressTemplateServiceImpl implements DeliveryExpressTempla
List<DeliveryExpressTemplateFreeDO> oldList = expressTemplateFreeMapper.selectListByTemplateId(templateId);
List<DeliveryExpressTemplateFreeDO> newList = INSTANCE.convertTemplateFreeList(templateId, frees);
List<List<DeliveryExpressTemplateFreeDO>> diffList = CollectionUtils.diffList(oldList, newList,
(oldVal, newVal) -> ObjectUtil.equal(oldVal.getId(), newVal.getTemplateId()));
(oldVal, newVal) -> ObjectUtil.equal(oldVal.getId(), newVal.getId()));
// 第二步批量添加修改删除
if (CollUtil.isNotEmpty(diffList.get(0))) {