瀏覽代碼

优化 SQL语句错误问题

java110 5 年之前
父節點
當前提交
705923fdc6
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      java110-db/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml

+ 4 - 4
java110-db/src/main/resources/mapper/store/StoreServiceDaoImplMapper.xml

@@ -585,10 +585,10 @@
         where
         where
         1=1
         1=1
         <if test="storeTypeCd != null and storeTypeCd != ''">
         <if test="storeTypeCd != null and storeTypeCd != ''">
-            t.store_type_cd = #{storeTypeCd}
+            and t.store_type_cd = #{storeTypeCd}
         </if>
         </if>
         <if test="storeId != null and storeId != ''">
         <if test="storeId != null and storeId != ''">
-            t.store_id = #{storeId}
+            and t.store_id = #{storeId}
         </if>
         </if>
         and t.status_cd = '0'
         and t.status_cd = '0'
         <if test="page != -1 and page != null ">
         <if test="page != -1 and page != null ">
@@ -606,10 +606,10 @@
         where
         where
         1=1
         1=1
         <if test="storeTypeCd != null and storeTypeCd != ''">
         <if test="storeTypeCd != null and storeTypeCd != ''">
-            t.store_type_cd = #{storeTypeCd}
+            and t.store_type_cd = #{storeTypeCd}
         </if>
         </if>
         <if test="storeId != null and storeId != ''">
         <if test="storeId != null and storeId != ''">
-            t.store_id = #{storeId}
+            and t.store_id = #{storeId}
         </if>
         </if>
         and t.status_cd = '0'
         and t.status_cd = '0'
     </select>
     </select>