zxl
2025-03-21 c4ab6a24d2825f11a0de0f165667dc533c458a01
business/src/main/java/com/ycl/controller/ProjectInvestmentInfoController.java
@@ -27,55 +27,55 @@
@RequiredArgsConstructor
@Api(value = "投资项目基础信息表", tags = "投资项目基础信息表管理")
@RestController
@RequestMapping("/project-investment-info")
@RequestMapping("/project/investmentInfo")
public class ProjectInvestmentInfoController {
    private final ProjectInvestmentInfoService projectInvestmentInfoService;
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:add')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:add')")
    public Result add(@RequestBody @Validated(Add.class) ProjectInvestmentInfoForm form) {
        return projectInvestmentInfoService.add(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:edit')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:edit')")
    public Result update(@RequestBody @Validated(Update.class) ProjectInvestmentInfoForm form) {
        return projectInvestmentInfoService.update(form);
    }
    @DeleteMapping("/{id}")
    @ApiOperation(value = "ID删除", notes = "ID删除")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:del')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:del')")
    public Result removeById(@PathVariable("id") String id) {
        return projectInvestmentInfoService.removeById(id);
    }
    @DeleteMapping("/batch")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:del:batch')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:del:batch')")
    public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) {
        return projectInvestmentInfoService.remove(ids);
    }
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:page')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:page')")
    public Result page(ProjectInvestmentInfoQuery query) {
        return projectInvestmentInfoService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:detail')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:detail')")
    public Result detail(@PathVariable("id") Integer id) {
        return projectInvestmentInfoService.detail(id);
    }
    @GetMapping("/list")
    @PreAuthorize("hasAuthority('projectInvestmentInfo:list')")
//    @PreAuthorize("hasAuthority('projectInvestmentInfo:list')")
    @ApiOperation(value = "列表", notes = "列表")
    public Result list() {
        return projectInvestmentInfoService.all();