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