fix 会员门户端单点登录企业端
This commit is contained in:
+19
@@ -430,4 +430,23 @@ public class CompanyLoginController {
|
|||||||
return Result.OK("修改密码成功");
|
return Result.OK("修改密码成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据token获取用户信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getLoginUser/{token}")
|
||||||
|
public Result<JSONObject> getThirdLoginUser(@PathVariable("token") String token) {
|
||||||
|
Result<JSONObject> result = new Result<>();
|
||||||
|
String phone = JwtUtil.getUsername(token);
|
||||||
|
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(PayContactsManagement::getPhone, phone);
|
||||||
|
PayContactsManagement contactsManagement = payContactsManagementService.getOne(queryWrapper);
|
||||||
|
if (contactsManagement == null) {
|
||||||
|
result.error500("登录失败,账号或密码错误!");
|
||||||
|
baseCommonService.addLog("用户登录失败,用户不存在!", CommonConstant.LOG_TYPE_1, null);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
userInfo(contactsManagement, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user