龚焕茏
2024-04-19 c0144e9d03472072f6c9eecef3f4347520b8328e
ycl-server/src/main/java/com/ycl/platform/controller/YwPeopleController.java
@@ -34,31 +34,35 @@
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    @PreAuthorize("@ss.hasPermi('unit:people:add')")
    public Result add(@RequestBody @Validated(Add.class) YwPeopleForm form) {
        return ywPeopleService.add(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    @PreAuthorize("@ss.hasPermi('unit:people:edit')")
    public Result update(@RequestBody @Validated(Update.class) YwPeopleForm form) {
        return ywPeopleService.update(form);
    }
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    @PreAuthorize("@ss.hasPermi('unit:people:remove')")
    public Result remove(@PathVariable String ids) {
        return ywPeopleService.remove(Arrays.asList(ids.split(",")));
    }
//    @PreAuthorize("@ss.hasPermi('unit:people:page')")
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    @PreAuthorize("@ss.hasPermi('unit:people:page')")
    public Result page(YwPeopleQuery query) {
        return ywPeopleService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    @PreAuthorize("@ss.hasPermi('unit:people:query')")
    public Result detail(@PathVariable("id") String id) {
        return ywPeopleService.detail(id);
    }
@@ -71,6 +75,7 @@
    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "列表")
    @PreAuthorize("@ss.hasPermi('unit:people:list')")
    public Result list() {
        return ywPeopleService.all();
    }