package com.foreverwin.mesnac.meapi.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.meapi.mapper.BomOperationMapper;
import com.foreverwin.mesnac.meapi.model.BomOperation;
import com.foreverwin.mesnac.meapi.service.BomOperationService;
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-6-23
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class BomOperationServiceImpl extends ServiceImpl<BomOperationMapper, BomOperation> implements BomOperationService {


    @Autowired
    private BomOperationMapper bomOperationMapper;

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

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


}