-
收入总计
+
订单总计
0.00
上月
diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php
index 3513702c2..61db7c983 100755
--- a/app/api/controller/Goods.php
+++ b/app/api/controller/Goods.php
@@ -30,7 +30,7 @@ use app\service\AppService;
class Goods extends Common
{
/**
- * [__construct 构造方法]
+ * 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
diff --git a/app/service/StatisticalService.php b/app/service/StatisticalService.php
index 22612bb8d..7742cf2d3 100755
--- a/app/service/StatisticalService.php
+++ b/app/service/StatisticalService.php
@@ -575,25 +575,22 @@ class StatisticalService
$data = [];
$value_arr = [];
$name_arr = [];
- if(!empty($status_arr))
+ $date = self::DayCreate($params['start'], $params['end']);
+ foreach($date as $day)
{
- $date = self::DayCreate($params['start'], $params['end']);
- foreach($date as $day)
- {
- // 当前日期名称
- $name_arr[] = date('Y-m-d', $day['start']);
+ // 当前日期名称
+ $name_arr[] = date('Y-m-d', $day['start']);
- // 根据状态获取数量
- foreach($status_arr as $status)
- {
- // 获取订单
- $where = [
- ['status', '=', $status],
- ['add_time', '>=', $day['start']],
- ['add_time', '<=', $day['end']],
- ];
- $value_arr[$status][] = Db::name('Order')->where($where)->count();
- }
+ // 根据状态获取数量
+ foreach($status_arr as $status)
+ {
+ // 获取订单
+ $where = [
+ ['status', '=', $status],
+ ['add_time', '>=', $day['start']],
+ ['add_time', '<=', $day['end']],
+ ];
+ $value_arr[$status][] = Db::name('Order')->where($where)->count();
}
}
@@ -639,25 +636,22 @@ class StatisticalService
// 订单收入总计、是否有收入统计权限
if(AdminIsPower('index', 'income'))
{
- if(!empty($status_arr))
+ $date = self::DayCreate($params['start'], $params['end']);
+ foreach($date as $day)
{
- $date = self::DayCreate($params['start'], $params['end']);
- foreach($date as $day)
- {
- // 当前日期名称
- $name_arr[] = date('Y-m-d', $day['start']);
+ // 当前日期名称
+ $name_arr[] = date('Y-m-d', $day['start']);
- // 根据状态获取数量
- foreach($status_arr as $status)
- {
- // 获取订单
- $where = [
- ['status', '=', $status],
- ['add_time', '>=', $day['start']],
- ['add_time', '<=', $day['end']],
- ];
- $value_arr[$status][] = Db::name('Order')->where($where)->sum('pay_price');
- }
+ // 根据状态获取数量
+ foreach($status_arr as $status)
+ {
+ // 获取订单
+ $where = [
+ ['status', '=', $status],
+ ['add_time', '>=', $day['start']],
+ ['add_time', '<=', $day['end']],
+ ];
+ $value_arr[$status][] = Db::name('Order')->where($where)->sum('pay_price');
}
}
diff --git a/app/service/ThemeService.php b/app/service/ThemeService.php
index 11596c866..83e456426 100755
--- a/app/service/ThemeService.php
+++ b/app/service/ThemeService.php
@@ -62,7 +62,7 @@ class ThemeService
$default_preview = __MY_PUBLIC_URL__.'static'.DS.'common'.DS.'images'.DS.'default-preview.jpg';
while(($temp_file = readdir($dh)) !== false)
{
- if(substr($temp_file, 0, 1) == '.' || in_array($temp_file, ['index.html']))
+ if(substr($temp_file, 0, 1) == '.' || in_array($temp_file, ['index.html']) || is_dir($temp_file))
{
continue;
}