package com.repair.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.repair.model.pojo.RepairUser;
import com.repair.model.vo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ceshi
 * @since 2023-07-11
 */
@Repository
public interface RepairUserMapper extends BaseMapper<RepairUser> {
    IPage<RepairUserVo> queryUserPageList(IPage<RepairUserVo> page, @Param("schoolId") String schoolId, @Param("teamId") String teamId, @Param("keyWord") String keyWord);

    List<RepairLogisticsVo> queryLogisticsList(@Param("recordId") Integer recordId);

    UserDataVo queryUserData(@Param("userId") Integer userId, @Param("dateNow") String dateNow);

    IPage<CollaboratorVo> queryCollaborator(IPage<CollaboratorVo> page, @Param("userId") Integer userId, @Param("schoolId") Integer schoolId, @Param("keyWord") String keyWord);

    List<AddressBookVo> queryAddressBook(@Param("schoolId") Integer schoolId, @Param("keyWord") String keyWord);

    IPage<AddressBookVo> queryUserPageBySchoolId(IPage<AddressBookVo> page, @Param("schoolId") Integer schoolId, @Param("userId") Integer userId);

    List<AutoDispatchUserVo> autoDispatchUser(@Param("schoolId") Integer schoolId, @Param("dateNow") String dateNow, @Param("articleId") Integer articleId, @Param("buildId") Integer buildId, @Param("keyWord") String keyWord);

    IPage<AutoDispatchUserVo> autoDispatchUser(IPage<AutoDispatchUserVo> page, @Param("schoolId") Integer schoolId, @Param("dateNow") String dateNow, @Param("articleId") Integer articleId, @Param("buildId") Integer buildId, @Param("keyWord") String keyWord);

    IPage<AutoOfflineUserVo> autoOfflineRepairUser(IPage<AutoOfflineUserVo> page, @Param("schoolId") Integer schoolId, @Param("keyWord") String keyWord);

    IPage<RepairWorkTypeVo> queryCollaboratorUser(IPage<RepairWorkTypeVo> page, @Param("schoolId") Integer schoolId, @Param("userId") Integer userId, @Param("dateNow") String dateNow, @Param("keyWord") String keyWord);

    IPage<PositiveReviewVo> queryPositiveReviewPage(IPage<PositiveReviewVo> page, @Param("schoolId") Integer schoolId);

    List<AutoDispatchUserVo> dropDown(Integer buildId, Integer articleId, Integer schoolId, Integer userId);

    List<ArticleBuildVo> queryArticleBuilds(@Param("userIds") List<Integer> userIds);
}
