yujian
2019-06-26 020d940ae4e16f55f69cef3dd4c8dc0b9764af07
邀请对应奖励红包加入版本区分
5个文件已修改
30 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoExtraService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/InviteGetMoneyController.java
@@ -257,7 +257,7 @@
                return;
            }
            String newCode = userInfoExtraService.activateInviteCode(uid, inviteCode);
            String newCode = userInfoExtraService.activateInviteCode(uid, inviteCode, acceptData.getPlatform(), acceptData.getVersion());
            if (newCode == null || newCode.trim().length() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("激活失败"));
                return;
@@ -287,7 +287,7 @@
    @RequestMapping(value = "activationInviteWX")
    public void activationInviteWX(AcceptData acceptData, Long uid, String  code, PrintWriter out) {
        try {
            userInfoExtraService.activationInviteWX(uid, code);
            userInfoExtraService.activationInviteWX(uid, code, acceptData.getPlatform(), acceptData.getVersion());
            out.print(JsonUtil.loadTrueResult("邀请码激活成功"));
        } catch (UserInfoExtraException e) {
            out.print(JsonUtil.loadFalseResult(e.getMsg()));
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java
@@ -26,6 +26,7 @@
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.cmq.ThreeSaleCMQManager;
import net.sf.json.JSONArray;
@@ -482,7 +483,7 @@
    @Override
    @Transactional
    public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter) throws ThreeSaleException {
    public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter, String platform, String version) throws ThreeSaleException {
        if (invitee == null || inviter == null) 
            throw new ThreeSaleException(1, "用户信息为空");
@@ -526,6 +527,7 @@
        // 邀请消息
        userInviteMsgNotificationService.inviteSuccess(inviter.getId(), threeSale);
        
        if (VersionUtil.greaterThan_1_5_60(platform, version)) {
        // 奖励淘礼金红包
        try {
            String inviteName= invitee.getNickName();
@@ -540,10 +542,11 @@
            LogHelper.errorDetailInfo(e);
        }
    }
    }
    @Override
    @Transactional
    public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld) throws ThreeSaleException {
    public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld, String platform, String version) throws ThreeSaleException {
        if (invitee == null || (inviterId == null && threeSaleOld == null))
            throw new ThreeSaleException(1, "用户信息为空");
@@ -593,6 +596,7 @@
        // 邀请消息
        userInviteMsgNotificationService.inviteSuccess(threeSale.getBoss().getId(), threeSale);
        
        if (VersionUtil.greaterThan_1_5_60(platform, version)) {
        // 奖励淘礼金红包
        try {
            String inviteName= invitee.getNickName();
@@ -606,6 +610,8 @@
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
        }
        
    }
    
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoExtraServiceImpl.java
@@ -322,7 +322,7 @@
    }
    
    @Override
    public String activateInviteCode(Long uid, String inviteCode) throws UserInfoExtraException{
    public String activateInviteCode(Long uid, String inviteCode, String platform, String version) throws UserInfoExtraException{
        if (uid == null || inviteCode == null) {
            throw new UserInfoExtraException(1, "用户id、邀请码不能为空");
        }
@@ -349,7 +349,7 @@
        
        // 绑定关系
        try {
            threeSaleSerivce.bindRelationshipByInviteCode(invitee, inviter);
            threeSaleSerivce.bindRelationshipByInviteCode(invitee, inviter, platform, version);
        } catch (ThreeSaleException e) {
            try {
                LogHelper.errorDetailInfo(e);
@@ -384,7 +384,7 @@
    
    
    @Override
    public void activationInviteWX(Long uid, String code) throws UserInfoExtraException{
    public void activationInviteWX(Long uid, String code, String platform, String version) throws UserInfoExtraException{
        if (uid == null || code == null) {
            throw new UserInfoExtraException(1, "激活信息不完整");
        }
@@ -465,7 +465,7 @@
        
        // 绑定关系
        try {
            threeSaleSerivce.bindRelationshipByWX(invitee, inviterId, threeSale);
            threeSaleSerivce.bindRelationshipByWX(invitee, inviterId, threeSale, platform, version);
        } catch (ThreeSaleException e) {
            try {
                LogHelper.errorDetailInfo(e);
fanli/src/main/java/com/yeshi/fanli/service/inter/hongbao/ThreeSaleSerivce.java
@@ -219,7 +219,7 @@
     * @param inviter
     * @throws ThreeSaleException
     */
    public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter) throws ThreeSaleException;
    public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter, String platform, String version) throws ThreeSaleException;
    /**
     * 统计邀请成功队员数量
@@ -244,7 +244,7 @@
     * @param threeSaleOld
     * @throws ThreeSaleException
     */
    public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld) throws ThreeSaleException;
    public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld, String platform, String version) throws ThreeSaleException;
    
    /**
    * 根据下级查找对象
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserInfoExtraService.java
@@ -45,7 +45,7 @@
     * @return
     * @throws UserInfoExtraException
     */
    public String activateInviteCode(Long uid, String inviteCode) throws UserInfoExtraException;
    public String activateInviteCode(Long uid, String inviteCode, String platform, String version) throws UserInfoExtraException;
    /**
     * 获取用户附加信息
@@ -80,7 +80,7 @@
     * @param code
     * @throws UserInfoExtraException
     */
    public void activationInviteWX(Long uid, String code) throws UserInfoExtraException;
    public void activationInviteWX(Long uid, String code, String platform, String version) throws UserInfoExtraException;
    /**
     * 判断是否是新用户