update 新增算法sha3x xtm币种,后台管理系统优化钱包出入账信息

This commit is contained in:
yyb
2025-09-28 13:48:27 +08:00
parent ef395c5253
commit 2efa65222d
22 changed files with 670 additions and 92 deletions

View File

@@ -35,8 +35,8 @@
coin,
`user`,
address,
`date`,
COALESCE(DATE(`should_out_date`),DATE(`date`)) as shouldOutDate,
`date_in` as `date`,
COALESCE(DATE(`should_out_date`),DATE(`date_in`),DATE(`date_out`)) as shouldOutDate,
max_height,
allocation_amount as allocationAmount,
transfer_amount as transferAmount
@@ -46,10 +46,10 @@
coin = #{coin} AND `user` = #{user}
<choose>
<when test="startDate != null and endDate != null">
and DATE(`date`) >= #{startDate} and DATE(`date`) <![CDATA[ <= ]]> #{endDate}
and DATE(`date_in`) >= #{startDate} and DATE(`date_in`) <![CDATA[ <= ]]> #{endDate}
</when>
<otherwise>
and `date` >= DATE_SUB(DATE(NOW()), INTERVAL 1 MONTH)
and `date_in` >= DATE_SUB(DATE(NOW()), INTERVAL 1 MONTH)
</otherwise>
</choose>
</where>

View File

@@ -7,23 +7,18 @@
<select id="getWalletIn" resultType="com.m2pool.manage.entity.ManageWalletOutIn">
SELECT
wi.coin,
wi.`user`,
COALESCE(wi.`should_out_date`, wi.`create_date`) as `date`,
wi.amount AS allocationAmount,
wi.should_out_date AS `shouldOutDate`,
wi.max_height AS maxHeight
coin,
`user`,
create_date as dateIn,
amount AS allocationAmount,
COALESCE(should_out_date,create_date) AS `shouldOutDate`,
max_height AS maxHeight
FROM
wallet_in wi
wallet_in
<where>
<choose>
<when test="startDate != null">
wi.`create_date` >= DATE(#{startDate})
</when>
<otherwise>
wi.`create_date` <![CDATA[ <= ]]> NOW()
</otherwise>
</choose>
<if test="startDate != null">
`create_date` >= DATE(#{startDate})
</if>
</where>
</select>
<select id="getWalletOut" resultType="com.m2pool.manage.entity.ManageWalletOutIn">
@@ -31,16 +26,16 @@
wo.coin,
wo.`user`,
wo.address,
wo.`date`,
wo.`date` as dateIn,
wo.`date` as dateOut,
wo.max_height AS maxHeight,
wo.tx_id AS txId,
wo.amount AS transferAmount
FROM
wallet_outv2 wo
<where>
AND wo.`date` <![CDATA[ <= ]]> NOW()
<if test="startDate != null">
AND wo.`date` > #{startDate}
wo.`date` >= #{startDate}
</if>
</where>
</select>
@@ -48,6 +43,6 @@
select coin, max(max_height) as maxHeight, max(should_out_date) AS shouldOutDate, `user`, sum(amount) as needPayAmount from wallet_in where state = 2 group by coin,`user`
</select>
<select id="getMaxDateData" resultType="java.time.LocalDateTime">
select `date` from manage_wallet_out_in order by `date` desc limit 1
select DATE(`date_in`) from manage_wallet_out_in order by `date_in` desc limit 1
</select>
</mapper>