|
@@ -30,6 +30,7 @@ import com.sckw.payment.model.constant.WalletChannelEnum;
|
|
|
import com.sckw.payment.model.dto.WalletInfoDto;
|
|
import com.sckw.payment.model.dto.WalletInfoDto;
|
|
|
import com.sckw.payment.model.dto.WalletRelationDto;
|
|
import com.sckw.payment.model.dto.WalletRelationDto;
|
|
|
import com.sckw.payment.model.dto.common.BusinessNo;
|
|
import com.sckw.payment.model.dto.common.BusinessNo;
|
|
|
|
|
+import com.sckw.payment.model.dto.common.Page;
|
|
|
import com.sckw.payment.model.dto.page.CashPage;
|
|
import com.sckw.payment.model.dto.page.CashPage;
|
|
|
import com.sckw.payment.model.dto.page.PrePayWalletPage;
|
|
import com.sckw.payment.model.dto.page.PrePayWalletPage;
|
|
|
import com.sckw.payment.model.dto.wallet.*;
|
|
import com.sckw.payment.model.dto.wallet.*;
|
|
@@ -238,6 +239,7 @@ public class WalletService {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 计算转账中金额
|
|
* 计算转账中金额
|
|
|
|
|
+ *
|
|
|
* @param fundVo
|
|
* @param fundVo
|
|
|
*/
|
|
*/
|
|
|
private void transferMoney(FundVo fundVo) {
|
|
private void transferMoney(FundVo fundVo) {
|
|
@@ -1576,25 +1578,40 @@ public class WalletService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public PageRes<PrePayDetailVo> prePayOrder(MoneyPage moneyPage) {
|
|
public PageRes<PrePayDetailVo> prePayOrder(MoneyPage moneyPage) {
|
|
|
- PrePayDetailVo chargeDetailVo = new PrePayDetailVo();
|
|
|
|
|
- chargeDetailVo.setOrderNo("123");
|
|
|
|
|
- chargeDetailVo.setChannel("huifu");
|
|
|
|
|
- chargeDetailVo.setChannelDict("1");
|
|
|
|
|
- chargeDetailVo.setChannelLabel("汇付天下");
|
|
|
|
|
- chargeDetailVo.setUid("kll_001");
|
|
|
|
|
- chargeDetailVo.setUidName("uid名称");
|
|
|
|
|
- chargeDetailVo.setFilter("kll_002");
|
|
|
|
|
- chargeDetailVo.setFilterName("filterName");
|
|
|
|
|
- chargeDetailVo.setStatus(0);
|
|
|
|
|
- chargeDetailVo.setStatusLabel("测试");
|
|
|
|
|
- chargeDetailVo.setMoney(new BigDecimal("12"));
|
|
|
|
|
- chargeDetailVo.setRemark("测试");
|
|
|
|
|
- chargeDetailVo.setCreateTime(DateTimeUtil.format(LocalDateTime.now()));
|
|
|
|
|
- List<PrePayDetailVo> objects = new ArrayList<>() {{
|
|
|
|
|
- add(chargeDetailVo);
|
|
|
|
|
- }};
|
|
|
|
|
- PageInfo<PrePayDetailVo> objectPageInfo = new PageInfo<>();
|
|
|
|
|
- return new PageRes<>(objectPageInfo, objects);
|
|
|
|
|
|
|
+ ChannelEnum byChannel = ChannelEnum.getByChannel(moneyPage.getChannel());
|
|
|
|
|
+ if (Objects.isNull(byChannel)) {
|
|
|
|
|
+ throw new BusinessException("支付通道异常");
|
|
|
|
|
+ }
|
|
|
|
|
+ R<Page<PrePayIndex2>> pageR = payCenterService.advancePayIndex2(moneyPage.getUid(), byChannel, moneyPage.getFilter(), moneyPage.getPage(), moneyPage.getPageSize());
|
|
|
|
|
+ if (!pageR.getStatus()) {
|
|
|
|
|
+ return new PageRes<>(moneyPage.getPage(), moneyPage.getPageSize(), 0, 0, new ArrayList<>());
|
|
|
|
|
+ }
|
|
|
|
|
+ Page<PrePayIndex2> data = pageR.getData();
|
|
|
|
|
+ if (Objects.nonNull(data)) {
|
|
|
|
|
+ List<PrePayIndex2> rows = data.getRows();
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(rows)) {
|
|
|
|
|
+ List<PrePayDetailVo> collect = rows.stream().map(a -> {
|
|
|
|
|
+ PrePayDetailVo prePayDetailVo = new PrePayDetailVo();
|
|
|
|
|
+ prePayDetailVo.setBalance(prePayDetailVo.smallMoney(a.getApBalance()));
|
|
|
|
|
+ prePayDetailVo.setOrderNo(a.getOrderNo());
|
|
|
|
|
+ prePayDetailVo.setChannel(a.getChannel());
|
|
|
|
|
+ prePayDetailVo.setChannelDict(ChannelEnum.getDict(a.getChannel()));
|
|
|
|
|
+ prePayDetailVo.setChannelLabel(ChannelEnum.getDesc(a.getChannel()));
|
|
|
|
|
+ prePayDetailVo.setUid(moneyPage.getUid());
|
|
|
|
|
+ prePayDetailVo.setUidName(getFirmName(moneyPage.getUid()));
|
|
|
|
|
+ prePayDetailVo.setFilter(moneyPage.getFilter());
|
|
|
|
|
+ prePayDetailVo.setFilterName(getFirmName(moneyPage.getFilter()));
|
|
|
|
|
+ prePayDetailVo.setStatus(a.getStatus());
|
|
|
|
|
+ prePayDetailVo.setStatusLabel(a.getStatusLabel());
|
|
|
|
|
+ prePayDetailVo.setMoney(prePayDetailVo.smallMoney(a.getMoney()));
|
|
|
|
|
+ prePayDetailVo.setRemark(a.getRemarks());
|
|
|
|
|
+ prePayDetailVo.setCreateTime(a.getCreateTime());
|
|
|
|
|
+ return prePayDetailVo;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+ return new PageRes<>(moneyPage.getPage(), moneyPage.getPageSize(), data.getTotal(), (int) (data.getTotal() / data.getPageSize() + 1), collect);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return new PageRes<>(moneyPage.getPage(), moneyPage.getPageSize(), 0, 0, new ArrayList<>());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|