1.展示订单确认页面
1.1.1. 功能分析
1、在购物车页面点击“去结算”按钮跳转到订单确认页面。2、请求的url:/order/order-cart3、参数:没有参数。4、购物车商品数据从cookie中取出来的。可以在订单系统中取到cookie中的购物车数据。5、配送地址列表,需要用户登录。需要根据用户id查询收货地址列表。静态数据。6、支付方式。静态数据。6、返回值:逻辑视图String,展示订单确认页面。
1.1.2. Interface层
package cn.e3mall.order.service;import cn.e3mall.common.utils.E3Result;import cn.e3mall.order.pojo.OrderInfo;public interface OrderService { E3Result createOrder(OrderInfo orderInfo);}
1.1.3. Service层
package cn.e3mall.order.service.impl;import java.util.Date;import java.util.List;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.beans.factory.annotation.Value;import org.springframework.stereotype.Service;import cn.e3mall.common.jedis.JedisClient;import cn.e3mall.common.utils.E3Result;import cn.e3mall.mapper.TbOrderItemMapper;import cn.e3mall.mapper.TbOrderMapper;import cn.e3mall.mapper.TbOrderShippingMapper;import cn.e3mall.order.pojo.OrderInfo;import cn.e3mall.order.service.OrderService;import cn.e3mall.pojo.TbOrderItem;import cn.e3mall.pojo.TbOrderShipping;@Servicepublic class OrderServiceImpl implements OrderService { @Autowired private TbOrderMapper orderMapper; @Autowired private TbOrderItemMapper orderItemMapper; @Autowired private TbOrderShippingMapper orderShippingMapper; @Autowired private JedisClient jedisClient; @Value("${ORDER_ID_GEN_KEY}") private String ORDER_ID_GEN_KEY;