一、主要功能概述
二、学习目标
主要接口:
1.添加地址:/shipping/add.do 2.删除地址:/shipping/del.do 3.登录状态更新地址:/shipping/update.do 4.选中查看具体的地址:/shipping/select.do 5.地址列表/shipping/list.do:
三、数据表设计
四、DAO
package com.mmall.dao; import com.mmall.pojo.Shipping; import org.apache.ibatis.annotations.Param; import java.util.List; public interface ShippingMapper { int deleteByPrimaryKey(Integer id); int insert(Shipping record); int insertSelective(Shipping record); Shipping selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(Shipping record); int updateByPrimaryKey(Shipping record); int deleteByShippingIdAndUserId(@Param("userId") Integer userId, @Param("shippingId") Integer shippingId); int updateByShipping(Shipping shipping); Shipping selectByShippingIdAndUserId(@Param("shippingId") Integer shippingId, @Param("userId") Integer userId); List<Shipping> selectShippingListByUserId(Integer userId); }