>[info] [客服消息](https://www.easywechat.com/4.x/official-account/messages.html)推送:文檔中寫明了用戶48小時與公眾號沒有互動,便不能收到客服消息,所以如果公眾號活躍程度不夠,不建議接入。
##### 溫馨提示:當前項目對[客服消息](https://www.easywechat.com/4.x/official-account/messages.html)也做了相關接入操作,代碼如下所示
~~~
/**
* 客服消息
* /api/Easycenter/Orderput
*/
public function Orderput()
{
//獲取數據庫中目標用戶的openid
$userlist = \app\admin\model\User::where(['status' => 'normal'])->column("openid");
$app = $this->app;
$msg = "大家好!歡迎使用\n 老吳線報系統。";
if (count($userlist) == 1) {
//單發
$message = new Text($msg);
$result = $app->customer_service->message($message)->to($userlist[0])->send();
} else {
//群發
$app->broadcasting->sendText($msg, $userlist);
}
}
~~~