给接口增加swagger描述

This commit is contained in:
季圣华
2021-11-08 23:14:21 +08:00
parent 744691d916
commit a923700c0e
30 changed files with 383 additions and 12 deletions

View File

@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.MaterialAttribute;
import com.jsh.erp.service.materialAttribute.MaterialAttributeService;
import com.jsh.erp.utils.BaseResponseInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
@@ -20,13 +22,21 @@ import java.util.List;
*/
@RestController
@RequestMapping(value = "/materialAttribute")
@Api(tags = {"商品属性"})
public class MaterialAttributeController {
private Logger logger = LoggerFactory.getLogger(MaterialAttributeController.class);
@Resource
private MaterialAttributeService materialAttributeService;
/**
* 获取全部商品属性
* @param request
* @return
* @throws Exception
*/
@GetMapping("/getAll")
@ApiOperation(value = "获取全部商品属性")
public BaseResponseInfo getAll(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
try {