姜永辉 1 год назад
Родитель
Сommit
369f0c3916
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

+ 8 - 1
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -190,6 +190,10 @@
         <if test="flgBusiness != null">
             AND flg_business  = #{flgBusiness}
         </if>
+        <if test="searchText !=null">
+            AND ( org_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
+            or org_code LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
+        </if>
         <if test="ids != null and ids.size() > 0 ">
             order by case org_id
             <foreach collection="ids" index="index" item="item">
@@ -288,7 +292,10 @@
         <if test="staffName != null and staffName != ''">
             And position (#{staffName} in staff.staff_name)>0
         </if>
-
+        <if test="searchText !=null">
+            AND ( staff.staff_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
+            or staff.staff_code LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
+        </if>
         <if test="ids != null and ids.size() > 0 ">
             order by case staff.staff_id
             <foreach collection="ids" index="index" item="item">