diff --git a/src/main/java/com/gxwebsoft/common/system/controller/MainController.java b/src/main/java/com/gxwebsoft/common/system/controller/MainController.java index e4bf617..b7913f1 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/MainController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/MainController.java @@ -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 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 getToken(@PathVariable("userId") Integer userId, @PathVariable("accessKey") String accessKey) { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 7659ea8..d584b5b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,9 +1,9 @@ # 端口 server: - port: 9090 + port: 9099 # socketIo socketio: - port: 9191 + port: 9199 # 多环境配置 spring: profiles: