新版仿ok交易所-后端
1
zj
yesterday f31fc9f42f78de0808e7f4bdc797c5e622df09e3
trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserRecomController.java
@@ -69,15 +69,15 @@
        model.setLoginSafeword(passwordManager.decryptPassword(model.getLoginSafeword()));
        SysUser sysUser = sysUserService.getSysUserById( SecurityUtils.getSysUser().getUserId());
        if(!passwordEncoder.matches(model.getLoginSafeword(), sysUser.getSafePassword())) {
            throw new YamiShopBindException("资金密码不正确!");
            throw new YamiShopBindException("Incorrect fund password!");
        }
       UserRecom userRecom= userRecomService.getById(model.getId());
        if (userRecom==null){
            throw  new YamiShopBindException("参数错误!");
            throw new YamiShopBindException("Invalid parameters!");
        }
        User user=userService.findUserByUserCode(model.getUserCode());
        if (user==null){
            throw new YamiShopBindException("推荐人UID错误");
            throw new YamiShopBindException("Invalid referrer UID");
        }
        userRecom.setRecomUserId(user.getUserId());
        userRecomService.updateById(userRecom);