dever 6 lat temu
rodzic
commit
00c2151456
1 zmienionych plików z 15 dodań i 2 usunięć
  1. 15 2
      main/lib/Cron.php

+ 15 - 2
main/lib/Cron.php

@@ -57,11 +57,24 @@ class Cron
     # 重新计算排行榜
     public function pai_api()
     {
+        $data = Dever::db('act/score')->state(array('type' => 4, 'data_id' => 28));
+
         # 购买小刊
         $where['product_id'] = 28;
         $where['status'] = 2;
-        $where['type'] = 1;
-        $data = Dever::db('journal/order')->state($where);
+
+        # 重建积分排行
+        foreach ($data as $k => $v) {
+            $where['uid'] = $v['uid'];
+            $order = Dever::db('journal/order')->state($where);
+
+            if ($order) {
+                $this->paiOrder($order);
+            }
+        }
+
+        
+        
     }