maven
2025-11-20 5c0bc75816a7b5fa348d658897a304f588d9d0ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.ruoyi.lavorissue.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.lavorissue.pojo.LaborConf;
import com.ruoyi.lavorissue.service.LaborConfService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * @author :yys
 * @date : 2025/11/19 14:02
 */
@RestController
@Api(tags = "劳保配置")
@RequestMapping("/laborConf")
public class LaborConfController extends BaseController {
 
    @Autowired
    private LaborConfService laborConfService;
 
    @GetMapping("/listPage")
    @Log(title = "查询劳保配置", businessType = BusinessType.OTHER)
    @ApiOperation("查询劳保配置")
    public AjaxResult listPage(Page page, LaborConf laborConf) {
        return laborConfService.listPage(page, laborConf);
    }
 
 
    @PostMapping("/add")
    @Log(title = "添加劳保配置", businessType = BusinessType.INSERT)
    @ApiOperation("添加劳保配置")
    public AjaxResult add(@RequestBody LaborConf laborConf) {
        return laborConfService.save(laborConf) ? success() : error();
    }
 
    @PostMapping("/update")
    @Log(title = "修改劳保配置", businessType = BusinessType.UPDATE)
    @ApiOperation("修改劳保配置")
    public AjaxResult update(@RequestBody LaborConf laborConf) {
        return laborConfService.updateById(laborConf) ? success() : error();
    }
 
    @DeleteMapping("/delete")
    @Log(title = "删除劳保配置", businessType = BusinessType.DELETE)
    @ApiOperation("删除劳保配置")
    public AjaxResult delete(@RequestBody List<Long> ids) {
        return laborConfService.removeBatchByIds(ids) ? success() : error();
    }
 
}