KKSU
2024-07-18 17c94afc50e7957b8fd98413cdc9cbbdc4c7967a
src/main/resources/mapper/dapp/DappStorageMapper.xml
@@ -74,6 +74,22 @@
    </select>
    <select id="selectSumByAmountDesc" resultType="cc.mrbird.febs.dapp.entity.DappStorage">
        SELECT
            member_id memberId,
               sum(amount) amount
        FROM
            dapp_storage
        where
                date_format(create_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
        GROUP BY
            member_id
        ORDER BY
            amount DESC
            limit #{offset},#{count}
    </select>
    <select id="selectAmountByAmountDesc" resultType="cc.mrbird.febs.dapp.entity.DappStorage">
        select
            *
@@ -114,4 +130,20 @@
    </select>
    <select id="selectSumByAmountDescFiveToFive" resultType="cc.mrbird.febs.dapp.entity.DappStorage">
        SELECT
            member_id memberId,
            sum(amount) amount
        FROM
            dapp_storage
        where
            create_time &gt;= #{startTime}
        GROUP BY
            member_id
        ORDER BY
            amount DESC
            limit #{offset},#{count}
    </select>
</mapper>