添加商品收藏

This commit is contained in:
xiaofeng
2019-07-03 00:01:24 +08:00
parent 5c2c4da6fa
commit ab04382852
5 changed files with 163 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package cn.iocoder.mall.product.api;
/**
* 商品收藏
* @author xiaofeng
* @date 2019/07/01 23:13
* @version 1.0
*/
public interface ProductSpuCollectionService {
/**
* 商品收藏
* @param spuId
* @param hasCollectionType 1 商品收藏 2 取消收藏
* @param userId
* @return
*/
boolean productSpuCollection(Integer spuId,Integer hasCollectionType,Integer userId);
}

View File

@@ -0,0 +1,46 @@
package cn.iocoder.mall.product.api.message;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 商品收藏或取消收藏时发送消息
* @author xiaofeng
* @date 2019/07/01 22:33
* @version 1.0
*/
@Data
@Accessors(chain = true)
public class ProductSpuCollectionMessage {
public static final String TOPIC = "ProductSpuCollection";
/**
* SPU 编号
*/
private Integer spuId;
/**
* 用户ID
*/
private Integer userId;
// ========== 基本信息 =========
/**
* SPU 名字
*/
private String spuName;
/**
* 商品图片
*/
private String spuImage;
/**
* 1 收藏 2 取消
*/
private Integer hasCollectionType;
}