package com.glxp.mipsdl.service.scpwxyy;

import com.github.pagehelper.PageHelper;
import com.glxp.mipsdl.entity.scpwxyy.A001;
import com.glxp.mipsdl.req.base.UdiwmsUnitRequest;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import com.glxp.mipsdl.thirddao.scpwxyy.A001Mapper;

import java.util.Collections;
import java.util.List;

@Service
public class A001Service extends ServiceImpl<A001Mapper, A001> {


    public List<A001> filterList(UdiwmsUnitRequest udiwmsUnitRequest) {
        if (null == udiwmsUnitRequest) {
            return Collections.emptyList();
        }
        if (null != udiwmsUnitRequest.getPage() && null != udiwmsUnitRequest.getLimit()) {
            PageHelper.offsetPage((udiwmsUnitRequest.getPage() - 1) * udiwmsUnitRequest.getLimit(), udiwmsUnitRequest.getLimit());
        }
        return this.baseMapper.filterList(udiwmsUnitRequest);
    }


}
