package com.jwipc.sys.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.sys.entity.PurchaseGroup;
import com.jwipc.sys.entity.PurchaseOrg;
import com.jwipc.sys.mapper.PurchaseOrgMapper;
import com.jwipc.sys.model.po.PurchaseGroupPO;
import com.jwipc.sys.model.po.PurchaseOrgPO;
import com.jwipc.sys.model.query.PurchaseGroupQuery;
import com.jwipc.sys.model.query.PurchaseOrgQuery;
import com.jwipc.sys.service.IPurchaseOrgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 采购组织主数据 服务实现类
 * </p>
 *
 * @author zhangjie
 * @since 2024-01-29
 */
@Service
public class PurchaseOrgServiceImpl extends ServiceImpl<PurchaseOrgMapper, PurchaseOrg> implements IPurchaseOrgService {
    @Override
    public List<PurchaseOrgPO> findPageByQuery(Page<PurchaseOrg> dbPage, PurchaseOrgQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }
    @Override
    public PurchaseOrgPO getDataById(Long id) {
        return baseMapper.getDataById(id);
    }


}
