| | |
| | | |
| | | @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); |
| | | } |
| | |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('unit:people:list')") |
| | | public Result list() { |
| | | return ywPeopleService.all(); |
| | | } |