|
|
@@ -2001,6 +2001,35 @@ class OrderController extends BaseController
|
|
|
//修改订单的确认时间 ssh 20240511
|
|
|
public function actionModifyOrderConfirmTime()
|
|
|
{
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? 0;
|
|
|
+ $date = $get['date'] ?? '';
|
|
|
+ if (empty($date)) {
|
|
|
+ util::fail('请选择日期');
|
|
|
+ }
|
|
|
+ $order = OrderClass::getById($id, true);
|
|
|
+ if (empty($order)) {
|
|
|
+ util::fail('没有找到订单');
|
|
|
+ }
|
|
|
+ if ($order->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的订单');
|
|
|
+ }
|
|
|
+ if ($order->payStatus == 0) {
|
|
|
+ util::fail('没有确认的订单');
|
|
|
+ }
|
|
|
+ $payTime = $order->payTime;
|
|
|
+ $time = strtotime($payTime);
|
|
|
+ $after = date("H:is", $time);
|
|
|
+ $new = $date . ' ' . $after;
|
|
|
+ $cgId = $order->purchaseId ?? 0;
|
|
|
+ $cg = PurchaseClass::getById($cgId, true);
|
|
|
+ if (empty($cg)) {
|
|
|
+ util::fail('没有找到订单信息');
|
|
|
+ }
|
|
|
+ $order->payTime = $new;
|
|
|
+ $order->save();
|
|
|
+ $cg->payTime = $new;
|
|
|
+ $cg->save();
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|