|
|
@@ -50,8 +50,6 @@ import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.bef
|
|
|
import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.*;
|
|
|
import static cn.iocoder.yudao.module.promotion.enums.MessageTemplateConstants.COMBINATION_SUCCESS;
|
|
|
|
|
|
-// TODO 芋艿:等拼团记录做完,完整 review 下
|
|
|
-
|
|
|
/**
|
|
|
* 拼团记录 Service 实现类
|
|
|
*
|
|
|
@@ -167,7 +165,6 @@ public class CombinationRecordServiceImpl implements CombinationRecordService {
|
|
|
ProductSpuRespDTO spu = productSpuApi.getSpu(reqDTO.getSpuId());
|
|
|
ProductSkuRespDTO sku = productSkuApi.getSku(reqDTO.getSkuId());
|
|
|
CombinationRecordDO record = CombinationActivityConvert.INSTANCE.convert(reqDTO, keyValue.getKey(), user, spu, sku);
|
|
|
- record.setPicUrl(spu.getPicUrl()); // fix:拼团记录创建时,需要设置拼团商品的图片
|
|
|
// 2.1. 如果是团长需要设置 headId 为 CombinationRecordDO#HEAD_ID_GROUP
|
|
|
if (record.getHeadId() == null) {
|
|
|
record.setStartTime(LocalDateTime.now())
|
|
|
@@ -220,9 +217,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService {
|
|
|
|
|
|
// 3. 拼团成功发送订阅消息
|
|
|
if (updateSuccess && isFull) {
|
|
|
- records.forEach(item -> {
|
|
|
- getSelf().sendCombinationResultMessage(item);
|
|
|
- });
|
|
|
+ records.forEach(item -> getSelf().sendCombinationResultMessage(item));
|
|
|
}
|
|
|
}
|
|
|
|