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
package org.jeecg.modules.dnc.controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.dnc.entity.DocClassification;
import org.jeecg.modules.dnc.response.CommonCode;
import org.jeecg.modules.dnc.response.ResponseResult;
import org.jeecg.modules.dnc.service.IDocClassificationService;
import org.springframework.beans.factory.annotation.Autowired;
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;
 
@Slf4j
@Api(tags = "文档分类表")
@RestController
@RequestMapping("/nc/doc/classification")
public class DocClassificationController extends JeecgController<DocClassification, IDocClassificationService> {
    @Autowired
    private IDocClassificationService docClassificationService;
 
    @AutoLog(value = "文档分类表-添加文档分类")
    @ApiOperation(value = "文档分类表-添加文档分类", notes = "文档分类表-添加文档分类")
    @PostMapping("/add")
    public ResponseResult addDocClassification(@RequestBody DocClassification docClassification) {
        boolean b = docClassificationService.addDocClassification(docClassification);
        if(b) {
            return new ResponseResult(CommonCode.SUCCESS);
        }
        return new ResponseResult(CommonCode.FAIL);
    }
}