package com.dayou.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dayou.dto.ItemBrokerageGeneralDTO;
import com.dayou.dto.ItemDTO;
import com.dayou.entity.Item;
import com.dayou.dao.CustomBaseMapper;
import com.dayou.entity.ItemBrokerageGeneral;
import com.dayou.vo.ItemStageVO;
import com.dayou.vo.ItemStatVO;
import com.dayou.vo.ItemVO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 项目信息表 Mapper 接口
 * </p>
 *
 * @author wucl
 * @since 2022-12-08
 */
public interface ItemMapper extends CustomBaseMapper<Item> {

    ItemStatVO stat();

    ItemVO xDetail(@Param("id") Long id);

    Page<ItemVO> getPage(Page page, @Param("item") ItemDTO item);

    Page<ItemVO> getXPage(Page page, @Param("item")ItemDTO item);

    List<ItemVO> xSelectList(@Param("item")ItemStageVO item);

    List<ItemBrokerageGeneral> getLastMonthItems(@Param("lastMonth23") LocalDate lastMonth23, @Param("userId") Long userId,@Param("marketerStatus") String marketerStatus );


    List<ItemBrokerageGeneral> getLastMonthItemsInStatus(@Param("lastMonth23") LocalDate lastMonth23, @Param("userId") Long userId);

    List<ItemVO> xList(@Param("item") ItemDTO item);

    List<ItemVO> xMineList( @Param("item") ItemDTO item);

    ItemDTO  getItemByBrokerageGeneralId(@Param("generalId") Long generalId);

    Set<ItemBrokerageGeneralDTO> getLastMonthTeamItems(@Param("lastMonth23")LocalDate lastMonth23, @Param("juniorUserIds") Set<Long> juniorUserIds);

    List<ItemVO> getCompletedNotEvaluateItem();
}
