package jnpf.cultivate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.cultivate.mapper.FtbCultivateLearnTaskIdentificationMapper;
import jnpf.cultivate.service.FtbCultivateLearnTaskIdentificationService;
import jnpf.model.cultivate.po.learn.FtbCultivateLearnTaskIdentification;
import jnpf.model.cultivate.resp.TaskRelationIdentificationVo;
import jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskIdentificationVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: peng.hao
 * @create: 2024/9/9:11:05
 */
@Service
public class FtbCultivateLearnTaskIdentificationServiceImpl extends ServiceImpl<FtbCultivateLearnTaskIdentificationMapper, FtbCultivateLearnTaskIdentification> implements FtbCultivateLearnTaskIdentificationService {

    @Resource
    private FtbCultivateLearnTaskIdentificationMapper ftbCultivateLearnTaskIdentificationMapper;

    /**
     * 根据任务id查询关联的认证id
     *
     * @param taskIds 任务ID集合
     * @return
     */
    @Override
    public List<TaskRelationIdentificationVo> queryIdentificationName(List<String> taskIds) {
        return ftbCultivateLearnTaskIdentificationMapper.queryIdentificationName(taskIds);
    }

    /**
     * 根据任务id查询关联的认证信息
     *
     * @param taskId 任务ID
     * @return
     */
    @Override
    public FtbCultivateLearnTaskIdentification queryByTaskId(String taskId) {
        return ftbCultivateLearnTaskIdentificationMapper.queryByTaskId(taskId);
    }

    @Override
    public List<FtbCultivateLearnTaskIdentificationVo> listByTaskId(String taskId) {
        return ftbCultivateLearnTaskIdentificationMapper.listByTaskId(taskId);
    }

    @Override
    public List<FtbCultivateLearnTaskIdentificationVo> listByTaskIdAndPhaseId(String taskId, String phaseId) {
        return ftbCultivateLearnTaskIdentificationMapper.listByTaskIdAndPhaseId(taskId, phaseId);
    }
}