package com.foreverwin.mesnac.production.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.production.model.LoadInventoryLog;
import com.foreverwin.mesnac.production.mapper.LoadInventoryLogMapper;
import com.foreverwin.mesnac.production.service.LoadInventoryLogService;
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-09
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class LoadInventoryLogServiceImpl extends ServiceImpl<LoadInventoryLogMapper, LoadInventoryLog> implements LoadInventoryLogService {


    @Autowired
    private LoadInventoryLogMapper loadInventoryLogMapper;

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

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


}