Jelajahi Sumber

调整普通公司员工权限

baihe 1 tahun lalu
induk
melakukan
16673c8c03

+ 3 - 1
component-springboot/src/main/java/com/gihon/component/rbac/controller/UserController.java

@@ -34,6 +34,9 @@ public class UserController {
     @ApiOperation("USER:用户列表")
     @GetMapping("list")
     public Response<PageBean<GihonUser>> list(@Validated UserListReq search) {
+        if (search.getCompanyId() == null) {
+            search.setCompanyId(AuthUtils.getCompanyId());
+        }
         IPage<GihonUser> list = gihonUserService.getUserlistPage(search);
         return Response.okPage(list);
     }
@@ -57,7 +60,6 @@ public class UserController {
     public Response<GihonUser> user(@Validated @PathVariable Long id) {
         return Response.ok(gihonUserService.getById(id));
     }
-    
 
     @ApiOperation("USER:新增")
     @PostMapping("")