diff --git a/crmeb/app/admin/model/record/StoreStatistics.php b/crmeb/app/admin/model/record/StoreStatistics.php index e560bfb7..e63e761f 100644 --- a/crmeb/app/admin/model/record/StoreStatistics.php +++ b/crmeb/app/admin/model/record/StoreStatistics.php @@ -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; diff --git a/crmeb/app/admin/model/store/StoreProduct.php b/crmeb/app/admin/model/store/StoreProduct.php index 14a28c80..15746844 100644 --- a/crmeb/app/admin/model/store/StoreProduct.php +++ b/crmeb/app/admin/model/store/StoreProduct.php @@ -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',