@@ -0,0 +1,2290 @@
+package com.github.cjm0000000.mmt.weixin.api.initiative;%0D%0A%0D%0Aimport java.util.HashMap;%0D%0Aimport java.util.Map;%0D%0A%0D%0Aimport org.apache.log4j.Logger;%0D%0Aimport org.springframework.beans.factory.annotation.Autowired;%0D%0A%0D%0Aimport com.alibaba.fastjson.JSON;%0D%0Aimport com.alibaba.fastjson.JSONObject;%0D%0Aimport com.github.cjm0000000.mmt.core.access.AccessTokenService;%0D%0Aimport com.github.cjm0000000.mmt.core.access.AccessTokenServiceManager;%0D%0Aimport com.github.cjm0000000.mmt.core.access.JSONResponse;%0D%0Aimport com.github.cjm0000000.mmt.core.config.MmtConfig;%0D%0Aimport com.github.cjm0000000.mmt.shared.fans.Fans;%0D%0Aimport com.github.cjm0000000.mmt.shared.fans.remote.FansAPI;%0D%0Aimport com.github.cjm0000000.mmt.shared.toolkit.http.HttpConnector;%0D%0A%0D%0A/**%0D%0A * WeiXin fans APIs%0D%0A * %0D%0A * @author lemon%0D%0A * @version 2.0%0D%0A * %0D%0A */%0D%0Apublic class WeiXinFansAPI implements AccessTokenServiceManager, FansAPI %7B%0D%0A  private static final Logger logger = Logger.getLogger(WeiXinFansAPI.class);%0D%0A  private static final String USER_INFO_URL = %22https://api.weixin.qq.com/cgi-bin/user/info%22;%0D%0A%0D%0A  @Autowired%0D%0A  private WeiXinCommonAPI commonApi;%0D%0A%0D%0A  @Override%0D%0A  public Fans getUserInfo(MmtConfig cfg, String openId) %7B%0D%0A    if (logger.isDebugEnabled()) logger.debug(%22try to get user infomation from remote server.%22);%0D%0A    String resp = HttpConnector.get(USER_INFO_URL, getUserInfoRequestParams(cfg, openId));%0D%0A    if (logger.isDebugEnabled()) logger.debug(%22get userInfo response: %22 + resp);%0D%0A    JSONObject jsonObj = JSON.parseObject(resp);%0D%0A    // TODO %E5%B0%81%E8%A3%85Fans%0D%0A    if (jsonObj.get(%22subscribe%22) != null && jsonObj.get(%22openid%22) != null)%0D%0A      return JSON.toJavaObject(jsonObj, null);%0D%0A    return null;%0D%0A  %7D%0D%0A%0D%0A  @Override%0D%0A  public JSONResponse getFans(MmtConfig cfg, String next_openid) %7B%0D%0A    // TODO Auto-generated method stub%0D%0A    return null;%0D%0A  %7D%0D%0A%0D%0A  @Override%0D%0A  public AccessTokenService getAccessTokenService() %7B%0D%0A    return commonApi;%0D%0A  %7D%0D%0A%0D%0A  /**%0D%0A   * %E8%8E%B7%E5%8F%96%E7%94%A8%E6%88%B7%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0%0D%0A   * %0D%0A   * @param cfg%0D%0A   * @param openId%0D%0A   * @return%0D%0A   */%0D%0A  private Map%3CString, Object%3E getUserInfoRequestParams(MmtConfig cfg, String openId) %7B%0D%0A    Map%3CString, Object%3E params = new HashMap%3C%3E(4);%0D%0A    params.put(%22access_token%22, getAccessTokenService().getAccessToken(cfg));%0D%0A    params.put(%22openid%22, openId);%0D%0A    return params;%0D%0A  %7D%0D%0A%0D%0A%7D%0D%0A

Add fanAPI implement.