From c0d47a27d57e8dceacf6baaf79bdf39f4039bee5 Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Mon, 28 Apr 2025 11:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=A4=9A=E5=B1=9E=E6=80=A7=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=B1=9E=E6=80=A7=E5=80=BC=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jsh/erp/controller/MaterialAttributeController.java | 3 ++- .../jsh/erp/datasource/mappers/MaterialAttributeMapperEx.java | 3 ++- .../java/com/jsh/erp/service/MaterialAttributeService.java | 4 ++-- .../main/resources/mapper_xml/MaterialAttributeMapperEx.xml | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialAttributeController.java b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialAttributeController.java index 30c0cc17..5ccf75b0 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialAttributeController.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/controller/MaterialAttributeController.java @@ -55,7 +55,8 @@ public class MaterialAttributeController extends BaseController { public TableDataInfo getList(@RequestParam(value = Constants.SEARCH, required = false) String search, HttpServletRequest request)throws Exception { String attributeName = StringUtil.getInfo(search, "attributeName"); - List list = materialAttributeService.select(attributeName); + String attributeValue = StringUtil.getInfo(search, "attributeValue"); + List list = materialAttributeService.select(attributeName, attributeValue); return getDataTable(list); } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialAttributeMapperEx.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialAttributeMapperEx.java index 931268f5..f7ffec28 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialAttributeMapperEx.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MaterialAttributeMapperEx.java @@ -8,7 +8,8 @@ import java.util.List; public interface MaterialAttributeMapperEx { List selectByConditionMaterialAttribute( - @Param("attributeName") String attributeName); + @Param("attributeName") String attributeName, + @Param("attributeValue") String attributeValue); int batchDeleteMaterialAttributeByIds( @Param("ids") String ids[]); diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialAttributeService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialAttributeService.java index 69a30d72..6c716ce6 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialAttributeService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/MaterialAttributeService.java @@ -57,11 +57,11 @@ public class MaterialAttributeService { return list; } - public List select(String attributeName) throws Exception{ + public List select(String attributeName, String attributeValue) throws Exception{ List list = new ArrayList<>(); try{ PageUtils.startPage(); - list = materialAttributeMapperEx.selectByConditionMaterialAttribute(attributeName); + list = materialAttributeMapperEx.selectByConditionMaterialAttribute(attributeName, attributeValue); }catch(Exception e){ JshException.readFail(logger, e); } diff --git a/jshERP-boot/src/main/resources/mapper_xml/MaterialAttributeMapperEx.xml b/jshERP-boot/src/main/resources/mapper_xml/MaterialAttributeMapperEx.xml index dc817f90..d567d6de 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/MaterialAttributeMapperEx.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/MaterialAttributeMapperEx.xml @@ -9,6 +9,10 @@ and ma.attribute_name like #{bindAttributeName} + + + and ma.attribute_value like #{bindAttributeValue} + and ifnull(ma.delete_flag,'0') !='1' order by ma.id desc