|
|
@@ -1077,6 +1077,36 @@ public class WalletService {
|
|
|
return walletInfoDto;
|
|
|
}
|
|
|
|
|
|
+ public Object appendCheck(AppendPayCheck appendPayCheck) {
|
|
|
+ String uid = walletRelationService.getRelation(LoginUserHolder.getEntId());
|
|
|
+ if (StringUtils.isBlank(uid)) {
|
|
|
+ throw new BusinessException("您暂未开通电子钱包");
|
|
|
+ }
|
|
|
+ //字典
|
|
|
+ ChannelEnum channelEnum = ChannelEnum.getByChannel(appendPayCheck.getChannel());
|
|
|
+ if (Objects.isNull(channelEnum)) {
|
|
|
+ throw new BusinessException("支付通道不存在");
|
|
|
+ }
|
|
|
+ R<WalletInfo> walletInfoR = payCenterService.totalInfo(uid, channelEnum, appendPayCheck.getFilter());
|
|
|
+ if (!walletInfoR.getStatus()) {
|
|
|
+ throw new BusinessException(StringUtils.isNotBlank(walletInfoR.getMsg()) ? walletInfoR.getMsg() : "未找到交易方");
|
|
|
+ }
|
|
|
+ WalletInfo data = walletInfoR.getData();
|
|
|
+ if (Objects.isNull(data)) {
|
|
|
+ throw new BusinessException("不存在交易");
|
|
|
+ }
|
|
|
+ WalletInfoDto walletInfoDto = new WalletInfoDto();
|
|
|
+ walletInfoDto.setOpenFlag(true);
|
|
|
+ walletInfoDto.setName(data.getName());
|
|
|
+ walletInfoDto.setWalletName(data.getWalletName());
|
|
|
+ walletInfoDto.setChannel(data.getChannel());
|
|
|
+ walletInfoDto.setStatus(data.getStatus());
|
|
|
+ walletInfoDto.setApMoney(walletInfoDto.smallMoney(data.getApMoney()));
|
|
|
+ walletInfoDto.setWdMoney(walletInfoDto.smallMoney(data.getWdMoney()));
|
|
|
+ walletInfoDto.setMoney(walletInfoDto.smallMoney(data.getMoney()));
|
|
|
+ return walletInfoDto;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 退款处理
|
|
|
*
|