|  |  |  | 
|---|
|  |  |  | package com.matrix.system.shopXcx.api.action; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.biz.bean.BizUser; | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping(value = "/calSecKillPrice") | 
|---|
|  |  |  | public AjaxResult calSecKillPrice(@RequestBody SecKillVO secKillVO) { | 
|---|
|  |  |  | BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class); | 
|---|
|  |  |  | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); | 
|---|
|  |  |  | ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillVO.getId()); | 
|---|
|  |  |  | if (seckillInfo == null) { | 
|---|
|  |  |  | return AjaxResult.buildFailInstance("参数有误"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | BigDecimal postage = wxShopOrderService.calculationPostage(seckillInfo.getSiPrice(),bizUser.getCompanyId()); | 
|---|
|  |  |  | 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); | 
|---|