一、主要功能概述

【SSM电商项目后台开发】008-收货地址模块

二、学习目标

【SSM电商项目后台开发】008-收货地址模块

主要接口:

1.添加地址:/shipping/add.do
2.删除地址:/shipping/del.do
3.登录状态更新地址:/shipping/update.do
4.选中查看具体的地址:/shipping/select.do
5.地址列表/shipping/list.do

三、数据表设计

【SSM电商项目后台开发】008-收货地址模块

四、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);
}
View Code

相关文章: