From 30826552feedab54fce5d4607977d71490b5e150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Tue, 7 Feb 2023 21:39:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=95=86=E5=93=81=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E4=BF=A1=E6=81=AF=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MaterialPropertyController.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialPropertyController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialPropertyController.java index eb5c7f16..3187bae6 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialPropertyController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialPropertyController.java @@ -1,19 +1,17 @@ package com.jsh.erp.controller; -import com.alibaba.fastjson.JSONObject; -import com.jsh.erp.constants.ExceptionConstants; -import com.jsh.erp.exception.BusinessRunTimeException; -import com.jsh.erp.service.material.MaterialService; +import com.jsh.erp.datasource.entities.MaterialProperty; import com.jsh.erp.service.materialProperty.MaterialPropertyService; +import com.jsh.erp.utils.BaseResponseInfo; import io.swagger.annotations.Api; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.PostMapping; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.util.List; /** * Description @@ -26,5 +24,23 @@ import javax.annotation.Resource; @Api(tags = {"商品扩展字段"}) public class MaterialPropertyController { + @Resource + private MaterialPropertyService materialPropertyService; + + @GetMapping(value = "/getAllList") + @ApiOperation(value = "查询全部商品扩展字段信息") + public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{ + BaseResponseInfo res = new BaseResponseInfo(); + try { + List list = materialPropertyService.getMaterialProperty(); + res.code = 200; + res.data = list; + } catch(Exception e){ + e.printStackTrace(); + res.code = 500; + res.data = "获取数据失败"; + } + return res; + } }