From ed2daf6cfa2d7477940106a25ddd48b462ce6c80 Mon Sep 17 00:00:00 2001 From: HashMap Date: Sun, 18 Jan 2026 15:46:39 +0800 Subject: [PATCH 1/5] =?UTF-8?q?perf(module/feed):=20=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=94=AF=E6=8C=81=E6=A8=A1=E7=B3=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改SQL Mapper使用`CONCAT('%',?,'%')`支持模糊查询 --- .../src/main/resources/mapper/feed/SgFeedListMapper.xml | 6 +++--- .../src/main/resources/mapper/feed/SgFeedPlanMapper.xml | 6 +++--- .../main/resources/mapper/feed/SgFeedStatisticMapper.xml | 4 ++-- .../src/main/resources/mapper/feed/SgFormulaListMapper.xml | 6 +++--- .../resources/mapper/feed/SgFormulaManagementMapper.xml | 6 +++--- .../src/main/resources/mapper/feed/SgMaterialMapper.xml | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/zhyc-module/src/main/resources/mapper/feed/SgFeedListMapper.xml b/zhyc-module/src/main/resources/mapper/feed/SgFeedListMapper.xml index 86932be..ae43230 100644 --- a/zhyc-module/src/main/resources/mapper/feed/SgFeedListMapper.xml +++ b/zhyc-module/src/main/resources/mapper/feed/SgFeedListMapper.xml @@ -19,9 +19,9 @@ - and formula_id = #{formulaId} - and batch_id = #{batchId} - and sheep_house_id = #{sheepHouseId} + and formula_id LIKE CONCAT('%',#{formulaId},'%') + and batch_id LIKE CONCAT('%',#{batchId},'%') + and sheep_house_id LIKE CONCAT('%',#{sheepHouseId},'%') and plan_date = #{planDate} ORDER BY plan_date ASC, formula_id ASC , batch_id ASC diff --git a/zhyc-module/src/main/resources/mapper/feed/SgFeedStatisticMapper.xml b/zhyc-module/src/main/resources/mapper/feed/SgFeedStatisticMapper.xml index 0bd9657..4cd4a36 100644 --- a/zhyc-module/src/main/resources/mapper/feed/SgFeedStatisticMapper.xml +++ b/zhyc-module/src/main/resources/mapper/feed/SgFeedStatisticMapper.xml @@ -31,8 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/zhyc-module/src/main/resources/mapper/feed/SgFormulaListMapper.xml b/zhyc-module/src/main/resources/mapper/feed/SgFormulaListMapper.xml index f422ccb..98d1018 100644 --- a/zhyc-module/src/main/resources/mapper/feed/SgFormulaListMapper.xml +++ b/zhyc-module/src/main/resources/mapper/feed/SgFormulaListMapper.xml @@ -22,9 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/zhyc-module/src/main/resources/mapper/feed/SgFormulaManagementMapper.xml b/zhyc-module/src/main/resources/mapper/feed/SgFormulaManagementMapper.xml index 17602f1..38f923a 100644 --- a/zhyc-module/src/main/resources/mapper/feed/SgFormulaManagementMapper.xml +++ b/zhyc-module/src/main/resources/mapper/feed/SgFormulaManagementMapper.xml @@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/zhyc-module/src/main/resources/mapper/feed/SgMaterialMapper.xml b/zhyc-module/src/main/resources/mapper/feed/SgMaterialMapper.xml index 6129720..c593ff4 100644 --- a/zhyc-module/src/main/resources/mapper/feed/SgMaterialMapper.xml +++ b/zhyc-module/src/main/resources/mapper/feed/SgMaterialMapper.xml @@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + - - - + \ No newline at end of file diff --git a/zhyc-module/src/main/resources/mapper/dairyProducts/NpSheepMilkAnalysisMapper.xml b/zhyc-module/src/main/resources/mapper/dairyProducts/NpSheepMilkAnalysisMapper.xml index af77171..0b7c83c 100644 --- a/zhyc-module/src/main/resources/mapper/dairyProducts/NpSheepMilkAnalysisMapper.xml +++ b/zhyc-module/src/main/resources/mapper/dairyProducts/NpSheepMilkAnalysisMapper.xml @@ -4,8 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - SELECT DISTINCT a.sheep_id FROM np_milk_prod_classes a LEFT JOIN sheep_file sf ON a.sheep_id = sf.id @@ -13,12 +12,27 @@ AND sf.bs_manage_tags LIKE CONCAT('%', #{manageEarTag}, '%') + + AND ( + sf.bs_manage_tags IN + + #{earNumber} + + ) + ORDER BY a.sheep_id - - + + - - - - From 25cef5dd15c7bf35a54a1be7d1c0dbe1773f7c75 Mon Sep 17 00:00:00 2001 From: zyh <2066096076@qq.com> Date: Tue, 20 Jan 2026 16:14:38 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=86=BB=E8=83=9A=E5=86=BB=E7=B2=BE?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=8A=B6=E6=80=81=E6=B7=BB=E5=8A=A0=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E6=A0=87=E8=AF=86=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E7=8A=B6=E6=80=81=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml | 1 + zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml b/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml index 83264bd..8dd5084 100644 --- a/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml +++ b/zhyc-module/src/main/resources/mapper/frozen/DdFeMapper.xml @@ -69,6 +69,7 @@ and out_date between #{params.beginOutDate} and #{params.endOutDate} + and status = #{status} diff --git a/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml b/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml index 20eda36..cd335a9 100644 --- a/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml +++ b/zhyc-module/src/main/resources/mapper/frozen/DdFsMapper.xml @@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and out_dt between #{params.beginOutDt} and #{params.endOutDt} + and stat = #{stat}