package com.foreverwin.mesnac.anomaly.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.anomaly.model.AbnormalBillDispose;
import com.foreverwin.mesnac.anomaly.mapper.AbnormalBillDisposeMapper;
import com.foreverwin.mesnac.anomaly.service.AbnormalBillDisposeService;
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 zjw
 * @since 2021-08-12
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class AbnormalBillDisposeServiceImpl extends ServiceImpl<AbnormalBillDisposeMapper, AbnormalBillDispose> implements AbnormalBillDisposeService {


    @Autowired
    private AbnormalBillDisposeMapper abnormalBillDisposeMapper;

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

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


}