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.ResourceInspectResource;
import com.foreverwin.mesnac.equip.mapper.ResourceInspectResourceMapper;
import com.foreverwin.mesnac.equip.service.ResourceInspectResourceService;
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-11
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ResourceInspectResourceServiceImpl extends ServiceImpl<ResourceInspectResourceMapper, ResourceInspectResource> implements ResourceInspectResourceService {


    @Autowired
    private ResourceInspectResourceMapper resourceInspectResourceMapper;

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

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


}