he2802 2 년 전
부모
커밋
5799b142be
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      zhongzheng-system/src/main/resources/mapper/modules/top/TopDivideOrderMapper.xml

+ 8 - 2
zhongzheng-system/src/main/resources/mapper/modules/top/TopDivideOrderMapper.xml

@@ -42,7 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             tdo.order_type = 1
           AND tdo.divide_log_id = #{divideLogId}
         <if test="startPrice != null and startPrice != ''">
-            AND (oo.order_price - oo.brokerage) BETWEEN #{startPrice} and #{endPrice}
+            AND (oo.order_price - oo.brokerage) <![CDATA[ >= ]]> #{startPrice}
+        </if>
+        <if test="endPrice != null and endPrice != ''">
+            AND (oo.order_price - oo.brokerage) <![CDATA[ <= ]]> #{endPrice}
         </if>
     </select>
 
@@ -67,7 +70,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             tdo.order_type = 2
           AND tdo.divide_log_id = #{divideLogId}
         <if test="startPrice != null and startPrice != ''">
-            AND (oo.order_price - oo.brokerage) BETWEEN #{startPrice} and #{endPrice}
+            AND (oo.order_price - oo.brokerage) <![CDATA[ >= ]]> #{startPrice}
+        </if>
+        <if test="endPrice != null and endPrice != ''">
+            AND (oo.order_price - oo.brokerage) <![CDATA[ <= ]]> #{endPrice}
         </if>
     </select>