Commit 1285acc49e036580b840f89166dfd8dfa47b87b2
1 parent
a2e9ecce
【功能优化】商城: 虚拟成团创建团成员时设置团长 ID
Showing
2 changed files
with
2 additions
and
2 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java
| ... | ... | @@ -217,7 +217,7 @@ public interface CombinationActivityConvert { |
| 217 | 217 | List<CombinationRecordDO> createRecords = new ArrayList<>(count); |
| 218 | 218 | for (int i = 0; i < count; i++) { |
| 219 | 219 | // 基础信息和团长保持一致 |
| 220 | - CombinationRecordDO newRecord = convert5(headRecord); | |
| 220 | + CombinationRecordDO newRecord = convert5(headRecord).setHeadId(headRecord.getId()); | |
| 221 | 221 | // 虚拟信息 |
| 222 | 222 | newRecord.setCount(0) // 会单独更新下,在后续的 Service 逻辑里 |
| 223 | 223 | .setUserId(0L).setNickname("").setAvatar("").setOrderId(0L); | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationRecordServiceImpl.java
| ... | ... | @@ -375,7 +375,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService { |
| 375 | 375 | CombinationRecordDO updateRecord = new CombinationRecordDO().setId(item.getId()) |
| 376 | 376 | .setStatus(status.getStatus()).setEndTime(now); |
| 377 | 377 | if (CombinationRecordStatusEnum.isSuccess(status.getStatus())) { // 虚拟成团完事更改状态成功后还需要把参与人数修改为成团需要人数 |
| 378 | - updateRecord.setUserCount(updateRecord.getUserSize()); | |
| 378 | + updateRecord.setUserCount(records.size()); | |
| 379 | 379 | } |
| 380 | 380 | updateRecords.add(updateRecord); |
| 381 | 381 | }); | ... | ... |