From cc01f01a9ff12f4167d7d5d40bc3cff2ffb366c6 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期二, 15 十一月 2022 15:51:20 +0800 Subject: [PATCH] Excel数据操作 --- src/main/java/com/lf/server/controller/sys/UserController.java | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 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..3d9b40f 100644 --- a/src/main/java/com/lf/server/controller/sys/UserController.java +++ b/src/main/java/com/lf/server/controller/sys/UserController.java @@ -1,10 +1,11 @@ package com.lf.server.controller.sys; -import com.lf.server.aspect.SysLog; +import com.lf.server.annotation.SysLog; import com.lf.server.controller.all.BaseController; 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