TRX 1 год назад
Родитель
Сommit
9153915bd5

+ 15 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/org/DepartmentController.java

@@ -1,5 +1,6 @@
 package com.zhongshu.card.server.core.controller.org;
 
+import com.github.microservice.auth.client.constant.AuthConstant;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.card.client.model.base.IDParam;
@@ -23,6 +24,20 @@ public class DepartmentController {
     @Autowired
     private DepartmentService departmentService;
 
+    @ResourceAuth(value = "departmentManager", type = AuthType.Platform, remark = "部门管理_部门列表_1_Menu")
+    @ResourceAuth(value = "departmentManager", type = AuthType.Project, remark = "部门管理_部门列表_1_Menu")
+    @ResourceAuth(value = "departmentManager", type = AuthType.School, remark = "部门管理_部门列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "部门管理_部门列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "部门管理_部门列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "部门管理_部门列表_1_Menu")
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "得到机构部门树-通用", description = "得到机构部门树")
+    @RequestMapping(value = "getDepartmentManagerTree", method = {RequestMethod.POST})
+    public ResultContent getDepartmentManagerTree(@RequestBody OidModel param) {
+        return this.departmentService.getDepartmentTree(param.getOid());
+    }
+
+
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "添加-编辑部门-通用", description = "添加-编辑部门")
     @RequestMapping(value = "addDepartment", method = {RequestMethod.POST})

+ 15 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/org/RegionController.java

@@ -25,6 +25,21 @@ public class RegionController {
     @Autowired
     RegionService regionService;
 
+    @ResourceAuth(value = "regionManager", type = AuthType.Platform, remark = "区域管理_区域管理_1_Menu")
+    @ResourceAuth(value = "regionManager", type = AuthType.Project, remark = "区域管理_区域管理_1_Menu")
+    @ResourceAuth(value = "regionManager", type = AuthType.School, remark = "区域管理_区域管理_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "区域管理_区域管理_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "区域管理_区域管理_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "区域管理_区域管理_1_Menu")
+    @Operation(summary = "获取地区数据")
+    @RequestMapping(value = "getRegionManager", method = RequestMethod.POST)
+    @ResourceAuth(value = AuthConstant.User, type = AuthType.User)
+    public ResultContent<List<RegionModel>> getRegionManager(
+            @RequestBody @Validated RegionModel regionModel) {
+        return regionService.getRegion(regionModel);
+    }
+
+
     @Operation(summary = "获取地区数据")
     @RequestMapping(value = "getRegion", method = RequestMethod.POST)
     @ResourceAuth(value = AuthConstant.User, type = AuthType.User)

+ 4 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/org/RoleController.java

@@ -1,5 +1,6 @@
 package com.zhongshu.card.server.core.controller.org;
 
+import com.github.microservice.auth.client.constant.AuthConstant;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.card.client.model.base.IDParam;
@@ -41,6 +42,9 @@ public class RoleController {
     @ResourceAuth(value = "roleList", type = AuthType.Platform, remark = "角色管理_角色列表_1_Menu")
     @ResourceAuth(value = "roleList", type = AuthType.Project, remark = "角色管理_角色列表_1_Menu")
     @ResourceAuth(value = "roleList", type = AuthType.School, remark = "角色管理_角色列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "角色管理_角色列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "角色管理_角色列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "角色管理_角色列表_1_Menu")
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "角色列表-分页查询", description = "角色列表-分页查询")
     @RequestMapping(value = {"page"}, method = {RequestMethod.POST})

+ 16 - 9
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/school/DeviceBindController.java

@@ -1,5 +1,6 @@
 package com.zhongshu.card.server.core.controller.school;
 
+import com.github.microservice.auth.client.constant.AuthConstant;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.card.client.model.base.IDParam;
@@ -31,6 +32,21 @@ public class DeviceBindController {
 
     //----------------------------设备基础信息 start------------------------
 
+    @ResourceAuth(value = "deviceManager", type = AuthType.Platform, remark = "设备管理_设备列表_1_Menu")
+    @ResourceAuth(value = "deviceManager", type = AuthType.Project, remark = "设备管理_设备列表_1_Menu")
+    @ResourceAuth(value = "deviceManager", type = AuthType.School, remark = "设备管理_设备列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "设备管理_设备列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "设备管理_设备列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "设备管理_设备列表_1_Menu")
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "设备列表-分页查询", description = "设备列表-分页查询")
+    @RequestMapping(value = {"page"}, method = {RequestMethod.POST})
+    public ResultContent<Page<DeviceBindModel>> page(
+            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) DeviceBindSearch param) {
+        return deviceBindService.page(param, pageable);
+    }
+
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "根据数据ID 设备详情", description = "根据数据ID 设备详情")
     @RequestMapping(value = "getDetailById", method = {RequestMethod.POST})
@@ -52,15 +68,6 @@ public class DeviceBindController {
         return this.deviceBindService.deleteById(param.getId());
     }
 
-    @ResourceAuth(value = "user", type = AuthType.User)
-    @Operation(summary = "设备列表-分页查询", description = "设备列表-分页查询")
-    @RequestMapping(value = {"page"}, method = {RequestMethod.POST})
-    public ResultContent<Page<DeviceBindModel>> page(
-            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
-            @Parameter(required = false) DeviceBindSearch param) {
-        return deviceBindService.page(param, pageable);
-    }
-
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "用户所在的商户设备列表-分页查询", description = "用户所在的商户设备列表-分页查询")
     @RequestMapping(value = {"busDevicePage"}, method = {RequestMethod.POST})

+ 42 - 16
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/school/DictInfoController.java

@@ -1,5 +1,6 @@
 package com.zhongshu.card.server.core.controller.school;
 
+import com.github.microservice.auth.client.constant.AuthConstant;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.card.client.model.base.IDParam;
@@ -8,6 +9,7 @@ import com.github.microservice.net.ResultContent;
 import com.zhongshu.card.client.service.school.BookInfoService;
 import com.zhongshu.card.client.service.school.DictInfoService;
 import com.zhongshu.card.client.service.school.NoticeInfoService;
+import com.zhongshu.card.client.type.DictInfoType;
 import com.zhongshu.card.server.core.service.org.RoleServiceImpl;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
@@ -35,16 +37,49 @@ import java.util.List;
 public class DictInfoController {
 
     @Autowired
-    RoleServiceImpl roleService;
+    DictInfoService dictInfoService;
 
-    @Autowired
-    NoticeInfoService noticeInfoService;
+    @ResourceAuth(value = "areaManager", type = AuthType.Platform, remark = "区域类型_区域类型_1_Menu")
+    @ResourceAuth(value = "areaManager", type = AuthType.Project, remark = "区域类型_区域类型_1_Menu")
+    @ResourceAuth(value = "areaManager", type = AuthType.School, remark = "区域类型_区域类型_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "区域类型_区域类型_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "区域类型_区域类型_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "区域类型_区域类型_1_Menu")
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "区域列表-分页查询", description = "区域列表-分页查询")
+    @RequestMapping(value = {"areaPageManager"}, method = {RequestMethod.POST})
+    public ResultContent<Page<DictInfoParam>> areaPageManager(
+            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) DictInfoSearch param) {
+        param.setDictInfoType(DictInfoType.AreaType);
+        return dictInfoService.page(param, pageable);
+    }
 
-    @Autowired
-    BookInfoService bookInfoService;
+    @ResourceAuth(value = "positionManager", type = AuthType.Platform, remark = "人员职位_人员职位_1_Menu")
+    @ResourceAuth(value = "positionManager", type = AuthType.Project, remark = "人员职位_人员职位_1_Menu")
+    @ResourceAuth(value = "positionManager", type = AuthType.School, remark = "人员职位_人员职位_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "人员职位_人员职位_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "人员职位_人员职位_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "人员职位_人员职位_1_Menu")
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "人员职位列表-分页查询", description = "人员职位列表-分页查询")
+    @RequestMapping(value = {"positionPageManager"}, method = {RequestMethod.POST})
+    public ResultContent<Page<DictInfoParam>> positionPageManager(
+            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) DictInfoSearch param) {
+        param.setDictInfoType(DictInfoType.Position);
+        return dictInfoService.page(param, pageable);
+    }
 
-    @Autowired
-    DictInfoService dictInfoService;
+
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "字典列表-分页查询", description = "字典列表-分页查询")
+    @RequestMapping(value = {"page"}, method = {RequestMethod.POST})
+    public ResultContent<Page<DictInfoParam>> page(
+            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) DictInfoSearch param) {
+        return dictInfoService.page(param, pageable);
+    }
 
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "添加-编辑字典", description = "添加-编辑字典")
@@ -67,15 +102,6 @@ public class DictInfoController {
         return this.dictInfoService.getDictInfo(param.getId());
     }
 
-    @ResourceAuth(value = "user", type = AuthType.User)
-    @Operation(summary = "字典列表-分页查询", description = "字典列表-分页查询")
-    @RequestMapping(value = {"page"}, method = {RequestMethod.POST})
-    public ResultContent<Page<DictInfoParam>> page(
-            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
-            @Parameter(required = false) DictInfoSearch param) {
-        return dictInfoService.page(param, pageable);
-    }
-
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "查询字典所有的数据", description = "查询字典所有的数据")
     @RequestMapping(value = {"findDictInfosByOid"}, method = {RequestMethod.POST})

+ 25 - 9
FullCardServer/src/main/java/com/zhongshu/card/server/core/controller/school/SchoolUserController.java

@@ -1,5 +1,6 @@
 package com.zhongshu.card.server.core.controller.school;
 
+import com.github.microservice.auth.client.constant.AuthConstant;
 import com.github.microservice.auth.security.annotations.ResourceAuth;
 import com.github.microservice.auth.security.type.AuthType;
 import com.zhongshu.card.client.model.base.IDParam;
@@ -43,6 +44,30 @@ public class SchoolUserController {
     @Autowired
     UserAccountService userAccountService;
 
+    @ResourceAuth(value = "schoolUserManager", type = AuthType.Platform, remark = "人员管理_人员列表_1_Menu")
+    @ResourceAuth(value = "schoolUserManager", type = AuthType.Project, remark = "人员管理_人员列表_1_Menu")
+    @ResourceAuth(value = "schoolUserManager", type = AuthType.School, remark = "人员管理_人员列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.SuperAdmin, type = AuthType.Platform, remark = "人员管理_人员列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.Project, remark = "人员管理_人员列表_1_Menu")
+    @ResourceAuth(value = AuthConstant.Admin, type = AuthType.School, remark = "人员管理_人员列表_1_Menu")
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "人员列表-分页查询", description = "人员列表-分页查询")
+    @RequestMapping(value = {"pageOrgUserManager"}, method = {RequestMethod.POST})
+    public ResultContent<Page<OrganizationUserModel>> pageOrgUserManager(
+            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) OrganizationUserSearch param) {
+        return userAccountService.pageOrgUser(param, pageable);
+    }
+
+    @ResourceAuth(value = "user", type = AuthType.User)
+    @Operation(summary = "人员列表-分页查询", description = "人员列表-分页查询")
+    @RequestMapping(value = {"pageOrgUser"}, method = {RequestMethod.POST})
+    public ResultContent<Page<OrganizationUserModel>> page(
+            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
+            @Parameter(required = false) OrganizationUserSearch param) {
+        return userAccountService.pageOrgUser(param, pageable);
+    }
+
     @Operation(summary = "注册用户c端用户(包含卡片信息)", description = "注册用户c端用户")
     @RequestMapping(value = {"registerUser"}, method = {RequestMethod.POST})
     public ResultContent<SchoolUserModel> registerUser(@RequestBody RegisterUserParam param) {
@@ -70,15 +95,6 @@ public class SchoolUserController {
         schoolUserService.exportSchoolUser(request, response, param);
     }
 
-    @ResourceAuth(value = "user", type = AuthType.User)
-    @Operation(summary = "人员列表-分页查询", description = "人员列表-分页查询")
-    @RequestMapping(value = {"pageOrgUser"}, method = {RequestMethod.POST})
-    public ResultContent<Page<OrganizationUserModel>> page(
-            @Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
-            @Parameter(required = false) OrganizationUserSearch param) {
-        return userAccountService.pageOrgUser(param, pageable);
-    }
-
     @ResourceAuth(value = "user", type = AuthType.User)
     @Operation(summary = "添加-编辑校园端用户(包含卡片信息)", description = "添加-编辑校园端用户")
     @RequestMapping(value = {"addOrUpdateSchoolUser"}, method = {RequestMethod.POST})