package com.base.plan.controller.rpc;


import com.base.plan.service.WindowResourceService;
import com.plan.api.model.WindowResourceRpcDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

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

@RequestMapping("/rpc/resource")
@RestController
@Slf4j
public class WindowResourceRpcController {

    @Resource
    private WindowResourceService windowResourceService;

    @RequestMapping(value = "/getWindowResourceInfo", method = RequestMethod.POST)
    public List<WindowResourceRpcDTO> getWindowResourceInfo(@RequestBody List<String> reqIds) {
        return windowResourceService.getWindowResourceInfo(reqIds);
    }
}
