订单支付成功时,事务化写入 USDT 收入流水。
归集明细成功时,事务化写入 USDT 支出流水。 使用唯一幂等键防止订单重扫、归集重试产生重复流水。 新增按应用、币种、时间范围以及日/月/年维度的统计接口。 管理员和商户接口均改为只读,移除流水新增、修改、删除入口。 商户查询由后端强制限定当前用户。
This commit is contained in:
1 parent
8cc7bd0c17
commit
0ff174e872
15 files changed
+377
-254
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/** 钱包流水统计查询条件。 */
|
||||
public class WalletLedgerStatisticsQuery {
|
||||
private Long appId;
|
||||
private Long userId;
|
||||
private String currency;
|
||||
private String granularity;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date beginTime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
public Long getAppId() { return appId; }
|
||||
public void setAppId(Long appId) { this.appId = appId; }
|
||||
public Long getUserId() { return userId; }
|
||||
public void setUserId(Long userId) { this.userId = userId; }
|
||||
public String getCurrency() { return currency; }
|
||||
public void setCurrency(String currency) { this.currency = currency; }
|
||||
public String getGranularity() { return granularity; }
|
||||
public void setGranularity(String granularity) { this.granularity = granularity; }
|
||||
public Date getBeginTime() { return beginTime; }
|
||||
public void setBeginTime(Date beginTime) { this.beginTime = beginTime; }
|
||||
public Date getEndTime() { return endTime; }
|
||||
public void setEndTime(Date endTime) { this.endTime = endTime; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 钱包流水统计响应。 */
|
||||
public class WalletLedgerStatisticsVo {
|
||||
private List<WalletLedgerSummaryVo> summaries;
|
||||
private List<WalletLedgerTrendVo> trends;
|
||||
|
||||
public WalletLedgerStatisticsVo(List<WalletLedgerSummaryVo> summaries,
|
||||
List<WalletLedgerTrendVo> trends) {
|
||||
this.summaries = summaries;
|
||||
this.trends = trends;
|
||||
}
|
||||
|
||||
public List<WalletLedgerSummaryVo> getSummaries() { return summaries; }
|
||||
public void setSummaries(List<WalletLedgerSummaryVo> summaries) { this.summaries = summaries; }
|
||||
public List<WalletLedgerTrendVo> getTrends() { return trends; }
|
||||
public void setTrends(List<WalletLedgerTrendVo> trends) { this.trends = trends; }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/** 单币种钱包流水汇总。 */
|
||||
public class WalletLedgerSummaryVo {
|
||||
private String currency;
|
||||
private BigDecimal incomeAmount;
|
||||
private BigDecimal expenseAmount;
|
||||
private BigDecimal netAmount;
|
||||
private Long count;
|
||||
|
||||
public String getCurrency() { return currency; }
|
||||
public void setCurrency(String currency) { this.currency = currency; }
|
||||
public BigDecimal getIncomeAmount() { return incomeAmount; }
|
||||
public void setIncomeAmount(BigDecimal incomeAmount) { this.incomeAmount = incomeAmount; }
|
||||
public BigDecimal getExpenseAmount() { return expenseAmount; }
|
||||
public void setExpenseAmount(BigDecimal expenseAmount) { this.expenseAmount = expenseAmount; }
|
||||
public BigDecimal getNetAmount() { return netAmount; }
|
||||
public void setNetAmount(BigDecimal netAmount) { this.netAmount = netAmount; }
|
||||
public Long getCount() { return count; }
|
||||
public void setCount(Long count) { this.count = count; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.system.domain.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/** 钱包流水趋势点。 */
|
||||
public class WalletLedgerTrendVo extends WalletLedgerSummaryVo {
|
||||
private String period;
|
||||
|
||||
public String getPeriod() { return period; }
|
||||
public void setPeriod(String period) { this.period = period; }
|
||||
}
|
||||
Reference in new issue
Block a user