Your Name 2 years ago
parent
commit
ace1ea130b
2 changed files with 3 additions and 2 deletions
  1. 2 1
      service/bill/database/shop_stat.php
  2. 1 1
      service/bill/lib/Cron.php

+ 2 - 1
service/bill/database/shop_stat.php

@@ -230,13 +230,14 @@ $config = array
     # request 请求接口定义
     'request' => array
     (
-        'getExcelAll' => array
+        'getState' => array
         (
             # 匹配的正则或函数 选填项
             'option' => array
             (
                 'start' => array('yes-month', '>='),
                 'end' => array('yes-month', '<='),
+                'shop_id' => 'yes',
                 'state' => 1,
             ),
             'type' => 'all',

+ 1 - 1
service/bill/lib/Cron.php

@@ -589,7 +589,7 @@ class Cron
             $insert['out_money'] = $shop[$key]['out_money'];
 
             if($insert){
-                $res = Dever::db('bill/shop_stat')->state(array('month'=>$start,'shop_id'=>$insert['shop_id']));
+                $res = Dever::db('bill/shop_stat')->getState(array('start'=>$start,'end'=>$end,'shop_id'=>$insert['shop_id'],'state'=>1));
                 if($res){
                     foreach($res as $k2 => $v2){
                         $insert['where_id'] = $v2['id'];