peicj 1 месяц назад
Родитель
Сommit
61ed6f2edb

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

@@ -75,8 +75,8 @@ public interface FsStoreProductScrmMapper
      */
     public int deleteFsStoreProductByIds(Long[] productIds);
     @Select({"<script> " +
-            "select p.*,pc.cate_name, fs_store.store_name from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
-            "left join fs_store on fs_store.store_id = p.store_id " +
+            "select p.*,pc.cate_name, fs.store_name from fs_store_product_scrm p left join fs_store_product_category_scrm pc on p.cate_id=pc.cate_id  " +
+            "left join fs_store fs on fs.store_id = p.store_id " +
             "where 1=1 " +
             "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
             "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
@@ -97,53 +97,53 @@ public interface FsStoreProductScrmMapper
             "and p.store_id = #{maps.storeId} " +
             "</if>"+
             "<if test = 'maps.storeIds != null '>" +
-            "and store_id in " +
+            "and p.store_id in " +
             "<foreach collection='maps.storeIds'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach>" +
             "</if>" +
             "<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}, '%')" +
+            "    AND p.drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')" +
             "</if>" +
             "<if test='maps.commonName != null and maps.commonName != \"\"'>" +
-            "    AND common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
+            "    AND p.common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
             "</if>" +
             "<if test='maps.dosageForm != null and maps.dosageForm != \"\"'>" +
-            "    AND dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
+            "    AND p.dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
             "</if>" +
             "<if test='maps.unitPrice != null and maps.unitPrice != \"\"'>" +
-            "    AND unit_price = #{maps.unitPrice}" +
+            "    AND p.unit_price = #{maps.unitPrice}" +
             "</if>" +
             "<if test='maps.batchNumber != null and maps.batchNumber != \"\"'>" +
-            "    AND batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
+            "    AND p.batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
             "</if>" +
             "<if test='maps.mah != null and maps.mah != \"\"'>" +
-            "    AND mah LIKE CONCAT('%', #{maps.mah}, '%')" +
+            "    AND p.mah LIKE CONCAT('%', #{maps.mah}, '%')" +
             "</if>" +
             "<if test='maps.mahAddress != null and maps.mahAddress != \"\"'>" +
-            "    AND mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
+            "    AND p.mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
             "</if>" +
             "<if test='maps.manufacturer != null and maps.manufacturer != \"\"'>" +
-            "    AND manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
+            "    AND p.manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
             "</if>" +
             "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress != \"\"'>" +
-            "    AND manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
+            "    AND p.manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
             " </if>" +
             " <if test='maps.indications != null and maps.indications != \"\"'>" +
-            "     AND indications LIKE CONCAT('%', #{maps.indications}, '%')" +
+            "     AND p.indications LIKE CONCAT('%', #{maps.indications}, '%')" +
             " </if>" +
             " <if test='maps.dosage != null and maps.dosage != \"\"'>" +
-            "     AND dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
+            "     AND p.dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
             " </if>" +
             " <if test='maps.adverseReactions != null and maps.adverseReactions != \"\"'>" +
-            "     AND adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
+            "     AND p.adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
             " </if>" +
             " <if test='maps.contraindications != null and maps.contraindications != \"\"'>" +
-            "     AND contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
+            "     AND p.contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
             " </if>" +
             " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
-            "     AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
+            "     AND p.precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
             " </if>"+
             " order by p.product_id desc "+
             "</script>"})