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 { @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); } }