yanghb
2025-05-07 bf8f34752cc7584193d490cd6c1fe5850d31a269
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
package com.ruoyi.web.controller.bussiness;
 
import com.ruoyi.bussiness.domain.Compensate;
import com.ruoyi.bussiness.service.CompensateService;
import com.ruoyi.common.core.domain.BaseResult;
import com.ruoyi.common.core.domain.ResponseUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
@Validated
@RestController
@RequestMapping(value = "/compensate")
@Api(value = "补偿标准控制器",tags = "补偿标准控制器")
public class CompensateController {
 
    @Autowired
    private CompensateService compensateService;
 
    @ApiOperation(value = "补偿标准信息", notes = "补偿标准信息")
    @PostMapping(value = "/list")
    public BaseResult<List<Compensate>> list() {
        List<Compensate> compensates = compensateService.list();
        return ResponseUtils.successResponse(compensates);
    }
 
    @PostMapping(value = "/edit")
    @ApiOperation(value = "补偿标准修改(批量修改)", notes = "补偿标准修改(批量修改)")
    public BaseResult<Object> edit(@RequestBody List<Compensate> compensate) {
        compensateService.updateCompensate(compensate);
        return ResponseUtils.successResponse();
    }
 
}