소스 검색

更新最近下单时间

shish 2 년 전
부모
커밋
dfaa851d1a
1개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 16 0
      app-hd/controllers/PurchaseController.php

+ 16 - 0
app-hd/controllers/PurchaseController.php

@@ -634,6 +634,22 @@ class PurchaseController extends BaseController
                         }
                     }
                 }
+
+                //更新最后下单时间
+                $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();
+                }
+
             }
         } catch (Exception $e) {
             $transaction->rollBack();