示例#1
0
 public function service_sendjid($micro_jid, $onlyonline = false)
 {
     $jids = array();
     $sql = "select a.employeeid jid from im_microaccount_memebr a where a.microaccount=?;";
     try {
         $ds = $this->conn_im->GetData("table", $sql, array((string) $micro_jid));
         $count = $ds["table"]["recordcount"];
         if ($ds && $count > 0) {
             foreach ($ds["table"]["rows"] as $key => $value) {
                 $jids[] = $value["jid"];
             }
         } else {
             return array();
         }
     } catch (\Exception $e) {
         $this->logger->err($e->getMessage());
     }
     !$onlyonline ? Utils::resortjid($this->conn_im, $jids) : Utils::findonlinejid($this->conn_im, $jids);
     return $jids;
 }