|
@@ -81,6 +81,8 @@
|
|
|
(select sum(a.trans_amount_) from user_cash_account_record a where a.account_id_ = t.user_id_
|
|
|
and a.post_status_ = 'WAIT' and a.in_or_out_ = 'IN') as amountUnrecorded,
|
|
|
(select sum(a.trans_amount_) from user_cash_account_record a where a.account_id_ = t.user_id_
|
|
|
+ and a.post_status_ = 'RECORDED' and a.in_or_out_ = 'IN') as amountRecorded,
|
|
|
+ (select sum(a.trans_amount_) from user_cash_account_record a where a.account_id_ = t.user_id_
|
|
|
and a.post_status_ = 'RECORDED' and a.in_or_out_ = 'IN'
|
|
|
and a.biz_type_ in ('LIVE_SHARE','VIDEO_SHARE','MUSIC_SHARE','VIP_SHARE','MALL_SHARE')) as amountShare
|
|
|
FROM user_cash_account t
|
|
@@ -125,6 +127,8 @@
|
|
|
sum(if(t.biz_type_ = 'MALL_SHARE',t.trans_amount_,0)) as mallShareAmount
|
|
|
from user_cash_account_record t
|
|
|
<where>
|
|
|
+ and t.post_status_ = 'RECORDED'
|
|
|
+ and t.in_or_out_ = 'IN' and t.err_flag_ != 1
|
|
|
<if test="param.startTime !=null">
|
|
|
<![CDATA[AND t.create_time_ >= #{param.startTime} ]]>
|
|
|
</if>
|
|
@@ -156,7 +160,7 @@
|
|
|
|
|
|
<select id="totalTransAmountByOrderNo" resultType="java.math.BigDecimal">
|
|
|
select sum(trans_amount_) from user_cash_account_record
|
|
|
- where post_status_ in ('WAIT','FROZEN','RECORDED') and in_or_out_ = 'IN' and err_flag_ = 0
|
|
|
+ where post_status_ in ('WAIT','FROZEN','RECORDED') and in_or_out_ = 'IN' and err_flag_ != 1
|
|
|
and order_no_ = #{orderNo}
|
|
|
</select>
|
|
|
|
|
@@ -168,7 +172,8 @@
|
|
|
sum(if(t.post_status_ = 'CANCEL',t.trans_amount_,0)) as cancelAmount,
|
|
|
count(distinct t.buy_user_) as studentNum
|
|
|
from user_cash_account_record t
|
|
|
- where t.account_id_ = #{param.userId}
|
|
|
+ where t.in_or_out_ = 'IN' and t.err_flag_ != 1
|
|
|
+ and t.account_id_ = #{param.userId}
|
|
|
and t.biz_type_ in ('LIVE_SHARE','VIDEO_SHARE','MUSIC_SHARE','VIP_SHARE','MALL_SHARE')
|
|
|
</select>
|
|
|
</mapper>
|