package com.hz.pm.api.meta.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hz.pm.api.meta.constant.ExpertDictTypeEnum;
import com.hz.pm.api.meta.model.entity.ExpertDictionary;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Liuxinxin
 * @since 2023-02-22
 */
public interface IExpertDictionaryService extends IService<ExpertDictionary> {


    /**
     * 根据专家ID批量查询专家字典信息
     *
     * @param userIds  专家ID
     * @param dictType 专家字典类型
     * @return /
     * @author WendyYang
     **/
    List<ExpertDictionary> listByUserId(Collection<Long> userIds, ExpertDictTypeEnum dictType);

    List<ExpertDictionary> listByUserId(Collection<Long> userIds);

    default void removeByUserId(Long userId) {
        this.remove(Wrappers.lambdaQuery(ExpertDictionary.class).eq(ExpertDictionary::getUserId, userId));
    }

}
