1231123
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.cai.dto.admin.vo.accountCash;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.ruoyi.cai.enums.AccountCashStatusEnum;
|
||||
import com.ruoyi.cai.enums.IsAnchorEnum;
|
||||
import com.ruoyi.common.annotation.ExcelEnumFormat;
|
||||
import com.ruoyi.common.convert.ExcelEnumConvert;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.NumberFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class AccountCashExportVo {
|
||||
@ExcelProperty(value = "提现次数")
|
||||
private Integer cashNum;
|
||||
|
||||
@ExcelProperty(value = "昵称")
|
||||
private String nickname;
|
||||
|
||||
@ExcelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty(value = "主播",converter = ExcelEnumConvert.class)
|
||||
@ExcelEnumFormat(enumClass = IsAnchorEnum.class,codeField = "code",textField = "message")
|
||||
private Integer isAnchor;
|
||||
|
||||
@ExcelProperty(value = "提现紫贝")
|
||||
private Long withdrawCoin;
|
||||
|
||||
@ExcelProperty(value = "提现金额")
|
||||
@NumberFormat(pattern = "0.##")
|
||||
// @ContentFontStyle(color = Font.COLOR_RED)
|
||||
private BigDecimal cashMoney;
|
||||
|
||||
/**
|
||||
* 银行名称
|
||||
*/
|
||||
@ExcelProperty(value = "银行名称")
|
||||
private String bank;
|
||||
/**
|
||||
* 账户名称
|
||||
*/
|
||||
@ExcelProperty(value = "账户名称")
|
||||
private String cardName;
|
||||
|
||||
@ExcelProperty(value = "账户")
|
||||
private String cardAccount;
|
||||
|
||||
@ExcelProperty(value = "状态",converter = ExcelEnumConvert.class)
|
||||
@ExcelEnumFormat(enumClass = AccountCashStatusEnum.class,codeField = "code",textField = "text")
|
||||
private Integer status;
|
||||
|
||||
@ExcelProperty(value = "ids")
|
||||
@ColumnWidth(value = 20)
|
||||
private String ids;
|
||||
}
|
||||
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.cai.dto.admin.incomeStatis.AccountCashCountDTO;
|
||||
import com.ruoyi.cai.domain.AccountCash;
|
||||
import com.ruoyi.cai.dto.admin.vo.AccountCashAdminVo;
|
||||
import com.ruoyi.cai.dto.admin.vo.accountCash.AccountCashExportVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户提现记录Mapper接口
|
||||
@@ -20,4 +22,6 @@ public interface AccountCashMapper extends BaseMapper<AccountCash> {
|
||||
Page<AccountCashAdminVo> pageAdmin(@Param("build") Page<Object> build, @Param("bo") AccountCashAdminVo bo);
|
||||
|
||||
AccountCashCountDTO incomeStatistics(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
|
||||
|
||||
List<AccountCashExportVo> exportMerge(@Param("bo") AccountCashAdminVo bo);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user