ruqinhu 5 лет назад
Родитель
Сommit
1b3c79e31a
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/main/resources/mybatis/mapper/order/YSOrder.xml

+ 4 - 4
src/main/resources/mybatis/mapper/order/YSOrder.xml

@@ -124,13 +124,13 @@
         from ys_order
         where od_status != 99
         <if test="od_no != null and od_no != ''">
-            and od_no like concat ("%",#{od_no,jdbcType=VARCHAR},"%")
+            and od_no like concat ('%',#{od_no,jdbcType=VARCHAR},'%')
         </if>
         <if test="od_user_address != null and od_user_address != ''">
-            and od_user_address like "%"#{od_user_address,jdbcType=VARCHAR}"%"
+            and od_user_address like concat ('%',#{od_user_address,jdbcType=VARCHAR},'%')
         </if>
         <if test="od_user_name != null and od_user_name != ''">
-            and od_user_name like "%"#{od_user_name,jdbcType=VARCHAR}"%"
+            and od_user_name like concat ('%',#{od_user_name,jdbcType=VARCHAR},'%')
         </if>
         <if test="od_startdate != null and od_startdate != ''">
             and DATE_FORMAT(od_startdate,'%Y-%m-%d') &gt;= DATE_FORMAT(#{od_startdate,jdbcType=DATE},'%Y-%m-%d')
@@ -157,7 +157,7 @@
             and od_cityid = #{od_cityid,jdbcType=INTEGER}
         </if>
         <if test="od_contract != null and od_contract != ''">
-            and od_contract like "%"#{od_contract,jdbcType=VARCHAR}"%"
+            and od_contract like concat ('%',#{od_contract,jdbcType=VARCHAR},'%')
         </if>
         <if test="od_consultantid != null and od_consultantid != ''">
             and od_consultantid = #{od_consultantid,jdbcType=INTEGER}