|
|
@@ -100,8 +100,10 @@ class OnlineCustomerService
|
|
|
}
|
|
|
public static function customerClsMessage($business_type,$business_id){
|
|
|
$notificList = Cache::store('common_redis')->get($business_type.'_notific');
|
|
|
- unset($notificList[$business_id]);
|
|
|
- Cache::store('common_redis')->set($business_type.'_notific',$notificList);
|
|
|
+ if(isset($notificList[$business_id])){
|
|
|
+ unset($notificList[$business_id]);
|
|
|
+ Cache::store('common_redis')->set($business_type.'_notific',$notificList);
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -118,8 +120,10 @@ class OnlineCustomerService
|
|
|
|
|
|
$count = 0;
|
|
|
if (!empty($notificList)) {
|
|
|
- $counts = array_count_values($notificList);
|
|
|
- $count = $counts[$admin_id] ?? 0;
|
|
|
+ // TODO 测试 tmp 暂不区分客服
|
|
|
+ $count = count($notificList);
|
|
|
+ /*$counts = array_count_values($notificList);
|
|
|
+ $count = $counts[$admin_id] ?? 0;*/
|
|
|
}
|
|
|
$to_router = $notificationTitle = '';
|
|
|
if(isset(self::$business_types[$business_type]) && self::$business_types[$business_type]){
|
|
|
@@ -130,8 +134,6 @@ class OnlineCustomerService
|
|
|
}
|
|
|
|
|
|
public static function getAllNotificList($admin_id,$business_codes = [],$prefix = '',$is_test = 0){
|
|
|
- // TODO 测试 tmp
|
|
|
- $admin_id = 1;
|
|
|
if($is_test){
|
|
|
return [
|
|
|
['type'=>'consultation','mp3_url'=>'','unique_code'=> md5('consultation'.time()),'to_router'=>'/works/external_consultation','notificationTitle' => '客咨消息','notific_count' => 5],
|