mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
基础配置权限修改,禅道-模糊,工序Bug修改
This commit is contained in:
+8
-4
@@ -33,7 +33,8 @@ public class DeptController {
|
||||
|
||||
@PostMapping("create")
|
||||
@Operation(summary = "创建部门")
|
||||
@PreAuthorize("@ss.hasPermission('system:dept:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:dept:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:dept:create','base:dept:create')")
|
||||
public CommonResult<Long> createDept(@Valid @RequestBody DeptSaveReqVO createReqVO) {
|
||||
Long deptId = deptService.createDept(createReqVO);
|
||||
return success(deptId);
|
||||
@@ -41,7 +42,8 @@ public class DeptController {
|
||||
|
||||
@PutMapping("update")
|
||||
@Operation(summary = "更新部门")
|
||||
@PreAuthorize("@ss.hasPermission('system:dept:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:dept:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:dept:update','base:dept:update')")
|
||||
public CommonResult<Boolean> updateDept(@Valid @RequestBody DeptSaveReqVO updateReqVO) {
|
||||
deptService.updateDept(updateReqVO);
|
||||
return success(true);
|
||||
@@ -50,7 +52,8 @@ public class DeptController {
|
||||
@DeleteMapping("delete")
|
||||
@Operation(summary = "删除部门")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:dept:delete')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:dept:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:dept:delete','base:dept:delete')")
|
||||
public CommonResult<Boolean> deleteDept(@RequestParam("id") Long id) {
|
||||
deptService.deleteDept(id);
|
||||
return success(true);
|
||||
@@ -75,7 +78,8 @@ public class DeptController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得部门信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:dept:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:dept:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:dept:query','base:dept:query')")
|
||||
public CommonResult<DeptRespVO> getDept(@RequestParam("id") Long id) {
|
||||
DeptDO dept = deptService.getDept(id);
|
||||
return success(BeanUtils.toBean(dept, DeptRespVO.class));
|
||||
|
||||
+2
-2
@@ -87,7 +87,7 @@ public class LabelTemplateController {
|
||||
@GetMapping("/getDefault")
|
||||
@Operation(summary = "获得默认标签模板")
|
||||
@Parameter(name = "type", description = "标签类型", required = true, example = "1024")
|
||||
//@PreAuthorize("@ss.hasPermission('system:label-template:query')")
|
||||
@PreAuthorize("@ss.hasPermission('system:label-template:query')")
|
||||
@OperateLog(enable = false)
|
||||
public CommonResult<LabelTemplateRespVO> getDefaultLabelTemplate(@RequestParam("type") String type) {
|
||||
return success(labelTemplateService.getDefaultLabelTemplate(type));
|
||||
@@ -95,7 +95,7 @@ public class LabelTemplateController {
|
||||
|
||||
@GetMapping("/setDefaultTemplate")
|
||||
@Operation(summary = "设置默认标签模板")
|
||||
@PreAuthorize("@ss.hasPermission('system:label-template:query')")
|
||||
@PreAuthorize("@ss.hasPermission('system:label-template:update')")
|
||||
public CommonResult<Boolean> setDefaultTemplate(@RequestParam Long id) {
|
||||
return success(labelTemplateService.setDefaultTemplate(id));
|
||||
}
|
||||
|
||||
+4
-4
@@ -31,21 +31,21 @@ public class MachineAuthController {
|
||||
|
||||
@PostMapping("organ-auth")
|
||||
@Operation(summary = "组织机台授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-auth::update')")
|
||||
public CommonResult<Boolean> auth(@RequestBody MachineOrgAuthReq vo) {
|
||||
return success(machineService.auth(vo));
|
||||
}
|
||||
|
||||
@GetMapping("organ-page")
|
||||
@Operation(summary = "组织机台授权分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-auth::query')")
|
||||
public CommonResult<PageResult<OrganMachineResp>> organTemplatePage(OrganMachinePage page) {
|
||||
return success(machineService.organMachinePage(page));
|
||||
}
|
||||
|
||||
@GetMapping("organ-by-organId")
|
||||
@Operation(summary = "根据组织id查询组织机台授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-auth::query')")
|
||||
@Parameter(name = "organId", description = "组织id", required = true, example = "1")
|
||||
public CommonResult<OrganMachineResp> organTemplateByOrganId(@RequestParam Long organId ) {
|
||||
return success(machineService.organMachineByOrganId(organId));
|
||||
@@ -53,7 +53,7 @@ public class MachineAuthController {
|
||||
|
||||
@GetMapping("page-machine-auth")
|
||||
@Operation(summary = "授权机台分页")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-auth::query')")
|
||||
public CommonResult<PageResult<MachineAuthResp>> pageTemplateAuth(MachinePageReqVO pageParam) {
|
||||
PageResult<MachineDO> page = machineService.page(pageParam);
|
||||
List<MachineAuthResp> list = page.getList().stream().map(e->MachineAuthResp.builder()
|
||||
|
||||
+4
-4
@@ -30,21 +30,21 @@ public class MachineTemplateAuthController {
|
||||
|
||||
@PostMapping("organ-auth-template")
|
||||
@Operation(summary = "组织模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template-auth::update')")
|
||||
public CommonResult<Boolean> auth(@RequestBody MachineOrgAuthReq vo) {
|
||||
return success(machineTemplateService.auth(vo));
|
||||
}
|
||||
|
||||
@GetMapping("organ-template-page")
|
||||
@Operation(summary = "组织模板授权分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template-auth::query')")
|
||||
public CommonResult<PageResult<OrganTemplateResp>> organTemplatePage(OrganTemplatePage page) {
|
||||
return success(machineTemplateService.organTemplatePage(page));
|
||||
}
|
||||
|
||||
@GetMapping("organ-template-by-organId")
|
||||
@Operation(summary = "根据组织id查询组织模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template-auth:query')")
|
||||
@Parameter(name = "organId", description = "组织id", required = true, example = "1")
|
||||
public CommonResult<OrganTemplateResp> organTemplateByOrganId(@RequestParam Long organId ) {
|
||||
return success(machineTemplateService.organTemplateByOrganId(organId));
|
||||
@@ -52,7 +52,7 @@ public class MachineTemplateAuthController {
|
||||
|
||||
@GetMapping("page-template-machine-auth")
|
||||
@Operation(summary = "授权机台模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template-auth::query')")
|
||||
public CommonResult<PageResult<TemplateAutoResp>> pageTemplateAuth(MachinePageReqVO pageParam) {
|
||||
PageResult<MachineTemplateDO> page = machineTemplateService.page(pageParam);
|
||||
List<TemplateAutoResp> list = page.getList().stream().map(e->TemplateAutoResp.builder()
|
||||
|
||||
+5
-5
@@ -36,7 +36,7 @@ public class MachineTemplateController {
|
||||
|
||||
@GetMapping("/setDefaultTemplate")
|
||||
@Operation(summary = "设置默认机台模板")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::create')")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::update')")
|
||||
public CommonResult<Boolean> setDefaultTemplate(@RequestParam Long id) {
|
||||
return success(machineTemplateService.setDefaultTemplate(id));
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class MachineTemplateController {
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("cutting-machine")
|
||||
@PutMapping("insert-template-machine")
|
||||
@Operation(summary = "新增机台模板配置")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::create')")
|
||||
@OperateLog(logArgs = false)
|
||||
@@ -65,7 +65,7 @@ public class MachineTemplateController {
|
||||
return success(machineTemplateService.createCuttingTemplate(reqVO));
|
||||
}
|
||||
|
||||
@PostMapping("cutting-machine")
|
||||
@PostMapping("update-template-machine")
|
||||
@Operation(summary = "修改机台模板配置")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::update')")
|
||||
@OperateLog(logArgs = false)
|
||||
@@ -73,14 +73,14 @@ public class MachineTemplateController {
|
||||
return success(machineTemplateService.updateCuttingTemplate(reqVO));
|
||||
}
|
||||
|
||||
@GetMapping("cutting-machine")
|
||||
@GetMapping("get-template-machine")
|
||||
@Operation(summary = "获取机台模板配置")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<CuttingTemplateRespVO> getCuttingTemplateById(@RequestParam("id") String id) {
|
||||
return success(machineTemplateService.getCuttingTemplateById(id));
|
||||
}
|
||||
|
||||
@DeleteMapping("cutting-machine")
|
||||
@DeleteMapping("delete-template-machine")
|
||||
@Operation(summary = "删除机台模板配置")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::delete')")
|
||||
public CommonResult<Boolean> deleteCutting(@RequestParam("id") Long id) {
|
||||
|
||||
+14
-7
@@ -45,14 +45,16 @@ public class PermissionController {
|
||||
@Operation(summary = "获得角色拥有的菜单编号")
|
||||
@Parameter(name = "roleId", description = "角色编号", required = true)
|
||||
@GetMapping("/list-role-menus")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-role-menu','base:permission:assign-role-menu')")
|
||||
public CommonResult<Set<Long>> getRoleMenuList(Long roleId) {
|
||||
return success(permissionService.getRoleMenuListByRoleId(roleId));
|
||||
}
|
||||
|
||||
@PostMapping("/assign-role-menu")
|
||||
@Operation(summary = "赋予角色菜单")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-role-menu','base:permission:assign-role-menu')")
|
||||
public CommonResult<Boolean> assignRoleMenu(@Validated @RequestBody PermissionAssignRoleMenuReqVO reqVO) {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
boolean isOrganRole = Objects.equals(reqVO.getRoleId(), InternalRoleConstants.ORGAN_ADMIN_ROLE_ID) || Objects.equals(reqVO.getRoleId(), InternalRoleConstants.ORGAN_STAFF_ROLE_ID);
|
||||
@@ -80,7 +82,8 @@ public class PermissionController {
|
||||
|
||||
@PostMapping("/assign-role-data-scope")
|
||||
@Operation(summary = "赋予角色数据权限")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-role-data-scope')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-role-data-scope')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-role-data-scope','base:permission:assign-role-data-scope')")
|
||||
public CommonResult<Boolean> assignRoleDataScope(@Valid @RequestBody PermissionAssignRoleDataScopeReqVO reqVO) {
|
||||
permissionService.assignRoleDataScope(reqVO.getRoleId(), reqVO.getDataScope(), reqVO.getDataScopeDeptIds());
|
||||
return success(true);
|
||||
@@ -89,14 +92,16 @@ public class PermissionController {
|
||||
@Operation(summary = "获得管理员拥有的角色编号列表")
|
||||
@Parameter(name = "userId", description = "用户编号", required = true)
|
||||
@GetMapping("/list-user-roles")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-user-role','base:permission:assign-user-role')")
|
||||
public CommonResult<Set<Long>> listAdminRoles(@RequestParam("userId") Long userId) {
|
||||
return success(permissionService.getUserRoleIdListByUserId(userId));
|
||||
}
|
||||
|
||||
@Operation(summary = "赋予用户角色")
|
||||
@PostMapping("/assign-user-role")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-user-role','base:permission:assign-user-role')")
|
||||
public CommonResult<Boolean> assignUserRole(@Validated @RequestBody PermissionAssignUserRoleReqVO reqVO) {
|
||||
Long organId = reqVO.getOrganId() == null ? OrganContextHolder.getOrganId() : reqVO.getOrganId();
|
||||
permissionService.assignUserRole(reqVO.getUserId(), reqVO.getRoleIds(), organId);
|
||||
@@ -105,7 +110,8 @@ public class PermissionController {
|
||||
|
||||
@Operation(summary = "赋予多用户角色")
|
||||
@PostMapping("/bath-assign-user-role")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-user-role','base:permission:assign-user-role')")
|
||||
public CommonResult<Boolean> bathAssignUserRole(@Validated @RequestBody PermissionAssignRoleUserReqVO reqVO) {
|
||||
permissionService.batchAssignRoleUsers(reqVO);
|
||||
return success(true);
|
||||
@@ -115,7 +121,8 @@ public class PermissionController {
|
||||
@Operation(summary = "获得拥有角色的用户列表")
|
||||
@Parameter(name = "roleId", description = "角色id", required = true)
|
||||
@GetMapping("/list-role-users")
|
||||
@PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:permission:assign-user-role','base:permission:assign-user-role')")
|
||||
public CommonResult<Set<Long>> listRoleUsers(@RequestParam("roleId") Long roleId, @RequestParam(value = "organId", required = false) Long organId) {
|
||||
return success(permissionService.getListRoleUsers(roleId, organId));
|
||||
}
|
||||
|
||||
+14
-7
@@ -48,7 +48,8 @@ public class RoleController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建角色")
|
||||
@PreAuthorize("@ss.hasPermission('system:role:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:create','base:role:create')")
|
||||
public CommonResult<Long> createRole(@Valid @RequestBody RoleSaveReqVO createReqVO) {
|
||||
if(Objects.isNull(createReqVO.getOrganId())) {
|
||||
createReqVO.setOrganId(OrganContextHolder.getOrganId());
|
||||
@@ -59,7 +60,8 @@ public class RoleController {
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "修改角色")
|
||||
@PreAuthorize("@ss.hasPermission('system:role:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:update','base:role:update')")
|
||||
public CommonResult<Boolean> updateRole(@Valid @RequestBody RoleSaveReqVO updateReqVO) {
|
||||
if (Objects.equals(updateReqVO.getId(), InternalRoleConstants.ORGAN_ADMIN_ROLE_ID) || Objects.equals(updateReqVO.getId(), InternalRoleConstants.ORGAN_STAFF_ROLE_ID)) {
|
||||
throw new ServiceException(11541, "内置角色无法修改");
|
||||
@@ -74,7 +76,8 @@ public class RoleController {
|
||||
|
||||
@PutMapping("/update-status")
|
||||
@Operation(summary = "修改角色状态")
|
||||
@PreAuthorize("@ss.hasPermission('system:role:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:update','base:role:update')")
|
||||
public CommonResult<Boolean> updateRoleStatus(@Valid @RequestBody RoleUpdateStatusReqVO reqVO) {
|
||||
roleService.updateRoleStatus(reqVO.getId(), reqVO.getStatus());
|
||||
return success(true);
|
||||
@@ -83,7 +86,8 @@ public class RoleController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除角色")
|
||||
@Parameter(name = "id", description = "角色编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:role:delete')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:delete','base:role:delete')")
|
||||
public CommonResult<Boolean> deleteRole(@RequestParam("id") Long id) {
|
||||
roleService.deleteRole(id);
|
||||
return success(true);
|
||||
@@ -91,7 +95,8 @@ public class RoleController {
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得角色信息")
|
||||
@PreAuthorize("@ss.hasPermission('system:role:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:query','base:role:query')")
|
||||
public CommonResult<RoleRespVO> getRole(@RequestParam("id") Long id) {
|
||||
RoleDO role = roleService.getRole(id);
|
||||
return success(BeanUtils.toBean(role, RoleRespVO.class));
|
||||
@@ -99,7 +104,8 @@ public class RoleController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得角色分页")
|
||||
@PreAuthorize("@ss.hasPermission('system:role:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:query','base:role:query')")
|
||||
public CommonResult<PageResult<RoleRespVO>> getRolePage(RolePageReqVO pageReqVO) {
|
||||
PageResult<RoleDO> pageResult = roleService.getRolePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, RoleRespVO.class));
|
||||
@@ -117,7 +123,8 @@ public class RoleController {
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出角色 Excel")
|
||||
@OperateLog(type = EXPORT)
|
||||
@PreAuthorize("@ss.hasPermission('system:role:export')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:role:export')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:role:export','base:role:export')")
|
||||
public void export(HttpServletResponse response, @Validated RolePageReqVO exportReqVO) throws IOException {
|
||||
exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<RoleDO> list = roleService.getRolePage(exportReqVO).getList();
|
||||
|
||||
+18
-9
@@ -69,7 +69,8 @@ public class UserController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "新增用户")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:create','base:user:create')")
|
||||
public CommonResult<Long> createUser(@Valid @RequestBody UserSaveReqVO reqVO) {
|
||||
Long id = userService.createUser(reqVO);
|
||||
return success(id);
|
||||
@@ -77,7 +78,8 @@ public class UserController {
|
||||
|
||||
@PutMapping("update")
|
||||
@Operation(summary = "修改用户")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:update','base:user:update')")
|
||||
public CommonResult<Boolean> updateUser(@Valid @RequestBody UserSaveReqVO reqVO) {
|
||||
userService.updateUser(reqVO);
|
||||
return success(true);
|
||||
@@ -86,7 +88,8 @@ public class UserController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:delete')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:delete','base:user:delete')")
|
||||
public CommonResult<Boolean> deleteUser(@RequestParam("id") Long id) {
|
||||
userService.deleteUser(id);
|
||||
return success(true);
|
||||
@@ -94,7 +97,8 @@ public class UserController {
|
||||
|
||||
@PutMapping("/update-password")
|
||||
@Operation(summary = "重置用户密码")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:update-password')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:update-password')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:update-password','base:user:update-password')")
|
||||
public CommonResult<Boolean> updateUserPassword(@Valid @RequestBody UserUpdatePasswordReqVO reqVO) {
|
||||
userService.updateUserPassword(reqVO.getId(), reqVO.getPassword());
|
||||
return success(true);
|
||||
@@ -102,7 +106,8 @@ public class UserController {
|
||||
|
||||
@PutMapping("/update-status")
|
||||
@Operation(summary = "修改用户状态")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:update')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:update','base:user:update')")
|
||||
public CommonResult<Boolean> updateUserStatus(@Valid @RequestBody UserUpdateStatusReqVO reqVO) {
|
||||
userService.updateUserStatus(reqVO.getId(), reqVO.getStatus());
|
||||
return success(true);
|
||||
@@ -110,7 +115,8 @@ public class UserController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:list')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:list')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:list','base:user:query')")
|
||||
public CommonResult<PageResult<UserRespVO>> getUserPage(@Valid UserPageReqVO pageReqVO) {
|
||||
// 获得用户分页列表
|
||||
PageResult<AdminUserDO> pageResult = userService.getUserPage(pageReqVO);
|
||||
@@ -138,7 +144,8 @@ public class UserController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户详情")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:query','base:user:query')")
|
||||
public CommonResult<UserRespVO> getUser(@RequestParam("id") Long id) {
|
||||
AdminUserDO user = userService.getUser(id);
|
||||
// 拼接数据
|
||||
@@ -148,7 +155,8 @@ public class UserController {
|
||||
|
||||
@GetMapping("/export")
|
||||
@Operation(summary = "导出用户")
|
||||
@PreAuthorize("@ss.hasPermission('system:user:export')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:export')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:export','base:user:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportUserList(@Validated UserPageReqVO exportReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
@@ -197,7 +205,8 @@ public class UserController {
|
||||
@Parameter(name = "file", description = "Excel 文件", required = true),
|
||||
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('system:user:import')")
|
||||
// @PreAuthorize("@ss.hasPermission('system:user:import')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('system:user:import','base:user:import')")
|
||||
public CommonResult<UserImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport,
|
||||
@RequestParam(value = "organId", required = false) Long organId
|
||||
|
||||
+1
@@ -61,6 +61,7 @@ public interface ProcessMapper extends BaseMapperX<ProcessDO> {
|
||||
.eq(ProcessDO::getOrganId, organId)
|
||||
.eq(ProcessDO::getIsEnabled,true)
|
||||
.selectAll(ProcessDO.class)
|
||||
.orderByDesc(ProcessDO::getSort)
|
||||
.orderByDesc(ProcessDO::getId));
|
||||
|
||||
|
||||
|
||||
+1
@@ -41,6 +41,7 @@
|
||||
and p.piece_type = #{vo.pieceType}
|
||||
</if>
|
||||
</where>
|
||||
order by sort,id desc
|
||||
</select>
|
||||
|
||||
<select id="selectOneById" resultType="com.cf.imes.module.system.dal.dataobject.process.ProcessDO">
|
||||
|
||||
Reference in New Issue
Block a user