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.InspectionItemAddition;
import com.foreverwin.mesnac.common.mapper.InspectionItemAdditionMapper;
import com.foreverwin.mesnac.common.service.InspectionItemAdditionService;
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-06-09
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class InspectionItemAdditionServiceImpl extends ServiceImpl<InspectionItemAdditionMapper, InspectionItemAddition> implements InspectionItemAdditionService {


    @Autowired
    private InspectionItemAdditionMapper inspectionItemAdditionMapper;

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

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


}