update 新增数据补全,删除接口
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
`user`,
|
||||
address,
|
||||
`date`,
|
||||
DATE(`date`) as shouldOutDate,
|
||||
COALESCE(DATE(`should_out_date`),DATE(`date`)) as shouldOutDate,
|
||||
max_height,
|
||||
allocation_amount as allocationAmount,
|
||||
transfer_amount as transferAmount
|
||||
@@ -53,7 +53,7 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
order by `date` desc
|
||||
order by `shouldOutDate` desc
|
||||
</select>
|
||||
<select id="getHistoryBalance" resultType="com.m2pool.manage.dto.HistoryBalanceDto">
|
||||
SELECT
|
||||
@@ -167,9 +167,10 @@
|
||||
user_account_balance uab
|
||||
JOIN user_miner_account uma ON uma.id = uab.ma_id
|
||||
WHERE
|
||||
uab.status = 0 AND (
|
||||
<foreach collection="list" item="item" separator="OR">
|
||||
(`user` = #{item.user} AND coin = #{item.coin})
|
||||
</foreach>
|
||||
(`miner_user` = #{item.user} AND coin = #{item.coin})
|
||||
</foreach>)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
SELECT
|
||||
wi.coin,
|
||||
wi.`user`,
|
||||
wi.should_out_date AS `date`,
|
||||
COALESCE(wi.`should_out_date`, wi.`create_date`) as `date`,
|
||||
wi.amount AS allocationAmount,
|
||||
wi.`create_date` as `shouldOutDate`,
|
||||
wi.should_out_date AS `shouldOutDate`,
|
||||
wi.max_height AS maxHeight
|
||||
FROM
|
||||
wallet_in wi
|
||||
<where>
|
||||
<choose>
|
||||
<when test="startDate != null">
|
||||
wi.`should_out_date` >= DATE(#{startDate})
|
||||
wi.`create_date` >= DATE(#{startDate})
|
||||
</when>
|
||||
<otherwise>
|
||||
wi.`should_out_date` <![CDATA[ <= ]]> NOW()
|
||||
wi.`create_date` <![CDATA[ <= ]]> NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
@@ -47,4 +47,7 @@
|
||||
<select id="summaryOfPendingPayments" resultType="com.m2pool.manage.dto.SummaryOfPendingPaymentsDto">
|
||||
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>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user