moonsflyer hai 8 meses
pai
achega
5c2e06717d
Modificáronse 1 ficheiros con 11 adicións e 1 borrados
  1. 11 1
      app/adminapi/logic/WorkbenchLogic.php

+ 11 - 1
app/adminapi/logic/WorkbenchLogic.php

@@ -59,7 +59,7 @@ class WorkbenchLogic extends BaseLogic
 
             'customer'=>self::customer(),
             'new_customer'=> 0,
-            'total_visitor'=> 100,
+            'total_visitor'=> self::getTotalVistor(),
             //农机手
             'agricultural_data'=> self::agricultural(),
             'bake_data'=> self::bake(),
@@ -394,4 +394,14 @@ class WorkbenchLogic extends BaseLogic
         $data['valueData'] = $valueData;
         return $data;
     }
+
+    public static function getTotalVistor(){
+        $number = 0;
+        $where['is_show'] =1;
+        $count = Article::where($where)->field('sum(click_actual) total_vistor')->find();
+        if($count){
+            $number = $count['total_vistor'];
+        }
+        return $number;
+    }
 }