fix: 按钮权限调整

This commit is contained in:
caiyuchao
2025-08-13 15:39:56 +08:00
parent 9ad95e3fad
commit 882a968579
4 changed files with 6 additions and 6 deletions

View File

@@ -44,7 +44,7 @@ public class CommentController {
@PostMapping("/create")
@Operation(summary = "创建评论")
// @PreAuthorize("@ss.hasPermission('license:comment:create')")
@PreAuthorize("@ss.hasPermission('license:project:comment')")
public CommonResult<Long> createComment(@Valid @RequestBody CommentSaveReqVO createReqVO) {
return success(commentService.createComment(createReqVO));
}

View File

@@ -173,7 +173,7 @@ public class CustomerController {
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
})
@PreAuthorize("@ss.hasPermission('system:user:import')")
@PreAuthorize("@ss.hasPermission('license:customer:export')")
public CommonResult<ImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
List<CustomerImportRespVO> list = ExcelUtils.read(file, CustomerImportRespVO.class);

View File

@@ -56,7 +56,7 @@ public class LicenseController {
@PostMapping("/create")
@Operation(summary = "创建License")
@PreAuthorize("@ss.hasPermission('license:license:create')")
@PreAuthorize("@ss.hasPermission('license:license:apply')")
public CommonResult<Long> createLicense(@Valid @RequestBody LicenseSaveReqVO createReqVO) {
return success(licenseService.createLicense(createReqVO, false));
}
@@ -79,7 +79,7 @@ public class LicenseController {
@PutMapping("/reapply")
@Operation(summary = "重新申请License")
@PreAuthorize("@ss.hasPermission('license:license:apply')")
@PreAuthorize("@ss.hasPermission('license:license:reapply')")
public CommonResult<Boolean> reapplyLicense(@Valid @RequestBody LicenseSaveReqVO updateReqVO) {
licenseService.reapplyLicense(updateReqVO);
return success(true);
@@ -221,7 +221,7 @@ public class LicenseController {
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
})
@PreAuthorize("@ss.hasPermission('system:user:import')")
@PreAuthorize("@ss.hasPermission('license:license:import')")
public CommonResult<ImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
List<LicenseImportExcelVO> list = ExcelUtils.read(file, LicenseImportExcelVO.class);

View File

@@ -157,7 +157,7 @@ public class ProjectController {
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
})
@PreAuthorize("@ss.hasPermission('system:user:import')")
@PreAuthorize("@ss.hasPermission('license:project:import')")
public CommonResult<ImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
List<ProjectImportRespVO> list = ExcelUtils.read(file, ProjectImportRespVO.class);