1. 统一计量单位菜单权限

This commit is contained in:
chenbowen
2026-01-05 19:44:45 +08:00
parent 7a05d1bd3f
commit cbc1f0f853

View File

@@ -43,14 +43,14 @@ public class UntInfoController implements BusinessControllerMarker {
@PostMapping("/create")
@Operation(summary = "创建计量单位")
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:create')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:create')")
public CommonResult<UntInfoRespVO> createUntInfo(@Valid @RequestBody UntInfoSaveReqVO createReqVO) {
return success(untInfoService.createUntInfo(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新计量单位")
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:update')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:update')")
public CommonResult<Boolean> updateUntInfo(@Valid @RequestBody UntInfoSaveReqVO updateReqVO) {
untInfoService.updateUntInfo(updateReqVO);
return success(true);
@@ -59,7 +59,7 @@ public class UntInfoController implements BusinessControllerMarker {
@DeleteMapping("/delete")
@Operation(summary = "删除计量单位")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:delete')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:delete')")
public CommonResult<Boolean> deleteUntInfo(@RequestParam("id") Long id) {
untInfoService.deleteUntInfo(id);
return success(true);
@@ -68,7 +68,7 @@ public class UntInfoController implements BusinessControllerMarker {
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除计量单位")
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:delete')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:delete')")
public CommonResult<Boolean> deleteUntInfoList(@RequestBody BatchDeleteReqVO req) {
untInfoService.deleteUntInfoListByIds(req.getIds());
return success(true);
@@ -77,7 +77,7 @@ public class UntInfoController implements BusinessControllerMarker {
@GetMapping("/get")
@Operation(summary = "获得计量单位")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:query')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:query')")
public CommonResult<UntInfoRespVO> getUntInfo(@RequestParam("id") Long id) {
UntInfoDO untInfo = untInfoService.getUntInfo(id);
return success(BeanUtils.toBean(untInfo, UntInfoRespVO.class));
@@ -85,7 +85,7 @@ public class UntInfoController implements BusinessControllerMarker {
@GetMapping("/page")
@Operation(summary = "获得计量单位分页")
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:query')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:query')")
public CommonResult<PageResult<UntInfoRespVO>> getUntInfoPage(@Valid UntInfoPageReqVO pageReqVO) {
PageResult<UntInfoDO> pageResult = untInfoService.getUntInfoPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, UntInfoRespVO.class));
@@ -93,7 +93,7 @@ public class UntInfoController implements BusinessControllerMarker {
@GetMapping("/export-excel")
@Operation(summary = "导出计量单位 Excel")
@PreAuthorize("@ss.hasPermission('unitmanagement:unt-info:export')")
@PreAuthorize("@ss.hasPermission('unit-management:unt-info:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportUntInfoExcel(@Valid UntInfoPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {