admin
2022-05-06 8cc3c660bdaaaa6a46eecadb78e4e9c17a07c227
app/src/main/java/com/yeshi/makemoney/app/controller/client/api/UserController.java
@@ -206,23 +206,23 @@
    @UserLogin(uid = "#uid")
    @ResponseBody
    @RequestMapping("unRegister")
    public String unRegister(AcceptData acceptData, String vcode, String phone) {
    public String unRegister(AcceptData acceptData, Long uid) {
        if (StringUtil.isNullOrEmpty(vcode)) {
            return JsonUtil.loadFalseResult("验证码不能为空");
        }
//        if (StringUtil.isNullOrEmpty(vcode)) {
//            return JsonUtil.loadFalseResult("验证码不能为空");
//        }
//
//        if (StringUtil.isNullOrEmpty(phone)) {
//            return JsonUtil.loadFalseResult("手机号不能为空");
//        }
//
//        if (!verifyCodeManager.isPhoneCodeRight(acceptData.getSystem(), phone, vcode)) {
//            return JsonUtil.loadFalseResult("验证码错误");
//        }
        if (StringUtil.isNullOrEmpty(phone)) {
            return JsonUtil.loadFalseResult("手机号不能为空");
        }
        if (!verifyCodeManager.isPhoneCodeRight(acceptData.getSystem(), phone, vcode)) {
            return JsonUtil.loadFalseResult("验证码错误");
        }
        UserInfo user = userInfoService.selectValidByPhone(acceptData.getSystem(), phone);
        UserInfo user = userInfoService.getAvaiableUser(uid);
        if (user == null) {
            return JsonUtil.loadFalseResult("不存在绑定该手机号的用户");
            return JsonUtil.loadFalseResult("用户不存在或用户已被封禁");
        }
        //注销
        userAccountService.unRegister(user.getId());
@@ -318,11 +318,10 @@
            pushManager.saveToken(acceptData, uid, regId);
            return JsonUtil.loadTrueResult("");
        } catch (BPushDeviceTokenException e) {
            return JsonUtil.loadTrueResult("业务出错");
            return JsonUtil.loadFalseResult(e.getCode(), "业务出错");
        } catch (ParamsException e) {
            return JsonUtil.loadTrueResult("参数错误");
            return JsonUtil.loadFalseResult(e.getCode(), "参数错误");
        }
    }
    /**