package cn.com.ty.lift.ud.recruitmentInfos.mapper;


import java.util.List;

import cn.com.ty.lift.ud.payment.mapper.entity.TyBillEntity;
import cn.com.ty.lift.ud.recruitmentInfos.controller.query.RecruitmentDeliveryQuery;
import cn.com.ty.lift.ud.recruitmentInfos.mapper.entity.RecruitmentDeliveryEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import  com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * 招聘投递信息 -Repository
 * 
 * @author Xson
 * @date 2020-04-23
 */
public interface RecruitmentDeliveryMapper extends BaseMapper<RecruitmentDeliveryEntity> {

	List<TyBillEntity> selectByQuery(@Param("ew") Wrapper wrapper, @Param("page") RecruitmentDeliveryQuery page);

    int countByQuery(@Param("ew") Wrapper wrapper);
    
    RecruitmentDeliveryEntity finOneById(@Param("id")Long id);
    
    @Select("SELECT * FROM recruitment_delivery WHERE user_id=#{userId} AND data_id=#{id}")
    RecruitmentDeliveryEntity findByDataIdAndResumeId(@Param("id")Long id,@Param("userId") Long userId) ;
}
