| | |
| | | AjaxResult calculationCartOrder(@RequestBody AddShopOrderPOJO addShopOrderPOJO) throws Exception { |
| | | BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class); //计算购物车中物品的优惠信息 |
| | | |
| | | List<ShopCartVo> cartList = shoppingCartService.findUserCartList(addShopOrderPOJO.getShopId()); |
| | | List<ShopCartVo> cartList = shoppingCartService.findUserCartList(addShopOrderPOJO.getShopId(),ShopShoppingCart.CAR_TYPE_MICRO); |
| | | |
| | | |
| | | //取出购物车中选中的产品 |
| | |
| | | } |
| | | } |
| | | //获取当前购物车产品可用的优惠券 |
| | | List<CouponReceiveInfoVO> usefulCoupon = wxShopCouponService.getCartVoCouponList(addShopOrderPOJO.getShopId(),notCouponuyCart); |
| | | List<CouponReceiveInfoVO> usefulCoupon = wxShopCouponService.getCartVoCouponList(bizUser.getCompanyId(),notCouponuyCart); |
| | | |
| | | //获取用户使用的优惠券 |
| | | CouponReceiveInfoVO shopCoupon = new CouponReceiveInfoVO(); |
| | |
| | | |
| | | } |
| | | |
| | | Integer addrId = null; |
| | | if (shopReceiveAddress != null) { |
| | | addrId = shopReceiveAddress.getAddrId(); |
| | | } |
| | | |
| | | //得到订单计价说明 |
| | | DiscountExplain discountExplain = shopOrderService.buildDiscountExplain(cartList, shopCoupon.getReceiveId(), addrId); |
| | | DiscountExplain discountExplain = shopOrderService.buildDiscountExplain(cartList, shopCoupon.getReceiveId(), bizUser.getCompanyId()); |
| | | |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, buyCart, buyCart.size()); |
| | | //结算金额信息 |