package com.ningdatech.pmapi.expert.service.impl;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo;
import com.ningdatech.pmapi.expert.mapper.NdExpertUserFullInfoMapper;
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Liuxinxin
 * @since 2023-02-22
 */
@Service
public class ExpertUserFullInfoServiceImpl extends ServiceImpl<NdExpertUserFullInfoMapper, ExpertUserFullInfo> implements IExpertUserFullInfoService {

    @Override
    public ExpertUserFullInfo getByUserId(Long userId) {
        return getOne(Wrappers.<ExpertUserFullInfo>lambdaQuery().eq(ExpertUserFullInfo::getUserId, userId));
    }

    @Override
    public List<ExpertUserFullInfo> listByUserId(List<Long> userIds) {
        return list(Wrappers.<ExpertUserFullInfo>lambdaQuery().in(ExpertUserFullInfo::getUserId, userIds));
    }

    @Override
    public List<ExpertUserFullInfo> listByUserIds(List<Long> userIds) {
        return list(Wrappers.<ExpertUserFullInfo>lambdaQuery().in(ExpertUserFullInfo::getUserId, userIds));
    }

}
