MallController.java
2.22 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package vion.controller.monitor;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import vion.dto.monitor.MallDTO;
import vion.model.monitor.MAccount;
import vion.service.monitor.IMallService;
import vion.vo.monitor.MallVO;
import java.util.List;
/**
* mall 信息
*/
@RestController
@RequestMapping("/api/mall")
@RequiredArgsConstructor
public class MallController {
private final IMallService mallService;
@GetMapping("/account")
@SaCheckPermission(value = "mall:account:list", orRole = "admin")
public Page<MAccount> listAccount(MAccount dto) {
return mallService.listAccount(dto);
}
@GetMapping
@SaCheckPermission(value = "mall:list", orRole = "admin")
public Page<MallVO> list(MallDTO dto) {
return mallService.list(dto);
}
@GetMapping("/{id}")
@SaCheckPermission(value = "mall:get", orRole = "admin")
public MallVO get(@PathVariable Long id) {
return mallService.get(id);
}
@GetMapping("/attention")
@SaCheckPermission(value = "mall:attention:list", orRole = "admin")
public Page<MallVO> listAttention(MallDTO dto) {
return mallService.listAttention(dto);
}
@GetMapping("/errorAttention")
@SaCheckPermission(value = "mall:attention:listError", orRole = "admin")
public Page<MallVO> listErrorAttention(MallDTO dto) {
return mallService.listErrorAttention(dto);
}
@PostMapping("/attention")
@SaCheckPermission(value = "mall:attention:edit", orRole = "admin")
public String attention(@RequestBody List<MallDTO> dtoList) {
return mallService.attention(dtoList);
}
@PostMapping("/attention/account/{accountUid}")
@SaCheckPermission(value = "mall:attention:account", orRole = "admin")
public String attentionByAccount(@PathVariable String accountUid) {
return mallService.attentionByAccount(accountUid);
}
@PostMapping("/attention/{id}")
@SaCheckPermission(value = "mall:attention:cancel", orRole = "admin")
public String cancelAttention(@PathVariable Long id) {
return mallService.cancelAttention(id);
}
}