From bbe0a2fd03063316e50cf141986bda984599bbda Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Tue, 22 Feb 2022 23:41:42 +0800 Subject: [PATCH] Merge branch 'developer' --- zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java index af6cc71..4ddba04 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java @@ -1,5 +1,7 @@ package com.matrix.system.shopXcx.api.action; +import com.matrix.system.hive.bean.SysVipInfo; +import com.matrix.system.common.init.UserCacheManager; import com.matrix.core.pojo.AjaxResult; import com.matrix.system.shopXcx.api.service.WXShopOrderService; import com.matrix.system.shopXcx.api.service.WxShopActivitiesSecKillService; @@ -37,7 +39,10 @@ @Autowired private WXShopOrderService wxShopOrderService; @Autowired - private WxShopActivitiesSecKillService wxShopActivitiesSecKillService; + private WxShopActivitiesSecKillService wxShopActvitiesSecKillService; + + @Autowired + private UserCacheManager userCacheManager; /** @@ -106,12 +111,13 @@ */ @PostMapping(value = "/calSecKillPrice") public AjaxResult calSecKillPrice(@RequestBody SecKillVO secKillVO) { + SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillVO.getId()); if (seckillInfo == null) { return AjaxResult.buildFailInstance("参数有误"); } - BigDecimal postage = wxShopOrderService.calculationPostage(secKillVO.getAddressId(), seckillInfo.getSiPrice()); + BigDecimal postage = wxShopOrderService.calculationPostage(seckillInfo.getSiPrice(),sysVipInfo.getCompanyId()); BigDecimal payPrice = seckillInfo.getSiPrice().multiply(BigDecimal.valueOf(secKillVO.getCount())).add(postage); AjaxResult ajaxResult = new AjaxResult(AjaxResult.STATUS_SUCCESS, null); ajaxResult.putInMap("totalPrice", payPrice); @@ -128,6 +134,6 @@ */ @PostMapping(value = "/createSecKill") public AjaxResult createSecKill(@RequestBody CreateSecKillDTO secKillDTO) throws Exception { - return wxShopActivitiesSecKillService.createSecKillOrder(secKillDTO); + return wxShopActvitiesSecKillService.createSecKillOrder(secKillDTO); } } -- Gitblit v1.9.1