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>