Bladeren bron

添加搜索条件

chenguo 1 week geleden
bovenliggende
commit
d894c2d635

+ 42 - 0
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -97,6 +97,48 @@ public interface FsStoreProductScrmMapper
             "<if test = 'maps.isAudit != null '> " +
             "and p.is_audit = #{maps.isAudit} " +
             "</if>" +
+            "<if test='maps.drugRegCertNo != null and maps.drugRegCertNo != \"\"'>" +
+            "            AND drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')" +
+            "</if>" +
+            "<if test='maps.commonName != null and maps.commonName != \"\"'>" +
+            "    AND common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
+            "</if>" +
+            "<if test='maps.dosageForm != null and maps.dosageForm != \"\"'>" +
+            "    AND dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
+            "</if>" +
+            "<if test='maps.unitPrice != null and maps.unitPrice != \"\"'>" +
+            "    AND unit_price = #{maps.unitPrice}" +
+            "</if>" +
+            "<if test='maps.batchNumber != null and maps.batchNumber != \"\"'>" +
+            "    AND batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
+            "</if>" +
+            "<if test='maps.mah != null and maps.mah != \"\"'>" +
+            "    AND mah LIKE CONCAT('%', #{maps.mah}, '%')" +
+            "</if>" +
+            "<if test='maps.mahAddress != null and maps.mahAddress != \"\"'>" +
+            "    AND mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
+            "</if>" +
+            "<if test='maps.manufacturer != null and maps.manufacturer != \"\"'>" +
+            "    AND manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
+            "</if>" +
+            "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress != \"\"'>" +
+            "    AND manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
+            " </if>" +
+            " <if test='maps.indications != null and maps.indications != \"\"'>" +
+            "     AND indications LIKE CONCAT('%', #{maps.indications}, '%')" +
+            " </if>" +
+            " <if test='maps.dosage != null and maps.dosage != \"\"'>" +
+            "     AND dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
+            " </if>" +
+            " <if test='maps.adverseReactions != null and maps.adverseReactions != \"\"'>" +
+            "     AND adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
+            " </if>" +
+            " <if test='maps.contraindications != null and maps.contraindications != \"\"'>" +
+            "     AND contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
+            " </if>" +
+            " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
+            "     AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
+            " </if>"+
             " order by p.product_id desc "+
             "</script>"})
     List<FsStoreProductListVO> selectFsStoreProductListVO(@Param("maps") FsStoreProductScrm fsStoreProduct);

+ 17 - 5
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <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="drugRegCertNo" column="drug_reg_cert_no"/>
         <result property="commonName" column="common_name"/>
         <result property="dosageForm" column="dosage_form"/>
         <result property="unitPrice" column="unit_price"/>
@@ -74,12 +74,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                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,
+               is_display,tui_cate_id,company_ids,is_drug,drug_image,drug_reg_cert_no,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>
 
+    <sql id="selectFsStoreProductPVo">
+        select p.product_id, p.image,p.video, p.slider_image, p.product_name, p.product_info, p.keyword, p.bar_code,
+               p.cate_id, p.price, p.vip_price, p.ot_price, p.postage, p.unit_name, p.sort, p.sales, p.stock, p.is_show,
+               p.is_hot, p.is_benefit, p.is_best, p.is_new, p.description, p.create_time, p.update_time, p.is_postage,
+               p.is_del, p.give_integral, p.cost, p.is_good, p.browse, p.code_path, p.temp_id, p.spec_type, p.is_integral,
+               p.integral, p.product_type, p.prescribe_code, p.prescribe_spec, p.prescribe_factory, p.prescribe_name,
+               p.is_display,p.tui_cate_id,p.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
+               p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.dosage,
+               p.adverse_reactions,p.contraindications,p.precautions,p.is_audit
+        from fs_store_product_scrm p
+    </sql>
+
     <select id="selectFsStoreProductByProductId" parameterType="Long" resultMap="FsStoreProductResult">
         <include refid="selectFsStoreProductVo"/>
         where product_id = #{productId}
@@ -129,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="drugRegCertNo != null and drugRegCertNo != ''">and drug_reg_cert_no = #{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>
@@ -223,7 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_cert_no ,</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>
@@ -351,7 +363,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_cert_no = #{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>