package com.ai.da.service.impl;

import com.ai.da.mapper.primary.AccountMapper;
import com.ai.da.mapper.primary.CloudTaskMapper;
import com.ai.da.mapper.primary.entity.Account;
import com.ai.da.mapper.primary.entity.CloudTask;
import com.ai.da.service.ClassificationService;
import com.ai.da.service.CloudTaskService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class CloudTaskServiceImpl extends ServiceImpl<CloudTaskMapper, CloudTask> implements CloudTaskService {
    @Resource
    private CloudTaskMapper cloudTaskMapper;

    @Override
    public CloudTask getByTaskId(String taskId) {
        QueryWrapper<CloudTask> qw = new QueryWrapper<>();
        qw.lambda().eq(CloudTask::getTaskId, taskId);
        return cloudTaskMapper.selectOne(qw);
    }
}
