package com.trade.service.trade.filingdoc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trade.service.trade.filingdoc.domain.FilingDocWriteTask;
import com.trade.service.trade.filingdoc.mapper.FilingDocWriteTaskMapper;
import com.trade.service.trade.filingdoc.service.IFilingDocWriteTaskService;
import com.trade.service.trade.filingdoc.vo.FilingDocSearch;
import com.trade.service.trade.filingdoc.vo.FilingDocVO;

import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 备案单证写入小图任务 服务实现类
 * </p>
 *
 * @author zhangchenm
 * @since 2024-10-23
 */
@Service
public class FilingDocWriteTaskServiceImpl extends ServiceImpl<FilingDocWriteTaskMapper, FilingDocWriteTask> implements IFilingDocWriteTaskService {

    @Override
    public boolean updateTask(FilingDocWriteTask task) {
        return this.updateById(task);
    }

    @Override
    public List<FilingDocWriteTask> findTaskByStatus(Integer status) {
        return lambdaQuery().eq(FilingDocWriteTask::getStatus, status).list();
    }

    @Override
    public List<FilingDocVO> queryList4FilingDocBySearch(FilingDocSearch search) {
        return getBaseMapper().queryList4FilingDocBySearch(search);
    }
}
