|
|
|
@ -513,12 +513,22 @@ |
|
|
|
#{statuses} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="areaPayTypeList != null and areaPayTypeList.size > 0"> |
|
|
|
AND ( |
|
|
|
<foreach collection="areaPayTypeList" item="item" separator=" OR "> |
|
|
|
(crc.received_market = #{item.areaId,jdbcType=INTEGER} AND crc.pay_type = #{item.payType,jdbcType=VARCHAR}) |
|
|
|
<if test="areaPayTypeList != null and areaPayTypeList.size() > 0"> |
|
|
|
<bind name="hasValidCondition" value="false" /> |
|
|
|
<foreach collection="areaPayTypeList" item="item"> |
|
|
|
<if test="item.areaId != null and item.areaId != '' and item.payType != null and item.payType != ''"> |
|
|
|
<bind name="hasValidCondition" value="true" /> |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
<if test="hasValidCondition"> |
|
|
|
AND ( |
|
|
|
<foreach collection="areaPayTypeList" item="item" separator=" OR "> |
|
|
|
<if test="item.areaId != null and item.areaId != '' and item.payType != null and item.payType != ''"> |
|
|
|
(crc.received_market = #{item.areaId,jdbcType=INTEGER} AND crc.pay_type = #{item.payType,jdbcType=VARCHAR}) |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
|
|
|
|
UNION ALL |
|
|
|
@ -554,7 +564,7 @@ |
|
|
|
FROM cash_record_refund crr |
|
|
|
INNER JOIN cash_record_collection crc ON crr.related_id = crc.id |
|
|
|
left join recharge_activity ra on ra.id = crc.activity |
|
|
|
WHERE crc.status =6 and crr.status =41 |
|
|
|
WHERE crr.status =41 |
|
|
|
<if test="jwcode != null"> |
|
|
|
and crc.jwcode = #{jwcode} |
|
|
|
</if> |
|
|
|
@ -564,6 +574,12 @@ |
|
|
|
#{markets} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="statuses!=null and statuses.size()>0"> |
|
|
|
and crc.status IN |
|
|
|
<foreach collection="statuses" item="statuses" open="(" separator="," close=")"> |
|
|
|
#{statuses} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<if test="performanceMarkets!= null and performanceMarkets.size > 0"> |
|
|
|
AND crc.performance_market IN |
|
|
|
<foreach collection="performanceMarkets" item="performanceMarkets" open="(" separator="," close=")"> |
|
|
|
@ -582,12 +598,22 @@ |
|
|
|
<if test="orderCode!= null and orderCode.length > 0"> |
|
|
|
AND crc.order_code like CONCAT('%', #{orderCode}, '%') |
|
|
|
</if> |
|
|
|
<if test="areaPayTypeList != null and areaPayTypeList.size > 0"> |
|
|
|
AND ( |
|
|
|
<foreach collection="areaPayTypeList" item="item" separator=" OR "> |
|
|
|
(crc.received_market = #{item.areaId,jdbcType=INTEGER} AND crc.pay_type = #{item.payType,jdbcType=VARCHAR}) |
|
|
|
<if test="areaPayTypeList != null and areaPayTypeList.size() > 0"> |
|
|
|
<bind name="hasValidCondition" value="false" /> |
|
|
|
<foreach collection="areaPayTypeList" item="item"> |
|
|
|
<if test="item.areaId != null and item.areaId != '' and item.payType != null and item.payType != ''"> |
|
|
|
<bind name="hasValidCondition" value="true" /> |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
<if test="hasValidCondition"> |
|
|
|
AND ( |
|
|
|
<foreach collection="areaPayTypeList" item="item" separator=" OR "> |
|
|
|
<if test="item.areaId != null and item.areaId != '' and item.payType != null and item.payType != ''"> |
|
|
|
(crc.received_market = #{item.areaId,jdbcType=INTEGER} AND crc.pay_type = #{item.payType,jdbcType=VARCHAR}) |
|
|
|
</if> |
|
|
|
</foreach> |
|
|
|
) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
) AS combined_result |
|
|
|
ORDER BY |
|
|
|
|