|
@@ -278,6 +278,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="manufacturer != null and manufacturer != ''">manufacturer ,</if>
|
|
<if test="manufacturer != null and manufacturer != ''">manufacturer ,</if>
|
|
|
<if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address,</if>
|
|
<if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address,</if>
|
|
|
<if test="indications != null and indications != ''">indications ,</if>
|
|
<if test="indications != null and indications != ''">indications ,</if>
|
|
|
|
|
+ <if test="ingredient != null and ingredient != ''">ingredient ,</if>
|
|
|
<if test="dosage != null and dosage != ''">dosage ,</if>
|
|
<if test="dosage != null and dosage != ''">dosage ,</if>
|
|
|
<if test="adverseReactions != null and adverseReactions != ''">adverse_reactions ,</if>
|
|
<if test="adverseReactions != null and adverseReactions != ''">adverse_reactions ,</if>
|
|
|
<if test="contraindications != null and contraindications != ''">contraindications ,</if>
|
|
<if test="contraindications != null and contraindications != ''">contraindications ,</if>
|
|
@@ -368,6 +369,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="manufacturer != null and manufacturer != ''">#{manufacturer} ,</if>
|
|
<if test="manufacturer != null and manufacturer != ''">#{manufacturer} ,</if>
|
|
|
<if test="manufacturerAddress != null and manufacturerAddress != ''">#{manufacturerAddress} ,</if>
|
|
<if test="manufacturerAddress != null and manufacturerAddress != ''">#{manufacturerAddress} ,</if>
|
|
|
<if test="indications != null and indications != ''">#{indications} ,</if>
|
|
<if test="indications != null and indications != ''">#{indications} ,</if>
|
|
|
|
|
+ <if test="ingredient != null and ingredient != ''">#{ingredient} ,</if>
|
|
|
<if test="dosage != null and dosage != ''">#{dosage} ,</if>
|
|
<if test="dosage != null and dosage != ''">#{dosage} ,</if>
|
|
|
<if test="adverseReactions != null and adverseReactions != ''">#{adverseReactions} ,</if>
|
|
<if test="adverseReactions != null and adverseReactions != ''">#{adverseReactions} ,</if>
|
|
|
<if test="contraindications != null and contraindications != ''">#{contraindications} ,</if>
|
|
<if test="contraindications != null and contraindications != ''">#{contraindications} ,</if>
|
|
@@ -461,6 +463,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer} ,</if>
|
|
<if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer} ,</if>
|
|
|
<if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address= #{manufacturerAddress} ,</if>
|
|
<if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address= #{manufacturerAddress} ,</if>
|
|
|
<if test="indications != null and indications != ''">indications = #{indications} ,</if>
|
|
<if test="indications != null and indications != ''">indications = #{indications} ,</if>
|
|
|
|
|
+ <if test="ingredient != null and ingredient != ''">ingredient = #{ingredient} ,</if>
|
|
|
<if test="dosage != null and dosage != ''">dosage = #{dosage} ,</if>
|
|
<if test="dosage != null and dosage != ''">dosage = #{dosage} ,</if>
|
|
|
<if test="adverseReactions != null and adverseReactions != ''">adverse_reactions = #{adverseReactions} ,</if>
|
|
<if test="adverseReactions != null and adverseReactions != ''">adverse_reactions = #{adverseReactions} ,</if>
|
|
|
<if test="contraindications != null and contraindications != ''">contraindications = #{contraindications} ,</if>
|
|
<if test="contraindications != null and contraindications != ''">contraindications = #{contraindications} ,</if>
|
|
@@ -797,4 +800,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
WHERE p.product_id IN <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
WHERE p.product_id IN <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectForbiddenKeywords" parameterType="String" resultType="com.fs.hisStore.domain.ForbiddenOnlineMedicine">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ id,
|
|
|
|
|
+ module,
|
|
|
|
|
+ category,
|
|
|
|
|
+ serial_number,
|
|
|
|
|
+ medicine_ingredient,
|
|
|
|
|
+ single_compound,
|
|
|
|
|
+ forbidden_keywords,
|
|
|
|
|
+ exception,
|
|
|
|
|
+ remarks
|
|
|
|
|
+ FROM forbidden_online_medicines
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="keyword == null or keyword.trim() == ''">
|
|
|
|
|
+ 1 = 0
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="keyword != null and keyword.trim() != ''">
|
|
|
|
|
+ AND (
|
|
|
|
|
+ (medicine_ingredient IS NOT NULL
|
|
|
|
|
+ AND medicine_ingredient != ''
|
|
|
|
|
+ AND medicine_ingredient LIKE CONCAT('%', #{keyword}, '%')
|
|
|
|
|
+ )
|
|
|
|
|
+ OR
|
|
|
|
|
+ (forbidden_keywords IS NOT NULL
|
|
|
|
|
+ AND forbidden_keywords != ''
|
|
|
|
|
+ AND forbidden_keywords LIKE CONCAT('%', #{keyword}, '%')
|
|
|
|
|
+ )
|
|
|
|
|
+ OR
|
|
|
|
|
+ (medicine_ingredient IS NOT NULL
|
|
|
|
|
+ AND medicine_ingredient != ''
|
|
|
|
|
+ AND REPLACE(medicine_ingredient, ' ', '') != ''
|
|
|
|
|
+ AND REPLACE(medicine_ingredient, ' ', '') LIKE CONCAT('%', #{keyword}, '%')
|
|
|
|
|
+ )
|
|
|
|
|
+ OR
|
|
|
|
|
+ (forbidden_keywords IS NOT NULL
|
|
|
|
|
+ AND forbidden_keywords != ''
|
|
|
|
|
+ AND REPLACE(forbidden_keywords, ' ', '') != ''
|
|
|
|
|
+ AND REPLACE(forbidden_keywords, ' ', '') LIKE CONCAT('%', #{keyword}, '%')
|
|
|
|
|
+ )
|
|
|
|
|
+ )
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ <if test="keyword != null and keyword.trim() != ''">
|
|
|
|
|
+ ORDER BY
|
|
|
|
|
+ CASE
|
|
|
|
|
+ WHEN medicine_ingredient = #{keyword} THEN 1
|
|
|
|
|
+ WHEN forbidden_keywords = #{keyword} THEN 1
|
|
|
|
|
+ WHEN medicine_ingredient LIKE CONCAT(#{keyword}, '%') THEN 2
|
|
|
|
|
+ WHEN forbidden_keywords LIKE CONCAT(#{keyword}, '%') THEN 2
|
|
|
|
|
+ ELSE 3
|
|
|
|
|
+ END,
|
|
|
|
|
+ module, category, serial_number
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|