| | |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserName(loginInfo.getString("userName")); |
| | | userDto.setPassword(loginInfo.getString("password")); |
| | | userDto = super.getForApi(pd,userDto,ServiceCodeConstant.SERVICE_CODE_USER_LOGIN,UserDto.class); |
| | | userDto = super.postForApi(pd,userDto,ServiceCodeConstant.SERVICE_CODE_USER_LOGIN,UserDto.class); |
| | | |
| | | if(userDto == null){ |
| | | responseEntity = new ResponseEntity<>("用户名或密码错误", HttpStatus.BAD_REQUEST); |
| | |
| | | UserDto tmpUserDto = super.getForApi(pd, userDto, ServiceCodeConstant.QUERY_USER_SECRET, UserDto.class); |
| | | |
| | | if(StringUtil.isEmpty(tmpUserDto.getKey())){ |
| | | tmpUserDto = super.postForApi(pd, tmpUserDto, ServiceCodeConstant.SERVICE_CODE_USER_LOGIN, UserDto.class); |
| | | String code = UUID.randomUUID().toString(); |
| | | CommonCache.setValue(code, openId, expireTime); |
| | | return ResultVo.redirectPage(errorUrl + "?code=" + code); |
| | | } |
| | | redirectUrl = redirectUrl + (redirectUrl.indexOf("?") > 0 ? "&key=" + tmpUserDto.getKey() : "?key=" + tmpUserDto.getKey()); |
| | | return ResultVo.redirectPage(redirectUrl); |