提现 / 定时任务

This commit is contained in:
2024-12-04 18:18:38 +08:00
parent 32a8eb78d6
commit d26a250761
16 changed files with 338 additions and 69 deletions

View File

@@ -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">

View File

@@ -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 &lt; DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00' )
AND create_at &gt; 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>