package com.hivekion.scenario.controller; import com.hivekion.scenario.entity.Vehicle; import com.hivekion.scenario.service.IResourceService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestParam; import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; /** *

* 建筑资源表 前端控制器 *

* * @author wangWenHua * @since 2025-09-14 */ @Controller @RequestMapping("/scenario/resource") public class ResourceController { @Resource private IResourceService resourceService; @GetMapping("/listVehiclesByType") public List listVehiclesByType(@RequestParam("type") Integer type, @RequestParam("resourceId") Integer resourceId){ List vehicleList = new ArrayList<>(); try{ vehicleList = this.resourceService.listAllVehiclesByType(type,resourceId); }catch (Exception e){ e.printStackTrace(); } return vehicleList; } }