/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.app.dto.ProdCommDataDto;
import com.yami.shop.bean.app.dto.ProdCommDto;
import com.yami.shop.bean.model.ProdComm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.bean.po.CommPo;
import com.yami.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

public interface ProdCommMapper extends BaseMapper<ProdComm> {
    ProdCommDataDto getProdCommDataByProdId(@Param("prodId") Long prodId);

    IPage<ProdCommDto> getProdCommDtoPageByProdId(@Param("page") Page page, @Param("prodId") Long prodId, @Param("evaluate") Integer evaluate);

    IPage<ProdCommDto> getProdCommDtoPageByUserId(Page page, @Param("userId") String userId);

    IPage<ProdComm> getProdCommPage(Page page, @Param("prodComm") ProdComm prodComm, @Param("shopId") Long shopId);

    IPage<ProdComm> commList(@Param("page") PageParam<ProdComm> page, @Param("prodId") Long prodId,
                             @Param("shopId") Long shopId,@Param("commStatus") Integer commStatus,
                             @Param("channelId") Long channelId);

    Integer commentCount(@Param("prodId") Long prodId, @Param("shopId") Long shopId, @Param("evaluate") Integer evaluate,@Param("channelId") Long channelId);

    Integer picCount(@Param("prodId") Long prodId, @Param("shopId") Long shopId,@Param("channelId") Long channelId);

    String goodRate(@Param("prodId") Long prodId, @Param("shopId") Long shopId,@Param("channelId") Long channelId);

    IPage<ProdComm> myCommList(@Param("page") PageParam<ProdComm> page, @Param("userId") String userId);

    String getShopName(String orderNumber);

    IPage<ProdComm> backendCommList(@Param("page") PageParam<ProdComm> page, @Param("po") CommPo po);
}
