package com.foreverwin.mesnac.quartz.service.impl;

import com.foreverwin.mesnac.quartz.mapper.SystemJobLogMapper;
import com.foreverwin.mesnac.quartz.model.SystemJobLog;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.quartz.service.SystemJobLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
/**
 * <p>
 * 系统任务日志表 服务实现类
 * </p>
 *
 * @author Ervin Chen
 * @since 2020-10-21
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SystemJobLogServiceImpl extends ServiceImpl<SystemJobLogMapper, SystemJobLog> implements SystemJobLogService {


    @Autowired
    private SystemJobLogMapper systemJobLogMapper;

    @Override
    public IPage<SystemJobLog> selectPage(FrontPage<SystemJobLog> frontPage, SystemJobLog systemJobLog) {
        QueryWrapper<SystemJobLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(systemJobLog);
        return super.page(frontPage.getPagePlus(), queryWrapper);
    }

    @Override
    public List<SystemJobLog> selectList(SystemJobLog systemJobLog) {
        QueryWrapper<SystemJobLog> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(systemJobLog);
        return super.list(queryWrapper);
    }


}