rabin 2 年之前
父节点
当前提交
b8e08de8a5
共有 3 个文件被更改,包括 9 次插入13 次删除
  1. 6 6
      app/shop/database/buy_order_goods.php
  2. 3 3
      app/shop/database/sell_order_goods.php
  3. 0 4
      app/shop/lib/Cron.php

+ 6 - 6
app/shop/database/buy_order_goods.php

@@ -257,9 +257,9 @@ return array
                 'source_type' => array('yes-t_2.source_type'),
                 'source_id' => array('yes-t_2.source_id'),
                 'status' => array('yes-t_2.status', 'in'),
-                'state_2' => array('yes-t_2.state', '=', 1),
-                'state_1' => array('yes-t_1.state', '=', 1),
-                'status_1' => array('yes-t_1.status', '=', 1),
+                'state_2' => 'yes-t_2.state-1',
+                'state_1' => 'yes-t_1.state-1',
+                'status_1' => 'yes-t_1.status-1',
             ),
             # 联表
             'join' => array
@@ -290,9 +290,9 @@ return array
                 'source_type' => array('yes-t_2.source_type'),
                 'source_id' => array('yes-t_2.source_id'),
                 'status' => array('yes-t_2.status', 'in'),
-                'state_2' => array('yes-t_2.state', '=', 1),
-                'state_1' => array('yes-t_1.state', '=', 1),
-                'status_1' => array('yes-t_1.status', '=', 1),
+                'state_2' => 'yes-t_2.state-1',
+                'state_1' => 'yes-t_1.state-1',
+                'status_1' => 'yes-t_1.status-1',
             ),
             # 联表
             'join' => array

+ 3 - 3
app/shop/database/sell_order_goods.php

@@ -288,9 +288,9 @@ return array
                 'shop_id' => array('yes-t_2.shop_id'),
                 'goods_id' => array('yes-t_1.goods_id'),
                 'status' => array('yes-t_2.status', 'in'),
-                'state_2' => array('yes-t_2.state', '=', 1),
-                'state_1' => array('yes-t_1.state', '=', 1),
-                'status_1' => array('yes-t_1.status', 'in'),
+                'state_2' => 'yes-t_2.state-1',
+                'state_1' => 'yes-t_1.state-1',
+                'status_1' => 'yes-t_1.status-1',
             ),
             # 联表
             'join' => array

+ 0 - 4
app/shop/lib/Cron.php

@@ -300,9 +300,6 @@ class Cron
         $end = Dever::input('end', date('Y-m-d'));
 
         $where['status'] = '2,3,4,5,6';
-        //$where['state_2'] = 1;
-        //$where['state_1'] = 1;
-        $where['status_1'] = 1;
         $start = Dever::maketime($start . ' 00:00:00');
         $end = Dever::maketime($end . ' 23:59:59');
         $day = intval(($end - $start)/86400);
@@ -320,7 +317,6 @@ class Cron
                 $data['day'] = $where['start'];
                 $info = Dever::db('shop/buy_stat')->find($data);
                 $cash = Dever::db('shop/buy_order_goods')->getCashNum($where);
-                return $cash;
                 $data['cash'] = round($cash['total'], 2);
                 $cash = Dever::db('shop/buy_order_goods')->getPCashNum($where);
                 $data['p_cash'] = round($cash['total'], 2);