package jnpf.cultivate.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.cultivate.mapper.FtbCultivateLearnTaskCertificateMapper;
import jnpf.cultivate.service.FtbCultivateLearnTaskCertificateService;
import jnpf.model.cultivate.po.learn.FtbCultivateLearnTaskCertificate;
import jnpf.model.cultivate.resp.TaskRelationCertificateVo;
import jnpf.model.cultivate.v2.task.vo.FtbCultivateLearnTaskCertificateVo;
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 FtbCultivateLearnTaskCertificateServiceImpl extends ServiceImpl<FtbCultivateLearnTaskCertificateMapper, FtbCultivateLearnTaskCertificate> implements FtbCultivateLearnTaskCertificateService {

    @Resource
    private FtbCultivateLearnTaskCertificateMapper ftbCultivateLearnTaskCertificateMapper;

    /**
     * 批量查询正式名称
     *
     * @param taskIds 任务id集合
     * @return 返回证书信息
     */
    @Override
    public List<TaskRelationCertificateVo> queryCertificateName(List<String> taskIds) {
        return ftbCultivateLearnTaskCertificateMapper.queryCertificateName(taskIds);
    }

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

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