package com.younike.system.mapper;

import com.younike.system.domain.vo.GoodsCommentsVO;
import com.younike.system.param.GoodsCommentQueryParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品评价Mapper接口
 *
 * @author jubs
 * @date 2022-01-11
 */
public interface MerchantGoodsCommentMapper {
    /**
     * 查询商品评价
     *
     * @param commontId 商品评价主键
     * @return 商品评价
     */
    GoodsCommentsVO selectGoodsCommentByCommontId(Long commontId);

    /**
     * 查询商品评价列表
     *
     * @param goodsCommentsVO 商品评价
     * @return 商品评价集合
     */
    List<GoodsCommentsVO> selectGoodsCommentList(GoodsCommentsVO goodsCommentsVO);

    /**
     * 新增商品评价
     *
     * @param goodsComment 商品评价
     * @return 结果
     */
    int insertGoodsComment(GoodsCommentsVO goodsComment);

    /**
     * 修改商品评价
     *
     * @param goodsComment 商品评价
     * @return 结果
     */
    int updateGoodsComment(GoodsCommentsVO goodsComment);

    /**
     * 删除商品评价
     *
     * @param commontId 商品评价主键
     * @return 结果
     */
    int deleteGoodsCommentByCommontId(Long commontId);

    /**
     * 批量删除商品评价
     *
     * @param commontIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteGoodsCommentByCommontIds(Long[] commontIds);

    /**
     * 根据订单类型查询订单商品评价列表
     *
     * @param commentQueryParam
     * @return
     */
    List<GoodsCommentsVO> listGoodsCommentByOrderType(@Param("param") GoodsCommentQueryParam commentQueryParam);
}
