From e9ba049a3264d70a546128e861d960f938ab2f41 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 11 Jan 2023 16:14:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/web/controller/OrderPayController.java | 6 ++++-- .../hai/order/service/impl/OrderPayBeforeServiceImpl.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hai-order/src/main/java/com/web/controller/OrderPayController.java b/hai-order/src/main/java/com/web/controller/OrderPayController.java index 2df77f5a..3df96695 100644 --- a/hai-order/src/main/java/com/web/controller/OrderPayController.java +++ b/hai-order/src/main/java/com/web/controller/OrderPayController.java @@ -147,8 +147,10 @@ public class OrderPayController { if (store == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油站"); } - if (order.getTotalPrice().compareTo(gasService.getMerPriceByMerId(store.getMerchantId())) == 1) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法进行支付,请联系平台客服"); + if (store.getPrestoreType().equals(1)) { + if (order.getTotalPrice().compareTo(gasService.getMerPriceByMerId(store.getMerchantId())) == 1) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法进行支付,请联系平台客服"); + } } if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())) { diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayBeforeServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayBeforeServiceImpl.java index 7982d0bf..9b4b6840 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayBeforeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayBeforeServiceImpl.java @@ -43,8 +43,10 @@ public class OrderPayBeforeServiceImpl implements OrderPayBeforeService { if (store == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油站"); } - if (order.getTotalPrice().compareTo(gasService.getMerPriceByMerId(store.getMerchantId())) == 1) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法进行支付,请联系平台客服"); + if (store.getPrestoreType().equals(1)) { + if (order.getTotalPrice().compareTo(gasService.getMerPriceByMerId(store.getMerchantId())) == 1) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法进行支付,请联系平台客服"); + } } if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber())) {