فهرست منبع

fengji 声部去掉 tenantId, 添加模糊搜索功能

yanite 3 سال پیش
والد
کامیت
c42985d7cf
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml

+ 4 - 4
mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -138,18 +138,18 @@
         SELECT * FROM `subject`
         <where>
             parent_subject_id_ != 0 AND del_flag_ = 0
-            <if test="parentSubjectId != null and topLeverCategoryId != ''">
-                parent_subject_id_ = #{parentSubjectId}
+            <if test="parentSubjectId != null and parentSubjectId != ''">
+                AND parent_subject_id_ = #{parentSubjectId}
             </if>
         </where>
     </select>
 
-    <select id="search" resultType="com.ym.mec.biz.dal.entity.Subject">
+    <select id="search" resultMap="Subject">
         SELECT * FROM `subject`
         <where>
             del_flag_ = 0
             <if test="search != null and search != ''">
-                (id_ = #{search} or name_ like concat('%', #{search}, '%')
+                AND (id_ = #{search} or name_ like concat('%', #{search}, '%'))
             </if>
         </where>
     </select>