package com.eactive.eai.rms.common.schedulerStatus;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.eactive.eai.rms.common.base.BaseService;
import com.eactive.eai.rms.data.entity.man.scheduler.JobHistoryService;

@Service
public class SchedulerStatusHistoryService extends BaseService {

	@Autowired
	private JobHistoryService jobHistoryService;

	@Autowired
	private JobHistoryUIMapper jobHistoryUIMapper;

	public Page<JobHistoryUI> selectList(Pageable pageable, String searchStartTime, String searchEndTime,
			String searchJobName, String searchInstanceName) {
		return jobHistoryService
				.findAll(pageable, searchStartTime, searchEndTime, searchJobName, searchInstanceName)
				.map(jobHistoryUIMapper::toVo);

	}

}
