package com.foreverwin.mesnac.quality.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.quality.model.InspectionProjectDetail;
import com.foreverwin.mesnac.quality.mapper.InspectionProjectDetailMapper;
import com.foreverwin.mesnac.quality.service.InspectionProjectDetailService;
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 Robert
 * @since 2021-06-03
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class InspectionProjectDetailServiceImpl extends ServiceImpl<InspectionProjectDetailMapper, InspectionProjectDetail> implements InspectionProjectDetailService {


    @Autowired
    private InspectionProjectDetailMapper inspectionProjectDetailMapper;

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

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


}