package com.cool.store.controller.webb;

import com.cool.store.entity.WarehouseInfoDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.WarehouseInfoService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

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

/**
 * @Author: WangShuo
 * @Date: 2025/04/08/15:12
 * @Version 1.0
 * @注释:
 */
@RestController
@Api("PC获取正新鸡排仓库配置")
@RequestMapping("/pc/warehouseInfo")
public class PCWarehouseInfoController {

    @Resource
    private WarehouseInfoService warehouseInfoService;

    @GetMapping("/getAllAndActive")
    @ApiOperation(value = "获取正新鸡排仓库配置")
    public ResponseResult<PageInfo<WarehouseInfoDO>> getAllAndActive(@RequestParam("keyword")String keyword ,
                                                                     @RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
                                                                     @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
        return ResponseResult.success(warehouseInfoService.getAllAndActive(keyword,pageNum,pageSize));
    }
}
