/** * 获取push消息id * * @return int */ private static function _getMessageId() { $msgIdKey = "PUSH_MSG_ID"; $redisHandle = \Util\Tools\PushRedis::getRedisHandle(); $msgId = $redisHandle->get($msgIdKey); if ($msgId < 2000000) { $redisHandle->incr($msgIdKey, 2000000); } else { $redisHandle->incr($msgIdKey, 1); } $msgId = $redisHandle->get($msgIdKey); return $msgId; }