SettlementDiffController.java
1.73 KB
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
package vion.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import vion.dto.SettlementDiffDTO;
import vion.service.ISettlementDiffService;
import vion.vo.SettlementDiffVO;
@RestController
@RequestMapping("/api")
@RequiredArgsConstructor
public class SettlementDiffController {
private final ISettlementDiffService settlementDiffService;
@GetMapping("/settlementDiff/list/{no}")
@SaCheckPermission(value = "settlementDiff:list", orRole = "admin")
public Page<SettlementDiffVO> list(@PathVariable String no, SettlementDiffDTO dto) {
return settlementDiffService.list(no, dto);
}
@GetMapping("/settlementDiff/{id}")
public SettlementDiffVO getVOById(@PathVariable Long id) {
return settlementDiffService.getVOById(id);
}
@PostMapping("/settlementDiff")
@SaCheckPermission(value = "settlementDiff:save", orRole = "admin")
public String save(SettlementDiffDTO dto) {
return settlementDiffService.save(dto);
}
@PostMapping("/settlementDiff/{id}")
@SaCheckPermission(value = "settlementDiff:edit", orRole = "admin")
public String update(@PathVariable Long id, SettlementDiffDTO dto) {
dto.setId(id);
return settlementDiffService.update(id, dto);
}
@DeleteMapping("/settlementDiff/{id}")
@SaCheckPermission(value = "settlementDiff:remove", orRole = "admin")
@Transactional(rollbackFor = Exception.class)
public String delById(@PathVariable Long id) {
return settlementDiffService.delById(id);
}
}