提交 0a2950d0 authored 作者: 马晨俊's avatar 马晨俊

mcj:

修复权限配置错误问题
上级 51ad175a
...@@ -39,7 +39,7 @@ public class ConfigController { ...@@ -39,7 +39,7 @@ public class ConfigController {
*/ */
@PostMapping("/updates") @PostMapping("/updates")
@ApiOperation("根据id修改参数,需要传id和value") @ApiOperation("根据id修改参数,需要传id和value")
@AuthAnnotation(code = {"1300"}) @AuthAnnotation(code = {"0001300"})
public ServerResponse update(@RequestBody List<Config> configs){ public ServerResponse update(@RequestBody List<Config> configs){
configService.updateConfig(configs); configService.updateConfig(configs);
return ServerResponse.ok(200); return ServerResponse.ok(200);
......
...@@ -41,7 +41,7 @@ public class RuleController { ...@@ -41,7 +41,7 @@ public class RuleController {
*/ */
@PostMapping @PostMapping
@ApiOperation("新增规则") @ApiOperation("新增规则")
@AuthAnnotation(code = {"001200", "001400"}) @AuthAnnotation(code = {"0001200", "0001400"})
public ServerResponse<Rule> rule(@RequestBody Rule rule) { public ServerResponse<Rule> rule(@RequestBody Rule rule) {
log.info("规则{}", rule); log.info("规则{}", rule);
Rule newRule = ruleService.addRulePlus(rule); Rule newRule = ruleService.addRulePlus(rule);
...@@ -56,7 +56,7 @@ public class RuleController { ...@@ -56,7 +56,7 @@ public class RuleController {
*/ */
@PostMapping(value = "/update") @PostMapping(value = "/update")
@ApiOperation("修改规则") @ApiOperation("修改规则")
@AuthAnnotation(code = {"001200", "001400"}) @AuthAnnotation(code = {"0001200", "0001400"})
public ServerResponse update(@RequestBody Rule rule) { public ServerResponse update(@RequestBody Rule rule) {
ruleService.upRulePlus(rule); ruleService.upRulePlus(rule);
return ServerResponse.ok(200); return ServerResponse.ok(200);
...@@ -70,7 +70,7 @@ public class RuleController { ...@@ -70,7 +70,7 @@ public class RuleController {
*/ */
@ApiOperation("根据数据封装删除规则") @ApiOperation("根据数据封装删除规则")
@DeleteMapping(value = "/{id}") @DeleteMapping(value = "/{id}")
@AuthAnnotation(code = {"001200", "001400"}) @AuthAnnotation(code = {"0001200", "0001400"})
public ServerResponse deleteByQo(@PathVariable String id) { public ServerResponse deleteByQo(@PathVariable String id) {
ruleService.deleteRulePlus(id); ruleService.deleteRulePlus(id);
return ServerResponse.ok(200); return ServerResponse.ok(200);
...@@ -91,7 +91,7 @@ public class RuleController { ...@@ -91,7 +91,7 @@ public class RuleController {
@ApiImplicitParam(name = "size", value = "每页记录数", required = true, paramType = "path", dataType = "int") @ApiImplicitParam(name = "size", value = "每页记录数", required = true, paramType = "path", dataType = "int")
}) })
@RequestMapping(value = "/search/{page}/{size}", method = RequestMethod.POST) @RequestMapping(value = "/search/{page}/{size}", method = RequestMethod.POST)
@AuthAnnotation(code = {"001200", "001400"}) @AuthAnnotation(code = {"0001200", "0001400"})
public ServerResponse<PageResult<Rule>> findSearch(@RequestBody Map searchMap, @PathVariable int page, @PathVariable int size) { public ServerResponse<PageResult<Rule>> findSearch(@RequestBody Map searchMap, @PathVariable int page, @PathVariable int size) {
Page<Rule> pageList = ruleService.findSearch(searchMap, page, size); Page<Rule> pageList = ruleService.findSearch(searchMap, page, size);
return ServerResponse.ok(new PageResult<>(pageList.getTotalElements(), pageList.getContent())); return ServerResponse.ok(new PageResult<>(pageList.getTotalElements(), pageList.getContent()));
...@@ -111,7 +111,7 @@ public class RuleController { ...@@ -111,7 +111,7 @@ public class RuleController {
@PostMapping("/importRules") @PostMapping("/importRules")
@ApiOperation("导入所有规则") @ApiOperation("导入所有规则")
@AuthAnnotation(code = {"001200"}) @AuthAnnotation(code = {"0001200"})
public ServerResponse importRules(@RequestParam("file") MultipartFile file) { public ServerResponse importRules(@RequestParam("file") MultipartFile file) {
ruleService.importRules(file); ruleService.importRules(file);
return ServerResponse.ok(""); return ServerResponse.ok("");
......
...@@ -41,7 +41,7 @@ public class TechnologyController { ...@@ -41,7 +41,7 @@ public class TechnologyController {
} }
@GetMapping("/names") @GetMapping("/names")
@ApiOperation("获取所有关键技术name") @ApiOperation("获取所有关键技术name")
@AuthAnnotation(code = {"001100"}) @AuthAnnotation(code = {"0001100"})
public ServerResponse getTechnologiesName(){ public ServerResponse getTechnologiesName(){
return ServerResponse.ok(technologyService.findAllTechnologyNames()); return ServerResponse.ok(technologyService.findAllTechnologyNames());
} }
...@@ -52,7 +52,7 @@ public class TechnologyController { ...@@ -52,7 +52,7 @@ public class TechnologyController {
*/ */
@GetMapping(value = "/{name}") @GetMapping(value = "/{name}")
@ApiOperation("根据name获取所有关键技术") @ApiOperation("根据name获取所有关键技术")
@AuthAnnotation(code = {"001100"}) @AuthAnnotation(code = {"0001100"})
public ServerResponse getTechnologies(@PathVariable String name){ public ServerResponse getTechnologies(@PathVariable String name){
return ServerResponse.ok(technologyService.findAllTechnology(name)); return ServerResponse.ok(technologyService.findAllTechnology(name));
} }
...@@ -62,7 +62,7 @@ public class TechnologyController { ...@@ -62,7 +62,7 @@ public class TechnologyController {
*/ */
@PostMapping("/add") @PostMapping("/add")
@ApiOperation("新添加关键技术") @ApiOperation("新添加关键技术")
@AuthAnnotation(code = {"001100"}) @AuthAnnotation(code = {"0001100"})
public ServerResponse addTechnologies(@RequestBody Technology technology){ public ServerResponse addTechnologies(@RequestBody Technology technology){
technologyService.add(technology); technologyService.add(technology);
return ServerResponse.ok(200); return ServerResponse.ok(200);
...@@ -70,7 +70,7 @@ public class TechnologyController { ...@@ -70,7 +70,7 @@ public class TechnologyController {
} }
@PostMapping(value = "/{id}") @PostMapping(value = "/{id}")
@ApiOperation("修改关键技术") @ApiOperation("修改关键技术")
@AuthAnnotation(code = {"001100"}) @AuthAnnotation(code = {"0001100"})
public ServerResponse update(@RequestBody Technology technology,@PathVariable String id){ public ServerResponse update(@RequestBody Technology technology,@PathVariable String id){
technology.setId(id); technology.setId(id);
technologyService.update(technology); technologyService.update(technology);
...@@ -89,7 +89,7 @@ public class TechnologyController { ...@@ -89,7 +89,7 @@ public class TechnologyController {
@ApiImplicitParam(name="size",value = "每页记录数",required=true,paramType="path",dataType="int") @ApiImplicitParam(name="size",value = "每页记录数",required=true,paramType="path",dataType="int")
}) })
@RequestMapping(value="/search/{page}/{size}",method=RequestMethod.POST) @RequestMapping(value="/search/{page}/{size}",method=RequestMethod.POST)
@AuthAnnotation(code = {"001100"}) @AuthAnnotation(code = {"0001100"})
public ServerResponse<PageResult> findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){ public ServerResponse<PageResult> findSearch(@RequestBody Map searchMap , @PathVariable int page, @PathVariable int size){
Page<Technology> pageList = technologyService.findSearch(searchMap, page, size); Page<Technology> pageList = technologyService.findSearch(searchMap, page, size);
return ServerResponse.ok(new PageResult<Technology>(pageList.getTotalElements(), pageList.getContent()) ); return ServerResponse.ok(new PageResult<Technology>(pageList.getTotalElements(), pageList.getContent()) );
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论