'话术库管理', "icon" => 'iconhuashuku', "link" => '/admin/pages/speech/index', "linkType"=> '4', ]; return [$toolsMenu]; } /** * 员工 客户获取列表查询 * * @param $data * @return array * @author shuixian * @DataTime: 2019/12/26 10:30 */ public function onStaffCustomerList($data) { // 聊天数量 $map1 = [ [ 'user_id', '=', $data[ 'uid' ] ], [ 'target_id', '=', $data['to_uid'] ] ]; $map2 = [ [ 'target_id', '=', $data[ 'uid' ] ], [ 'user_id', '=', $data['to_uid'] ] ]; $messageCount = RadarMessage::whereOr( [ $map1, $map2 ] )->count(); $msgData[ 'count' ] = $messageCount; $msgData[ 'title' ] = "聊天"; // 通话数量 $phoneCount = CardCount::where( [ [ 'user_id', '=', $data[ 'uid' ] ], [ 'to_uid', '=', $data['to_uid'] ], [ 'sign', '=', 'copy' ], [ 'type', 'in', [ 2, 3, 11 ] ] ] )->count(); $phoneData[ 'count' ] = $phoneCount; $phoneData[ 'title' ] = "通话"; return [$msgData , $phoneData]; } }