|
@@ -49,10 +49,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="isDisplay" column="is_display" />
|
|
|
<result property="tuiCateId" column="tui_cate_id" />
|
|
|
<result property="companyIds" column="company_ids" />
|
|
|
+ <result property="isDrug" column="is_drug"/>
|
|
|
+ <result property="drugImage" column="drug_image"/>
|
|
|
+ <result property="drugRegCertNo" column="drug_reg_certNo"/>
|
|
|
+ <result property="commonName" column="common_name"/>
|
|
|
+ <result property="dosageForm" column="dosage_form"/>
|
|
|
+ <result property="unitPrice" column="unit_price"/>
|
|
|
+ <result property="batchNumber" column="batch_number"/>
|
|
|
+ <result property="mah" column="mah"/>
|
|
|
+ <result property="mahAddress" column="mah_address"/>
|
|
|
+ <result property="manufacturer" column="manufacturer"/>
|
|
|
+ <result property="manufacturerAddress" column="manufacturer_address"/>
|
|
|
+ <result property="indications" column="indications"/>
|
|
|
+ <result property="dosage" column="dosage"/>
|
|
|
+ <result property="adverseReactions" column="adverse_reactions"/>
|
|
|
+ <result property="contraindications" column="contraindications"/>
|
|
|
+ <result property="precautions" column="precautions"/>
|
|
|
+ <result property="isAudit" column="is_audit"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsStoreProductVo">
|
|
|
- select product_id, image,video, slider_image, product_name, product_info, keyword, bar_code, cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show, is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage, is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral, integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,is_display,tui_cate_id,company_ids from fs_store_product_scrm
|
|
|
+ select product_id, image,video, slider_image, product_name, product_info, keyword, bar_code,
|
|
|
+ cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show,
|
|
|
+ is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage,
|
|
|
+ is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral,
|
|
|
+ integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,
|
|
|
+ is_display,tui_cate_id,company_ids,is_drug,drug_image,drug_reg_certNo,common_name,dosage_form,
|
|
|
+ unit_price,batch_number,mah,mah_address,manufacturer,manufacturer_address,indications,dosage,
|
|
|
+ adverse_reactions,contraindications,precautions,is_audit
|
|
|
+ from fs_store_product_scrm
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsStoreProductByProductId" parameterType="Long" resultMap="FsStoreProductResult">
|
|
@@ -102,6 +127,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="prescribeFactory != null and prescribeFactory != ''"> and prescribe_factory = #{prescribeFactory}</if>
|
|
|
<if test="prescribeName != null and prescribeName != ''"> and prescribe_name like concat('%', #{prescribeName}, '%')</if>
|
|
|
<if test="isDisplay != null "> and is_display = #{isDisplay}</if>
|
|
|
+ <if test="isDrug != null and isDrug != ''">and is_drug = #{isDrug} ,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">and drug_image = #{drugImage} ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">and drug_reg_certNo = #{drugRegCertNo} ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">and common_name = #{commonName} ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">and dosage_form = #{dosageForm} ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">and unit_price = #{unitPrice} ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">and batch_number = #{batchNumber} ,</if>
|
|
|
+ <if test="mah != null and mah != ''">and mah = #{mah} ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">and mah_address = #{mahAddress} ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">and manufacturer = #{manufacturer} ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">and manufacturer_address= #{manufacturerAddress} ,</if>
|
|
|
+ <if test="indications != null and indications != ''">and indications = #{indications} ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">and dosage = #{dosage} ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">and adverse_reactions = #{adverseReactions} ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">and contraindications = #{contraindications} ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">and precautions = #{precautions} ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">and is_audit = #{isAudit} ,</if>
|
|
|
|
|
|
</where>
|
|
|
</select>
|
|
@@ -168,6 +210,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDisplay != null">is_display,</if>
|
|
|
<if test="tuiCateId != null">tui_cate_id,</if>
|
|
|
<if test="companyIds != null and companyIds != ''">company_ids,</if>
|
|
|
+ <if test="isDrug!= null and isDrug != ''">is_drug,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">drug_image ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_certNo ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">common_name ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">dosage_form ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">unit_price ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">batch_number ,</if>
|
|
|
+ <if test="mah != null and mah != ''">mah ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">mah_address ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">manufacturer ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address,</if>
|
|
|
+ <if test="indications != null and indications != ''">indications ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">dosage ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">adverse_reactions ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">contraindications ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">precautions ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">is_audit ,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="image != null and image != ''">#{image},</if>
|
|
@@ -213,6 +272,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDisplay != null">#{isDisplay},</if>
|
|
|
<if test="tuiCateId != null">#{tuiCateId},</if>
|
|
|
<if test="companyIds != null and companyIds != ''">#{companyIds},</if>
|
|
|
+ <if test="isDrug!= null and isDrug!= ''">#{isDrug} ,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">#{drugImage} ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">#{drugRegCertNo} ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">#{commonName} ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">#{dosageForm} ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">#{unitPrice} ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">#{batchNumber} ,</if>
|
|
|
+ <if test="mah != null and mah != ''">#{mah} ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">#{mahAddress} ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">#{manufacturer} ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">#{manufacturerAddress} ,</if>
|
|
|
+ <if test="indications != null and indications != ''">#{indications} ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">#{dosage} ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">#{adverseReactions} ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">#{contraindications} ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">#{precautions} ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">#{isAudit} ,</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -262,6 +338,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="isDisplay != null">is_display = #{isDisplay},</if>
|
|
|
<if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
|
|
|
<if test="companyIds != null and companyIds != ''">company_ids = #{companyIds},</if>
|
|
|
+ <if test="isDrug != null and isDrug != ''">is_drug = #{isDrug} ,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">drug_image = #{drugImage} ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_certNo = #{drugRegCertNo} ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">common_name = #{commonName} ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">dosage_form = #{dosageForm} ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">unit_price = #{unitPrice} ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">batch_number = #{batchNumber} ,</if>
|
|
|
+ <if test="mah != null and mah != ''">mah = #{mah} ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">mah_address = #{mahAddress} ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer} ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address= #{manufacturerAddress} ,</if>
|
|
|
+ <if test="indications != null and indications != ''">indications = #{indications} ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">dosage = #{dosage} ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">adverse_reactions = #{adverseReactions} ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">contraindications = #{contraindications} ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">precautions = #{precautions} ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">is_audit = #{isAudit} ,</if>
|
|
|
+
|
|
|
</trim>
|
|
|
where product_id = #{productId}
|
|
|
</update>
|
|
@@ -277,10 +371,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyIds != null and companyIds != ''">
|
|
|
company_ids = #{companyIds}
|
|
|
</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">
|
|
|
+ is_audit = #{isAudit}
|
|
|
+ </if>
|
|
|
where product_id = #{item}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
+ <update id="batchAudit" parameterType="com.fs.statis.dto.ProductAuditDTO">
|
|
|
+ UPDATE fs_store_product_scrm
|
|
|
+ SET is_audit = #{isAudit}
|
|
|
+ WHERE product_id IN
|
|
|
+ <foreach item="productId" collection="productIds" open="(" separator="," close=")">
|
|
|
+ #{productId}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
<delete id="deleteFsStoreProductById" parameterType="Long">
|
|
|
delete from fs_store_product_scrm where product_id = #{productId}
|
|
|
</delete>
|