|
@@ -3,18 +3,15 @@ package com.ruixuan.web.controller.system;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
+
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import com.ruixuan.common.annotation.Log;
|
|
import com.ruixuan.common.annotation.Log;
|
|
import com.ruixuan.common.constant.UserConstants;
|
|
import com.ruixuan.common.constant.UserConstants;
|
|
@@ -36,6 +33,7 @@ import com.ruixuan.system.service.ISysUserService;
|
|
*
|
|
*
|
|
* @author ruixuan
|
|
* @author ruixuan
|
|
*/
|
|
*/
|
|
|
|
+@Api(tags = "系统设置-用户",description = "system-user")
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/system/user")
|
|
@RequestMapping("/system/user")
|
|
public class SysUserController extends BaseController
|
|
public class SysUserController extends BaseController
|
|
@@ -234,4 +232,22 @@ public class SysUserController extends BaseController
|
|
userService.insertUserAuth(userId, roleIds);
|
|
userService.insertUserAuth(userId, roleIds);
|
|
return success();
|
|
return success();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "根据用户id查询用户以及角色信息",notes = "根据用户id查询用户以及角色信息")
|
|
|
|
+ @GetMapping("/getUserRoleByUserId")
|
|
|
|
+ public AjaxResult getUserRoleByUserId( @ApiParam("用户id") @RequestParam(value = "userId") Long userId) {
|
|
|
|
+ return AjaxResult.success("查询成功",userService.getUserRoleByUserId(userId));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "根据角色名称查询用户信息",notes = "根据角色名称查询用户信息")
|
|
|
|
+ @GetMapping("/getUserByRoleName")
|
|
|
|
+ public AjaxResult getUserByRoleName( @ApiParam("角色名称") @RequestParam(value = "roleName") String roleName) {
|
|
|
|
+ return AjaxResult.success("查询成功",userService.getUserByRoleName(roleName));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|