生日有礼修改

This commit is contained in:
张松 2025-10-16 14:22:37 +08:00
parent 9000ee1a22
commit 1d1f271388
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ public class BirthdayGiftTask {
/**
* 生日有礼奖励发放
*/
// @Scheduled(cron = "0 0 12 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
public void deliver() {
birthdayGiftService.deliver();
}

View File

@ -174,9 +174,9 @@ public class MkBirthdayGiftServiceImpl extends ServiceImpl<MkBirthdayGiftMapper,
TableValueConstant.BirthdayGiftRecord.PushStatus.WAIT_PUSH.getCode() : TableValueConstant.BirthdayGiftRecord.PushStatus.NO_PUSH.getCode())
.setMainShopId(birthdayGift.getMainShopId()).setBirthday(DateUtil.parseDate(shopUser.getBirthDay()).toLocalDateTime().toLocalDate())
.setSourceId(birthdayGift.getId()).setTemplateCode(shopTemplate.getTemplateCode()).setTemplateContent(JSONObject.toJSONString(Map.of(
"nickName", shopUser.getNickName(),
"shopName", shopInfo.getShopName(),
"num", config.getCouponInfoList() != null ? config.getCouponInfoList().stream().map(CouponInfoDTO::getNum).reduce(0, Integer::sum) : 0
"用户昵称", shopUser.getNickName(),
"店铺名称", shopInfo.getShopName(),
"数量", config.getCouponInfoList() != null ? config.getCouponInfoList().stream().map(CouponInfoDTO::getNum).reduce(0, Integer::sum) : 0
)));
birthdayGiftRecordService.save(giftRecord);
rabbitPublisher.sendBirthdayGiftSmsMsg(giftRecord.getId().toString());