mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-07 19:40:07 +08:00
update
This commit is contained in:
@@ -155,12 +155,13 @@ public class AdapayMemberController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现接口
|
* 提现接口
|
||||||
|
* http://localhost:8080/adapay/member/drawCash
|
||||||
*/
|
*/
|
||||||
@PostMapping("/withdraw")
|
@PostMapping("/drawCash")
|
||||||
public AjaxResult withdraw(@RequestBody WithdrawDTO dto) {
|
public AjaxResult drawCash(@RequestBody WithdrawDTO dto) {
|
||||||
AjaxResult result;
|
AjaxResult result;
|
||||||
try {
|
try {
|
||||||
adapayMemberService.withdraw(dto);
|
adapayMemberService.drawCash(dto);
|
||||||
result = AjaxResult.success();
|
result = AjaxResult.success();
|
||||||
} catch (BaseAdaPayException e) {
|
} catch (BaseAdaPayException e) {
|
||||||
logger.error("提现接口 error", e);
|
logger.error("提现接口 error", e);
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ public class AdapayMemberService {
|
|||||||
* @param dto
|
* @param dto
|
||||||
* @throws BaseAdaPayException
|
* @throws BaseAdaPayException
|
||||||
*/
|
*/
|
||||||
public void withdraw(WithdrawDTO dto) throws BaseAdaPayException {
|
public void drawCash(WithdrawDTO dto) throws BaseAdaPayException {
|
||||||
// 通过merchantId 查询出汇付会员id 和 结算账户id,用来查询余额
|
// 通过merchantId 查询出汇付会员id 和 结算账户id,用来查询余额
|
||||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(dto.getMerchantId());
|
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(dto.getMerchantId());
|
||||||
if (adapayMemberAccount == null) {
|
if (adapayMemberAccount == null) {
|
||||||
@@ -440,17 +440,17 @@ public class AdapayMemberService {
|
|||||||
}
|
}
|
||||||
Map<String, Object> settleCountParams = Maps.newHashMap();
|
Map<String, Object> settleCountParams = Maps.newHashMap();
|
||||||
|
|
||||||
settleCountParams.put("order_no", "jsdk_payment_" + System.currentTimeMillis());
|
settleCountParams.put("order_no", "drawcash_" + System.currentTimeMillis());
|
||||||
settleCountParams.put("cash_amt", AdapayUtil.formatAmount(dto.getCashAmt()));
|
settleCountParams.put("cash_amt", AdapayUtil.formatAmount(dto.getCashAmt()));
|
||||||
settleCountParams.put("member_id", adapayMemberAccount.getAdapayMemberId());
|
settleCountParams.put("member_id", adapayMemberAccount.getAdapayMemberId());
|
||||||
settleCountParams.put("app_id", ADAPAY_APP_ID);
|
settleCountParams.put("app_id", ADAPAY_APP_ID);
|
||||||
settleCountParams.put("settle_account_id", adapayMemberAccount.getSettleAccountId());
|
settleCountParams.put("settle_account_id", adapayMemberAccount.getSettleAccountId());
|
||||||
settleCountParams.put("cash_type", "T1");
|
settleCountParams.put("cash_type", "T1");
|
||||||
settleCountParams.put("notify_url", "");
|
settleCountParams.put("notify_url", ADAPAY_CALLBACK_URL);
|
||||||
|
|
||||||
log.info("取现接口,请求参数:" + JSON.toJSONString(settleCountParams));
|
log.info("取现接口,请求参数:{}", JSON.toJSONString(settleCountParams));
|
||||||
Map<String, Object> settleCount = Drawcash.create(settleCountParams);
|
Map<String, Object> settleCount = Drawcash.create(settleCountParams);
|
||||||
log.info("取现接口返回参数" + JSON.toJSONString(settleCount));
|
log.info("取现接口返回参数{}", JSON.toJSONString(settleCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user