dever 6 年之前
父节点
当前提交
06900083b0
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 4 1
      stat/lib/Journal.php
  2. 4 1
      stat/lib/Source.php

+ 4 - 1
stat/lib/Journal.php

@@ -55,9 +55,11 @@ class Journal
     {
     {
         # 这里就是为了做下sql的实现方式,其实用dever自带的功能完全可以实现。
         # 这里就是为了做下sql的实现方式,其实用dever自带的功能完全可以实现。
         $day = date('Y-m-d', $where['start']);
         $day = date('Y-m-d', $where['start']);
+        $order_num = $order_yes_num = $order_no_num = $buy_num = $buy_cash = 0;
+        /*
         $sql = 'select * from wonderful_journal_order where type in(1,3,4) and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $sql = 'select * from wonderful_journal_order where type in(1,3,4) and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $order = Dever::db('journal/order')->fetchAll($sql);
         $order = Dever::db('journal/order')->fetchAll($sql);
-        $order_num = $order_yes_num = $order_no_num = $buy_num = $buy_cash = 0;
+        
         if ($order) {
         if ($order) {
             
             
             foreach ($order as $k => $v) {
             foreach ($order as $k => $v) {
@@ -84,6 +86,7 @@ class Journal
                 }
                 }
             }
             }
         }
         }
+        */
 
 
         $sql = 'select * from wonderful_act_order where type = 3 and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $sql = 'select * from wonderful_act_order where type = 3 and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $order = Dever::db('act/order')->fetchAll($sql);
         $order = Dever::db('act/order')->fetchAll($sql);

+ 4 - 1
stat/lib/Source.php

@@ -59,10 +59,12 @@ class Source
     private function total($source, $info, $where, $pv, $uv, $user_num, $user_yes_num)
     private function total($source, $info, $where, $pv, $uv, $user_num, $user_yes_num)
     {
     {
         $day = date('Y-m-d', $where['start']);
         $day = date('Y-m-d', $where['start']);
+        $order_num = $order_yes_num = $order_no_num = $buy_num = $buy_cash = 0;
+        /*
         $sql = 'select * from wonderful_journal_order where type in(1,3) and source = '.$source['id'].' and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $sql = 'select * from wonderful_journal_order where type in(1,3) and source = '.$source['id'].' and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $order = Dever::db('journal/order')->fetchAll($sql);
         $order = Dever::db('journal/order')->fetchAll($sql);
 
 
-        $order_num = $order_yes_num = $order_no_num = $buy_num = $buy_cash = 0;
+        
 
 
         if ($order) {
         if ($order) {
             foreach ($order as $k => $v) {
             foreach ($order as $k => $v) {
@@ -87,6 +89,7 @@ class Source
                 }
                 }
             }
             }
         }
         }
+        */
 
 
         $sql = 'select * from wonderful_act_order where type = 3 and source = '.$source['id'].' and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $sql = 'select * from wonderful_act_order where type = 3 and source = '.$source['id'].' and product_id = '.$info['id'].' and state = 1 and cdate >= '.$where['start'].' and cdate <= '.$where['end'];
         $order = Dever::db('act/order')->fetchAll($sql);
         $order = Dever::db('act/order')->fetchAll($sql);