stanley-king 3 年之前
父節點
當前提交
2cdabadca0
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      helper/statistics/stat_refill.php

+ 3 - 4
helper/statistics/stat_refill.php

@@ -22,7 +22,6 @@ class stat_refill
                                 ->field('refill_provider.store_id,store.store_name')->join('inner')
                                 ->on('store.store_id=refill_provider.store_id')
                                 ->where(['refill_provider.provider_id' => ['gt',0]])
-                                ->limit(100)
                                 ->select();
         foreach ($items as $item) {
             $store_id = intval($item['store_id']);
@@ -76,8 +75,6 @@ class stat_refill
         }
     }
 
-
-
     private function system_stat($day_time)
     {
         $cond = [
@@ -181,6 +178,7 @@ class stat_refill
             $params['success_channel_amounts'] = $item['channel_amounts'];
             $params['success_mch_amounts'] = $item['mch_amounts'];
             $params['profit_amounts'] = $item['mch_amounts'] - $item['channel_amounts'];
+
             if($cur_mchid != 0 && $cur_mchid == $mchid) {
                 Model('')->table('refill_stats')->where(['time_stamp' => $day_time, 'cid' => $cur_mchid, 'type' => 'merchant'])->update($params);
             }else{
@@ -188,6 +186,7 @@ class stat_refill
             }
         }
     }
+
     public function provider_stat($day_time,$cur_storeid = 0)
     {
         $cond = [
@@ -225,12 +224,12 @@ class stat_refill
             $params['success_channel_amounts'] = $item['channel_amounts'];
             $params['success_mch_amounts'] = $item['mch_amounts'];
             $params['profit_amounts'] = $item['mch_amounts'] - $item['channel_amounts'];
+
             if($cur_storeid != 0 && $cur_storeid == $store_id) {
                 Model('')->table('refill_stats')->where(['time_stamp' => $day_time, 'cid' => $cur_storeid, 'type' => 'provider'])->update($params);
             }else{
                 Model('')->table('refill_stats')->insert($params);
             }
-
         }
     }
 }