| @@ 429-448 (lines=20) @@ | ||
| 426 | /** |
|
| 427 | * 按帐号大批量推送 |
|
| 428 | */ |
|
| 429 | public function PushAccountListMultiple($pushId, $accountList) |
|
| 430 | { |
|
| 431 | $pushId = intval($pushId); |
|
| 432 | $ret = array('ret_code' => -1); |
|
| 433 | if ($pushId <= 0) { |
|
| 434 | $ret['err_msg'] = 'pushId not valid'; |
|
| 435 | return $ret; |
|
| 436 | } |
|
| 437 | if (!is_array($accountList) || empty($accountList)) { |
|
| 438 | $ret['err_msg'] = 'accountList not valid'; |
|
| 439 | return $ret; |
|
| 440 | } |
|
| 441 | $params = array(); |
|
| 442 | $params['access_id'] = $this->accessId; |
|
| 443 | $params['push_id'] = $pushId; |
|
| 444 | $params['account_list'] = json_encode($accountList); |
|
| 445 | $params['timestamp'] = time(); |
|
| 446 | ||
| 447 | return $this->callRestful(self::RESTAPI_PUSHACCOUNTLISTMULTIPLE, $params); |
|
| 448 | } |
|
| 449 | ||
| 450 | /** |
|
| 451 | * 按Token大批量推送 |
|
| @@ 453-472 (lines=20) @@ | ||
| 450 | /** |
|
| 451 | * 按Token大批量推送 |
|
| 452 | */ |
|
| 453 | public function PushDeviceListMultiple($pushId, $deviceList) |
|
| 454 | { |
|
| 455 | $pushId = intval($pushId); |
|
| 456 | $ret = array('ret_code' => -1); |
|
| 457 | if ($pushId <= 0) { |
|
| 458 | $ret['err_msg'] = 'pushId not valid'; |
|
| 459 | return $ret; |
|
| 460 | } |
|
| 461 | if (!is_array($deviceList) || empty($deviceList)) { |
|
| 462 | $ret['err_msg'] = 'deviceList not valid'; |
|
| 463 | return $ret; |
|
| 464 | } |
|
| 465 | $params = array(); |
|
| 466 | $params['access_id'] = $this->accessId; |
|
| 467 | $params['push_id'] = $pushId; |
|
| 468 | $params['device_list'] = json_encode($deviceList); |
|
| 469 | $params['timestamp'] = time(); |
|
| 470 | ||
| 471 | return $this->callRestful(self::RESTAPI_PUSHDEVICELISTMULTIPLE, $params); |
|
| 472 | } |
|
| 473 | ||
| 474 | /** |
|
| 475 | * 查询消息推送状态 |
|