|
@@ -90,6 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="creditStatus != null and creditStatus == 1">
|
|
|
AND vto.pay_price = vto.order_received
|
|
|
</if>
|
|
|
+ <if test="finishStatus != null">
|
|
|
+ AND vto.finish_status = #{finishStatus}
|
|
|
+ </if>
|
|
|
<if test="invoiceStatus != null and invoiceStatus != ''">
|
|
|
AND vto.invoice_status = #{invoiceStatus}
|
|
|
</if>
|
|
@@ -102,6 +105,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="orderSn != null and orderSn != ''">
|
|
|
AND vto.order_sn = #{orderSn}
|
|
|
</if>
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ AND vto.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
<if test="orderSnList != null and orderSnList.size()!=0 ">
|
|
|
AND vto.order_sn in
|
|
|
<foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
|
|
@@ -110,8 +116,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
<if test="keyword != null and keyword != ''">
|
|
|
AND (
|
|
|
- vto.create_org LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
--- OR vto.course_org LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
+ vto.order_sn LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
+ OR vto.create_no LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
OR vto.order_org LIKE CONCAT( '%', #{keyword}, '%' ))
|
|
|
</if>
|
|
|
order by vto.create_time DESC
|
|
@@ -160,6 +166,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="orderSn != null and orderSn != ''">
|
|
|
AND ot.order_sn = #{orderSn}
|
|
|
</if>
|
|
|
+ <if test="finishStatus != null">
|
|
|
+ AND ot.finish_status = #{finishStatus}
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ AND ot.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
<if test="orderSnList != null and orderSnList.size()!=0 ">
|
|
|
AND ot.order_sn in
|
|
|
<foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
|
|
@@ -168,7 +180,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
<if test="keyword != null and keyword != ''">
|
|
|
AND (
|
|
|
- ot.create_org LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
+ ot.order_sn LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
+ OR ot.create_no LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
OR ot.order_org LIKE CONCAT( '%', #{keyword}, '%' ))
|
|
|
</if>
|
|
|
) + (SELECT
|
|
@@ -213,6 +226,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="invoiceStatus != null and invoiceStatus != ''">
|
|
|
AND o.invoice_status = #{invoiceStatus}
|
|
|
</if>
|
|
|
+ <if test="finishStatus != null">
|
|
|
+ AND o.finish_status = #{finishStatus}
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null and tenantId != ''">
|
|
|
+ AND o.tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
AND o.create_time <![CDATA[ >= ]]> #{startTime}
|
|
|
</if>
|
|
@@ -227,6 +246,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
+ </if>
|
|
|
+ <if test="keyword != null and keyword != ''">
|
|
|
+ AND o.order_sn LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
</if>
|
|
|
)) as number
|
|
|
</select>
|