|
@@ -20,9 +20,8 @@ class Manage
|
|
|
$where = array();
|
|
|
$where['fstart'] = $start;
|
|
|
$where['fend'] = $end;
|
|
|
-
|
|
|
$w = array();
|
|
|
- $fstart = Dever::input('start', date('Y-m-01', strtotime('-0 month')));
|
|
|
+ $fstart = Dever::input('start', date('Y-m-01', $start));
|
|
|
$w['fstart'] = Dever::maketime($fstart . ' 00:00:00');
|
|
|
$w['fend'] = $end;
|
|
|
$data = array();
|
|
@@ -63,13 +62,11 @@ class Manage
|
|
|
|
|
|
public function content_api($where,$type){
|
|
|
$data = array();
|
|
|
-
|
|
|
if($type == 2){
|
|
|
$data['time'] = date('Y.m',$where['fstart']);
|
|
|
- }else{
|
|
|
+ }elseif($type == 1){
|
|
|
$data['time'] = date('Y.m.d',$where['fstart']);
|
|
|
}
|
|
|
-
|
|
|
|
|
|
$where['status'] = 4;
|
|
|
$data['num'] = Dever::db('agent/order')->getNum($where);
|
|
@@ -118,7 +115,6 @@ class Manage
|
|
|
public function c_api($where){
|
|
|
$role = Dever::db('setting/role')->getAll(array('id'=>1,'state'=>1));
|
|
|
foreach($role as $k => $v){
|
|
|
-
|
|
|
$where['role'] = $v['id'];
|
|
|
$data[$k]['name'] = $v['name'];
|
|
|
$where['status'] = 2;
|
|
@@ -138,6 +134,12 @@ class Manage
|
|
|
$data[$k]['option_money'] = 0;
|
|
|
}
|
|
|
|
|
|
+ $soft_money = Dever::db('agent/order')->getSoftCash($where);
|
|
|
+ if($soft_money['total']){
|
|
|
+ $data[$k]['soft_money'] = $soft_money['total'];
|
|
|
+ }else{
|
|
|
+ $data[$k]['soft_money'] = 0;
|
|
|
+ }
|
|
|
$wh['role'] = $v['id'];
|
|
|
$wh['status'] = 3;
|
|
|
$wh['fstart'] = $where['fstart'];
|