From 7935dc34ac744d0ad1dc8147ad7fe84732b639ae Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 8 Aug 2022 09:59:38 +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 --- .../cweb/controller/HighOrderController.java | 49 +++++++++++++------ .../resources/dev/commonConfig.properties | 2 +- .../prod-9401/commonConfig.properties | 2 +- .../resources/prod/commonConfig.properties | 2 +- 4 files changed, 36 insertions(+), 19 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index 953635f6..22322294 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -320,20 +320,38 @@ public class HighOrderController { // 计算价格 GasPayPriceModel priceModel = gasDiscountOilPriceService.oilPriceDiscountCompute(childOrder.getGoodsPrice(), childOrder.getGoodsId(), childOrder.getGasOilNo(), highOrder.getIsTyAgent()); - // 支付价格 - childOrder.setGoodsActualPrice(priceModel.getPayPrice()); - - // 油价信息 - childOrder.setGasPriceGun(priceModel.getPriceGun()); - childOrder.setGasPriceVip(priceModel.getPriceVip()); - childOrder.setGasPriceOfficial(priceModel.getPriceOfficial()); - childOrder.setGasPricePlatform(priceModel.getPricePlatform()); - childOrder.setGasOilLiters(priceModel.getOilLiters()); - childOrder.setGasDiscount(priceModel.getDiscount()); - childOrder.setExt1(priceModel.getPricePlatform().toString()); - childOrder.setGasOilSubsidy(priceModel.getPreferentialMargin()); - childOrder.setGasLitersPreferences(priceModel.getLitersPreferences()); - childOrder.setGasPricePreferences(priceModel.getPricePreferences()); + + // 使用了优惠价 + if (highDiscountUserRel != null) { + // 支付价格 + childOrder.setGoodsActualPrice(childOrder.getGoodsPrice()); + // 油价信息 + childOrder.setGasPriceGun(priceModel.getPriceGun()); + childOrder.setGasPriceVip(priceModel.getPriceVip()); + childOrder.setGasPriceOfficial(priceModel.getPriceOfficial()); + childOrder.setGasPricePlatform(priceModel.getPriceVip()); + childOrder.setGasOilLiters(priceModel.getOilLiters()); + childOrder.setGasDiscount(new BigDecimal("0")); + childOrder.setExt1(childOrder.getGasPricePlatform().toString()); + childOrder.setGasOilSubsidy(new BigDecimal("0")); + childOrder.setGasLitersPreferences(new BigDecimal("0")); + childOrder.setGasPricePreferences(priceModel.getPriceVip()); + } else { + // 支付价格 + childOrder.setGoodsActualPrice(priceModel.getPayPrice()); + // 油价信息 + childOrder.setGasPriceGun(priceModel.getPriceGun()); + childOrder.setGasPriceVip(priceModel.getPriceVip()); + childOrder.setGasPriceOfficial(priceModel.getPriceOfficial()); + childOrder.setGasPricePlatform(priceModel.getPricePlatform()); + childOrder.setGasOilLiters(priceModel.getOilLiters()); + childOrder.setGasDiscount(priceModel.getDiscount()); + childOrder.setExt1(priceModel.getPricePlatform().toString()); + childOrder.setGasOilSubsidy(priceModel.getPreferentialMargin()); + childOrder.setGasLitersPreferences(priceModel.getLitersPreferences()); + childOrder.setGasPricePreferences(priceModel.getPricePreferences()); + } + // 来源类型 1:平台自建 2:团油 if (store.getSourceType().equals(1)) { @@ -414,7 +432,7 @@ public class HighOrderController { BigDecimal integralDeductionPrice = new BigDecimal(0); if (buyPoints && highOrder.getPayGold() != null) { - integralDeductionPrice = new BigDecimal(highOrder.getPayGold()).divide(new BigDecimal(100)); + integralDeductionPrice = new BigDecimal(highOrder.getPayGold().toString()).divide(new BigDecimal(100)); highUserService.goldHandle(userInfoModel.getHighUser().getId(), highOrder.getPayGold(), 2, 2, highOrder.getId()); BigDecimal payGold = new BigDecimal(highOrder.getPayGold()); @@ -425,7 +443,6 @@ public class HighOrderController { } } - highOrder.setMerchId(request.getHeader("mchId")); highOrder.setTotalPrice(totalPrice); diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index 8cb3044b..dc2f2eac 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -15,7 +15,7 @@ shellPlatMerchantId=S0302206141001919666 shellPlatMerchantKey=pic1yj2l3zby5ywpznrtdz7458ce2soj # JinZhu configuration parameters -jzAppId=app_xiaohan_test_01 +jzAppId=app_huidui_prod_01 jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key diff --git a/hai-service/src/main/resources/prod-9401/commonConfig.properties b/hai-service/src/main/resources/prod-9401/commonConfig.properties index e3d4a6c6..1ff7bbef 100644 --- a/hai-service/src/main/resources/prod-9401/commonConfig.properties +++ b/hai-service/src/main/resources/prod-9401/commonConfig.properties @@ -18,7 +18,7 @@ shellPlatMerchantId=S0302206141001919666 shellPlatMerchantKey=pic1yj2l3zby5ywpznrtdz7458ce2soj # JinZhu configuration parameters -jzAppId=app_xiaohan_test_01 +jzAppId=app_huidui_prod_01 jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties index c3af7736..148767dc 100644 --- a/hai-service/src/main/resources/prod/commonConfig.properties +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -18,7 +18,7 @@ shellPlatMerchantId=S0302206141001919666 shellPlatMerchantKey=pic1yj2l3zby5ywpznrtdz7458ce2soj # JinZhu configuration parameters -jzAppId=app_xiaohan_test_01 +jzAppId=app_huidui_prod_01 jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key