package com.foreverwin.mesnac.common.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.common.model.InspectionTaskDetail;
import com.foreverwin.mesnac.common.mapper.InspectionTaskDetailMapper;
import com.foreverwin.mesnac.common.service.InspectionTaskDetailService;
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 Philip
 * @since 2021-07-05
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class InspectionTaskDetailServiceImpl extends ServiceImpl<InspectionTaskDetailMapper, InspectionTaskDetail> implements InspectionTaskDetailService {


    @Autowired
    private InspectionTaskDetailMapper inspectionTaskDetailMapper;

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

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


}