update 后台管理新增定时任务开关,收益入库定时任务修改。新增用户待支付汇总 接口
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
FROM
|
||||
wallet_in
|
||||
where
|
||||
coin = #{coin} AND `user` = #{user}
|
||||
coin = #{coin} AND `user` = #{user} and state = 1
|
||||
</select>
|
||||
<select id="getAccountExpend" resultType="java.math.BigDecimal">
|
||||
SELECT
|
||||
@@ -153,8 +153,23 @@
|
||||
select count(*) from ${coin}_mhs30m where `date` <![CDATA[ <= ]]> #{date}
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteOnlineAndOfflineData">
|
||||
delete from ${coin}_mhs30m where `date` <![CDATA[ <= ]]> #{date} LIMIT 5000
|
||||
</delete>
|
||||
|
||||
<select id="getStartPayments" resultType="com.m2pool.manage.dto.SummaryOfPendingPaymentsDto">
|
||||
SELECT
|
||||
uma.miner_user AS `user`,
|
||||
uma.coin,
|
||||
COALESCE ( uab.amount, 0 ) as startPayAmount
|
||||
FROM
|
||||
user_account_balance uab
|
||||
JOIN user_miner_account uma ON uma.id = uab.ma_id
|
||||
WHERE
|
||||
<foreach collection="list" item="item" separator="OR">
|
||||
(`user` = #{item.user} AND coin = #{item.coin})
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
SELECT
|
||||
wi.coin,
|
||||
wi.`user`,
|
||||
wi.should_out_date AS shouldOutDate,
|
||||
wi.should_out_date AS `date`,
|
||||
wi.amount AS allocationAmount,
|
||||
wi.`create_date` as `date`,
|
||||
wi.`create_date` as `shouldOutDate`,
|
||||
wi.max_height AS maxHeight
|
||||
FROM
|
||||
wallet_in wi
|
||||
<where>
|
||||
<choose>
|
||||
<when test="startDate != null">
|
||||
wi.`create_date` >= DATE(#{startDate})
|
||||
wi.`should_out_date` >= DATE(#{startDate})
|
||||
</when>
|
||||
<otherwise>
|
||||
wi.`create_date` <![CDATA[ <= ]]> NOW()
|
||||
wi.`should_out_date` <![CDATA[ <= ]]> NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
@@ -44,4 +44,7 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<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>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user