40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package com.muyu.controller;
|
|
|
|
import com.muyu.common.Result;
|
|
import com.muyu.domain.req.VehicleInstanceListReq;
|
|
import com.muyu.domain.resp.VehicleInstanceResp;
|
|
import com.muyu.service.VehicleInstanceService;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author DongZl
|
|
* @description: 车辆实例控制层
|
|
* @Date 2023-11-25 上午 10:01
|
|
*/
|
|
@Log4j2
|
|
@RestController
|
|
@RequestMapping("/instance")
|
|
public class VehicleInstanceController {
|
|
|
|
@Autowired
|
|
private VehicleInstanceService vehicleInstanceService;
|
|
|
|
/**
|
|
* 查询车辆集合
|
|
* @param vehicleInstanceListReq 车辆列表查询对象
|
|
* @return 结果
|
|
*/
|
|
@PostMapping("/list")
|
|
public Result<List<VehicleInstanceResp>> list(@RequestBody VehicleInstanceListReq vehicleInstanceListReq){
|
|
List<VehicleInstanceResp> list = vehicleInstanceService.queryList(vehicleInstanceListReq);
|
|
return Result.success(list);
|
|
}
|
|
}
|