|
@@ -52,6 +52,14 @@
|
|
|
,before_day_time = CURRENT_DATE
|
|
|
,before_day_init_balance = before_day_balance
|
|
|
,before_day_balance = balance
|
|
|
+ ,total_in_amount = total_in_amount + CASE
|
|
|
+ WHEN #{amount} > 0 THEN #{amount}
|
|
|
+ ELSE 0
|
|
|
+ END,
|
|
|
+ total_out_amount = total_out_amount + CASE
|
|
|
+ WHEN 0 > #{amount} THEN -#{amount}
|
|
|
+ ELSE 0
|
|
|
+ END
|
|
|
where id = #{accountId}
|
|
|
<if test="accountId != 5">
|
|
|
and balance + #{amount} >= 0
|