Parcourir la source

更新下单时间

shish il y a 1 an
Parent
commit
4c4161ed21
1 fichiers modifiés avec 15 ajouts et 0 suppressions
  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) {
                         //昆明发货,客户算了一次打包费和运费,第二次就不再算了