管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-12-26 73bdda075ce2b432cd83a32dc20c26017342c012
src/main/java/com/lf/server/controller/sys/UserController.java
@@ -3,6 +3,7 @@
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.RoleEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.entity.ctrl.UserUpdateEntity;
import com.lf.server.helper.StringHelper;
@@ -233,6 +234,26 @@
    }
    @SysLog()
    @ApiOperation(value = "根据用户ID查询角色")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "用户ID", dataType = "Integer", paramType = "query", example = "1")
    })
    @GetMapping(value = "/selectRoleByUserId")
    public ResponseMsg<Object> selectRoleByUserId(Integer id) {
        try {
            if (null == id || id < 1) {
                return fail("用户ID不能为空或小于1", false);
            }
            List<RoleEntity> rs = userService.selectRoleByUserId(id);
            return success(rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), false);
        }
    }
    @SysLog()
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "com.lf.server.entity.data.UserEntity", paramType = "body", example = "")