shish 1 год назад
Родитель
Сommit
4c4161ed21
1 измененных файлов с 15 добавлено и 0 удалено
  1. 15 0
      app-hd/controllers/NoticeController.php

+ 15 - 0
app-hd/controllers/NoticeController.php

@@ -162,6 +162,21 @@ class NoticeController extends PublicController
                     }
                 }
 
+                //更新最后下单时间
+                $customId = $order->customId ?? 0;
+                $custom = CustomClass::getById($customId, true);
+                $date = date("Y-m-d H:i:s");
+                if (!empty($custom)) {
+                    $custom->recentExpend = $date;
+                    $custom->save();
+                }
+                $ghsId = $order->ghsId ?? 0;
+                $ghs = GhsClass::getById($ghsId, true);
+                if (!empty($ghs)) {
+                    $ghs->recentExpend = $date;
+                    $ghs->save();
+                }
+
                 if (isset($cg->localOrder) && $cg->localOrder == 1) {
                     if ($cg->transType != 5 && $cg->transType != 4) {
                         //昆明发货,客户算了一次打包费和运费,第二次就不再算了