|
@@ -60,6 +60,32 @@
|
|
|
|
|
|
|
|
|
<select id="search" resultType="com.diagbot.entity.LibraryInfo">
|
|
|
+ SELECT a.* FROM kl_library_info a, kl_concept b
|
|
|
+ WHERE a.is_deleted = 'N' and b.is_deleted = 'N'
|
|
|
+ AND a.concept_id = b.id
|
|
|
+ <if test="typeList != null and typeList.size() > 0">
|
|
|
+ AND a.type_id in
|
|
|
+ <foreach collection="typeList" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ AND (a.NAME = #{name} OR a.spell = #{name})
|
|
|
+
|
|
|
+ union
|
|
|
+
|
|
|
+ SELECT a.* FROM kl_library_info a, kl_concept b
|
|
|
+ WHERE a.is_deleted = 'N' and b.is_deleted = 'N'
|
|
|
+ AND a.concept_id = b.id
|
|
|
+ <if test="typeList != null and typeList.size() > 0">
|
|
|
+ AND a.type_id in
|
|
|
+ <foreach collection="typeList" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ AND (a.NAME LIKE concat(#{name},'%') OR a.spell LIKE concat(#{name},'%'))
|
|
|
+
|
|
|
+ union
|
|
|
+
|
|
|
SELECT a.* FROM kl_library_info a, kl_concept b
|
|
|
WHERE a.is_deleted = 'N' and b.is_deleted = 'N'
|
|
|
AND a.concept_id = b.id
|
|
@@ -70,6 +96,8 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
AND (a.NAME LIKE concat('%',#{name},'%') OR a.spell LIKE concat('%',#{name},'%'))
|
|
|
+
|
|
|
+
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|