package co.yixiang.yshop.module.product.service.storeproductrelation;

import co.yixiang.yshop.module.product.controller.app.relation.vo.AppStoreProductRelationQueryVo;
import co.yixiang.yshop.module.product.dal.dataobject.storeproductrelation.StoreProductRelationDO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 商品点赞和收藏 Service 接口
 *
 * @author yshop
 */
public interface AppStoreProductRelationService extends IService<StoreProductRelationDO> {

    /**
     * 是否收藏
     * @param productId 商品ID
     * @param uid 用户ID
     * @return Boolean
     */
    Boolean isProductRelation(long productId, long uid,String category);

    /**
     *添加收藏
     * @param productId 商品id
     * @param uid 用户id
     */
    void addRroductRelation(long productId,long uid,String category);

    /**
     * 取消收藏
     * @param productId 商品id
     * @param uid 用户id
     */
    void delRroductRelation(long productId,long uid,String category);

    /**
     * 获取用户收藏列表
     * @param page page
     * @param limit limit
     * @param uid 用户id
     * @return list
     */
    List<AppStoreProductRelationQueryVo> userCollectProduct(int page, int limit, Long uid, String type);



}
