新增:其他客户端获取登录用户信息(post方式)
This commit is contained in:
@@ -29,6 +29,7 @@ import com.gxwebsoft.common.system.mapper.CompanyMapper;
|
||||
import com.gxwebsoft.common.system.param.LoginParam;
|
||||
import com.gxwebsoft.common.system.param.SmsCaptchaParam;
|
||||
import com.gxwebsoft.common.system.param.UpdatePasswordParam;
|
||||
import com.gxwebsoft.common.system.param.UserParam;
|
||||
import com.gxwebsoft.common.system.result.CaptchaResult;
|
||||
import com.gxwebsoft.common.system.result.LoginResult;
|
||||
import com.gxwebsoft.common.system.service.*;
|
||||
@@ -359,6 +360,17 @@ public class MainController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("获取登录用户信息Authorities")
|
||||
@PostMapping("/auth/user")
|
||||
public ApiResult<User> userInfo(@RequestBody UserParam param) {
|
||||
// 登录账号|手机号码|邮箱登录
|
||||
User user = userService.getByUsername(param.getUsername(), param.getTenantId());
|
||||
if (user != null) {
|
||||
return success(user);
|
||||
}
|
||||
return fail("用户不存在", null);
|
||||
}
|
||||
|
||||
@ApiOperation("免密登录")
|
||||
@GetMapping("/token/{userId}/{accessKey}")
|
||||
public ApiResult<LoginResult> getToken(@PathVariable("userId") Integer userId, @PathVariable("accessKey") String accessKey) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# 端口
|
||||
server:
|
||||
port: 9090
|
||||
port: 9099
|
||||
# socketIo
|
||||
socketio:
|
||||
port: 9191
|
||||
port: 9199
|
||||
# 多环境配置
|
||||
spring:
|
||||
profiles:
|
||||
|
||||
Reference in New Issue
Block a user