Browse Source

bug fixes

PLF 5 years ago
parent
commit
0cb13c1bf7

+ 3 - 3
src/main/resources/mapper/CmMallOrganizeProductsMapper.xml

@@ -172,13 +172,13 @@
                 AND a.classifyID = #{classifyID}
                 AND a.classifyID = #{classifyID}
             </if>
             </if>
             <if test="preferredProduct != null and preferredProduct != ''">
             <if test="preferredProduct != null and preferredProduct != ''">
-                AND a.preferredProduct != #{preferredProduct}
+                AND IFNULL(a.preferredProduct,'') != #{preferredProduct}
             </if>
             </if>
             <if test="commonlyProduct != null and commonlyProduct != ''">
             <if test="commonlyProduct != null and commonlyProduct != ''">
-                AND a.commonlyProduct != #{commonlyProduct}
+                AND IFNULL(a.commonlyProduct,'') != #{commonlyProduct}
             </if>
             </if>
             <if test="preferentialProduct != null and preferentialProduct != ''">
             <if test="preferentialProduct != null and preferentialProduct != ''">
-                AND a.preferentialProduct != #{preferentialProduct}
+                AND IFNULL(a.preferentialProduct,'') != #{preferentialProduct}
             </if>
             </if>
             <if test="productName != null and productName != ''">
             <if test="productName != null and productName != ''">
                 AND p.name LIKE concat('%',#{productName},'%')
                 AND p.name LIKE concat('%',#{productName},'%')

+ 4 - 4
src/main/resources/mapper/UserMapper.xml

@@ -48,16 +48,16 @@
         UPDATE
         UPDATE
           cm_mall_organize
           cm_mall_organize
         SET
         SET
-        <if test="contactNumber != null and contactNumber != ''">
+        <if test="contactNumber != null">
             contactNumber = #{contactNumber},
             contactNumber = #{contactNumber},
         </if>
         </if>
-        <if test="introduction != null and introduction != ''">
+        <if test="introduction != null">
             introduction = #{introduction}
             introduction = #{introduction}
         </if>
         </if>
-        <if test="afterSale != null and afterSale != ''">
+        <if test="afterSale != null">
             afterSale = #{afterSale}
             afterSale = #{afterSale}
         </if>
         </if>
-        <if test="shoppingNotes != null and shoppingNotes != ''">
+        <if test="shoppingNotes != null">
             shoppingNotes = #{shoppingNotes}
             shoppingNotes = #{shoppingNotes}
         </if>
         </if>
         WHERE
         WHERE