获取标签下的用户列表
@param tagId 标签ID
@param nextOpenId 下一个openId
@return
178465
public UserPagination listUsers(int tagId, String nextOpenId) {
        Map<String, Object> map = new HashMap<>();
        map.put("tagid", tagId);
        String url = WxEndpoint.get("url.tag.user.list");
        if (nextOpenId == null || "".equals(nextOpenId)) {
        } else {
            map.put("next_openid", nextOpenId);
        }

        String response = wxClient.post(url, JsonMapper.defaultMapper().toJson(map));
        logger.debug("list tag users: {}", response);

        return JsonMapper.defaultMapper().fromJson(response, UserPagination.class);
    }
644845
public function getMemberList($nextOpenId = null)
    {
        $nextOpenId === null && $nextOpenId = ['next_openid' => $nextOpenId];
        $result = $this->httpGet(self::WECHAT_MEMBER_GET_URL . 'access_token=' . $this->getAccessToken(), $nextOpenId);
        return !isset($result['errcode']) ? $result : false;
    }
562707
public TagKind getTagKind() {
    if (htmlTagNode instanceof HtmlOpenTagNode) {
      HtmlOpenTagNode openTagNode = (HtmlOpenTagNode) htmlTagNode;
      if (openTagNode.isSelfClosing() || openTagNode.getTagName().isDefinitelyVoid()) {
        return TagKind.VOID_TAG;
      }
      return TagKind.OPEN_TAG;
    } else {
      return TagKind.CLOSE_TAG;
    }
  }
298821
public function tagUsers(array $openids, int $tagId)
    {
        $params = [
            'openid_list' => $openids,
            'tagid' => $tagId,
        ];

        return $this->httpPostJson('cgi-bin/tags/members/batchtagging', $params);
    }
284064
public List<TagCount> getTagsOnSpace(int spaceId) {
		return getResourceFactory()
				.getApiResource("/tag/space/" + spaceId + "/")
				.get(new GenericType<List<TagCount>>() { });
	}
456620
public DefaultSwidProcessor setSoftwareId(final String uniqueId, final String tagCreatorRegid) {
        swidTag.setSoftwareId(
                new SoftwareIdComplexType(
                        new Token(uniqueId, idGenerator.nextId()),
                        new RegistrationId(tagCreatorRegid, idGenerator.nextId()),
                        idGenerator.nextId()));
        return this;
    }
646025
private synchronized long nextId(boolean isPadding, long busId) {

        long timestamp = timeGen();
        long paddingnum = regionId;

        if (isPadding) {
            paddingnum = busId;
        }

        if (timestamp < lastTimestamp) {
            try {
                throw new Exception("Clock moved backwards.  Refusing to generate id for " + (lastTimestamp - timestamp) + " milliseconds");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        //如果上次生成时间和当前时间相同,在同一毫秒内
        if (lastTimestamp == timestamp) {
            //sequence自增，因为sequence只有10bit，所以和sequenceMask相与一下，去掉高位
            sequence = (sequence + 1) & sequenceMask;
            //判断是否溢出,也就是每毫秒内超过1024，当为1024时，与sequenceMask相与，sequence就等于0
            if (sequence == 0) {
                //自旋等待到下一毫秒
                timestamp = tailNextMillis(lastTimestamp);
            }
        } else {
            // 如果和上次生成时间不同,重置sequence，就是下一毫秒开始，sequence计数重新从0开始累加,
            // 为了保证尾数随机性更大一些,最后一位设置一个随机数
            sequence = new SecureRandom().nextInt(10);
        }

        lastTimestamp = timestamp;

        return ((timestamp - twepoch) << timestampLeftShift) | (paddingnum << regionIdShift) | (workerId << workerIdShift) | sequence;
    }
1274653
public void removeTag(String tagId) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_REMOVE_TAG);

        parameters.put("tag_id", tagId);

        Response response = transport.post(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
    }
1296137
public function getUserOpenIds($nextOpenId = null)
    {
        return $this->auth(function () use ($nextOpenId) {
            return wei()->http([
                'timeout' => 10000,
                'dataType' => 'json',
                'url' => $this->baseUrl . 'cgi-bin/user/get',
                'data' => [
                    'access_token' => $this->accessToken,
                    'next_openid' => $nextOpenId,
                ],
            ]);
        });
    }
315729
protected String getId(FaceletContext ctx)
    {
        if (this.id != null)
        {
            return this.id.getValue(ctx);
        }
        return ctx.generateUniqueId(this.tagId);
    }
446598
public static Specification<JpaDistributionSet> hasTag(final Long tagId) {

        return (targetRoot, query, cb) -> {
            final SetJoin<JpaDistributionSet, JpaDistributionSetTag> tags = targetRoot.join(JpaDistributionSet_.tags,
                    JoinType.LEFT);
            return cb.equal(tags.get(JpaDistributionSetTag_.id), tagId);
        };
    }
1310698
public static Specification<JpaTarget> hasTag(final Long tagId) {

        return (targetRoot, query, cb) -> {
            final SetJoin<JpaTarget, JpaTargetTag> tags = targetRoot.join(JpaTarget_.tags, JoinType.LEFT);
            return cb.equal(tags.get(JpaTargetTag_.id), tagId);
        };
    }
955598
private int findNextTypeId() {

        int result = (int)(20000 + Math.round(Math.random() * 1000));
        for (I_CmsResourceType type : OpenCms.getResourceManager().getResourceTypes()) {
            if (type.getTypeId() >= result) {
                result = type.getTypeId() + 1;
            }
        }
        return result;
    }
928713
public static FollowResult userGet(String access_token,String next_openid){
		HttpUriRequest httpUriRequest = RequestBuilder.get()
				.setUri(BASE_URI+"/cgi-bin/user/get")
				.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
				.addParameter("next_openid", next_openid==null?"":next_openid)
				.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,FollowResult.class);
	}
367472
public Broadcast getBroadcast(String broadcastId) throws OpenTokException {
        if(StringUtils.isEmpty(broadcastId)) {
            throw new InvalidArgumentException("Broadcast id is null or empty");
        }
        String stream = this.client.getBroadcast(broadcastId);
        try {
            return broadcastReader.readValue(stream);
        } catch (Exception e) {
            throw new RequestException("Exception mapping json: " + e.getMessage());
        }
    }
367428
public GetTagInfoResponse get(Integer tagid){
        GetTagInfoResponse response;
        BeanUtil.requireNonNull(tagid, "tagid不能为空！");
        String url = BASE_API_URL + "cgi-bin/tag/get?access_token=#&tagid=" + tagid;
        BaseResponse r = executeGet(url);
        String jsonResult = isSuccess(r.getErrcode()) ? r.getErrmsg() : r.toJsonString();
        response = JSONUtil.toBean(jsonResult, GetTagInfoResponse.class);
        return response;
    }
529130
public static AuthcodetoopenidResult toolsAuthcodetoopenid(Authcodetoopenid authcodetoopenid,String key){
		Map<String,String> map = MapUtil.objectToMap(authcodetoopenid);
		String sign = SignatureUtil.generateSign(map,authcodetoopenid.getSign_type(),key);
		authcodetoopenid.setSign(sign);
		String shorturlXML = XMLConverUtil.convertToXML(authcodetoopenid);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI()+ "/tools/authcodetoopenid")
				.setEntity(new StringEntity(shorturlXML,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,AuthcodetoopenidResult.class,authcodetoopenid.getSign_type(),key);
	}