package com.nantian.cloud.jljc.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nantian.cloud.jljc.entity.TExperts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 专家库 Mapper 接口
 *
 * @since 2020-09-05
 */
@Mapper
public interface TExpertsMapper extends BaseMapper<TExperts> {

    //分页、条件查询
    IPage getExpertsByPage(@Param("page") Page page,@Param("query") TExperts tExperts);

    List<TExperts> getExperts(@Param("type")  String type, @Param("industryCode") String industryCode);

    //根据id获取
    TExperts getExpertsById(@Param("id") Integer id);

    //新增
    boolean addExperts(TExperts tExperts);

    //修改
    boolean updateExpertsById(TExperts tExperts);

    //删除
    boolean deleteExpertsById(TExperts tExperts);


    //随机抽取专家
    List<TExperts> getRandomExperts(@Param("list") String[] split,@Param("num") Integer num,@Param("len") String len);
}
