package com.sqx.modules.taking.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.modules.taking.entity.CommentFabulous;
import com.sqx.modules.taking.entity.TakingCommnt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface OrderTakingCommentDao extends BaseMapper<TakingCommnt> {
    IPage<Map<String, Object>> selectOrderTakingComment(IPage page, @Param("artificerId") Long artificerId,@Param("massageTypeId") Long massageTypeId);

    int selectCommentNumber(@Param("id") Long id);

    CommentFabulous selectGoodsNum(@Param("commentId") Long commentId, @Param("userId") Long userId);

    int deleteGoodsNum(@Param("id") Long id);

    int insertGoodsNum(@Param("commentId") Long commentId, @Param("userId") Long userId);

    Double selectAvgScore(@Param("artificerId") Long artificerId);

    IPage<Map<String, Object>> selectOrderTakingCommentByUserId(Page<Map<String,Object>> page, @Param("userId") Long userId);

    Double selectCountTakingByUserId(Long userId,@Param("startTime") String startTime,@Param("endTime") String endTime);

    Integer selectCommentCount(Long userId,Integer type,@Param("startTime") String startTime,@Param("endTime") String endTime);

    IPage<TakingCommnt> selectTakingCommentByArtificerId(IPage<TakingCommnt> page1, @Param("artificerId")Long artificerId);
}
