package com.ningdatech.carapi.company.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.carapi.company.entity.dto.ResProductManageDTO;
import com.ningdatech.carapi.company.service.INdCompanyProductManageService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 公司生产管理 前端控制器
 * </p>
 *
 * @author liushuai
 * @since 2022-10-10
 */
@RestController
@RequestMapping("/api/v1/company-product-manage")
@RequiredArgsConstructor
public class NdCompanyProductManageController {
    private final INdCompanyProductManageService iNdCompanyProductManageService;

    @GetMapping
    public Page<ResProductManageDTO> manageList(@RequestParam(value = "companyName", required = false) String companyName,
                                                @RequestParam(value = "regionId", required = false) Long regionId,
                                                @RequestParam(value = "pageNumber") int pageNum,
                                                @RequestParam(value = "pageSize") int pageSize) {
        return iNdCompanyProductManageService.manageList(companyName, regionId, pageNum, pageSize);
    }
}
