mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 创建提现请求 提取方法
This commit is contained in:
@@ -830,17 +830,17 @@ public class AdapayService {
|
||||
}
|
||||
|
||||
// 发送提现申请
|
||||
Map<String, Object> settleCountParams = Maps.newHashMap();
|
||||
// Map<String, Object> settleCountParams = Maps.newHashMap();
|
||||
String orderNo = "drawcash_" + dto.getMerchantId() + "_" + System.currentTimeMillis();
|
||||
settleCountParams.put("order_no", orderNo);
|
||||
settleCountParams.put("cash_amt", AdapayUtil.formatAmount(cashAmt));
|
||||
settleCountParams.put("member_id", adapayAccountBalanceVO.getAdapayMemberId());
|
||||
settleCountParams.put("app_id", config.getAdapayAppId());
|
||||
settleCountParams.put("settle_account_id", adapayAccountBalanceVO.getSettleAccountId());
|
||||
settleCountParams.put("cash_type", "T1");
|
||||
settleCountParams.put("notify_url", ADAPAY_CALLBACK_URL);
|
||||
Map<String, Object> settleCount = Drawcash.create(settleCountParams, config.getWechatAppId());
|
||||
log.info("申请取现接口,请求参数:{}, 返回参数:{}", JSON.toJSONString(settleCountParams), JSON.toJSONString(settleCount));
|
||||
// settleCountParams.put("order_no", orderNo);
|
||||
// settleCountParams.put("cash_amt", AdapayUtil.formatAmount(cashAmt));
|
||||
// settleCountParams.put("member_id", adapayAccountBalanceVO.getAdapayMemberId());
|
||||
// settleCountParams.put("app_id", config.getAdapayAppId());
|
||||
// settleCountParams.put("settle_account_id", adapayAccountBalanceVO.getSettleAccountId());
|
||||
// settleCountParams.put("cash_type", "T1");
|
||||
// settleCountParams.put("notify_url", ADAPAY_CALLBACK_URL);
|
||||
Map<String, Object> settleCount = createDrawcashRequest(orderNo, cashAmt, adapayAccountBalanceVO.getAdapayMemberId(), config.getAdapayAppId(), adapayAccountBalanceVO.getSettleAccountId(), config.getWechatAppId());
|
||||
// log.info("申请取现接口,请求参数:{}, 返回参数:{}", JSON.toJSONString(settleCountParams), JSON.toJSONString(settleCount));
|
||||
|
||||
if (settleCount == null) {
|
||||
throw new BusinessException("", "申请取现接口发生异常");
|
||||
@@ -878,6 +878,24 @@ public class AdapayService {
|
||||
clearingBillInfoService.updateStatus(clearingBillIds, billStatus, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建提现请求
|
||||
*/
|
||||
public Map<String, Object> createDrawcashRequest(String orderNo, BigDecimal cashAmt, String adapayMemberId, String adapayAppId, String settleAccountId, String wechatAppId) throws BaseAdaPayException {
|
||||
Map<String, Object> settleCountParams = Maps.newHashMap();
|
||||
settleCountParams.put("order_no", orderNo);
|
||||
settleCountParams.put("cash_amt", AdapayUtil.formatAmount(cashAmt));
|
||||
settleCountParams.put("member_id", adapayMemberId);
|
||||
settleCountParams.put("app_id", adapayAppId);
|
||||
settleCountParams.put("settle_account_id", settleAccountId);
|
||||
settleCountParams.put("cash_type", "T1");
|
||||
settleCountParams.put("notify_url", ADAPAY_CALLBACK_URL);
|
||||
Map<String, Object> settleCount = Drawcash.create(settleCountParams, wechatAppId);
|
||||
log.info("申请取现接口,请求参数:{}, 返回参数:{}", JSON.toJSONString(settleCountParams), JSON.toJSONString(settleCount));
|
||||
return settleCount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询取现对象
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user