mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +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")
|
||||
public AjaxResult withdraw(@RequestBody WithdrawDTO dto) {
|
||||
@PostMapping("/drawCash")
|
||||
public AjaxResult drawCash(@RequestBody WithdrawDTO dto) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
adapayMemberService.withdraw(dto);
|
||||
adapayMemberService.drawCash(dto);
|
||||
result = AjaxResult.success();
|
||||
} catch (BaseAdaPayException e) {
|
||||
logger.error("提现接口 error", e);
|
||||
|
||||
@@ -431,7 +431,7 @@ public class AdapayMemberService {
|
||||
* @param dto
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
public void withdraw(WithdrawDTO dto) throws BaseAdaPayException {
|
||||
public void drawCash(WithdrawDTO dto) throws BaseAdaPayException {
|
||||
// 通过merchantId 查询出汇付会员id 和 结算账户id,用来查询余额
|
||||
AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.selectByMerchantId(dto.getMerchantId());
|
||||
if (adapayMemberAccount == null) {
|
||||
@@ -440,17 +440,17 @@ public class AdapayMemberService {
|
||||
}
|
||||
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("member_id", adapayMemberAccount.getAdapayMemberId());
|
||||
settleCountParams.put("app_id", ADAPAY_APP_ID);
|
||||
settleCountParams.put("settle_account_id", adapayMemberAccount.getSettleAccountId());
|
||||
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);
|
||||
log.info("取现接口返回参数" + JSON.toJSONString(settleCount));
|
||||
log.info("取现接口返回参数{}", JSON.toJSONString(settleCount));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user