| | |
| | | R r = userService.getMcsUserByOpenId(openid); |
| | | if (R.isOk(r) && nonNull(r.getData())) { |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | return tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword()); |
| | | return tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword(), this.getAppId()); |
| | | } |
| | | LoginReturnVO loginReturnVO = new LoginReturnVO(); |
| | | loginReturnVO.setOpenId(openid); |
| | |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | isValid = loginUserInfoVO.getStatus() == 1; |
| | | if (isValid) { |
| | | R result = tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword()); |
| | | R result = tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword(), this.getAppId()); |
| | | return result; |
| | | } else { |
| | | return R.fail("账号被禁用"); |
| | |
| | | throw new ServiceException("登录错误超过限制,请五分钟后重试"); |
| | | } |
| | | } |
| | | R result = tokenService.loginMcsUser(account, password); |
| | | R result = tokenService.loginMcsUser(account, password, this.getAppId()); |
| | | return result; |
| | | } else { |
| | | return R.fail("账号被禁用"); |
| | |
| | | McsLoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(JSONObject.toJSONString(r.getData()), McsLoginUserInfoVO.class); |
| | | isValid = loginUserInfoVO.getStatus() == 1; |
| | | if (isValid) { |
| | | R result = tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword()); |
| | | R result = tokenService.loginMcsUser(loginUserInfoVO.getAccount(), loginUserInfoVO.getPlaintextPassword(), this.getAppId()); |
| | | return result; |
| | | } else { |
| | | return R.fail("账号被禁用"); |