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

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.equip.model.ResourceInspectTask;
import com.foreverwin.mesnac.equip.mapper.ResourceInspectTaskMapper;
import com.foreverwin.mesnac.equip.service.ResourceInspectTaskService;
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 pavel.Liu
 * @since 2021-06-10
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ResourceInspectTaskServiceImpl extends ServiceImpl<ResourceInspectTaskMapper, ResourceInspectTask> implements ResourceInspectTaskService {


    @Autowired
    private ResourceInspectTaskMapper resourceInspectTaskMapper;

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

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


}