/**
* 微信授权登录
*/
@PostMapping("/login")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "移动端登录", notes = "移动端登录")
public R login(@RequestBody AppUser appUser) {
R<UserInfo> r = userClient.userInfo(BladeConstant.ADMIN_TENANT_ID ,appUser.getAccount() ,UserEnum.APP.getName());
if(!r.isSuccess()){
return R.fail("获取用户信息失败");
}
UserInfo userInfo = r.getData();
if(userInfo == null || userInfo.getUser() == null){
return R.fail("用户不存在");
}
User user = userInfo.getUser();
Long id = user.getId();
String currentPwswd = user.getPassword();
if(currentPwswd == null || !currentPwswd.equals(DigestUtil.encrypt(appUser.getPassword()))){
return R.fail("密码错误");
}
Integer userType = user.getUserType();
if (userType!=2){
return R.fail("该用户不是app用户!");
}
CacheUtil.put(CacheN
还没有评论,来说两句吧...