From 6f97a42dccaedb7a8950feac205080e63d8be439 Mon Sep 17 00:00:00 2001
From: yupeng <roc__yu@163.com>
Date: 星期三, 26 二月 2025 14:27:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into xizang-changyun

---
 ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml
index 4f0c44e..c92258e 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TItemTypeMapper.xml
@@ -26,11 +26,19 @@
         ORDER BY sort_by,create_time DESC
     </select>
     <select id="getItemList" resultType="com.ruoyi.system.vo.TItemTypeVO">
-        select
-        <include refid="Base_Column_List"/>
+        select <include refid="Base_Column_List"></include>
         from t_item_type
-        where disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
-        ORDER BY sort_by,create_time DESC
+        where id in (
+        select
+            tit.id
+        from t_item_type tit
+        left join t_item ti on tit.id = ti.type_id
+        where tit.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        <if test="itemName != null and itemName != ''">
+            and ti.item_name like concat('%', #{itemName}, '%')
+        </if>
+        GROUP BY tit.id
+        ORDER BY tit.sort_by,tit.create_time DESC)
     </select>
 
 </mapper>

--
Gitblit v1.7.1