mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-10 17:42:50 +00:00
调整数据统计商品数量
This commit is contained in:
parent
097a351a1b
commit
a4dc1b3602
@ -58,7 +58,9 @@ class StoreStatistics extends BaseModel
|
||||
public static function getOrderInfo($where)
|
||||
{
|
||||
$orderinfo = self::getTimeWhere($where)
|
||||
->field('sum(total_price) total_price,sum(cost) cost,sum(pay_postage) pay_postage,sum(pay_price) pay_price,sum(coupon_price) coupon_price,sum(deduction_price) deduction_price,from_unixtime(pay_time,\'%Y-%m-%d\') pay_time')->order('pay_time')->group('from_unixtime(pay_time,\'%Y-%m-%d\')')->select()->toArray();
|
||||
->field('sum(total_price) total_price,sum(cost) cost,sum(pay_postage) pay_postage,sum(pay_price) pay_price,sum(coupon_price) coupon_price,sum(deduction_price) deduction_price,from_unixtime(pay_time,\'%Y-%m-%d\') pay_time')
|
||||
->order('pay_time')->where('paid',1)->where('refund_status',0)
|
||||
->group('from_unixtime(pay_time,\'%Y-%m-%d\')')->select()->toArray();
|
||||
$price = 0;
|
||||
$postage = 0;
|
||||
$deduction = 0;
|
||||
|
||||
@ -288,10 +288,10 @@ class StoreProduct extends BaseModel
|
||||
'class'=>'fa fa fa-ioxhost',
|
||||
],
|
||||
[
|
||||
'name'=>'新增商品',
|
||||
'name'=>'商品总数',
|
||||
'field'=>'件',
|
||||
'count'=>self::setWhereType(self::getModelTime($where,new self),$type)->where('is_new',1)->sum('stock'),
|
||||
'content'=>'新增商品总数',
|
||||
'count'=>self::setWhereType(self::getModelTime($where,new self),$type)->sum('stock'),
|
||||
'content'=>'增商品总数',
|
||||
'background_color'=>'layui-bg-cyan',
|
||||
'sum'=>self::where('is_new',1)->sum('stock'),
|
||||
'class'=>'fa fa-line-chart',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user