修改汇总模版权限

This commit is contained in:
lxd 2025-03-20 12:56:22 +08:00
parent c210b1fc88
commit bf04998b09

View File

@ -41,14 +41,12 @@ public class InspectTemplateController {
@PostMapping("/create")
@Operation(summary = "创建汇总模板")
@PreAuthorize("@ss.hasPermission('inspect:template:create')")
public CommonResult<Integer> createTemplate(@Valid @RequestBody InspectTemplateSaveReqVO createReqVO) {
return success(templateService.createTemplate(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新汇总模板")
@PreAuthorize("@ss.hasPermission('inspect:template:update')")
public CommonResult<Boolean> updateTemplate(@Valid @RequestBody InspectTemplateSaveReqVO updateReqVO) {
templateService.updateTemplate(updateReqVO);
return success(true);
@ -57,7 +55,6 @@ public class InspectTemplateController {
@DeleteMapping("/delete")
@Operation(summary = "删除汇总模板")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('inspect:template:delete')")
public CommonResult<Boolean> deleteTemplate(@RequestParam("id") Integer id) {
templateService.deleteTemplate(id);
return success(true);
@ -66,7 +63,6 @@ public class InspectTemplateController {
@GetMapping("/get")
@Operation(summary = "获得汇总模板")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('inspect:template:query')")
public CommonResult<InspectTemplateRespVO> getTemplate(@RequestParam("id") Integer id) {
InspectTemplateDO template = templateService.getTemplate(id);
return success(BeanUtils.toBean(template, InspectTemplateRespVO.class));
@ -74,7 +70,6 @@ public class InspectTemplateController {
@GetMapping("/page")
@Operation(summary = "获得汇总模板分页")
@PreAuthorize("@ss.hasPermission('inspect:template:query')")
public CommonResult<PageResult<InspectTemplateRespVO>> getTemplatePage(@Valid InspectTemplatePageReqVO pageReqVO) {
PageResult<InspectTemplateDO> pageResult = templateService.getTemplatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, InspectTemplateRespVO.class));
@ -82,7 +77,6 @@ public class InspectTemplateController {
@GetMapping("/export-excel")
@Operation(summary = "导出汇总模板 Excel")
@PreAuthorize("@ss.hasPermission('inspect:template:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportTemplateExcel(@Valid InspectTemplatePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {