rabin 2 年之前
父节点
当前提交
e253bb491a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/shop/lib/Cron.php
  2. 1 1
      service/agent/lib/Import.php

+ 1 - 1
app/shop/lib/Cron.php

@@ -491,7 +491,7 @@ class Cron
 
                 $data['order_num'] = Dever::db('shop/sell_order')->getOrderNum($where);
                 
-                if ($data['num'] > 0 && $data['order_num'] > 0) {
+                if ($data['num'] > 0 || $data['order_num'] > 0) {
                     $data['area'] = $v['area'];
                     if (!$info) {
                         Dever::db('shop/user_stat')->insert($data);

+ 1 - 1
service/agent/lib/Import.php

@@ -16,6 +16,7 @@ class Import
     public function __construct()
     {
         $this->db = Dever::db('agent/test:old');
+        $this->state = Dever::input('state', 1);
     }
 
     # 获取已审核的条件
@@ -51,7 +52,6 @@ class Import
 
     public function get_api()
     {
-        $this->state = Dever::input('state', 1);
         $this->date = Dever::maketime('2021-09-01 00:00:00');
         Dever::config('base')->hook = true;
         $host = 'https://cryl.yijiuguanfang.com/attachment/';