From a9f950c0d11a687a7a940443b8c765f6d87ae4f1 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Tue, 20 Apr 2021 00:26:22 +0800
Subject: [PATCH] 合并新的修改
---
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..e42af89 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.component.redis.RedisUserLoginUtils;
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 RedisUserLoginUtils redisUserLoginUtils;
/**
@@ -106,12 +111,13 @@
*/
@PostMapping(value = "/calSecKillPrice")
public AjaxResult calSecKillPrice(@RequestBody SecKillVO secKillVO) {
+ SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
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