1
zj
2026-01-13 6edf5438c56814b26bf4308286ebe26ac93ccb5c
src/main/java/com/nq/service/impl/UserRechargeServiceImpl.java
@@ -20,7 +20,6 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -47,8 +46,6 @@
    AgentUserMapper agentUserMapper;
    @Autowired
    ISiteSettingService iSiteSettingService;
    @Resource
    UserCashDetailMapper userCashDetailMapper;
    @Resource
    SitePayMapper sitePayMapper;
@@ -60,8 +57,6 @@
    @Autowired
    ISiteInfoService iSiteInfoService;
    @Resource
    UserAssetsMapper userAssetsMapper;
    public ServerResponse checkInMoney(int maxOrder, Integer userId) {
        int count = this.userRechargeMapper.checkInMoney(0, userId);
@@ -222,9 +217,16 @@
        PageInfo pageInfo = new PageInfo(userRecharges);
        for (int i = 0; i <userRecharges.size() ; i++) {
          SitePay s =   sitePayMapper.selectById(userRecharges.get(i).getPayId());
            userRecharges.get(i).setAssetsType(EStockType.MX.getSymbol1());
            userRecharges.get(i).setChannelName(EStockType.MX.getSymbol());
            //SitePay s =   sitePayMapper.selectById(userRecharges.get(i).getPayId());
            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);
@@ -320,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) {
@@ -345,7 +349,8 @@
            userRecharge.setPayTime(new Date());
            userRecharge.setOrderStatus(Integer.valueOf(1));
            userRecharge.setPayId(1);
            userAssetsServices.availablebalanceChange(EStockType.MX.getCode(),
            userRecharge.setAssetsType(accectType);
            userAssetsServices.availablebalanceChange(accectType,
                    userId,EUserAssets.TOP_UP,new BigDecimal(amt),"","");
            int insertCount = this.userRechargeMapper.insert(userRecharge);
            if (insertCount > 0) {