package com.sqx.modules.resumes.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.common.utils.Result;
import com.sqx.modules.resumes.entity.PostDetails;
import com.sqx.modules.resumes.entity.PostPush;
import com.sqx.modules.resumes.vo.CityVo;
import com.sqx.modules.resumes.vo.LetterCity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author fang
 * @date 2022/8/3
 */
@Mapper
public interface PostPushDao extends BaseMapper<PostPush> {

    int insertPostPush(PostPush postPush);


    IPage<PostPush> getPostPushList(@Param("page") Page<PostPush> page, @Param("lng") Double lng, @Param("lat") Double lat, @Param("postPush") PostPush postPush, @Param("industry") String[] industry, @Param("education") String[] education, @Param("experience") String[] experience, @Param("companyPeople") String[] companyPeople, @Param("salaryRange") String[] salaryRange, @Param("screen") Integer screen, @Param("isDue") Integer isDue);

    IPage<PostDetails> selectPostList(Page<PostPush> page, Integer ruleClassifyId, String address, Long userId);

    List<LetterCity> getLetter();

    List<String> getCityList(@Param("letter") String letter, @Param("city") String city);

    List<String> getCountyByCity(@Param("city") String city);

    List<String> getHotCity(Integer limitCount);

    List<CityVo> getCityCounty();

    PostPush selectPostId(@Param("userId") Long userId, @Param("postPushId") Long postPushId, @Param("lng") Double lng, @Param("lat") Double lat);

    List<String> getCityCompanyId(@Param("companyId") Long companyId);

    List<String> getCompanyClassify(@Param("companyId") Long companyId);

    IPage<PostPush> getAdminPostPushList(@Param("pages") Page<PostPush> pages, @Param("postPush") PostPush postPush, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<Object> getHotPost();
}
