|
@@ -641,7 +641,15 @@ public class InviteService {
|
|
|
userMapper.updateById(invitee);
|
|
userMapper.updateById(invitee);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 9. 绑定时不发放任何权益,奖励统一由被邀请人入驻审核通过后触发
|
|
|
|
|
|
|
+ // 9. 被邀请人已入驻审核通过 → 直接触发发奖(否则等后续入驻审核通过时触发)
|
|
|
|
|
+ com.xuekairui.user.entity.BusinessLicense license = businessLicenseService.getByUserId(inviteeId);
|
|
|
|
|
+ if (license != null && LicenseStatus.APPROVED.name().equals(license.getReviewStatus())) {
|
|
|
|
|
+ if (activityInviteGate != null) {
|
|
|
|
|
+ activityInviteGate.grantRewardForApprovedUser(inviterId, inviteeId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.warn("活动模块未加载,无法发放已入驻用户奖励: inviter={}, invitee={}", inviterId, inviteeId);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -752,7 +760,15 @@ public class InviteService {
|
|
|
user.setInviterId(inviterId);
|
|
user.setInviterId(inviterId);
|
|
|
userMapper.updateById(user);
|
|
userMapper.updateById(user);
|
|
|
|
|
|
|
|
- // 10. 绑定时不发放任何权益,奖励统一由被邀请人入驻审核通过后触发
|
|
|
|
|
|
|
+ // 10. 被邀请人已入驻审核通过 → 直接触发发奖(否则等后续入驻审核通过时触发)
|
|
|
|
|
+ com.xuekairui.user.entity.BusinessLicense license = businessLicenseService.getByUserId(userId);
|
|
|
|
|
+ if (license != null && LicenseStatus.APPROVED.name().equals(license.getReviewStatus())) {
|
|
|
|
|
+ if (activityInviteGate != null) {
|
|
|
|
|
+ activityInviteGate.grantRewardForApprovedUser(inviterId, userId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.warn("活动模块未加载,无法发放已入驻用户补填奖励: inviter={}, invitee={}", inviterId, userId);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
log.info("补填邀请码成功: invitee={}, inviter={}", userId, inviterId);
|
|
log.info("补填邀请码成功: invitee={}, inviter={}", userId, inviterId);
|
|
|
return "补填邀请码成功!";
|
|
return "补填邀请码成功!";
|