package com.cool.store.service.impl;

import com.cool.store.entity.WarehouseInfoDO;
import com.cool.store.mapper.WarehouseInfoMapper;
import com.cool.store.service.WarehouseInfoService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lowagie.text.PageSize;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * @Author: WangShuo
 * @Date: 2025/04/08/15:09
 * @Version 1.0
 * @注释:
 */
@Service
public class WarehouseInfoServiceImpl implements WarehouseInfoService {

    @Resource
    private WarehouseInfoMapper warehouseInfoMapper;
    @Override
    public PageInfo<WarehouseInfoDO> getAllAndActive(String keyword,Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<WarehouseInfoDO> allAndActive = warehouseInfoMapper.getAllAndActive(keyword);
        return new PageInfo<>(allAndActive);
    }
}
