Browse Source

20260115业绩

milestone-20260113-现金管理0109
sunjiabei 1 day ago
parent
commit
2e1cba5741
  1. 1
      src/main/java/com/example/demo/controller/cash/CashCollectionController.java
  2. 1
      src/main/java/com/example/demo/domain/DTO/PerformanceDTO.java
  3. 35
      src/main/java/com/example/demo/domain/vo/cash/PerformanceVO.java
  4. 3
      src/main/java/com/example/demo/mapper/cash/CashCollectionMapper.java
  5. 3
      src/main/java/com/example/demo/service/cash/CashCollectionService.java
  6. 7
      src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java
  7. 9
      src/main/resources/cashMapper/CashCollectionMapper.xml

1
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())); return Result.success(cashCollectionService.performanceSelect(page.getPageNum(),page.getPageSize(),page.getPerformanceDTO()));
} catch (Exception e) { } catch (Exception e) {
// 推送异常到飞书核心调用工具类 // 推送异常到飞书核心调用工具类
System.out.println(e.getMessage());
throw new SecurityException(); throw new SecurityException();
} }
} }

1
src/main/java/com/example/demo/domain/DTO/PerformanceDTO.java

@ -13,4 +13,5 @@ import lombok.Data;
@Data @Data
public class PerformanceDTO { public class PerformanceDTO {
String index;
} }

35
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: 202601-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; // 手续费
}

3
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.GOrder;
import com.example.demo.domain.entity.RechargeActivity; import com.example.demo.domain.entity.RechargeActivity;
import com.example.demo.domain.vo.cash.CashCollection; 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.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -70,5 +71,5 @@ public interface CashCollectionMapper {
@Param("auditId") Integer auditId, @Param("auditId") Integer auditId,
@Param("version") Integer version); @Param("version") Integer version);
List<CashCollection> performanceSelect(PerformanceDTO performanceDTO);
List<PerformanceVO> performanceSelect(PerformanceDTO performanceDTO);
} }

3
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.RechargeActivity;
import com.example.demo.domain.entity.User; import com.example.demo.domain.entity.User;
import com.example.demo.domain.vo.cash.CashCollection; 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.example.demo.domain.vo.coin.Result;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -46,6 +47,6 @@ public interface CashCollectionService {
//同步事务方法 //同步事务方法
void processBatch(List<GOrder> gOrders); void processBatch(List<GOrder> gOrders);
PageInfo<CashCollection> performanceSelect(Integer pageNum, Integer pageSize, PerformanceDTO performanceDTO);
PageInfo<PerformanceVO> performanceSelect(Integer pageNum, Integer pageSize, PerformanceDTO performanceDTO);
} }

7
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.entity.*;
import com.example.demo.domain.vo.cash.CashCollection; import com.example.demo.domain.vo.cash.CashCollection;
import com.example.demo.domain.vo.cash.CashCollectionMessage; 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.GoldUser;
import com.example.demo.domain.vo.coin.Messages; import com.example.demo.domain.vo.coin.Messages;
import com.example.demo.domain.vo.coin.Result; import com.example.demo.domain.vo.coin.Result;
@ -507,11 +508,11 @@ public User getNameAndMarket(Integer jwcode) {
//多条件查询收款订单列表 //多条件查询收款订单列表
@Override @Override
public PageInfo<CashCollection> performanceSelect(Integer pageNum, Integer pageSize,PerformanceDTO performanceDTO) {
public PageInfo<PerformanceVO> performanceSelect(Integer pageNum, Integer pageSize, PerformanceDTO performanceDTO) {
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper
List<CashCollection> cashCollections = cashCollectionMapper.performanceSelect(performanceDTO);
return new PageInfo<>(cashCollections);
List<PerformanceVO> performanceVOs = cashCollectionMapper.performanceSelect(performanceDTO);
return new PageInfo<>(performanceVOs);
} }
} }

9
src/main/resources/cashMapper/CashCollectionMapper.xml

@ -302,8 +302,13 @@
AND version = #{version} AND version = #{version}
</update> </update>
<select id="performanceSelect" resultType="com.example.demo.domain.vo.cash.CashCollection">
select jwcode,name,market,order_code,payment_currency,payment_amount,received_currency,received_amount,handling_charge
<select id="performanceSelect" resultType="com.example.demo.domain.vo.cash.PerformanceVO">
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
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save