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.ProdReadyTaskDetail;
import com.foreverwin.mesnac.common.mapper.ProdReadyTaskDetailMapper;
import com.foreverwin.mesnac.common.service.ProdReadyTaskDetailService;
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-23
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ProdReadyTaskDetailServiceImpl extends ServiceImpl<ProdReadyTaskDetailMapper, ProdReadyTaskDetail> implements ProdReadyTaskDetailService {


    @Autowired
    private ProdReadyTaskDetailMapper prodReadyTaskDetailMapper;

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

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


}