生日有礼修改
This commit is contained in:
@@ -31,7 +31,7 @@ public class BirthdayGiftTask {
|
|||||||
/**
|
/**
|
||||||
* 生日有礼奖励发放
|
* 生日有礼奖励发放
|
||||||
*/
|
*/
|
||||||
// @Scheduled(cron = "0 0 12 * * ?")
|
@Scheduled(cron = "0 0 0 * * ?")
|
||||||
public void deliver() {
|
public void deliver() {
|
||||||
birthdayGiftService.deliver();
|
birthdayGiftService.deliver();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,9 +174,9 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
|
|||||||
TableValueConstant.BirthdayGiftRecord.PushStatus.WAIT_PUSH.getCode() : TableValueConstant.BirthdayGiftRecord.PushStatus.NO_PUSH.getCode())
|
TableValueConstant.BirthdayGiftRecord.PushStatus.WAIT_PUSH.getCode() : TableValueConstant.BirthdayGiftRecord.PushStatus.NO_PUSH.getCode())
|
||||||
.setMainShopId(birthdayGift.getMainShopId()).setBirthday(DateUtil.parseDate(shopUser.getBirthDay()).toLocalDateTime().toLocalDate())
|
.setMainShopId(birthdayGift.getMainShopId()).setBirthday(DateUtil.parseDate(shopUser.getBirthDay()).toLocalDateTime().toLocalDate())
|
||||||
.setSourceId(birthdayGift.getId()).setTemplateCode(shopTemplate.getTemplateCode()).setTemplateContent(JSONObject.toJSONString(Map.of(
|
.setSourceId(birthdayGift.getId()).setTemplateCode(shopTemplate.getTemplateCode()).setTemplateContent(JSONObject.toJSONString(Map.of(
|
||||||
"nickName", shopUser.getNickName(),
|
"用户昵称", shopUser.getNickName(),
|
||||||
"shopName", shopInfo.getShopName(),
|
"店铺名称", shopInfo.getShopName(),
|
||||||
"num", config.getCouponInfoList() != null ? config.getCouponInfoList().stream().map(CouponInfoDTO::getNum).reduce(0, Integer::sum) : 0
|
"数量", config.getCouponInfoList() != null ? config.getCouponInfoList().stream().map(CouponInfoDTO::getNum).reduce(0, Integer::sum) : 0
|
||||||
)));
|
)));
|
||||||
birthdayGiftRecordService.save(giftRecord);
|
birthdayGiftRecordService.save(giftRecord);
|
||||||
rabbitPublisher.sendBirthdayGiftSmsMsg(giftRecord.getId().toString());
|
rabbitPublisher.sendBirthdayGiftSmsMsg(giftRecord.getId().toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user