This commit is contained in:
unknown 2023-08-29 19:07:31 +08:00
parent 26cc26b19f
commit a3a392555e
2 changed files with 4 additions and 3 deletions

View File

@ -52,11 +52,12 @@ class ContractController extends BaseApiController
'update_time' => time(),
];
//写入数据
$result = (new Contract())->save($data);
$result = Contract::create($data);
//更改车辆状态
$carStatus = Vehicle::where('id','in',array_column($cars->toArray(),'id'))->update(['status'=>2,'update_time'=>time()]);
//返回
if($result && $carStatus) {
if($result->id && $carStatus) {
$data['id'] = $result->id;
return $this->success('合同发起成功,等待审核',$data);
}else{
return $this->fail('请求失败');

View File

@ -115,7 +115,7 @@ class IndexController extends BaseApiController
Vehicle::where('id','in',$carIds)->update(['status'=>3]);
curl_post('https://worker-task.lihaink.cn/api/index/notifyVehicleContractUpdate',[],[
'id' => $contract['id'],
'signing_timer' => 1,
'signing_timer' => 2,
'status' => 4
]);
curl_post('https://worker-task.lihaink.cn/v1/notify_property',[],[