Commit 4372f923 by ping.wu

Merge branch 'feature/20220727_非码付接口迁移准备_wuping' of…

Merge branch 'feature/20220727_非码付接口迁移准备_wuping' of https://gitlab.freemud.com/order-group-application/order-group
parents 8f286ebe 2668325e
......@@ -1409,7 +1409,7 @@ public class PayServiceImpl {
refundRequest.setTotalAmount(refundRequest.getRefundAmount());
}
AssortmentOpenPlatformIappWxappStore wxAppStore = this.assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(refundRequest.getAppId(), refundRequest.getStoreId(), payCode);
// AssortmentOpenPlatformIappWxappStore wxAppStore = this.assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(refundRequest.getAppId(), refundRequest.getStoreId(), payCode);
PayRefundRequestDto request = new PayRefundRequestDto();
request.setStoreId(refundRequest.getStoreId());
request.setStationId(refundRequest.getStationId());
......@@ -1425,7 +1425,7 @@ public class PayServiceImpl {
request.setPartnerId(refundRequest.getPartnerId());
request.setVer(2);
request.setExtendParams(refundRequest.getExtendParams());
com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam = this.checkParam(refundRequest.getPartnerId(), refundRequest.getStoreId(), refundRequest.getRefundAmount(), wxAppStore);
com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam = this.checkParam(refundRequest.getPartnerId(), refundRequest.getStoreId(), refundRequest.getRefundAmount());
if (!Objects.equals(checkParam.getCode(), "100")) {
return checkParam;
} else {
......@@ -1478,7 +1478,7 @@ public class PayServiceImpl {
}
public com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam(String partnerId, String storeId, Long amount, AssortmentOpenPlatformIappWxappStore wxAppStore) {
public com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam(String partnerId, String storeId, Long amount) {
if (StringUtils.isBlank(partnerId)) {
return ResponseUtils.error("501", "商户号不能为空");
} else if (StringUtils.isBlank(storeId)) {
......@@ -1486,7 +1486,7 @@ public class PayServiceImpl {
} else if (amount == null) {
return ResponseUtils.error("501", "金额不能为空");
} else {
return wxAppStore == null ? ResponseUtils.error("500", "支付信息没有配置") : ResponseUtils.success();
return ResponseUtils.success();
}
}
......
......@@ -650,21 +650,22 @@ public class OrderVerifyHandle {
/**
* 获取已完成订单退款金额
* isRefundDeliveryFee 退款是否退配送费已在申请退款传到订单基础服务,取订单售后单中退款金额 actualAmount
*/
public BigDecimal getRefundAmount(OrderBeanV1 data,boolean isRefundDeliveryFee) {
//是否配置已完成订单可退款
BigDecimal refundAmount = new BigDecimal(data.getAmount());
if (isRefundDeliveryFee || isPayBySVC(data)){
return refundAmount;
}
List<AccountBeanV1> accountList = data.getAccountList();
if (CollectionUtils.isNotEmpty(accountList)) {
for (AccountBeanV1 orderCostResp : accountList) {
if (orderCostResp.getType() == OldOrderAccountType.DELIVERY_AMOUNT.getCode()) {
refundAmount = new BigDecimal(data.getAmount().intValue() - orderCostResp.getPrice());
}
}
}
// if (isRefundDeliveryFee || isPayBySVC(data)){
// return refundAmount;
// }
// List<AccountBeanV1> accountList = data.getAccountList();
// if (CollectionUtils.isNotEmpty(accountList)) {
// for (AccountBeanV1 orderCostResp : accountList) {
// if (orderCostResp.getType() == OldOrderAccountType.DELIVERY_AMOUNT.getCode()) {
// refundAmount = new BigDecimal(data.getAmount().intValue() - orderCostResp.getPrice());
// }
// }
// }
return refundAmount;
}
/**
......
......@@ -255,7 +255,7 @@ public class PaymentHandle {
if (refundRequest.getTotalAmount() == null || refundRequest.getTotalAmount() == 0L) {
refundRequest.setTotalAmount(refundRequest.getRefundAmount());
}
AssortmentOpenPlatformIappWxappStore wxAppStore = this.assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(refundRequest.getAppId(), refundRequest.getStoreId(), payCode);
// AssortmentOpenPlatformIappWxappStore wxAppStore = this.assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(refundRequest.getAppId(), refundRequest.getStoreId(), payCode);
PayRefundRequestDto request = new PayRefundRequestDto();
request.setStoreId(refundRequest.getStoreId());
request.setStationId(refundRequest.getStationId());
......@@ -271,7 +271,7 @@ public class PaymentHandle {
request.setPartnerId(refundRequest.getPartnerId());
request.setVer(2);
request.setExtendParams(refundRequest.getExtendParams());
com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam = this.checkParam(refundRequest.getPartnerId(), refundRequest.getStoreId(), refundRequest.getRefundAmount(), wxAppStore);
com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam = this.checkParam(refundRequest.getPartnerId(), refundRequest.getStoreId(), refundRequest.getRefundAmount());
if (!Objects.equals(checkParam.getCode(), "100")) {
return null;
}
......@@ -450,7 +450,7 @@ public class PaymentHandle {
}
private com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam(String partnerId, String storeId, Long amount, AssortmentOpenPlatformIappWxappStore wxAppStore) {
private com.freemud.application.sdk.api.base.BaseResponse<OrderRefundResponse> checkParam(String partnerId, String storeId, Long amount) {
if (StringUtils.isBlank(partnerId)) {
return ResponseUtils.error("501", "商户号不能为空");
} else if (StringUtils.isBlank(storeId)) {
......@@ -458,7 +458,7 @@ public class PaymentHandle {
} else if (amount == null) {
return ResponseUtils.error("501", "金额不能为空");
} else {
return wxAppStore == null ? ResponseUtils.error("500", "支付信息没有配置") : ResponseUtils.success();
return ResponseUtils.success();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment