“谢茂盛”
authored
|
1
2
|
package com.order.erp.controller;
|
“谢茂盛”
authored
|
3
|
import com.order.erp.common.annotation.AnonymousAccess;
|
“谢茂盛”
authored
|
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
|
import com.order.erp.common.constant.ServerResult;
import com.order.erp.domain.vo.admin.DictionaryQueryVO;
import com.order.erp.domain.vo.admin.DictionaryVO;
import com.order.erp.log.Log;
import com.order.erp.service.admin.DictionaryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
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 javax.annotation.Resource;
/**
* @author xms
*/
@RestController
@Api(tags = "系统:字典管理")
@RequestMapping("/order/erp/dictionary")
public class DictionaryController {
@Resource
private DictionaryService dictionaryService;
@Log("查询字典列表")
@ApiOperation("查询字典列表")
@PostMapping(value = "/list_by_page")
|
“谢茂盛”
authored
|
35
|
@AnonymousAccess
|
“谢茂盛”
authored
|
36
37
38
39
40
41
42
|
public ServerResult listByPage(@RequestBody @Validated DictionaryQueryVO queryVO) {
return dictionaryService.listByPage(queryVO);
}
@Log("获取所有字典")
@ApiOperation("获取所有字典")
@PostMapping(value = "/get_all")
|
“谢茂盛”
authored
|
43
|
@AnonymousAccess
|
“谢茂盛”
authored
|
44
45
46
47
48
49
50
|
public ServerResult getAll(@RequestBody @Validated DictionaryQueryVO queryVO) {
return dictionaryService.getAll(queryVO);
}
@Log("新增字典")
@ApiOperation("新增字典")
@PostMapping("/add")
|
“谢茂盛”
authored
|
51
|
@AnonymousAccess
|
“谢茂盛”
authored
|
52
53
54
55
56
57
58
|
public ServerResult add(@RequestBody @Validated DictionaryVO dictionaryVO) {
return dictionaryService.add(dictionaryVO);
}
@Log("修改字典")
@ApiOperation("修改字典")
@PostMapping("/edit")
|
“谢茂盛”
authored
|
59
|
@AnonymousAccess
|
“谢茂盛”
authored
|
60
61
62
63
64
65
66
|
public ServerResult edit(@RequestBody @Validated DictionaryVO dictionaryVO) {
return dictionaryService.edit(dictionaryVO);
}
@Log("删除字典")
@ApiOperation("删除字典")
@PostMapping("/delete")
|
“谢茂盛”
authored
|
67
|
@AnonymousAccess
|
“谢茂盛”
authored
|
68
69
70
71
|
public ServerResult delete(@RequestBody @Validated DictionaryQueryVO queryVO) {
return dictionaryService.deleteById(queryVO);
}
}
|