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

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

import java.util.List;
/**
 * <p>
 * 检验项目维护-副 服务实现类
 * </p>
 *
 * @author Philip
 * @since 2021-06-09
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class InspectionItemDetailServiceImpl extends ServiceImpl<InspectionItemDetailMapper, InspectionItemDetail> implements InspectionItemDetailService {


    @Autowired
    private InspectionItemDetailMapper inspectionItemDetailMapper;

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

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


}