diff --git a/src/main/java/cn/com/tenlion/operator/service/UserRegisterService.java b/src/main/java/cn/com/tenlion/operator/service/UserRegisterService.java index fb9a13b..2d281dc 100644 --- a/src/main/java/cn/com/tenlion/operator/service/UserRegisterService.java +++ b/src/main/java/cn/com/tenlion/operator/service/UserRegisterService.java @@ -10,6 +10,8 @@ import cn.com.tenlion.operator.service.accountitem.IAccountItemService; import cn.com.tenlion.operator.service.user.custom.UserCustomService; import cn.com.tenlion.operator.service.user.expand.UserExpandServiceImpl; import cn.com.tenlion.operator.service.user.invite.UserInviteService; +import cn.com.tenlion.projectconfig.util.ProjectConfigUtil; +import com.alibaba.fastjson.JSONObject; import ink.wgink.exceptions.SaveException; import ink.wgink.interfaces.expand.register.IRegisterHandlerService; import ink.wgink.interfaces.expand.register.IRegisterWithExpandInfoHandlerService; @@ -87,6 +89,8 @@ public class UserRegisterService implements IRegisterHandlerService, IRegisterWi if (data != null) { Integer money = Integer.valueOf(data.get("money").toString()); String remark = data.get("remark").toString(); + JSONObject obj = JSONObject.parseObject(ProjectConfigUtil.getText("IndexInvitingNewcomers")); + String invitedTitle = obj.getString("invitedTitle"); String msg = ""; /** * 增加子账号 2025年3月13日17:02:07 @@ -101,10 +105,18 @@ public class UserRegisterService implements IRegisterHandlerService, IRegisterWi accountItemVO.setOrderId(userId); accountItemVO.setOrderType("Invite"); iAccountItemService.saveReturnId(accountItemVO); + // 4. 给被邀请人加钱 + AccountItemVO accountItemVO2 = new AccountItemVO(); + accountItemVO2.setMode(1); // 入账 + accountItemVO2.setType(AccountItemTypeEnum.PAYMENT_SPLIT.getValue()); // 收入类型 充值 | 分账入账 | 退款入账 + accountItemVO2.setAccountId(userId); + accountItemVO2.setAccountMoney(money); + accountItemVO2.setDescription(invitedTitle); + accountItemVO2.setOrderId(userId); + accountItemVO2.setOrderType("Invite"); + iAccountItemService.saveReturnId(accountItemVO2); } } - - } @Override