From 8ebbfce918f12ce02ace2e614fa54ab1059f7334 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Wed, 14 Jan 2026 15:35:43 +0800
Subject: [PATCH] 1
---
src/main/java/com/nq/service/impl/UserRechargeServiceImpl.java | 27 ++++++++++++++++++++++-----
1 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/nq/service/impl/UserRechargeServiceImpl.java b/src/main/java/com/nq/service/impl/UserRechargeServiceImpl.java
index 974c520..e371ed3 100644
--- a/src/main/java/com/nq/service/impl/UserRechargeServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserRechargeServiceImpl.java
@@ -218,8 +218,15 @@
for (int i = 0; i <userRecharges.size() ; i++) {
//SitePay s = sitePayMapper.selectById(userRecharges.get(i).getPayId());
- userRecharges.get(i).setAssetsType(EStockType.getDefault().getSymbol1());
- userRecharges.get(i).setChannelName(EStockType.getDefault().getSymbol());
+ if (StringUtils.isNotBlank(userRecharges.get(i).getAssetsType())) {
+ EStockType eStockType = EStockType.getEStockTypeByCode(userRecharges.get(i).getAssetsType());
+ userRecharges.get(i).setAssetsType(eStockType.getSymbol1());
+ userRecharges.get(i).setChannelName(eStockType.getSymbol());
+ } else {
+ userRecharges.get(i).setAssetsType(EStockType.getDefault().getSymbol1());
+ userRecharges.get(i).setChannelName(EStockType.getDefault().getSymbol());
+ }
+
}
return ServerResponse.createBySuccess(pageInfo);
@@ -315,11 +322,13 @@
}
- public ServerResponse createOrder(Integer userId, Integer state, Integer amt, String payChannel) {
+ public ServerResponse createOrder(Integer userId, Integer state, Integer amt, String payChannel, String accectType) {
if (userId == null || state == null || amt == null) {
return ServerResponse.createByErrorMsg("参数不能为空");
}
-
+ if (accectType == null || accectType.isEmpty()) {
+ accectType = EStockType.getDefault().getCode();
+ }
try {
User user = this.userMapper.selectById(userId);
if (user == null) {
@@ -340,7 +349,8 @@
userRecharge.setPayTime(new Date());
userRecharge.setOrderStatus(Integer.valueOf(1));
userRecharge.setPayId(1);
- userAssetsServices.availablebalanceChange(EStockType.getDefault().getCode(),
+ userRecharge.setAssetsType(accectType);
+ userAssetsServices.availablebalanceChange(accectType,
userId,EUserAssets.TOP_UP,new BigDecimal(amt),"","");
int insertCount = this.userRechargeMapper.insert(userRecharge);
if (insertCount > 0) {
@@ -394,4 +404,11 @@
return userRecharges;
}
+
+ @Override
+ public int countPendingRecharge() {
+ com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<UserRecharge> queryWrapper = new com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<>();
+ queryWrapper.eq("order_status", 0);
+ return this.userRechargeMapper.selectCount(queryWrapper).intValue();
+ }
}
--
Gitblit v1.9.3