From dc59d63cfa8cac113c4834e6b7d90c0af61df31f Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 27 十月 2022 20:38:20 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/controller/sys/UserController.java | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/lf/server/controller/sys/UserController.java b/src/main/java/com/lf/server/controller/sys/UserController.java index 1c28601..415abd2 100644 --- a/src/main/java/com/lf/server/controller/sys/UserController.java +++ b/src/main/java/com/lf/server/controller/sys/UserController.java @@ -5,6 +5,7 @@ import com.lf.server.entity.all.ResponseMsg; import com.lf.server.entity.sys.UserEntity; import com.lf.server.entity.ctrl.UserUpdateEntity; +import com.lf.server.helper.StringHelper; import com.lf.server.service.sys.TokenService; import com.lf.server.service.sys.UserService; import io.swagger.annotations.Api; @@ -140,6 +141,26 @@ } @SysLog() + @ApiOperation(value = "鏍规嵁鐢ㄦ埛ID鏌ヨ") + @ApiImplicitParams({ + @ApiImplicitParam(name = "uid", value = "鐢ㄦ埛ID", dataType = "String", paramType = "query", example = "admin") + }) + @GetMapping(value = "/selectByUid") + public ResponseMsg<UserEntity> selectByUid(String uid) { + try { + if (StringHelper.isEmpty(uid)) { + fail("鐢ㄦ埛ID涓嶈兘涓虹┖", null); + } + + UserEntity userEntity = userService.selectByUid(uid); + + return success(userEntity); + } catch (Exception ex) { + return fail(ex.getMessage(), null); + } + } + + @SysLog() @ApiOperation(value = "鏌ヨ鎵�鏈�") @GetMapping(value = "/selectUserAll") public ResponseMsg<List<UserEntity>> selectUserAll() { @@ -196,7 +217,6 @@ if (str != null) { return fail(str, -1); } - if (ue != null) { entity.setCreateUser(ue.getId()); } -- Gitblit v1.9.3