This commit is contained in:
unknown 2023-09-07 10:08:23 +08:00
parent 5874bb8fb8
commit ad44ac2844

View File

@ -132,15 +132,15 @@ class ContractController extends BaseApiController
//获取参数 //获取参数
$num = $this->request->post('num'); $num = $this->request->post('num');
if(empty($num)){ if(empty($num)){
return $this->fail('车辆数量不足'); return $this->fail('物理系统车辆数量不足');
} }
//获取车辆 //获取车辆
$data = Vehicle::where('status',0)->where('type',0)->limit($num)->select(); $data = Vehicle::where('status',0)->where('type',0)->limit($num)->select();
//判断 //判断
if($data->count() < $num){ if($data->count() < $num){
return $this->fail('车辆数量不足'); return $this->fail('物理系统车辆数量不足');
} }
return $this->success('车辆数量充足'); return $this->success('物理系统车辆数量充足');
} }
public function getAvailableVehicles() { public function getAvailableVehicles() {