|
@@ -86,7 +86,8 @@ class GZHSendKFMessage implements ShouldQueue
|
|
if(1 == $message->u_type) {
|
|
if(1 == $message->u_type) {
|
|
$info = $this->getUserOpenids($officialAccount, $next_openid);
|
|
$info = $this->getUserOpenids($officialAccount, $next_openid);
|
|
foreach ($info['openid'] as $opid){
|
|
foreach ($info['openid'] as $opid){
|
|
- GZHSendKFMessageService::sendText($officialAccount, $opid, $messageStr, $this->traceContext);
|
|
|
|
|
|
+// GZHSendKFMessageService::sendText($officialAccount, $opid, $messageStr, $this->traceContext);
|
|
|
|
+ dump($opid);
|
|
}
|
|
}
|
|
$next_openid = $info['next_openid'];
|
|
$next_openid = $info['next_openid'];
|
|
if(!$next_openid) {
|
|
if(!$next_openid) {
|
|
@@ -131,6 +132,8 @@ class GZHSendKFMessage implements ShouldQueue
|
|
'next_openid' => $next_openid,
|
|
'next_openid' => $next_openid,
|
|
]
|
|
]
|
|
])->toArray();
|
|
])->toArray();
|
|
|
|
+ $result = $officialAccount->user->list($next_openid);
|
|
|
|
+
|
|
if(0 != ($result['errcode'] ?? 0)) {
|
|
if(0 != ($result['errcode'] ?? 0)) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
@@ -154,7 +157,7 @@ class GZHSendKFMessage implements ShouldQueue
|
|
private function getOfficialAccount($gzh) {
|
|
private function getOfficialAccount($gzh) {
|
|
try{
|
|
try{
|
|
return WechatPlatform::buildApplication($gzh)
|
|
return WechatPlatform::buildApplication($gzh)
|
|
- ->getOfficialAccountWithRefreshToken($gzh->authorizer_appid, $gzh->authorizer_refresh_token);
|
|
|
|
|
|
+ ->officialAccount($gzh->authorizer_appid, $gzh->authorizer_refresh_token);
|
|
} catch (\Throwable $exception) {
|
|
} catch (\Throwable $exception) {
|
|
myLog('KFMessageSend')->error('获取公众号调用对象失败', [
|
|
myLog('KFMessageSend')->error('获取公众号调用对象失败', [
|
|
'exceptionMessage' => $exception->getMessage(),
|
|
'exceptionMessage' => $exception->getMessage(),
|