汇付基础响应

This commit is contained in:
2023-08-21 13:20:17 +08:00
parent e3f22f49c1
commit 3893afaa06
12 changed files with 140 additions and 40 deletions

View File

@@ -14,10 +14,7 @@ import com.jsowell.adapay.config.AbstractAdapayConfig;
import com.jsowell.adapay.dto.*;
import com.jsowell.adapay.factory.AdapayConfigFactory;
import com.jsowell.adapay.response.*;
import com.jsowell.adapay.vo.AdapayAccountBalanceVO;
import com.jsowell.adapay.vo.AdapayCorpMemberVO;
import com.jsowell.adapay.vo.AdapayMemberInfoVO;
import com.jsowell.adapay.vo.AdapaySettleAccountVO;
import com.jsowell.adapay.vo.*;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.redis.RedisCache;
@@ -583,7 +580,7 @@ public class AdapayService {
}
/**
* 提现逻辑
* 提现逻辑/创建取现对象
*
* @param dto
* @throws BaseAdaPayException
@@ -653,6 +650,34 @@ public class AdapayService {
clearingBillInfoService.updateStatus(clearingBillIds, billStatus);
}
/**
* 查询取现对象
* @param orderNo 请求订单号
*/
public DrawCashDetailVO queryDrawCashDetail(String orderNo, String wechatAppId) throws BaseAdaPayException {
Map<String, Object> queryCashParam = Maps.newHashMap();
queryCashParam.put("order_no", orderNo);
Map<String, Object> response = Drawcash.query(queryCashParam, wechatAppId);
log.info("查询取现对象param:{}, result:{}", JSON.toJSONString(queryCashParam), JSON.toJSONString(response));
if (response != null) {
QueryDrawCashResponse queryDrawCashResponse = JSON.parseObject(JSON.toJSONString(response), QueryDrawCashResponse.class);
if (queryDrawCashResponse == null || !StringUtils.equals(queryDrawCashResponse.getStatus(), "succeeded")) {
return null;
}
QueryDrawCashResponse.Cash cash = queryDrawCashResponse.getCashList().get(0);
DrawCashDetailVO vo = new DrawCashDetailVO();
vo.setCashId(cash.getCashId());
vo.setCashAmt(cash.getCashAmt());
vo.setTransStat(cash.getTransStat());
vo.setStatusDesc(cash.getTransStatusDesc());
return vo;
}
return null;
}
/**
* 更新汇付会员信息
*