|
|
@ -134,11 +134,17 @@ class Recovery extends Controller |
|
|
|
if (empty($params['order_id']) || empty($params['recovery_id']) || empty($params['status'])) { |
|
|
|
if (empty($params['order_id']) || empty($params['recovery_id']) || empty($params['status'])) { |
|
|
|
return $this->renderError('缺少必要参数'); |
|
|
|
return $this->renderError('缺少必要参数'); |
|
|
|
} |
|
|
|
} |
|
|
|
$model = new RecoveryOrder(); |
|
|
|
|
|
|
|
$res = $model->save(['order_status' => $params['status']]); |
|
|
|
$model = (new RecoveryOrder())::detail($params['order_id']); |
|
|
|
if ($res) { |
|
|
|
if ($model) { |
|
|
|
return $this->renderSuccess('更新成功'); |
|
|
|
if($params['status'] == RecoveryStatusEnum::ALREADY || $params['status'] == RecoveryStatusEnum::FINISN) { |
|
|
|
|
|
|
|
$res = $model->save(['order_status' => $params['status']]); |
|
|
|
|
|
|
|
if ($res) { |
|
|
|
|
|
|
|
return $this->renderSuccess('更新成功'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $this->renderError('更新失败'); |
|
|
|
return $this->renderError('更新失败'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|