|
@@ -46,13 +46,7 @@
|
|
SELECT
|
|
SELECT
|
|
vto.*
|
|
vto.*
|
|
FROM
|
|
FROM
|
|
- <if test="businessFullName != null and businessFullName != '' and ((userCard == null or userCard == '') and (userName == null or userName == ''))">
|
|
|
|
- ( SELECT DISTINCT order_sn
|
|
|
|
- FROM `v_top_order_business` where INSTR( business_full_name,#{businessFullName} ) > 0
|
|
|
|
- ) a
|
|
|
|
- LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
|
|
|
|
- </if>
|
|
|
|
- <if test="((userCard != null and userCard != '') or (userName != null and userName != '')) and (businessFullName == null or businessFullName == '')">
|
|
|
|
|
|
+ <if test="((userCard != null and userCard != '') or (userName != null and userName != ''))">
|
|
( SELECT DISTINCT order_sn
|
|
( SELECT DISTINCT order_sn
|
|
FROM `v_top_order_card` where 1=1
|
|
FROM `v_top_order_card` where 1=1
|
|
<if test="userCard != null and userCard != ''">
|
|
<if test="userCard != null and userCard != ''">
|
|
@@ -64,33 +58,16 @@
|
|
) a
|
|
) a
|
|
LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
|
|
LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
|
|
</if>
|
|
</if>
|
|
- <if test="((userCard != null and userCard != '') or (userName != null and userName != '')) and businessFullName != null and businessFullName != ''">
|
|
|
|
- ( SELECT DISTINCT order_sn
|
|
|
|
- FROM (
|
|
|
|
- SELECT
|
|
|
|
- DISTINCT order_sn
|
|
|
|
- FROM
|
|
|
|
- ( SELECT order_sn FROM v_top_order_business WHERE INSTR( business_full_name,#{businessFullName} ) > 0 UNION
|
|
|
|
- ALL SELECT order_sn FROM v_top_order_card
|
|
|
|
- WHERE 1 = 1
|
|
|
|
- <if test="userCard != null and userCard != ''">
|
|
|
|
- AND user_card = #{userCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
|
|
|
|
- </if>
|
|
|
|
- <if test="userName != null and userName != ''">
|
|
|
|
- AND user_name LIKE CONCAT( '%', #{userName}, '%' )
|
|
|
|
- </if>
|
|
|
|
- ) b
|
|
|
|
- ) m
|
|
|
|
- ) a
|
|
|
|
- LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
|
|
|
|
- </if>
|
|
|
|
- <if test="(userCard == null or userCard == '') and (businessFullName == null or businessFullName == '') and (userName == null or userName == '')">
|
|
|
|
|
|
+ <if test="(userCard == null or userCard == '') and (userName == null or userName == '')">
|
|
v_top_order vto
|
|
v_top_order vto
|
|
</if>
|
|
</if>
|
|
WHERE vto.`status` in (0,1)
|
|
WHERE vto.`status` in (0,1)
|
|
<if test="operationType != null">
|
|
<if test="operationType != null">
|
|
AND vto.operation_type = #{operationType}
|
|
AND vto.operation_type = #{operationType}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="businessFullName != null and businessFullName != ''">
|
|
|
|
+ AND vto.business_full_name = #{businessFullName}
|
|
|
|
+ </if>
|
|
<if test="checkStatus != null and checkStatus.size()!=0 ">
|
|
<if test="checkStatus != null and checkStatus.size()!=0 ">
|
|
AND vto.check_status in
|
|
AND vto.check_status in
|
|
<foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">
|