管道基础大数据平台系统开发-【后端】-Server
q
13693261870
2022-10-17 5dd2d665b8352cef2f14ba8fa1220a94d2467cd8
q
已修改1个文件
21 ■■■■■ 文件已修改
src/main/java/com/lf/server/controller/sys/UserController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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() {