Commit 7849666529b4b5836808a912b87dc2fe55456980
1 parent
a9928fa2
【功能修复】商城:虚拟成团时,headId 未使用团长编号
Showing
1 changed file
with
2 additions
and
3 deletions
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 { | @@ -217,7 +217,8 @@ public interface CombinationActivityConvert { | ||
| 217 | List<CombinationRecordDO> createRecords = new ArrayList<>(count); | 217 | List<CombinationRecordDO> createRecords = new ArrayList<>(count); |
| 218 | for (int i = 0; i < count; i++) { | 218 | for (int i = 0; i < count; i++) { |
| 219 | // 基础信息和团长保持一致 | 219 | // 基础信息和团长保持一致 |
| 220 | - CombinationRecordDO newRecord = convert5(headRecord); | 220 | + CombinationRecordDO newRecord = BeanUtils.toBean(headRecord, CombinationRecordDO.class) |
| 221 | + .setId(null).setHeadId(headRecord.getHeadId()); | ||
| 221 | // 虚拟信息 | 222 | // 虚拟信息 |
| 222 | newRecord.setCount(0) // 会单独更新下,在后续的 Service 逻辑里 | 223 | newRecord.setCount(0) // 会单独更新下,在后续的 Service 逻辑里 |
| 223 | .setUserId(0L).setNickname("").setAvatar("").setOrderId(0L); | 224 | .setUserId(0L).setNickname("").setAvatar("").setOrderId(0L); |
| @@ -225,7 +226,5 @@ public interface CombinationActivityConvert { | @@ -225,7 +226,5 @@ public interface CombinationActivityConvert { | ||
| 225 | } | 226 | } |
| 226 | return createRecords; | 227 | return createRecords; |
| 227 | } | 228 | } |
| 228 | - @Mapping(target = "id", ignore = true) | ||
| 229 | - CombinationRecordDO convert5(CombinationRecordDO headRecord); | ||
| 230 | 229 | ||
| 231 | } | 230 | } |