package net.northking.cctp.executePlan.db.impl;

import net.northking.cctp.common.db.*;
import net.northking.cctp.executePlan.db.dao.MqSynchronizeTaskDao;
import net.northking.cctp.executePlan.db.entity.MqSynchronizeTask;
import net.northking.cctp.executePlan.db.service.MqSynchronizeTaskService;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@ConditionalOnMissingBean(name = "MqSynchronizeTaskServiceImpl")
public class MqSynchronizeTaskServiceImpl extends PaginationService<MqSynchronizeTask> implements MqSynchronizeTaskService {

    private final MqSynchronizeTaskDao mqSynchronizeTaskDao;

    public MqSynchronizeTaskServiceImpl(MqSynchronizeTaskDao mqSynchronizeTaskDao) {this.mqSynchronizeTaskDao = mqSynchronizeTaskDao;}

    public BasicDao<MqSynchronizeTask> getDao() {return mqSynchronizeTaskDao;}

    public MqSynchronizeTask createEntity() { return new MqSynchronizeTask();}

    @Override
    protected void beforeInsert(MqSynchronizeTask mqSynchronizeTask) {

    }

    @Override
    protected void beforeUpdate(MqSynchronizeTask mqSynchronizeTask) {

    }

    @Override
    public List<MqSynchronizeTask> findByTypes(List<Integer> types) {
        return mqSynchronizeTaskDao.findByTypes(types);
    }


}
