package com.cyksj.service.sys.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.cyksj.mapper.SysCorpFollowRelateMapper;
import com.cyksj.mapper.sys.SysConfigMapper;
import com.cyksj.model.entity.SysCorpFollowRelate;
import com.cyksj.service.sys.SysCorpServiceRelateService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * 项目名: yhlxj2
 * 文件名: SysCorpServiceRelateServiceImpl
 * 创建者: JavaZou
 * 创建时间:2024/1/11 12:07
 */
@Service
@RequiredArgsConstructor
public class SysCorpServiceRelateServiceImpl implements SysCorpServiceRelateService {
	private final SysConfigMapper sysConfigMapper;

	private final SysCorpFollowRelateMapper sysCorpFollowRelateMapper;


	@Override
	public List<String> getFollowIdsByRelateIds(List<Integer> indxIds) throws Exception {
		//值班客服
		return sysCorpFollowRelateMapper.selectList(Wrappers.lambdaQuery(SysCorpFollowRelate.class)
				.in(SysCorpFollowRelate::getId, indxIds)).stream().map(SysCorpFollowRelate::getFollowId).collect(Collectors.toList());
	}
}
