添加商品收藏
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package cn.iocoder.mall.user.api;
|
||||
|
||||
import cn.iocoder.mall.user.api.bo.UserProductSpuCollectionsBO;
|
||||
import cn.iocoder.mall.user.api.dto.UserProductSpuCollectionsAddDTO;
|
||||
import cn.iocoder.mall.user.api.dto.UserProductSpuCollectionsUpdateDTO;
|
||||
|
||||
/**
|
||||
* UserProductSpuCollectionsService
|
||||
* @author xiaofeng
|
||||
* @date 2019/07/01 20:27
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface UserProductSpuCollectionsService {
|
||||
|
||||
/**
|
||||
* 添加商品收藏
|
||||
* @return
|
||||
*/
|
||||
int addUserSkuCollections(UserProductSpuCollectionsAddDTO userProductSpuCollectionsAddDTO);
|
||||
|
||||
/**
|
||||
* 获取用户商品收藏
|
||||
* @param userId 用户ID
|
||||
* @param spuId 商品ID
|
||||
* @return
|
||||
*/
|
||||
UserProductSpuCollectionsBO getUserSpuCollectionsByUserIdAndSpuId(Integer userId, Integer spuId);
|
||||
|
||||
/**
|
||||
* 取消商品收藏
|
||||
* @param userProductSpuCollectionsUpdateDTO
|
||||
* @return
|
||||
*/
|
||||
int updateUserProductSpuCollections(UserProductSpuCollectionsUpdateDTO userProductSpuCollectionsUpdateDTO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package cn.iocoder.mall.user.api.bo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户_商品_收藏记录表
|
||||
* @author xiaofeng
|
||||
* @date 2019-07-01 20:23:30
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UserProductSpuCollectionsBO implements Serializable {
|
||||
|
||||
/**
|
||||
* id自增长
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Integer spuId;
|
||||
|
||||
/**
|
||||
* 商品名字
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
/**
|
||||
* 图片名字
|
||||
*/
|
||||
private String spuImage;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package cn.iocoder.mall.user.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 添加商品收藏参数
|
||||
* @author xiaofeng
|
||||
* @date 2019/07/01 20:38
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UserProductSpuCollectionsAddDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* id自增长
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer userId;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Integer spuId;
|
||||
|
||||
/**
|
||||
* 商品名字
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
/**
|
||||
* 图片名字
|
||||
*/
|
||||
private String spuImage;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.mall.user.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 更新商品收藏参数
|
||||
* @author xiaofeng
|
||||
* @date 2019/07/01 20:38
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class UserProductSpuCollectionsUpdateDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* id自增长
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 删除状态
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user