运营商切换提现方式

This commit is contained in:
Guoqs
2025-03-06 14:36:42 +08:00
parent 144732da3a
commit 76a32f79ee
6 changed files with 106 additions and 9 deletions

View File

@@ -8,10 +8,7 @@ import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.common.enums.adapay.AdapayPayChannelEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.DictUtils;
import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.*;
import com.jsowell.common.util.spring.SpringUtils;
import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO;
@@ -21,6 +18,7 @@ import com.jsowell.pile.service.PileMerchantInfoService;
import com.jsowell.pile.util.UserUtils;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
import com.jsowell.pile.vo.web.MerchantWithdrawalTypeVO;
import com.jsowell.pile.vo.web.PileMerchantInfoVO;
import com.jsowell.system.service.SysDeptService;
import com.jsowell.system.service.SysUserService;
@@ -643,4 +641,33 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
return pileMerchantInfoMapper.queryMerchantInfoByStationId(stationId);
}
@Override
public MerchantWithdrawalTypeVO queryWithdrawalType(QueryMerchantInfoDTO dto) {
PileMerchantInfo pileMerchantInfo = pileMerchantInfoMapper.selectPileMerchantInfoById(Long.parseLong(dto.getMerchantId()));
if (pileMerchantInfo != null) {
MerchantWithdrawalTypeVO merchantWithdrawalTypeVO = new MerchantWithdrawalTypeVO();
merchantWithdrawalTypeVO.setMerchantId(pileMerchantInfo.getId() + "");
merchantWithdrawalTypeVO.setWithdrawalType(pileMerchantInfo.getDelayMode());
merchantWithdrawalTypeVO.setReservedAmount(pileMerchantInfo.getReservedAmount());
return merchantWithdrawalTypeVO;
}
return null;
}
@Override
public int updateWithdrawalType(MerchantWithdrawalTypeVO dto) {
if (dto == null || StringUtils.isBlank(dto.getMerchantId()) || StringUtils.isBlank(dto.getWithdrawalType())) {
return 0;
}
PileMerchantInfo merchantInfo = new PileMerchantInfo();
merchantInfo.setId(Long.parseLong(dto.getMerchantId()));
merchantInfo.setWithdrawalType(dto.getWithdrawalType());
if (dto.getReservedAmount() != null) {
merchantInfo.setReservedAmount(dto.getReservedAmount());
}
merchantInfo.setUpdateBy(SecurityUtils.getUsername());
merchantInfo.setUpdateTime(DateUtils.getNowDate());
return pileMerchantInfoMapper.updatePileMerchantInfo(merchantInfo);
}
}