From e892ea04b56194b6208b5a902f1622f40d4c56a7 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Sat, 10 Jul 2021 09:10:08 +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