From 7849666529b4b5836808a912b87dc2fe55456980 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 2 Oct 2024 14:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=9F=8E=EF=BC=9A=E8=99=9A=E6=8B=9F=E6=88=90?= =?UTF-8?q?=E5=9B=A2=E6=97=B6=EF=BC=8CheadId=20=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=9B=A2=E9=95=BF=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../convert/combination/CombinationActivityConvert.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java index 3ee4a8190..8f8088060 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java @@ -217,7 +217,8 @@ public interface CombinationActivityConvert { List createRecords = new ArrayList<>(count); for (int i = 0; i < count; i++) { // 基础信息和团长保持一致 - CombinationRecordDO newRecord = convert5(headRecord); + CombinationRecordDO newRecord = BeanUtils.toBean(headRecord, CombinationRecordDO.class) + .setId(null).setHeadId(headRecord.getHeadId()); // 虚拟信息 newRecord.setCount(0) // 会单独更新下,在后续的 Service 逻辑里 .setUserId(0L).setNickname("").setAvatar("").setOrderId(0L); @@ -225,7 +226,5 @@ public interface CombinationActivityConvert { } return createRecords; } - @Mapping(target = "id", ignore = true) - CombinationRecordDO convert5(CombinationRecordDO headRecord); }