汇付支付 执行退款

This commit is contained in:
2023-05-27 16:01:27 +08:00
parent 35413920d3
commit 6cba1f84c5
9 changed files with 83 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ import com.jsowell.common.util.AdapayUtil;
import com.jsowell.common.util.JWTUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.id.IdUtils;
import com.jsowell.common.util.id.SnowflakeIdWorker;
import com.jsowell.pile.domain.MemberBasicInfo;
import com.jsowell.pile.domain.MemberInvoiceTitle;
import com.jsowell.pile.domain.MemberPlateNumberRelation;
@@ -455,7 +456,7 @@ public class MemberService {
public Map<String, Object> rechargeBalanceWithAdapay(WeixinPayDTO dto) throws Exception {
// 封装对象
CreateAdaPaymentParam createAdaPaymentParam = new CreateAdaPaymentParam();
createAdaPaymentParam.setOrder_no(IdUtils.fastSimpleUUID());
createAdaPaymentParam.setOrder_no(SnowflakeIdWorker.getSnowflakeId());
createAdaPaymentParam.setPay_amt(AdapayUtil.formatAmount(dto.getAmount()));
createAdaPaymentParam.setApp_id(ADAPAY_APP_ID); // 移动到配置文件中
createAdaPaymentParam.setPay_channel("wx_lite"); // todo 如果以后有支付宝等别的渠道,这里需要做修改,判断是什么渠道的请求

View File

@@ -758,7 +758,7 @@ public class OrderService {
orderBasicInfoService.weChatRefund(dto);
}
public void adapayRefund(WeChatRefundDTO dto) {
public void adapayRefund(WeChatRefundDTO dto) throws BaseAdaPayException {
log.info("汇付退款 param:{}", JSON.toJSONString(dto));
// 退款有两种情况 1-订单结算退款 2-用户余额退款
String refundType = dto.getRefundType();
@@ -1213,7 +1213,6 @@ public class OrderService {
}
}
// 入库
OrderInvoiceRecord orderInvoiceRecord = new OrderInvoiceRecord();
orderInvoiceRecord.setStatus("0");