自动生成配置文件和mapper xml

newBigdata
xiaoCJ 10 months ago
parent 3abd85cbb1
commit d349a2faa3

@ -70,7 +70,6 @@ public class UserController {
public ResultEntity login(@RequestParam(required = false) String passwordEncode,
@RequestParam(required = false) String userName,
HttpServletRequest request,
@RequestParam int roleId,
@RequestParam(required = false) String TOKEN) {
JwtUser jwtUser;
String passWord;
@ -97,9 +96,6 @@ public class UserController {
return new ResultEntity(HttpStatus.BAD_REQUEST, "密码错误");
}
StuUser user1 = stuUsers.get(0);
if (!Objects.equals(roleId, user1.getRoleId())) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "用户权限错误!");
} else {
// 保存用户的登录信息
Map<String, Object> map = new HashMap<>();
StuUser user = stuUsers.get(0);
@ -114,14 +110,9 @@ public class UserController {
map.put("logId", uuid);
map.put("token", token);
return new ResultEntity(HttpStatus.OK, map);
}
} else { // 2、智云单点登录
jwtUser = TokenProvider.getJWTUserByZhiYun(TOKEN);
int roleId1 = jwtUser.getRoleId();
if (!Objects.equals(roleId, roleId1)) {
return new ResultEntity(HttpStatus.BAD_REQUEST, "用户权限错误!");
}
jwtUser = TzApi.foreignExchangeTradingLogin(jwtUser.getUsername(), jwtUser.getPassword());
if (jwtUser == null) {
throw new UnAuthorizedException("用户名或密码错误");

Loading…
Cancel
Save