提现 / 定时任务
This commit is contained in:
@@ -14,6 +14,17 @@
|
||||
where user_id=#{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateMayAmount">
|
||||
update user_money set
|
||||
<if test="type==1">
|
||||
amount=amount+#{amount}
|
||||
</if>
|
||||
<if test="type==2">
|
||||
amount=amount-#{amount}
|
||||
</if>
|
||||
where user_id=#{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateSysMoney">
|
||||
update user_money set
|
||||
<if test="type==1">
|
||||
|
||||
@@ -7,6 +7,14 @@
|
||||
select * from cash_out where state=1 order by out_at desc limit 3
|
||||
</select>
|
||||
|
||||
<select id="selectYesterday" resultType="com.sqx.modules.pay.entity.CashOut">
|
||||
SELECT * FROM cash_out
|
||||
WHERE
|
||||
state = 0 AND user_type = 1
|
||||
AND create_at < DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00' )
|
||||
AND create_at > DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY), '%Y-%m-%d 00:00:00')
|
||||
</select>
|
||||
|
||||
<select id="selectCashOutSum" resultType="Double">
|
||||
select sum(money) from cash_out where state in (0,1) and user_id=#{userId} and date_format(create_at,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user