迁移购物车模块

This commit is contained in:
YunaiV
2020-08-06 21:13:21 +08:00
parent d06e51ba21
commit 3914b32637
99 changed files with 810 additions and 269 deletions

View File

@@ -4,9 +4,6 @@ import cn.iocoder.mall.order.biz.dataobject.CartItemDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Collection;
import java.util.List;
@Repository
public interface CartMapper {
//

View File

@@ -1,95 +0,0 @@
package cn.iocoder.mall.order.biz.dataobject;
import cn.iocoder.mall.mybatis.core.dataobject.BaseDO;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 购物车的商品信息
*/
@Data
@Accessors(chain = true)
public class CartItemDO extends BaseDO {
// ========= 基础字段 BEGIN =========
/**
* 编号,唯一自增。
*/
private Integer id;
/**
* 状态
*
* 1-正常
* 2-主动删除
* 3-下单删除
*/
private Integer status;
/**
* 商品在购物车中的删除时间
*/
private Date deleteTime;
/**
* 是否选中
*/
private Boolean selected;
// ========= 基础字段 END =========
// ========= 买家信息 BEGIN =========
/**
* 用户编号
*/
private Integer userId;
// ========= 买家信息 END =========
// ========= 商品信息 BEGIN =========
/**
* 商品 SPU 编号
*/
private Integer spuId;
/**
* 商品 SKU 编号
*/
private Integer skuId;
/**
* 商品购买数量
*/
private Integer quantity;
// TODO 冗余字段
// ========= 商品信息 END =========
// ========= 交易信息 BEGIN =========
/**
* 订单编号
*/
private Integer orderId;
/**
* 订单创建时间
*/
private Date orderCreateTime;
// ========= 交易信息 BEGIN =========
// ========= 优惠信息 BEGIN =========
// /**
// * 商品营销活动编号
// */
// private Integer activityId;
// /**
// * 商品营销活动类型
// */
// private Integer activityType;
// ========= 优惠信息 END =========
}

View File

@@ -2,55 +2,10 @@ package cn.iocoder.mall.order.biz.service;
public interface CartService {
// // ========== 购物车 Item 的逻辑 ==========
//
// /**
// * 添加商品至购物车
// *
// * @param userId 用户编号
// * @param skuId 商品 SKU 编号
// * @param quantity 数量
// * @return 是否成功
// */
// Boolean add(Integer userId, Integer skuId, Integer quantity);
//
// /**
// * 购物车更新商品数量
// *
// * @param userId 用户编号
// * @param skuId 商品 SKU 编号
// * @param quantity 数量
// * @return 是否成功
// */
// Boolean updateQuantity(Integer userId, Integer skuId, Integer quantity);
//
// /**
// * 购物车更新商品是否选中
// *
// * @param userId 用户编号
// * @param skuIds 商品 SKU 编号数组
// * @param selected 是否选中
// * @return 是否成功
// */
// Boolean updateSelected(Integer userId, Collection<Integer> skuIds, Boolean selected);
//
// /**
// * 购物车删除商品
// *
// * @param userId 用户编号
// * @param skuIds 商品 SKU 编号的数组
// *
// * @return 是否成功
// */
// Boolean deleteList(Integer userId, List<Integer> skuIds);
//
// /**
// * 清空购物车
// *
// * @param userId 用户编号
// * @return 是否成功
// */
// Boolean deleteAll(Integer userId);
//
// /**
// * 查询用户在购物车中的商品数量