补充消息推送
This commit is contained in:
@@ -46,6 +46,9 @@ public class MemberProductService {
|
||||
@Autowired
|
||||
private MemberGrantService memberGrantService;
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Autowired
|
||||
private WxNativePayAbility wxNativePayAbility;
|
||||
|
||||
@@ -149,6 +152,7 @@ public class MemberProductService {
|
||||
// 查商品拿 durationDays,发放会员权益
|
||||
MemberProduct product = memberProductMapper.selectById(order.getProductId());
|
||||
memberGrantService.grant(order.getUserId(), product.getDurationDays());
|
||||
messageService.sendToUser(3, order.getUserId(), "会员购买成功", "您已成功购买会员," + product.getDurationDays() + "天会员权益已到账", "memberOrder", order.getId());
|
||||
|
||||
log.info("会员支付成功处理完成 orderNo:{} userId:{} durationDays:{}", orderNo, order.getUserId(), product.getDurationDays());
|
||||
}
|
||||
|
||||
@@ -52,6 +52,9 @@ public class UserRegisterService {
|
||||
@Autowired
|
||||
private MemberGrantService memberGrantService;
|
||||
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Value("${app.reward.register-days:3}")
|
||||
private int registerDays;
|
||||
|
||||
@@ -85,6 +88,7 @@ public class UserRegisterService {
|
||||
|
||||
// 发放新用户注册会员权益
|
||||
memberGrantService.grant(user.getId(), registerDays);
|
||||
messageService.sendToUser(1, user.getId(), "欢迎加入OfferPie", "注册成功,已赠送您" + registerDays + "天会员权益,快来体验AI求职助手吧!", null, null);
|
||||
|
||||
return user;
|
||||
}
|
||||
@@ -118,6 +122,7 @@ public class UserRegisterService {
|
||||
|
||||
// 发放邀请人会员权益
|
||||
memberGrantService.grant(inviter.getId(), inviteDays);
|
||||
messageService.sendToUser(1, inviter.getId(), "邀请奖励到账", "您邀请的好友已成功注册," + inviteDays + "天会员权益已到账", null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user