Browse Source

Merge branch 'master' of http://git.bocai108.com:10180/Ethan/Customer-Service

Jonlin 6 years ago
parent
commit
46de57c33d

+ 4 - 4
application/admin/controller/Accounts.php

@@ -21,14 +21,14 @@ class Accounts extends Base
             $limit  = $param['pageSize'];
             $offset = (($param['pageNumber'] - 1) * $limit);
             $where = [];
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 $where['account_name'] = ['like', '%' . $param['searchText'] . '%'];
             }
             //标签
             if ($param['label_id'] != '' && $param['label_id'] != 0) {
                 $where['label_id'] = $param['label_id'];
             }
-            if (empty($param['start']) === false && empty($param['end']) === false && $param['start'] <= $param['end']) {
+            if (strlen($param['start']) && strlen($param['end']) && $param['start'] <= $param['end']) {
                 $start = strtotime($param['start']);
                 $end = strtotime($param['end'] . ' 23:59:59');
                 $return['total'] = db('accounts')->whereBetween('add_time', [$start, $end])->count();  //总数据
@@ -221,7 +221,7 @@ class Accounts extends Base
             $limit  = $param['pageSize'];
             $offset = (($param['pageNumber'] - 1) * $limit);
             $where = [];
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 $where['name'] = ['like', '%' . $param['searchText'] . '%'];
             }
             $result = db('accountslabel')->where($where)->limit($offset, $limit)->order('add_time', 'desc')->select();
@@ -321,4 +321,4 @@ class Accounts extends Base
 
         return $operate;
     }
-}
+}

+ 1 - 1
application/admin/controller/Admins.php

@@ -27,7 +27,7 @@ class Admins extends Base
             $offset = ($param['pageNumber'] - 1) * $limit;
 
             $where = [];
-            if (!empty($param['searchText'])) {
+            if (strlen($param['searchText'])) {
                 $where['user_name'] = ['like', '%' . $param['searchText'] . '%'];
             }
 

+ 7 - 7
application/admin/controller/Kfnotice.php

@@ -26,17 +26,17 @@ class Kfnotice extends Base
 
             $where = [];
             $bibao = false;
-            if (!empty($param['searchText'])) {
+            if (strlen($param['searchText'])) {
                 $arr = explode("|", $param['searchText']);
                 if (count($arr) == 5) {
                     list($timerang, $sendtype, $groupid, $txttype, $txttext) = $arr;
-                    if (!empty($timerang)) {
+                    if (strlen($timerang)) {
                         list($tbegin, $tend) = explode(",", $timerang);
                          $bibao = true;
                          $biaaodata =  [$tbegin, $tend.' 23:59:59'];
                     }
 
-                    if ($sendtype) {
+                    if (strlen($sendtype)) {
                         $where['sendtype'] = intval($sendtype);
                     }
 
@@ -52,7 +52,7 @@ class Kfnotice extends Base
                     }
 
 
-                    if (!empty($txttext)) {
+                    if (strlen($txttext)) {
                         if ($txttype == 1) {
                             $where['title'] = ['like', '%' . $txttext . '%'];
                         } else {
@@ -108,12 +108,12 @@ class Kfnotice extends Base
             $group = intval(input('post.groupid', 0));
 
 
-            if (empty($atext) || empty($title)) {
+            if (strlen($atext) || strlen($title)) {
                 return json(['code' => -1, 'data' => '', 'msg' => '标题和内容不能为空']);
             }
 
             $sendtime = input('post.sendtime');
-            if (empty($sendtime)) {
+            if (!strlen($sendtime)) {
                 $sendtime = date("Y-m-d H:i:s", time() + 10);
             }
             $sendtype = (strtotime($sendtime) >= (time() + 60)) ? 2 : 1;
@@ -195,4 +195,4 @@ class Kfnotice extends Base
 
         return $operate;
     }
-}
+}

+ 4 - 4
application/admin/controller/Messages.php

@@ -21,7 +21,7 @@ class Messages extends Base
             $where  = [];
             $orwhere  = [];
             //用户名称
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 $where['a.name'] = array('like','%'.$param['searchText'].'%');
                 $orwhere['name'] = array('like','%'.$param['searchText'].'%');
             }
@@ -46,7 +46,7 @@ class Messages extends Base
                 $orwhere['type_id'] = $param['type_id'];
             }
             $return['total'] = db('Accountsmessage')->where($orwhere)->count();  //总数据
-            if (empty($param['start']) === false && empty($param['end']) === false && $param['start'] <= $param['end']) {
+            if (strlen($param['start']) && strlen($param['end']) && $param['start'] <= $param['end']) {
                 $start = strtotime($param['start']);
                 $end = strtotime($param['end'] . ' 23:59:59');
                 $return['total'] = db('Accountsmessage')->whereBetween('add_time', [$start, $end])->where($orwhere)->count();  //总数据
@@ -265,7 +265,7 @@ class Messages extends Base
             $offset = ($param['pageNumber'] - 1) * $limit;
 
             $where  = [];
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 $where['account_name'] = $param['searchText'];
             }
 
@@ -379,4 +379,4 @@ class Messages extends Base
 
         return $operate;
     }
-}
+}

+ 2 - 2
application/admin/controller/Report.php

@@ -388,10 +388,10 @@ class Report extends Base
 
             $where = [];
             //用户名称
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 $where['user_account|user_name|user_job_number'] = array('like', '%' . $param['searchText'] . '%');
             }
-            if (empty($param['start']) === false && empty($param['end']) === false && $param['start'] <= $param['end']) {
+            if (strlen($param['start']) && strlen($param['end']) && $param['start'] <= $param['end']) {
                 $start = strtotime($param['start']);
                 $end = strtotime($param['end'] . ' 23:59:59');
             }

+ 1 - 1
application/admin/controller/Robot.php

@@ -24,7 +24,7 @@ class Robot extends Base
             $limit  = $param['pageSize'];
             $offset = (($param['pageNumber'] - 1) * $limit);
             $where  = [];
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 // $where['robot_name'] = $param['searchText'];
                 $where['robot_name'] = ['like', '%' . $param['searchText'] . '%'];
             }

+ 1 - 1
application/admin/controller/Sensitivec.php

@@ -14,7 +14,7 @@ class Sensitivec extends Base
             $limit  = $param['pageSize'];
             $offset = (($param['pageNumber'] - 1) * $limit);
             $where['sensitivewords_for'] = $param['type'];
-            if (empty($param['searchText']) === false) {
+            if (strlen($param['searchText'])) {
                 $where['sensitivewords_word'] = ['like', '%' . $param['searchText'] . '%'];
             }
 

+ 1 - 1
application/admin/controller/System.php

@@ -174,7 +174,7 @@ class System extends Base
 
             $temp = db('service_log');
             $countTmp = db('service_log');
-            if(!empty($param['searchText'])){
+            if(strlen($param['searchText'])){
                 $temp = $temp->whereLike('user_name', '%'.$param['searchText'].'%');
                 $countTmp = $countTmp->whereLike('user_name', '%'.$param['searchText'].'%');
             }

+ 1 - 1
application/admin/controller/Words.php

@@ -19,7 +19,7 @@ class Words extends Base
             $offset = ($param['pageNumber'] - 1) * $limit;
 
             $where['user_id'] = $param['type'] == 1? 0 : ['neq',0];
-            if (!empty($param['searchText'])) {
+            if (strlen($param['searchText'])) {
                 $where['content'] = $param['searchText'];
             }
 

+ 1 - 1
application/admin/model/Accountsmessage.php

@@ -41,7 +41,7 @@ class Accountsmessage extends Model
             $result = $result->where($where);
         }
 
-        if (empty($start) === false && empty($end) === false) {
+        if (strlen($start) && strlen($end)) {
             $result = $result->whereBetween('add_time', [$start, $end]);
         }
 

+ 2 - 2
application/admin/view/report/index.html

@@ -385,7 +385,7 @@
             },
             itemStyle: {
                 normal: {
-                    shadowColor: 'rgba(0, 0, 0, 0.8)',
+                    shadowColor: 'rgba(0, 0, 0, 0.3)',
                     shadowBlur: 50,
                 }
             }
@@ -453,7 +453,7 @@
                 },
                 itemStyle: {
                     normal: {
-                        shadowColor: 'rgba(0, 0, 0, 0.8)',
+                        shadowColor: 'rgba(0, 0, 0, 0.3)',
                         shadowBlur: 50,
                     }
                 }

+ 2 - 2
application/service/controller/History.php

@@ -55,12 +55,12 @@ class History extends Common
             $userName    = input('post.user_name');
             $startTime   = strtotime(date('Y-m-d').'-6 day');
             $endTime     = strtotime(date('Y-m-d').'+1 day');
-            if (empty($start) === false && empty($end) === false) {
+            if (strlen($start) && strlen($end) ) {
                 $startTime = strtotime($start);
                 $endTime   = strtotime($end);
             }
 
-            if (empty($userName) === false) {
+            if (strlen($userName)) {
                 $serviceLogWhere['user_name'] = $userName;
             }
 

+ 3 - 3
application/service/controller/Words.php

@@ -76,15 +76,15 @@ class Words extends Common
             $title          = input('post.title');
             $userWordsData['update_time'] = date('Y-m-d H:i:s');
             // 更新内容.
-            if (empty($content) === false) {
+            if (strlen($content)) {
                 $userWordsData['content'] = input('post.content');
             }
 
-            if (empty($status) === false) {
+            if (strlen($status)) {
                 $userWordsData['status'] = input('post.status');
             }
 
-            if (empty($title) === false) {
+            if (strlen($title)) {
                 $userWordsData['title'] = input('post.title');
             }
 

+ 4 - 1
vendor/GatewayWorker_windows/Applications/whisper/Events.php

@@ -113,7 +113,9 @@ class Events
             // 实时监控.
             Timer::add(60, function () {
                 $adminList = self::$global->adminList ?? [];
-                self::systemMonitoring($adminList);
+                if ($adminList) {
+                    self::systemMonitoring($adminList);
+                }
             });
         }
 
@@ -1911,6 +1913,7 @@ class Events
             }
             $serviceLog[$k]['allCount'] = $allCount;
         }
+        print_r([$serviceLog,$csdTime,$verifyReturnTime]);
         // 查询对话时效设置.
         foreach ($adminList as $v) {
             $chat_message = [