|
@@ -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'];
|