package com.ruoyi.system.controller;
|
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.web.page.PageInfo;
|
import com.ruoyi.system.api.model.Driver;
|
import com.ruoyi.system.query.DriverListReq;
|
import com.ruoyi.system.query.DriverListResp;
|
import com.ruoyi.system.service.IDriverService;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* @author zhibing.pu
|
* @Date 2025/3/27 16:20
|
*/
|
@RestController
|
@RequestMapping("/driver")
|
public class DriverController {
|
|
@Resource
|
private IDriverService driverService;
|
|
@GetMapping("/getDriverList")
|
@ApiOperation(value = "获取司机列表", tags = {"司机管理"})
|
public R<PageInfo<DriverListResp>> getDriverList(DriverListReq driverListReq) {
|
PageInfo<DriverListResp> page = driverService.getDriverList(driverListReq);
|
return R.ok(page);
|
}
|
|
|
@GetMapping("/getDriverInfo/{id}")
|
@ApiOperation(value = "获取司机详情", tags = {"司机管理"})
|
public R<Driver> getDriverInfo(@PathVariable("id") Integer id) {
|
Driver driver = driverService.getById(id);
|
return R.ok(driver);
|
}
|
}
|