mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-20 13:11:52 +08:00
【代码优化】SYSTEM:微信小程序的订阅
This commit is contained in:
@@ -44,7 +44,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.
|
||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.afterNow;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.beforeNow;
|
||||
import static cn.iocoder.yudao.module.promotion.enums.ErrorCodeConstants.*;
|
||||
import static cn.iocoder.yudao.module.promotion.enums.MessageTemplateConstants.COMBINATION_RESULT;
|
||||
import static cn.iocoder.yudao.module.promotion.enums.MessageTemplateConstants.COMBINATION_SUCCESS;
|
||||
|
||||
// TODO 芋艿:等拼团记录做完,完整 review 下
|
||||
|
||||
@@ -212,10 +212,10 @@ public class CombinationRecordServiceImpl implements CombinationRecordService {
|
||||
}
|
||||
updateRecords.add(updateRecord);
|
||||
});
|
||||
Boolean result = combinationRecordMapper.updateBatch(updateRecords);
|
||||
Boolean updateSuccess = combinationRecordMapper.updateBatch(updateRecords);
|
||||
|
||||
// 3. 拼团成功发送订阅消息
|
||||
if (result && isFull) {
|
||||
if (updateSuccess && isFull) {
|
||||
records.forEach(item -> {
|
||||
getSelf().sendCombinationResultMessage(item);
|
||||
});
|
||||
@@ -227,7 +227,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService {
|
||||
// 构建并发送模版消息
|
||||
socialClientApi.sendWxaSubscribeMessage(new SocialWxaSubscribeMessageSendReqDTO()
|
||||
.setUserId(record.getUserId()).setUserType(UserTypeEnum.MEMBER.getValue())
|
||||
.setTemplateTitle(COMBINATION_RESULT)
|
||||
.setTemplateTitle(COMBINATION_SUCCESS)
|
||||
.setPage("pages/order/detail?id=" + record.getOrderId()) // 订单详情页
|
||||
.addMessage("thing1", "商品拼团活动") // 活动标题
|
||||
.addMessage("thing2", "恭喜您拼团成功!我们将尽快为您发货。")); // 温馨提示
|
||||
|
Reference in New Issue
Block a user