diff --git a/src/main/java/com/example/demo/controller/cash/CashCollectionController.java b/src/main/java/com/example/demo/controller/cash/CashCollectionController.java index 0c95b22..d3a303a 100644 --- a/src/main/java/com/example/demo/controller/cash/CashCollectionController.java +++ b/src/main/java/com/example/demo/controller/cash/CashCollectionController.java @@ -280,6 +280,7 @@ public class CashCollectionController { return Result.success(cashCollectionService.performanceSelect(page.getPageNum(),page.getPageSize(),page.getPerformanceDTO())); } catch (Exception e) { // 推送异常到飞书(核心:调用工具类) + System.out.println(e.getMessage()); throw new SecurityException(); } } diff --git a/src/main/java/com/example/demo/domain/DTO/PerformanceDTO.java b/src/main/java/com/example/demo/domain/DTO/PerformanceDTO.java index 5f042aa..1720c62 100644 --- a/src/main/java/com/example/demo/domain/DTO/PerformanceDTO.java +++ b/src/main/java/com/example/demo/domain/DTO/PerformanceDTO.java @@ -13,4 +13,5 @@ import lombok.Data; @Data public class PerformanceDTO { + String index; } diff --git a/src/main/java/com/example/demo/domain/vo/cash/PerformanceVO.java b/src/main/java/com/example/demo/domain/vo/cash/PerformanceVO.java new file mode 100644 index 0000000..8e9bcc7 --- /dev/null +++ b/src/main/java/com/example/demo/domain/vo/cash/PerformanceVO.java @@ -0,0 +1,35 @@ +package com.example.demo.domain.vo.cash; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serial; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +/** + * @program: gold-java + * @ClassName PerformanceVO + * @description: + * @author: Double + * @create: 2026−01-15 10:15 + * @Version 1.0 + **/ + +@Data +public class PerformanceVO { + + private Integer jwcode; // 精网号 + private String name; // 姓名 + private String market; // 所属地区 + private String orderCode; // 金币订单号 + private String paymentCurrency; // 付款币种 + private BigDecimal paymentAmount; // 付款金额 + private String receivedCurrency; // 到账币种 + private BigDecimal receivedAmount; // 到账金额 + private BigDecimal handlingCharge; // 手续费 + +} diff --git a/src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java b/src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java index 68c1408..0645c61 100644 --- a/src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java +++ b/src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java @@ -6,6 +6,7 @@ import com.example.demo.domain.entity.CashRecord; import com.example.demo.domain.entity.GOrder; import com.example.demo.domain.entity.RechargeActivity; import com.example.demo.domain.vo.cash.CashCollection; +import com.example.demo.domain.vo.cash.PerformanceVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -70,5 +71,5 @@ public interface CashCollectionMapper { @Param("auditId") Integer auditId, @Param("version") Integer version); - List performanceSelect(PerformanceDTO performanceDTO); + List performanceSelect(PerformanceDTO performanceDTO); } diff --git a/src/main/java/com/example/demo/service/cash/CashCollectionService.java b/src/main/java/com/example/demo/service/cash/CashCollectionService.java index 44d6893..48dc232 100644 --- a/src/main/java/com/example/demo/service/cash/CashCollectionService.java +++ b/src/main/java/com/example/demo/service/cash/CashCollectionService.java @@ -6,6 +6,7 @@ import com.example.demo.domain.entity.GOrder; import com.example.demo.domain.entity.RechargeActivity; import com.example.demo.domain.entity.User; import com.example.demo.domain.vo.cash.CashCollection; +import com.example.demo.domain.vo.cash.PerformanceVO; import com.example.demo.domain.vo.coin.Result; import com.github.pagehelper.PageInfo; @@ -46,6 +47,6 @@ public interface CashCollectionService { //同步事务方法 void processBatch(List gOrders); - PageInfo performanceSelect(Integer pageNum, Integer pageSize, PerformanceDTO performanceDTO); + PageInfo performanceSelect(Integer pageNum, Integer pageSize, PerformanceDTO performanceDTO); } diff --git a/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java index b6d9794..18db203 100644 --- a/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java @@ -6,6 +6,7 @@ import com.example.demo.domain.DTO.PerformanceDTO; import com.example.demo.domain.entity.*; import com.example.demo.domain.vo.cash.CashCollection; import com.example.demo.domain.vo.cash.CashCollectionMessage; +import com.example.demo.domain.vo.cash.PerformanceVO; import com.example.demo.domain.vo.coin.GoldUser; import com.example.demo.domain.vo.coin.Messages; import com.example.demo.domain.vo.coin.Result; @@ -507,11 +508,11 @@ public User getNameAndMarket(Integer jwcode) { //多条件查询收款订单列表 @Override - public PageInfo performanceSelect(Integer pageNum, Integer pageSize,PerformanceDTO performanceDTO) { + public PageInfo performanceSelect(Integer pageNum, Integer pageSize, PerformanceDTO performanceDTO) { PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper - List cashCollections = cashCollectionMapper.performanceSelect(performanceDTO); - return new PageInfo<>(cashCollections); + List performanceVOs = cashCollectionMapper.performanceSelect(performanceDTO); + return new PageInfo<>(performanceVOs); } } diff --git a/src/main/resources/cashMapper/CashCollectionMapper.xml b/src/main/resources/cashMapper/CashCollectionMapper.xml index 962f496..c1ec3b9 100644 --- a/src/main/resources/cashMapper/CashCollectionMapper.xml +++ b/src/main/resources/cashMapper/CashCollectionMapper.xml @@ -302,8 +302,13 @@ AND version = #{version} - + select cr.jwcode,cr.name,m.name as market,cr.order_code,r1.rate_name as paymentCurrency,cr.payment_amount,r2.rate_name as receivedCurrency,cr.received_amount,cr.handling_charge + from cash_record_collection cr + left join market m on m.id = cr.market + left join rate r1 on r1.id = cr.payment_currency + left join rate r2 on r2.id = cr.received_currency + where order_type = 1 and status = 4 \ No newline at end of file