zyy
2025-08-22 68b9175323a2f9b40ffcc48bb01af1d8279e5d01
src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -1,11 +1,10 @@
package com.nq.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.Gson;
import com.nq.dao.*;
import com.nq.enums.EStockType;
import com.nq.enums.EUserAssets;
import com.nq.pojo.*;
import com.nq.service.*;
@@ -15,16 +14,9 @@
import com.nq.common.ServerResponse;
import com.nq.utils.*;
import com.nq.utils.http.HttpClientUtil;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import javax.annotation.Resource;
@@ -32,7 +24,6 @@
import javax.servlet.http.HttpServletResponse;
import com.nq.utils.timeutil.TimeUtil;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -72,16 +63,7 @@
    AgentUserMapper agentUserMapper;
    @Autowired
    IUserPositionService iUserPositionService;
    @Autowired
    IUserBankService iUserBankService;
    @Autowired
    ISiteSettingService iSiteSettingService;
    @Autowired
    ISiteProductService iSiteProductService;
    @Autowired
    UserBankMapper userBankMapper;
@@ -90,18 +72,12 @@
    SiteSettingServiceImpl siteSettingService;
    @Autowired
    IStockConfigServices iStockConfigServices;
    @Autowired
    UserAssetsMapper userAssetsMapper;
    @Resource
    StockTimeSettingMapper stockTimeSettingMapper;
    @Autowired
    TransferResponseService transferResponseService;
    @Transactional
    @Transactional(rollbackFor = Exception.class)
    public ServerResponse outMoney(String amt, String with_Pwd,String accsetType,String bankId,HttpServletRequest request) throws Exception {
        if (StringUtils.isBlank(amt)) {
            return ServerResponse.createByErrorMsg("The parameter cannot be null");
@@ -172,7 +148,7 @@
    }
    private boolean getServerResponse() {
        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", "IN"));
        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", EStockType.MX.getCode()));
        if (stockTimeSetting == null) {
            return false;
        }
@@ -240,7 +216,7 @@
            User user = this.userMapper.selectById(userWithdraw.getUserId());
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId("IN", user.getId());
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.MX.getCode(), user.getId());
            if (userAssets == null) {
                return ServerResponse.createByErrorMsg("用户资金账户不存在");
            }
@@ -334,7 +310,7 @@
    }
    @Transactional
    @Transactional(rollbackFor = Exception.class)
    public ServerResponse updateState(Integer withId, Integer state, String authMsg, HttpServletRequest request, HttpServletResponse response) throws Exception {
        try {
            UserWithdraw userWithdraw = this.userWithdrawMapper.selectByPrimaryKey(withId);
@@ -354,7 +330,7 @@
            if (user == null) {
                return ServerResponse.createByErrorMsg("用户不存在");
            }
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId("IN", user.getId());
            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.MX.getCode(), user.getId());
            if (userAssets == null) {
                return ServerResponse.createByErrorMsg("用户资金账户不存在");
            }