update 新增后台管理系统文档管理模块,以及业务系统帮助中心文档接口。修改首页折线图补零逻辑bug,及管理系统挖矿账户详情页,收支详情修改

This commit is contained in:
yyb
2025-07-16 15:40:49 +08:00
parent 0857913e54
commit b43e8f9965
31 changed files with 1148 additions and 51 deletions

View File

@@ -34,25 +34,25 @@
coin,
`user`,
address,
create_date,
should_out_date,
`date`,
should_out_date as shouldOutDate,
max_height,
amount,
state
allocation_amount as allocationAmount,
transfer_amount as transferAmount
FROM
wallet_in
manage_wallet_out_in
<where>
coin = #{coin} AND `user` = #{user}
<choose>
<when test="startDate != null and endDate != null">
and `create_date` >= #{startDate} and `create_date`<![CDATA[ <= ]]> #{endDate}
and `date` >= #{startDate} and `date`<![CDATA[ <= ]]> #{endDate}
</when>
<otherwise>
and `create_date` >= DATE_SUB(NOW(), INTERVAL 1 MONTH)
and `date` >= DATE_SUB(NOW(), INTERVAL 1 MONTH)
</otherwise>
</choose>
</where>
order by `date` desc
</select>
<select id="getHistoryBalance" resultType="com.m2pool.manage.dto.HistoryBalanceDto">
SELECT

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.m2pool.manage.mapper.ManageDocumentsMapper">
<select id="getListDataByPage" resultType="com.m2pool.manage.dto.ManageDocumentDto">
SELECT
id,
title,
sub_title as subTitle,
content,
create_user as createUser,
update_user as updateUser,
update_time as updateTime,
create_time as createTime,
type
FROM
manage_documents
<where>
del = false
<if test="keyword != null">
AND title like CONCAT('%',#{keyword},'%') OR sub_title like CONCAT('%',#{keyword},'%') OR content like CONCAT('%',#{keyword},'%')
</if>
</where>
ORDER BY id DESC
</select>
<select id="getListDataEnByPage" resultType="com.m2pool.manage.dto.ManageDocumentDto">
SELECT
id,
title_en as `title`,
sub_title_en as subTitle,
content_en as content,
create_user as createUser,
update_user as updateUser,
update_time as updateTime,
create_time as createTime,
type
FROM
manage_documents
<where>
del = false
<if test="keyword != null">
AND title_en like CONCAT('%',#{keyword},'%') OR sub_title_en like CONCAT('%',#{keyword},'%') OR content_en like CONCAT('%',#{keyword},'%')
</if>
</where>
ORDER BY id DESC
</select>
<select id="findCatalogueList" resultType="com.m2pool.manage.dto.ManageCatalogueDto">
select
type,
case when #{lang} = 'zh' then description else description_en end as description
from
manage_documents_type
where del = false
</select>
<select id="findCatalogueDocumentList" resultType="com.m2pool.manage.dto.ManageCatalogueDocumentDto">
select
id,
case when #{lang} = 'zh' then title else title_en end as title,
case when #{lang} = 'zh' then sub_title else sub_title_en end as subTitle,
create_user as createUser,
update_user as updateUser,
update_time as updateTime,
create_time as createTime,
type
from
manage_documents
where del = false and type = #{type}
order by id desc
</select>
</mapper>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.m2pool.manage.mapper.ManageWalletOutInMapper">
<select id="getWalletInfo" resultType="com.m2pool.manage.entity.ManageWalletOutIn">
SELECT
wi.coin,
wi.`user`,
wi.should_out_date AS shouldOutDate,
wi.amount AS allocationAmount,
wo.address,
wo.`date`,
wo.max_height AS maxHeight,
wo.tx_id AS txId,
wo.amount AS transferAmount
FROM
wallet_in wi
LEFT JOIN wallet_outv2 wo
ON
DATE(wi.create_date) = DATE(wo.`date`) AND wi.coin = wo.coin AND wi.`user` = wo.`user`
<where>
wo.`date` <![CDATA[ <= ]]> NOW()
<if test="startDate != null">
AND wo.`date` > #{startDate}
</if>
</where>
UNION
SELECT
wi.coin,
wi.`user`,
wi.should_out_date AS shouldOutDate,
wi.amount AS allocationAmount,
wo.address,
wo.`date`,
wo.max_height AS maxHeight,
wo.tx_id AS txId,
wo.amount AS transferAmount
FROM
wallet_in wi
RIGHT JOIN wallet_outv2 wo
ON
DATE(wi.create_date) = DATE(wo.`date`) AND wi.coin = wo.coin AND wi.`user` = wo.`user`
<where>
wo.`date` <![CDATA[ <= ]]> NOW()
<if test="startDate != null">
AND wo.`date` > #{startDate}
</if>
</where>
</select>
</mapper>