package tech.easyflow.ai.service.impl;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import tech.easyflow.ai.entity.WorkflowExecResult;
import tech.easyflow.ai.mapper.WorkflowExecResultMapper;
import tech.easyflow.ai.service.WorkflowExecResultService;

/**
 * 工作流执行记录 服务层实现。
 *
 * @author ArkLight
 * @since 2025-05-28
 */
@Service
public class WorkflowExecResultServiceImpl extends ServiceImpl<WorkflowExecResultMapper, WorkflowExecResult>  implements WorkflowExecResultService {

    @Override
    public WorkflowExecResult getByExecKey(String execKey) {
        QueryWrapper w = QueryWrapper.create();
        w.eq(WorkflowExecResult::getExecKey, execKey);
        return getOne(w);
    }
}
