新版仿ok交易所-后端
1
zj
20 hours ago 640ccb9229224642515527daf87f308a7aa9bdf4
trading-order-admin/src/main/java/com/yami/trading/admin/controller/user/UserDataController.java
@@ -85,24 +85,14 @@
    public Result update(@Valid @RequestBody UpdateUserModel model) {
        User user = userService.getById(model.getUserId());
        if (user == null) {
            throw new YamiShopBindException("参数错误!");
            throw new YamiShopBindException("Invalid parameters!");
        }
//        if (Constants.SECURITY_ROLE_AGENT.equals(user.getRoleName())||Constants.SECURITY_ROLE_AGENTLOW.equals(user.getRoleName())) {
//               &&user!=null&&!Constants.SECURITY_ROLE_GUEST.equals(user.getRolename())) {
//            if(!Constants.SECURITY_ROLE_GUEST.equals(user.getRoleName())) {
//                throw new YamiShopBindException("只能修改演示账户");
//            }
//            List<String> children = userRecomService.findChildren(sec.getPartyId());
//            if(!children.contains(partyId)) {
//                throw new YamiShopBindException("只能修改自己线下的用户演示账户");
//
//            }
//          }
        user.setEnabled(model.isEnabled());
        user.setRemarks(model.getRemarks());
        user.setStatus(model.isLoginAuthority()?1:0);
        user.setWithdrawAuthority(model.isWithdrawAuthority());
        user.setStatus(model.isLoginAuthority() ? 1 : 0);
        user.setCreditScore(model.getCreditScore());
        userService.updateById(user);
        return Result.ok(null);
    }