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 { ...@@ -1409,7 +1409,7 @@ public class PayServiceImpl {
refundRequest.setTotalAmount(refundRequest.getRefundAmount()); 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(); PayRefundRequestDto request = new PayRefundRequestDto();
request.setStoreId(refundRequest.getStoreId()); request.setStoreId(refundRequest.getStoreId());
request.setStationId(refundRequest.getStationId()); request.setStationId(refundRequest.getStationId());
...@@ -1425,7 +1425,7 @@ public class PayServiceImpl { ...@@ -1425,7 +1425,7 @@ public class PayServiceImpl {
request.setPartnerId(refundRequest.getPartnerId()); request.setPartnerId(refundRequest.getPartnerId());
request.setVer(2); request.setVer(2);
request.setExtendParams(refundRequest.getExtendParams()); 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")) { if (!Objects.equals(checkParam.getCode(), "100")) {
return checkParam; return checkParam;
} else { } else {
...@@ -1478,7 +1478,7 @@ public class PayServiceImpl { ...@@ -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)) { if (StringUtils.isBlank(partnerId)) {
return ResponseUtils.error("501", "商户号不能为空"); return ResponseUtils.error("501", "商户号不能为空");
} else if (StringUtils.isBlank(storeId)) { } else if (StringUtils.isBlank(storeId)) {
...@@ -1486,7 +1486,7 @@ public class PayServiceImpl { ...@@ -1486,7 +1486,7 @@ public class PayServiceImpl {
} else if (amount == null) { } else if (amount == null) {
return ResponseUtils.error("501", "金额不能为空"); return ResponseUtils.error("501", "金额不能为空");
} else { } else {
return wxAppStore == null ? ResponseUtils.error("500", "支付信息没有配置") : ResponseUtils.success(); return ResponseUtils.success();
} }
} }
......
...@@ -650,21 +650,22 @@ public class OrderVerifyHandle { ...@@ -650,21 +650,22 @@ public class OrderVerifyHandle {
/** /**
* 获取已完成订单退款金额 * 获取已完成订单退款金额
* isRefundDeliveryFee 退款是否退配送费已在申请退款传到订单基础服务,取订单售后单中退款金额 actualAmount
*/ */
public BigDecimal getRefundAmount(OrderBeanV1 data,boolean isRefundDeliveryFee) { public BigDecimal getRefundAmount(OrderBeanV1 data,boolean isRefundDeliveryFee) {
//是否配置已完成订单可退款 //是否配置已完成订单可退款
BigDecimal refundAmount = new BigDecimal(data.getAmount()); BigDecimal refundAmount = new BigDecimal(data.getAmount());
if (isRefundDeliveryFee || isPayBySVC(data)){ // if (isRefundDeliveryFee || isPayBySVC(data)){
return refundAmount; // return refundAmount;
} // }
List<AccountBeanV1> accountList = data.getAccountList(); // List<AccountBeanV1> accountList = data.getAccountList();
if (CollectionUtils.isNotEmpty(accountList)) { // if (CollectionUtils.isNotEmpty(accountList)) {
for (AccountBeanV1 orderCostResp : accountList) { // for (AccountBeanV1 orderCostResp : accountList) {
if (orderCostResp.getType() == OldOrderAccountType.DELIVERY_AMOUNT.getCode()) { // if (orderCostResp.getType() == OldOrderAccountType.DELIVERY_AMOUNT.getCode()) {
refundAmount = new BigDecimal(data.getAmount().intValue() - orderCostResp.getPrice()); // refundAmount = new BigDecimal(data.getAmount().intValue() - orderCostResp.getPrice());
} // }
} // }
} // }
return refundAmount; return refundAmount;
} }
/** /**
......
...@@ -255,7 +255,7 @@ public class PaymentHandle { ...@@ -255,7 +255,7 @@ public class PaymentHandle {
if (refundRequest.getTotalAmount() == null || refundRequest.getTotalAmount() == 0L) { if (refundRequest.getTotalAmount() == null || refundRequest.getTotalAmount() == 0L) {
refundRequest.setTotalAmount(refundRequest.getRefundAmount()); 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(); PayRefundRequestDto request = new PayRefundRequestDto();
request.setStoreId(refundRequest.getStoreId()); request.setStoreId(refundRequest.getStoreId());
request.setStationId(refundRequest.getStationId()); request.setStationId(refundRequest.getStationId());
...@@ -271,7 +271,7 @@ public class PaymentHandle { ...@@ -271,7 +271,7 @@ public class PaymentHandle {
request.setPartnerId(refundRequest.getPartnerId()); request.setPartnerId(refundRequest.getPartnerId());
request.setVer(2); request.setVer(2);
request.setExtendParams(refundRequest.getExtendParams()); 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")) { if (!Objects.equals(checkParam.getCode(), "100")) {
return null; return null;
} }
...@@ -450,7 +450,7 @@ public class PaymentHandle { ...@@ -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)) { if (StringUtils.isBlank(partnerId)) {
return ResponseUtils.error("501", "商户号不能为空"); return ResponseUtils.error("501", "商户号不能为空");
} else if (StringUtils.isBlank(storeId)) { } else if (StringUtils.isBlank(storeId)) {
...@@ -458,7 +458,7 @@ public class PaymentHandle { ...@@ -458,7 +458,7 @@ public class PaymentHandle {
} else if (amount == null) { } else if (amount == null) {
return ResponseUtils.error("501", "金额不能为空"); return ResponseUtils.error("501", "金额不能为空");
} else { } 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