Browse Source

12-11 同步审核字段

milestone-20251203-冲刺计划
lijianlin 1 month ago
parent
commit
b16dbd191e
  1. 2
      src/main/java/com/example/demo/domain/entity/CashRecord.java
  2. 13
      src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java
  3. 2
      src/main/resources/cashMapper/CashCollectionMapper.xml
  4. 2
      src/main/resources/mapper/WorkBenchMapper.xml

2
src/main/java/com/example/demo/domain/entity/CashRecord.java

@ -55,6 +55,8 @@ public class CashRecord implements Serializable {
private LocalDateTime payTime; // 付款日期到秒 private LocalDateTime payTime; // 付款日期到秒
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private LocalDateTime receivedTime; // 到账日期到秒 private LocalDateTime receivedTime; // 到账日期到秒
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
private LocalDateTime auditTime;
// 状态 & 操作人 // 状态 & 操作人
private Integer status; // 订单状态 private Integer status; // 订单状态

13
src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java

@ -402,6 +402,9 @@ public User getNameAndMarket(Integer jwcode) {
log.error("失败订单ID: {}", failedIds); log.error("失败订单ID: {}", failedIds);
// 可存入 error_log 供人工处理 // 可存入 error_log 供人工处理
// 这里选择继续下一批容忍部分失败 // 这里选择继续下一批容忍部分失败
} }
@ -452,17 +455,17 @@ public User getNameAndMarket(Integer jwcode) {
cashRecord.setPayload("IOS"); cashRecord.setPayload("IOS");
break; break;
case 5: case 5:
cashRecord.setPayType("Stripe-链接收款");
cashRecord.setPayType("Stripe");
cashRecord.setReceivedMarket("13"); cashRecord.setReceivedMarket("13");
cashRecord.setPayload("Stripe"); cashRecord.setPayload("Stripe");
break; break;
case 6: case 6:
cashRecord.setPayType("PaymentAsia-链接收款");
cashRecord.setPayType("PaymentAsia");
cashRecord.setReceivedMarket("13"); cashRecord.setReceivedMarket("13");
cashRecord.setPayload("PaymentAsia"); cashRecord.setPayload("PaymentAsia");
break; break;
case 7: case 7:
cashRecord.setPayType("Ipay88-链接收款");
cashRecord.setPayType("Ipay88");
cashRecord.setReceivedMarket("5"); cashRecord.setReceivedMarket("5");
cashRecord.setPayload("Ipay88"); cashRecord.setPayload("Ipay88");
break; break;
@ -479,7 +482,9 @@ public User getNameAndMarket(Integer jwcode) {
cashRecord.setFreeGold(0); cashRecord.setFreeGold(0);
cashRecord.setPaymentCurrency(""); cashRecord.setPaymentCurrency("");
cashRecord.setPaymentAmount(BigDecimal.valueOf(0)); cashRecord.setPaymentAmount(BigDecimal.valueOf(0));
cashRecord.setPayTime(LocalDateTime.ofEpochSecond(gOrder.getSuccessTime(), 0, ZoneOffset.UTC));
//转换时间戳加上时区偏移
cashRecord.setPayTime(LocalDateTime.ofEpochSecond(gOrder.getSuccessTime(), 0, ZoneOffset.of("+08:00")));
cashRecord.setAuditTime(LocalDateTime.ofEpochSecond(gOrder.getSuccessTime(), 0, ZoneOffset.of("+08:00")));
cashRecord.setStatus(3); cashRecord.setStatus(3);
cashRecord.setSubmitterId(99999); cashRecord.setSubmitterId(99999);
//存入现金库 //存入现金库

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

@ -231,7 +231,7 @@
add_time,is_synced add_time,is_synced
from g_order from g_order
where is_synced=0 and state=1 and pay_style in(3,5,6,7,9) where is_synced=0 and state=1 and pay_style in(3,5,6,7,9)
and success_time>1665246960
and success_time>=1763136000
limit #{size} limit #{size}
</select> </select>
<select id="selectById" resultType="com.example.demo.domain.vo.cash.CashCollection"> <select id="selectById" resultType="com.example.demo.domain.vo.cash.CashCollection">

2
src/main/resources/mapper/WorkBenchMapper.xml

@ -179,7 +179,7 @@
SUM(CASE WHEN r.id = 7 THEN cr.received_amount/100 ELSE 0 END) AS vdn, SUM(CASE WHEN r.id = 7 THEN cr.received_amount/100 ELSE 0 END) AS vdn,
SUM(CASE WHEN r.id = 8 THEN cr.received_amount/100 ELSE 0 END) AS krw, SUM(CASE WHEN r.id = 8 THEN cr.received_amount/100 ELSE 0 END) AS krw,
ROUND( SUM(cr.received_amount/100 * r.num), 2) AS totalSGD ROUND( SUM(cr.received_amount/100 * r.num), 2) AS totalSGD
FROM cash_record cr
FROM cash_record_collection cr
JOIN market m ON cr.received_market = m.id JOIN market m ON cr.received_market = m.id
JOIN rate r ON cr.received_currency = r.id JOIN rate r ON cr.received_currency = r.id
WHERE cr.received_currency IN (2,3,4,5,6,7,8) -- 只统计这7种币 WHERE cr.received_currency IN (2,3,4,5,6,7,8) -- 只统计这7种币

Loading…
Cancel
Save