From dd0833ef33804b7cf085b8c3c005e5788a3617d6 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Mon, 22 Mar 2021 17:10:38 +0800
Subject: [PATCH] 积分商城16
---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
index bf2e433..b79a20b 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
@@ -126,6 +126,7 @@
}
private ShopOrder createOrder(CreateSecKillDTO secKillDTO) {
+ BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(secKillDTO.getAddressId());
if (shopReceiveAddress == null) {
throw new GlobleException("请选择正确的收获地址");
@@ -177,6 +178,7 @@
shopOrder.setUpdateBy("微信小程序生成");
shopOrder.setCommodityPrice(secKillDTO.getPrice());
shopOrder.setPurchaseQuantity(1);
+ shopOrder.setCompanyId(bizUser.getCompanyId());
//购买方式
shopOrder.setShippingMethod(secKillDTO.getShippingMethod());
//生成订单号
@@ -201,15 +203,15 @@
shopOrder.setPayResult(ShopOrder.ORDER_WX_STATUS_WAIT_PAY);
//如果没有提交购买方式或配送方式不是物流
//获取邮费
- BigDecimal postPrice = wxShopOrderService.calculationPostage(secKillDTO.getAddressId(), secKillDTO.getPrice());
+ BigDecimal postPrice = wxShopOrderService.calculationPostage(secKillDTO.getPrice(),bizUser.getCompanyId());
shopOrder.setPostage(postPrice);
BigDecimal payPrice = secKillDTO.getPrice().multiply(BigDecimal.valueOf(secKillDTO.getCount())).add(shopOrder.getPostage());
shopOrder.setOrderMoney(payPrice);
DiscountExplain discountExplain = new DiscountExplain();
discountExplain.setPayPrice(payPrice);
discountExplain.setPostage(postPrice);
- discountExplain.setActivity(BigDecimal.ZERO);
- discountExplain.setCoupon(BigDecimal.ZERO);
+ discountExplain.setActivityPrice(BigDecimal.ZERO);
+ discountExplain.setCouponPrice(BigDecimal.ZERO);
discountExplain.setBillPrice(payPrice);
Gson g = new GsonBuilder().create();
shopOrder.setDiscountExplain(g.toJson(discountExplain));
--
Gitblit v1.9.1