回收订单改状态

wysf
ztt 11 months ago
parent 94ea0a073e
commit 0b34ad756e
  1. 8
      app/api/controller/Recovery.php

@ -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();
$model = (new RecoveryOrder())::detail($params['order_id']);
if ($model) {
if($params['status'] == RecoveryStatusEnum::ALREADY || $params['status'] == RecoveryStatusEnum::FINISN) {
$res = $model->save(['order_status' => $params['status']]); $res = $model->save(['order_status' => $params['status']]);
if ($res) { if ($res) {
return $this->renderSuccess('更新成功'); return $this->renderSuccess('更新成功');
} }
}
}
return $this->renderError('更新失败'); return $this->renderError('更新失败');
} }

Loading…
Cancel
Save