This commit is contained in:
77
2024-07-21 15:01:09 +08:00
parent f98988f708
commit d11d10f1bf
5 changed files with 128 additions and 4 deletions

View File

@@ -49,6 +49,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by t1.create_time desc
</select>
<select id="exportMerge" resultType="com.ruoyi.cai.dto.admin.vo.accountCash.AccountCashExportVo">
select
group_concat(t1.id) as ids,
count(1) as cash_num,
t2.nickname, t2.mobile, t2.is_anchor,
sum(t1.withdraw_coin) as withdraw_coin, sum(t1.cash_money) as cash_money,
t1.bank, t1.card_name, t1.card_account, t1.status
from cai_account_cash t1
left join cai_user t2 on t1.user_id = t2.id
where t1.status = 1
<if test="bo.cardName != null and bo.cardName != ''">
and t1.card_name like concat('%',#{bo.cardName},'%')
</if>
<if test="bo.cardAccount != null and bo.cardAccount != ''">
and t1.card_account like concat('%',#{bo.cardAccount},'%')
</if>
<if test="bo.mobile != null and bo.mobile != ''">
and t2.mobile = #{bo.mobile}
</if>
<if test="bo.usercode != null and bo.usercode != ''">
and t2.usercode = #{bo.usercode}
</if>
<if test="bo.status != null">
</if>
<if test="bo.id != null">
and t1.id = #{bo.id}
</if>
group by t1.user_id, t1.card_name, t1.card_account
order by t1.create_time desc
</select>
<select id="incomeStatistics" resultType="com.ruoyi.cai.dto.admin.incomeStatis.AccountCashCountDTO">
select
sum(cash_money) as cash_money,
@@ -57,5 +88,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where status = 2 and create_time between #{startTime} and #{endTime}
</select>
</mapper>