|
|
@@ -11,6 +11,9 @@
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
+use App\Models\GongdengOrderModel;
|
|
|
+use App\Models\MemberModel;
|
|
|
+use App\Models\OrdersModel;
|
|
|
use App\Models\UserModel;
|
|
|
use App\Models\AdminRomModel;
|
|
|
use App\Services\AdminService;
|
|
|
@@ -91,6 +94,30 @@ class IndexController extends Backend
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 工作台统计数据
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function counts(){
|
|
|
+ $data = [
|
|
|
+ 'gdCount'=> GongdengOrderModel::where(['mark'=> 1,'status'=> 2])
|
|
|
+ ->count('id'),
|
|
|
+ 'shopCount'=> OrdersModel::where(['mark'=> 1])
|
|
|
+ ->whereIn('status',[2,3,4])
|
|
|
+ ->count('id'),
|
|
|
+ 'memberCount'=> MemberModel::where(['mark'=> 1,'status'=> 1])
|
|
|
+ ->where('create_time','>', strtotime(date('Y-m-d')))
|
|
|
+ ->count('id')
|
|
|
+ ];
|
|
|
+
|
|
|
+ return message(MESSAGE_OK,true, $data);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public function statistics(){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 清除缓存
|
|
|
* @return array
|
|
|
*/
|