接口修改1
This commit is contained in:
parent
c4a1473394
commit
9f1a87c01b
@ -844,13 +844,12 @@ class Statistics extends BaseController
|
|||||||
// 总订单
|
// 总订单
|
||||||
$return['total_order'] = Db::connect('shop')->table('eb_product_order_log')->where('status',1)->count();
|
$return['total_order'] = Db::connect('shop')->table('eb_product_order_log')->where('status',1)->count();
|
||||||
// 镇订单
|
// 镇订单
|
||||||
// 先默认方山镇
|
|
||||||
$z_order = Db::connect('shop')->table('eb_product_order_log')->where($where)->where('status',1)->count();
|
$z_order = Db::connect('shop')->table('eb_product_order_log')->where($where)->where('status',1)->count();
|
||||||
// 镇分佣
|
// 镇分佣
|
||||||
$return['fenyong'] = 0;
|
$return['fenyong'] = 0;
|
||||||
//总市场流量
|
//总市场流量
|
||||||
// $return['liuliang'] = bcmul(bcdiv($z_order,$return['total_order'],2),100);
|
$return['liuliang'] = bcmul(bcdiv($z_order,$return['total_order'],2),100);
|
||||||
$return['liuliang'] = 15;
|
// $return['liuliang'] = 15;
|
||||||
$return['month'] = 12;
|
$return['month'] = 12;
|
||||||
// 商品销量前十
|
// 商品销量前十
|
||||||
$return['data'] = Db::connect('shop')->table('eb_store_product')
|
$return['data'] = Db::connect('shop')->table('eb_store_product')
|
||||||
@ -898,7 +897,7 @@ class Statistics extends BaseController
|
|||||||
->select()
|
->select()
|
||||||
->toarray();
|
->toarray();
|
||||||
foreach ($return as $k =>$v){
|
foreach ($return as $k =>$v){
|
||||||
$return[$k]['demand'] = '';
|
$return[$k]['demand'] = $v['value'];
|
||||||
$return[$k]['minnum'] = [
|
$return[$k]['minnum'] = [
|
||||||
['month'=>'1月','value'=>0],
|
['month'=>'1月','value'=>0],
|
||||||
['month'=>'2月','value'=>$v['price']],
|
['month'=>'2月','value'=>$v['price']],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user