zyy
2025-09-26 2c9cdb539cbbde244eb98d5edc6377facffdd500
src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.gson.Gson;
import com.nq.dao.*;
import com.nq.enums.EConfigKey;
import com.nq.enums.EStockType;
import com.nq.enums.EUserAssets;
import com.nq.pojo.*;
@@ -109,7 +110,7 @@
                return ServerResponse.createByErrorMsg("最小提现金额:" + siteSetting.getWithMinAmt(),request);
            }
            boolean b = getServerResponse();
            boolean b = getServerResponse(accsetType);
            if (!b) {
                return ServerResponse.createByErrorMsg("提现失败,当前时间已停止提现", request);
            }
@@ -133,6 +134,7 @@
            userWithdraw.setWithStatus(Integer.valueOf(0));
            BigDecimal withfee = siteSetting.getWithFeePercent().multiply(new BigDecimal(amt)).add(new BigDecimal(siteSetting.getWithFeeSingle().intValue()));
            userWithdraw.setWithFee(withfee);
            userWithdraw.setAccsetType(accsetType);
            int insertCount = this.userWithdrawMapper.insert(userWithdraw);
            if (insertCount > 0) {
                return ServerResponse.createBySuccessMsg("提现成功",request);
@@ -147,8 +149,8 @@
    }
    private boolean getServerResponse() {
        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", EStockType.MX.getCode()));
    private boolean getServerResponse(String accsetType) {
        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", EUserAssets.WITHDRAW.getCode()));
        if (stockTimeSetting == null) {
            return false;
        }
@@ -216,7 +218,7 @@
            User user = this.userMapper.selectById(userWithdraw.getUserId());
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.MX.getCode(), user.getId());
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.getDefault().getCode(), user.getId());
            if (userAssets == null) {
                return ServerResponse.createByErrorMsg("用户资金账户不存在");
            }
@@ -330,7 +332,7 @@
            if (user == null) {
                return ServerResponse.createByErrorMsg("用户不存在");
            }
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.MX.getCode(), user.getId());
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(userWithdraw.getAccsetType(), user.getId());
            if (userAssets == null) {
                return ServerResponse.createByErrorMsg("用户资金账户不存在");
            }