微信公众号开发---实现微信自定义菜单创建以及消息回复等

来源:互联网 发布:网络歌曲磨剪子抢菜刀 编辑:程序博客网 时间:2024/06/05 08:25
1、创建自定义菜单
        根据微信接口文档,内容如下图:对应链接

要创建自定义菜单要获取ACCESS_TOKEN,根据微信接口文档获取ACCESS_TOKEN接口如下图:对应链接

OK,下面上代码
首先获取ACCESS_TOKEN对应代码如下:
<a target=_blank id="L1" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L1" rel="#L1" style="text-decoration: none; color: rgb(12, 137, 207);">  1</a><a target=_blank id="L2" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L2" rel="#L2" style="text-decoration: none; color: rgb(12, 137, 207);">  2</a><a target=_blank id="L3" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L3" rel="#L3" style="text-decoration: none; color: rgb(12, 137, 207);">  3</a><a target=_blank id="L4" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L4" rel="#L4" style="text-decoration: none; color: rgb(12, 137, 207);">  4</a><a target=_blank id="L5" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L5" rel="#L5" style="text-decoration: none; color: rgb(12, 137, 207);">  5</a><a target=_blank id="L6" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L6" rel="#L6" style="text-decoration: none; color: rgb(12, 137, 207);">  6</a><a target=_blank id="L7" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L7" rel="#L7" style="text-decoration: none; color: rgb(12, 137, 207);">  7</a><a target=_blank id="L8" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L8" rel="#L8" style="text-decoration: none; color: rgb(12, 137, 207);">  8</a><a target=_blank id="L9" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L9" rel="#L9" style="text-decoration: none; color: rgb(12, 137, 207);">  9</a><a target=_blank id="L10" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L10" rel="#L10" style="text-decoration: none; color: rgb(12, 137, 207);"> 10</a><a target=_blank id="L11" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L11" rel="#L11" style="text-decoration: none; color: rgb(12, 137, 207);"> 11</a><a target=_blank id="L12" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L12" rel="#L12" style="text-decoration: none; color: rgb(12, 137, 207);"> 12</a><a target=_blank id="L13" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L13" rel="#L13" style="text-decoration: none; color: rgb(12, 137, 207);"> 13</a><a target=_blank id="L14" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L14" rel="#L14" style="text-decoration: none; color: rgb(12, 137, 207);"> 14</a><a target=_blank id="L15" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L15" rel="#L15" style="text-decoration: none; color: rgb(12, 137, 207);"> 15</a><a target=_blank id="L16" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L16" rel="#L16" style="text-decoration: none; color: rgb(12, 137, 207);"> 16</a><a target=_blank id="L17" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L17" rel="#L17" style="text-decoration: none; color: rgb(12, 137, 207);"> 17</a><a target=_blank id="L18" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L18" rel="#L18" style="text-decoration: none; color: rgb(12, 137, 207);"> 18</a><a target=_blank id="L19" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L19" rel="#L19" style="text-decoration: none; color: rgb(12, 137, 207);"> 19</a><a target=_blank id="L20" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L20" rel="#L20" style="text-decoration: none; color: rgb(12, 137, 207);"> 20</a><a target=_blank id="L21" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L21" rel="#L21" style="text-decoration: none; color: rgb(12, 137, 207);"> 21</a><a target=_blank id="L22" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L22" rel="#L22" style="text-decoration: none; color: rgb(12, 137, 207);"> 22</a><a target=_blank id="L23" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L23" rel="#L23" style="text-decoration: none; color: rgb(12, 137, 207);"> 23</a><a target=_blank id="L24" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L24" rel="#L24" style="text-decoration: none; color: rgb(12, 137, 207);"> 24</a><a target=_blank id="L25" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L25" rel="#L25" style="text-decoration: none; color: rgb(12, 137, 207);"> 25</a><a target=_blank id="L26" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L26" rel="#L26" style="text-decoration: none; color: rgb(12, 137, 207);"> 26</a><a target=_blank id="L27" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L27" rel="#L27" style="text-decoration: none; color: rgb(12, 137, 207);"> 27</a><a target=_blank id="L28" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L28" rel="#L28" style="text-decoration: none; color: rgb(12, 137, 207);"> 28</a><a target=_blank id="L29" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L29" rel="#L29" style="text-decoration: none; color: rgb(12, 137, 207);"> 29</a><a target=_blank id="L30" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L30" rel="#L30" style="text-decoration: none; color: rgb(12, 137, 207);"> 30</a><a target=_blank id="L31" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L31" rel="#L31" style="text-decoration: none; color: rgb(12, 137, 207);"> 31</a><a target=_blank id="L32" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L32" rel="#L32" style="text-decoration: none; color: rgb(12, 137, 207);"> 32</a><a target=_blank id="L33" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L33" rel="#L33" style="text-decoration: none; color: rgb(12, 137, 207);"> 33</a><a target=_blank id="L34" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L34" rel="#L34" style="text-decoration: none; color: rgb(12, 137, 207);"> 34</a><a target=_blank id="L35" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L35" rel="#L35" style="text-decoration: none; color: rgb(12, 137, 207);"> 35</a><a target=_blank id="L36" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L36" rel="#L36" style="text-decoration: none; color: rgb(12, 137, 207);"> 36</a><a target=_blank id="L37" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L37" rel="#L37" style="text-decoration: none; color: rgb(12, 137, 207);"> 37</a><a target=_blank id="L38" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L38" rel="#L38" style="text-decoration: none; color: rgb(12, 137, 207);"> 38</a><a target=_blank id="L39" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L39" rel="#L39" style="text-decoration: none; color: rgb(12, 137, 207);"> 39</a><a target=_blank id="L40" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L40" rel="#L40" style="text-decoration: none; color: rgb(12, 137, 207);"> 40</a><a target=_blank id="L41" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L41" rel="#L41" style="text-decoration: none; color: rgb(12, 137, 207);"> 41</a><a target=_blank id="L42" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L42" rel="#L42" style="text-decoration: none; color: rgb(12, 137, 207);"> 42</a><a target=_blank id="L43" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L43" rel="#L43" style="text-decoration: none; color: rgb(12, 137, 207);"> 43</a><a target=_blank id="L44" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L44" rel="#L44" style="text-decoration: none; color: rgb(12, 137, 207);"> 44</a><a target=_blank id="L45" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L45" rel="#L45" style="text-decoration: none; color: rgb(12, 137, 207);"> 45</a><a target=_blank id="L46" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L46" rel="#L46" style="text-decoration: none; color: rgb(12, 137, 207);"> 46</a><a target=_blank id="L47" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L47" rel="#L47" style="text-decoration: none; color: rgb(12, 137, 207);"> 47</a><a target=_blank id="L48" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L48" rel="#L48" style="text-decoration: none; color: rgb(12, 137, 207);"> 48</a><a target=_blank id="L49" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L49" rel="#L49" style="text-decoration: none; color: rgb(12, 137, 207);"> 49</a><a target=_blank id="L50" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L50" rel="#L50" style="text-decoration: none; color: rgb(12, 137, 207);"> 50</a><a target=_blank id="L51" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L51" rel="#L51" style="text-decoration: none; color: rgb(12, 137, 207);"> 51</a><a target=_blank id="L52" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L52" rel="#L52" style="text-decoration: none; color: rgb(12, 137, 207);"> 52</a><a target=_blank id="L53" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L53" rel="#L53" style="text-decoration: none; color: rgb(12, 137, 207);"> 53</a><a target=_blank id="L54" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L54" rel="#L54" style="text-decoration: none; color: rgb(12, 137, 207);"> 54</a><a target=_blank id="L55" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L55" rel="#L55" style="text-decoration: none; color: rgb(12, 137, 207);"> 55</a><a target=_blank id="L56" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L56" rel="#L56" style="text-decoration: none; color: rgb(12, 137, 207);"> 56</a><a target=_blank id="L57" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L57" rel="#L57" style="text-decoration: none; color: rgb(12, 137, 207);"> 57</a><a target=_blank id="L58" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L58" rel="#L58" style="text-decoration: none; color: rgb(12, 137, 207);"> 58</a><a target=_blank id="L59" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L59" rel="#L59" style="text-decoration: none; color: rgb(12, 137, 207);"> 59</a><a target=_blank id="L60" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L60" rel="#L60" style="text-decoration: none; color: rgb(12, 137, 207);"> 60</a><a target=_blank id="L61" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L61" rel="#L61" style="text-decoration: none; color: rgb(12, 137, 207);"> 61</a><a target=_blank id="L62" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L62" rel="#L62" style="text-decoration: none; color: rgb(12, 137, 207);"> 62</a><a target=_blank id="L63" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L63" rel="#L63" style="text-decoration: none; color: rgb(12, 137, 207);"> 63</a><a target=_blank id="L64" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L64" rel="#L64" style="text-decoration: none; color: rgb(12, 137, 207);"> 64</a><a target=_blank id="L65" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L65" rel="#L65" style="text-decoration: none; color: rgb(12, 137, 207);"> 65</a><a target=_blank id="L66" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L66" rel="#L66" style="text-decoration: none; color: rgb(12, 137, 207);"> 66</a><a target=_blank id="L67" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L67" rel="#L67" style="text-decoration: none; color: rgb(12, 137, 207);"> 67</a><a target=_blank id="L68" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L68" rel="#L68" style="text-decoration: none; color: rgb(12, 137, 207);"> 68</a><a target=_blank id="L69" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L69" rel="#L69" style="text-decoration: none; color: rgb(12, 137, 207);"> 69</a><a target=_blank id="L70" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L70" rel="#L70" style="text-decoration: none; color: rgb(12, 137, 207);"> 70</a>
package ;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.http.client.ClientProtocolException;
import org.json.JSONException;
import org.json.JSONObject;
import cn.com.wkt.weixin.service.impl.WXApiServiceImpl;
/**
*
* @author Administrator
*
*/
public class GetAccessToken {
public static Map<String, JSONObject> AccessToken = new HashMap<String, JSONObject>();
/**
* 获取 AccessToken
*
* @param publicName
* 公众号标识
* @param appId
* @param appSecret
* @throws ClientProtocolException
* @throws IOException
*/
public synchronized static void AccessToken(String publicName,
String appId, String appSecret) throws ClientProtocolException,
IOException, JSONException {
WXApiServiceImpl imp = new WXApiServiceImpl();
JSONObject json = imp.getAccessTokenJSON(appId, appSecret);
json.put("time", System.currentTimeMillis());
AccessToken.put(publicName, json);
}
/**
* 判断 AccessToken 是否存在或是否超时,不存在或超时重新获取
*
* @param appId
* @param appSecret
* @param publicName
* @return access_token
* @throws ClientProtocolException
* @throws IOException
* @throws JSONException
*/
public synchronized static String ifAccessToken(String appId,
String appSecret, String publicName)
throws ClientProtocolException, IOException, JSONException {
String access_token = "";
Long time = System.currentTimeMillis(); // 当前时间戳
// 判断 AccessToken 是否存在
if (AccessToken == null || AccessToken.get(publicName) == null) {
AccessToken(publicName, appId, appSecret);
}
// 上次获取 AccessToken 的时间戳
Long oldtime = Long.parseLong(AccessToken.get(publicName).get("time")
.toString());
if (time - oldtime > 7000 * 1000) { // 上次获取的时间大于7200秒,重新获取
AccessToken(publicName, appId, appSecret);
}
access_token = (String) AccessToken.get(publicName).get("access_token");
return access_token;
}
}
 来自CODE的代码片
snippet_file_0.txt
<a target=_blank id="L1" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L1" rel="#L1" style="text-decoration: none; color: rgb(12, 137, 207);">  1</a><a target=_blank id="L2" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L2" rel="#L2" style="text-decoration: none; color: rgb(12, 137, 207);">  2</a><a target=_blank id="L3" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L3" rel="#L3" style="text-decoration: none; color: rgb(12, 137, 207);">  3</a><a target=_blank id="L4" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L4" rel="#L4" style="text-decoration: none; color: rgb(12, 137, 207);">  4</a><a target=_blank id="L5" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L5" rel="#L5" style="text-decoration: none; color: rgb(12, 137, 207);">  5</a><a target=_blank id="L6" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L6" rel="#L6" style="text-decoration: none; color: rgb(12, 137, 207);">  6</a><a target=_blank id="L7" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L7" rel="#L7" style="text-decoration: none; color: rgb(12, 137, 207);">  7</a><a target=_blank id="L8" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L8" rel="#L8" style="text-decoration: none; color: rgb(12, 137, 207);">  8</a><a target=_blank id="L9" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L9" rel="#L9" style="text-decoration: none; color: rgb(12, 137, 207);">  9</a><a target=_blank id="L10" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L10" rel="#L10" style="text-decoration: none; color: rgb(12, 137, 207);"> 10</a><a target=_blank id="L11" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L11" rel="#L11" style="text-decoration: none; color: rgb(12, 137, 207);"> 11</a><a target=_blank id="L12" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L12" rel="#L12" style="text-decoration: none; color: rgb(12, 137, 207);"> 12</a><a target=_blank id="L13" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L13" rel="#L13" style="text-decoration: none; color: rgb(12, 137, 207);"> 13</a><a target=_blank id="L14" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L14" rel="#L14" style="text-decoration: none; color: rgb(12, 137, 207);"> 14</a><a target=_blank id="L15" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L15" rel="#L15" style="text-decoration: none; color: rgb(12, 137, 207);"> 15</a><a target=_blank id="L16" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L16" rel="#L16" style="text-decoration: none; color: rgb(12, 137, 207);"> 16</a><a target=_blank id="L17" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L17" rel="#L17" style="text-decoration: none; color: rgb(12, 137, 207);"> 17</a><a target=_blank id="L18" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L18" rel="#L18" style="text-decoration: none; color: rgb(12, 137, 207);"> 18</a><a target=_blank id="L19" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L19" rel="#L19" style="text-decoration: none; color: rgb(12, 137, 207);"> 19</a><a target=_blank id="L20" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L20" rel="#L20" style="text-decoration: none; color: rgb(12, 137, 207);"> 20</a><a target=_blank id="L21" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L21" rel="#L21" style="text-decoration: none; color: rgb(12, 137, 207);"> 21</a><a target=_blank id="L22" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L22" rel="#L22" style="text-decoration: none; color: rgb(12, 137, 207);"> 22</a><a target=_blank id="L23" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L23" rel="#L23" style="text-decoration: none; color: rgb(12, 137, 207);"> 23</a><a target=_blank id="L24" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L24" rel="#L24" style="text-decoration: none; color: rgb(12, 137, 207);"> 24</a><a target=_blank id="L25" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L25" rel="#L25" style="text-decoration: none; color: rgb(12, 137, 207);"> 25</a><a target=_blank id="L26" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L26" rel="#L26" style="text-decoration: none; color: rgb(12, 137, 207);"> 26</a><a target=_blank id="L27" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L27" rel="#L27" style="text-decoration: none; color: rgb(12, 137, 207);"> 27</a><a target=_blank id="L28" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L28" rel="#L28" style="text-decoration: none; color: rgb(12, 137, 207);"> 28</a><a target=_blank id="L29" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L29" rel="#L29" style="text-decoration: none; color: rgb(12, 137, 207);"> 29</a><a target=_blank id="L30" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L30" rel="#L30" style="text-decoration: none; color: rgb(12, 137, 207);"> 30</a><a target=_blank id="L31" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L31" rel="#L31" style="text-decoration: none; color: rgb(12, 137, 207);"> 31</a><a target=_blank id="L32" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L32" rel="#L32" style="text-decoration: none; color: rgb(12, 137, 207);"> 32</a><a target=_blank id="L33" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L33" rel="#L33" style="text-decoration: none; color: rgb(12, 137, 207);"> 33</a><a target=_blank id="L34" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L34" rel="#L34" style="text-decoration: none; color: rgb(12, 137, 207);"> 34</a><a target=_blank id="L35" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L35" rel="#L35" style="text-decoration: none; color: rgb(12, 137, 207);"> 35</a><a target=_blank id="L36" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L36" rel="#L36" style="text-decoration: none; color: rgb(12, 137, 207);"> 36</a><a target=_blank id="L37" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L37" rel="#L37" style="text-decoration: none; color: rgb(12, 137, 207);"> 37</a><a target=_blank id="L38" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L38" rel="#L38" style="text-decoration: none; color: rgb(12, 137, 207);"> 38</a><a target=_blank id="L39" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L39" rel="#L39" style="text-decoration: none; color: rgb(12, 137, 207);"> 39</a><a target=_blank id="L40" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L40" rel="#L40" style="text-decoration: none; color: rgb(12, 137, 207);"> 40</a><a target=_blank id="L41" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L41" rel="#L41" style="text-decoration: none; color: rgb(12, 137, 207);"> 41</a><a target=_blank id="L42" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L42" rel="#L42" style="text-decoration: none; color: rgb(12, 137, 207);"> 42</a><a target=_blank id="L43" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L43" rel="#L43" style="text-decoration: none; color: rgb(12, 137, 207);"> 43</a><a target=_blank id="L44" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L44" rel="#L44" style="text-decoration: none; color: rgb(12, 137, 207);"> 44</a><a target=_blank id="L45" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L45" rel="#L45" style="text-decoration: none; color: rgb(12, 137, 207);"> 45</a><a target=_blank id="L46" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L46" rel="#L46" style="text-decoration: none; color: rgb(12, 137, 207);"> 46</a><a target=_blank id="L47" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L47" rel="#L47" style="text-decoration: none; color: rgb(12, 137, 207);"> 47</a><a target=_blank id="L48" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L48" rel="#L48" style="text-decoration: none; color: rgb(12, 137, 207);"> 48</a>
package cn.com.wkt.weixin.service.impl;
import java.io.IOException;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.stereotype.Service;
import cn.com.wkt.weixin.service.WXApiService;
@Service("wXApiService")
public class WXApiServiceImpl implements WXApiService {
public JSONObject getAccessTokenJSON(String appId, String appSecret)
throws ClientProtocolException, IOException, JSONException {
String result = "";
HttpClient httpclient = new DefaultHttpClient();
String smsUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid="
+ appId + "&secret=" + appSecret + "";
HttpPost httppost = new HttpPost(smsUrl);
HttpResponse response = httpclient.execute(httppost);
try {
if (response.getStatusLine().getStatusCode() == 200) {
HttpEntity httpEntity = response.getEntity();
result = EntityUtils.toString(httpEntity, "UTF-8");
result.replaceAll("\r", "");
} else {
httppost.abort();
}
} catch (ClientProtocolException e) {
e.printStackTrace();
result = e.getMessage().toString();
} catch (IOException e) {
e.printStackTrace();
result = e.getMessage().toString();
}
JSONObject json = new JSONObject(result);
return json;
}
}
 来自CODE的代码片
snippet_file_0.txt
ACCESS_TOKEN获取成功接下来开始创建菜单
<a target=_blank id="L1" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L1" rel="#L1" style="text-decoration: none; color: rgb(12, 137, 207);">  1</a><a target=_blank id="L2" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L2" rel="#L2" style="text-decoration: none; color: rgb(12, 137, 207);">  2</a><a target=_blank id="L3" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L3" rel="#L3" style="text-decoration: none; color: rgb(12, 137, 207);">  3</a><a target=_blank id="L4" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L4" rel="#L4" style="text-decoration: none; color: rgb(12, 137, 207);">  4</a><a target=_blank id="L5" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L5" rel="#L5" style="text-decoration: none; color: rgb(12, 137, 207);">  5</a><a target=_blank id="L6" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L6" rel="#L6" style="text-decoration: none; color: rgb(12, 137, 207);">  6</a><a target=_blank id="L7" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L7" rel="#L7" style="text-decoration: none; color: rgb(12, 137, 207);">  7</a><a target=_blank id="L8" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L8" rel="#L8" style="text-decoration: none; color: rgb(12, 137, 207);">  8</a><a target=_blank id="L9" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L9" rel="#L9" style="text-decoration: none; color: rgb(12, 137, 207);">  9</a><a target=_blank id="L10" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L10" rel="#L10" style="text-decoration: none; color: rgb(12, 137, 207);"> 10</a><a target=_blank id="L11" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L11" rel="#L11" style="text-decoration: none; color: rgb(12, 137, 207);"> 11</a><a target=_blank id="L12" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L12" rel="#L12" style="text-decoration: none; color: rgb(12, 137, 207);"> 12</a><a target=_blank id="L13" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L13" rel="#L13" style="text-decoration: none; color: rgb(12, 137, 207);"> 13</a><a target=_blank id="L14" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L14" rel="#L14" style="text-decoration: none; color: rgb(12, 137, 207);"> 14</a><a target=_blank id="L15" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L15" rel="#L15" style="text-decoration: none; color: rgb(12, 137, 207);"> 15</a><a target=_blank id="L16" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L16" rel="#L16" style="text-decoration: none; color: rgb(12, 137, 207);"> 16</a><a target=_blank id="L17" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L17" rel="#L17" style="text-decoration: none; color: rgb(12, 137, 207);"> 17</a><a target=_blank id="L18" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L18" rel="#L18" style="text-decoration: none; color: rgb(12, 137, 207);"> 18</a><a target=_blank id="L19" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L19" rel="#L19" style="text-decoration: none; color: rgb(12, 137, 207);"> 19</a><a target=_blank id="L20" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L20" rel="#L20" style="text-decoration: none; color: rgb(12, 137, 207);"> 20</a><a target=_blank id="L21" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L21" rel="#L21" style="text-decoration: none; color: rgb(12, 137, 207);"> 21</a><a target=_blank id="L22" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L22" rel="#L22" style="text-decoration: none; color: rgb(12, 137, 207);"> 22</a><a target=_blank id="L23" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L23" rel="#L23" style="text-decoration: none; color: rgb(12, 137, 207);"> 23</a><a target=_blank id="L24" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L24" rel="#L24" style="text-decoration: none; color: rgb(12, 137, 207);"> 24</a><a target=_blank id="L25" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L25" rel="#L25" style="text-decoration: none; color: rgb(12, 137, 207);"> 25</a><a target=_blank id="L26" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L26" rel="#L26" style="text-decoration: none; color: rgb(12, 137, 207);"> 26</a><a target=_blank id="L27" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L27" rel="#L27" style="text-decoration: none; color: rgb(12, 137, 207);"> 27</a><a target=_blank id="L28" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L28" rel="#L28" style="text-decoration: none; color: rgb(12, 137, 207);"> 28</a><a target=_blank id="L29" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L29" rel="#L29" style="text-decoration: none; color: rgb(12, 137, 207);"> 29</a><a target=_blank id="L30" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L30" rel="#L30" style="text-decoration: none; color: rgb(12, 137, 207);"> 30</a><a target=_blank id="L31" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L31" rel="#L31" style="text-decoration: none; color: rgb(12, 137, 207);"> 31</a><a target=_blank id="L32" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L32" rel="#L32" style="text-decoration: none; color: rgb(12, 137, 207);"> 32</a><a target=_blank id="L33" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L33" rel="#L33" style="text-decoration: none; color: rgb(12, 137, 207);"> 33</a><a target=_blank id="L34" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L34" rel="#L34" style="text-decoration: none; color: rgb(12, 137, 207);"> 34</a><a target=_blank id="L35" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L35" rel="#L35" style="text-decoration: none; color: rgb(12, 137, 207);"> 35</a><a target=_blank id="L36" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L36" rel="#L36" style="text-decoration: none; color: rgb(12, 137, 207);"> 36</a><a target=_blank id="L37" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L37" rel="#L37" style="text-decoration: none; color: rgb(12, 137, 207);"> 37</a><a target=_blank id="L38" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L38" rel="#L38" style="text-decoration: none; color: rgb(12, 137, 207);"> 38</a><a target=_blank id="L39" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L39" rel="#L39" style="text-decoration: none; color: rgb(12, 137, 207);"> 39</a><a target=_blank id="L40" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L40" rel="#L40" style="text-decoration: none; color: rgb(12, 137, 207);"> 40</a><a target=_blank id="L41" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L41" rel="#L41" style="text-decoration: none; color: rgb(12, 137, 207);"> 41</a><a target=_blank id="L42" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L42" rel="#L42" style="text-decoration: none; color: rgb(12, 137, 207);"> 42</a>
public void CreateMenu() throws IOException{
try {
access_token = GetAccessToken.ifAccessToken(ConstantUtil.APP_ID, ConstantUtil.APP_SECRET, ConstantUtil.APP_TOKEN);
String user_define_menu = "{\"button\":["
+ "{\"name\":\"微登录\",\"sub_button\":"
+ "[{\"type\":\"view\",\"name\":\"授权登录\",\"key\":\"11\",\"url\":\"http://www.baidu.com\"},"
+ "{\"type\":\"click\",\"name\":\"帐号解绑\",\"key\":\"22\"}]}"
+ ",{\"type\":\"click\",\"name\":\"微推送\",\"key\":\"20_PROMANAGE\"}]}";
String action = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token="+access_token;
try {
URL url = new URL(action);
HttpURLConnection http = (HttpURLConnection) url.openConnection();
http.setRequestMethod("POST");
http.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
http.setDoOutput(true);
http.setDoInput(true);
System.setProperty("sun.net.client.defaultConnectTimeout", "30000");//连接超时30秒
System.setProperty("sun.net.client.defaultReadTimeout", "30000"); //读取超时30秒
http.connect();
OutputStream os= http.getOutputStream();
os.write(user_define_menu.getBytes("UTF-8"));//传入参数
os.flush();
os.close();
InputStream is =http.getInputStream();
int size =is.available();
byte[] jsonBytes =new byte[size];
is.read(jsonBytes);
String message=new String(jsonBytes,"UTF-8");
System.out.println(message);
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
 来自CODE的代码片
snippet_file_0.txt


2、自动回复,以及推送模版等
    1)一切以微信接口文档为依据

根据URL配置的地址,微信服务器会返回结果吧(表达不清,勿怪)
对应URL代码
<a target=_blank id="L1" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L1" rel="#L1" style="text-decoration: none; color: rgb(12, 137, 207);">   1</a><a target=_blank id="L2" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L2" rel="#L2" style="text-decoration: none; color: rgb(12, 137, 207);">   2</a><a target=_blank id="L3" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L3" rel="#L3" style="text-decoration: none; color: rgb(12, 137, 207);">   3</a><a target=_blank id="L4" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L4" rel="#L4" style="text-decoration: none; color: rgb(12, 137, 207);">   4</a><a target=_blank id="L5" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L5" rel="#L5" style="text-decoration: none; color: rgb(12, 137, 207);">   5</a><a target=_blank id="L6" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L6" rel="#L6" style="text-decoration: none; color: rgb(12, 137, 207);">   6</a><a target=_blank id="L7" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L7" rel="#L7" style="text-decoration: none; color: rgb(12, 137, 207);">   7</a><a target=_blank id="L8" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L8" rel="#L8" style="text-decoration: none; color: rgb(12, 137, 207);">   8</a><a target=_blank id="L9" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L9" rel="#L9" style="text-decoration: none; color: rgb(12, 137, 207);">   9</a><a target=_blank id="L10" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L10" rel="#L10" style="text-decoration: none; color: rgb(12, 137, 207);">  10</a><a target=_blank id="L11" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L11" rel="#L11" style="text-decoration: none; color: rgb(12, 137, 207);">  11</a><a target=_blank id="L12" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L12" rel="#L12" style="text-decoration: none; color: rgb(12, 137, 207);">  12</a><a target=_blank id="L13" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L13" rel="#L13" style="text-decoration: none; color: rgb(12, 137, 207);">  13</a><a target=_blank id="L14" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L14" rel="#L14" style="text-decoration: none; color: rgb(12, 137, 207);">  14</a><a target=_blank id="L15" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L15" rel="#L15" style="text-decoration: none; color: rgb(12, 137, 207);">  15</a><a target=_blank id="L16" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L16" rel="#L16" style="text-decoration: none; color: rgb(12, 137, 207);">  16</a><a target=_blank id="L17" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L17" rel="#L17" style="text-decoration: none; color: rgb(12, 137, 207);">  17</a><a target=_blank id="L18" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L18" rel="#L18" style="text-decoration: none; color: rgb(12, 137, 207);">  18</a><a target=_blank id="L19" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L19" rel="#L19" style="text-decoration: none; color: rgb(12, 137, 207);">  19</a><a target=_blank id="L20" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L20" rel="#L20" style="text-decoration: none; color: rgb(12, 137, 207);">  20</a><a target=_blank id="L21" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L21" rel="#L21" style="text-decoration: none; color: rgb(12, 137, 207);">  21</a><a target=_blank id="L22" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L22" rel="#L22" style="text-decoration: none; color: rgb(12, 137, 207);">  22</a><a target=_blank id="L23" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L23" rel="#L23" style="text-decoration: none; color: rgb(12, 137, 207);">  23</a><a target=_blank id="L24" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L24" rel="#L24" style="text-decoration: none; color: rgb(12, 137, 207);">  24</a><a target=_blank id="L25" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L25" rel="#L25" style="text-decoration: none; color: rgb(12, 137, 207);">  25</a><a target=_blank id="L26" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L26" rel="#L26" style="text-decoration: none; color: rgb(12, 137, 207);">  26</a><a target=_blank id="L27" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L27" rel="#L27" style="text-decoration: none; color: rgb(12, 137, 207);">  27</a><a target=_blank id="L28" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L28" rel="#L28" style="text-decoration: none; color: rgb(12, 137, 207);">  28</a><a target=_blank id="L29" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L29" rel="#L29" style="text-decoration: none; color: rgb(12, 137, 207);">  29</a><a target=_blank id="L30" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L30" rel="#L30" style="text-decoration: none; color: rgb(12, 137, 207);">  30</a><a target=_blank id="L31" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L31" rel="#L31" style="text-decoration: none; color: rgb(12, 137, 207);">  31</a><a target=_blank id="L32" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L32" rel="#L32" style="text-decoration: none; color: rgb(12, 137, 207);">  32</a><a target=_blank id="L33" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L33" rel="#L33" style="text-decoration: none; color: rgb(12, 137, 207);">  33</a><a target=_blank id="L34" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L34" rel="#L34" style="text-decoration: none; color: rgb(12, 137, 207);">  34</a><a target=_blank id="L35" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L35" rel="#L35" style="text-decoration: none; color: rgb(12, 137, 207);">  35</a><a target=_blank id="L36" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L36" rel="#L36" style="text-decoration: none; color: rgb(12, 137, 207);">  36</a><a target=_blank id="L37" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L37" rel="#L37" style="text-decoration: none; color: rgb(12, 137, 207);">  37</a><a target=_blank id="L38" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L38" rel="#L38" style="text-decoration: none; color: rgb(12, 137, 207);">  38</a><a target=_blank id="L39" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L39" rel="#L39" style="text-decoration: none; color: rgb(12, 137, 207);">  39</a><a target=_blank id="L40" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L40" rel="#L40" style="text-decoration: none; color: rgb(12, 137, 207);">  40</a><a target=_blank id="L41" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L41" rel="#L41" style="text-decoration: none; color: rgb(12, 137, 207);">  41</a><a target=_blank id="L42" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L42" rel="#L42" style="text-decoration: none; color: rgb(12, 137, 207);">  42</a><a target=_blank id="L43" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L43" rel="#L43" style="text-decoration: none; color: rgb(12, 137, 207);">  43</a><a target=_blank id="L44" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L44" rel="#L44" style="text-decoration: none; color: rgb(12, 137, 207);">  44</a><a target=_blank id="L45" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L45" rel="#L45" style="text-decoration: none; color: rgb(12, 137, 207);">  45</a><a target=_blank id="L46" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L46" rel="#L46" style="text-decoration: none; color: rgb(12, 137, 207);">  46</a><a target=_blank id="L47" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L47" rel="#L47" style="text-decoration: none; color: rgb(12, 137, 207);">  47</a><a target=_blank id="L48" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L48" rel="#L48" style="text-decoration: none; color: rgb(12, 137, 207);">  48</a><a target=_blank id="L49" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L49" rel="#L49" style="text-decoration: none; color: rgb(12, 137, 207);">  49</a><a target=_blank id="L50" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L50" rel="#L50" style="text-decoration: none; color: rgb(12, 137, 207);">  50</a><a target=_blank id="L51" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L51" rel="#L51" style="text-decoration: none; color: rgb(12, 137, 207);">  51</a><a target=_blank id="L52" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L52" rel="#L52" style="text-decoration: none; color: rgb(12, 137, 207);">  52</a><a target=_blank id="L53" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L53" rel="#L53" style="text-decoration: none; color: rgb(12, 137, 207);">  53</a><a target=_blank id="L54" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L54" rel="#L54" style="text-decoration: none; color: rgb(12, 137, 207);">  54</a><a target=_blank id="L55" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L55" rel="#L55" style="text-decoration: none; color: rgb(12, 137, 207);">  55</a><a target=_blank id="L56" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L56" rel="#L56" style="text-decoration: none; color: rgb(12, 137, 207);">  56</a><a target=_blank id="L57" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L57" rel="#L57" style="text-decoration: none; color: rgb(12, 137, 207);">  57</a><a target=_blank id="L58" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L58" rel="#L58" style="text-decoration: none; color: rgb(12, 137, 207);">  58</a><a target=_blank id="L59" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L59" rel="#L59" style="text-decoration: none; color: rgb(12, 137, 207);">  59</a><a target=_blank id="L60" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L60" rel="#L60" style="text-decoration: none; color: rgb(12, 137, 207);">  60</a><a target=_blank id="L61" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L61" rel="#L61" style="text-decoration: none; color: rgb(12, 137, 207);">  61</a><a target=_blank id="L62" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L62" rel="#L62" style="text-decoration: none; color: rgb(12, 137, 207);">  62</a><a target=_blank id="L63" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L63" rel="#L63" style="text-decoration: none; color: rgb(12, 137, 207);">  63</a><a target=_blank id="L64" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L64" rel="#L64" style="text-decoration: none; color: rgb(12, 137, 207);">  64</a><a target=_blank id="L65" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L65" rel="#L65" style="text-decoration: none; color: rgb(12, 137, 207);">  65</a><a target=_blank id="L66" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L66" rel="#L66" style="text-decoration: none; color: rgb(12, 137, 207);">  66</a><a target=_blank id="L67" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L67" rel="#L67" style="text-decoration: none; color: rgb(12, 137, 207);">  67</a><a target=_blank id="L68" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L68" rel="#L68" style="text-decoration: none; color: rgb(12, 137, 207);">  68</a><a target=_blank id="L69" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L69" rel="#L69" style="text-decoration: none; color: rgb(12, 137, 207);">  69</a><a target=_blank id="L70" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L70" rel="#L70" style="text-decoration: none; color: rgb(12, 137, 207);">  70</a><a target=_blank id="L71" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L71" rel="#L71" style="text-decoration: none; color: rgb(12, 137, 207);">  71</a><a target=_blank id="L72" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L72" rel="#L72" style="text-decoration: none; color: rgb(12, 137, 207);">  72</a><a target=_blank id="L73" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L73" rel="#L73" style="text-decoration: none; color: rgb(12, 137, 207);">  73</a><a target=_blank id="L74" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L74" rel="#L74" style="text-decoration: none; color: rgb(12, 137, 207);">  74</a><a target=_blank id="L75" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L75" rel="#L75" style="text-decoration: none; color: rgb(12, 137, 207);">  75</a><a target=_blank id="L76" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L76" rel="#L76" style="text-decoration: none; color: rgb(12, 137, 207);">  76</a><a target=_blank id="L77" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L77" rel="#L77" style="text-decoration: none; color: rgb(12, 137, 207);">  77</a><a target=_blank id="L78" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L78" rel="#L78" style="text-decoration: none; color: rgb(12, 137, 207);">  78</a><a target=_blank id="L79" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L79" rel="#L79" style="text-decoration: none; color: rgb(12, 137, 207);">  79</a><a target=_blank id="L80" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L80" rel="#L80" style="text-decoration: none; color: rgb(12, 137, 207);">  80</a><a target=_blank id="L81" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L81" rel="#L81" style="text-decoration: none; color: rgb(12, 137, 207);">  81</a><a target=_blank id="L82" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L82" rel="#L82" style="text-decoration: none; color: rgb(12, 137, 207);">  82</a><a target=_blank id="L83" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L83" rel="#L83" style="text-decoration: none; color: rgb(12, 137, 207);">  83</a><a target=_blank id="L84" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L84" rel="#L84" style="text-decoration: none; color: rgb(12, 137, 207);">  84</a><a target=_blank id="L85" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L85" rel="#L85" style="text-decoration: none; color: rgb(12, 137, 207);">  85</a><a target=_blank id="L86" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L86" rel="#L86" style="text-decoration: none; color: rgb(12, 137, 207);">  86</a><a target=_blank id="L87" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L87" rel="#L87" style="text-decoration: none; color: rgb(12, 137, 207);">  87</a><a target=_blank id="L88" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L88" rel="#L88" style="text-decoration: none; color: rgb(12, 137, 207);">  88</a><a target=_blank id="L89" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L89" rel="#L89" style="text-decoration: none; color: rgb(12, 137, 207);">  89</a><a target=_blank id="L90" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L90" rel="#L90" style="text-decoration: none; color: rgb(12, 137, 207);">  90</a><a target=_blank id="L91" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L91" rel="#L91" style="text-decoration: none; color: rgb(12, 137, 207);">  91</a><a target=_blank id="L92" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L92" rel="#L92" style="text-decoration: none; color: rgb(12, 137, 207);">  92</a><a target=_blank id="L93" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L93" rel="#L93" style="text-decoration: none; color: rgb(12, 137, 207);">  93</a><a target=_blank id="L94" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L94" rel="#L94" style="text-decoration: none; color: rgb(12, 137, 207);">  94</a><a target=_blank id="L95" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L95" rel="#L95" style="text-decoration: none; color: rgb(12, 137, 207);">  95</a><a target=_blank id="L96" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L96" rel="#L96" style="text-decoration: none; color: rgb(12, 137, 207);">  96</a><a target=_blank id="L97" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L97" rel="#L97" style="text-decoration: none; color: rgb(12, 137, 207);">  97</a><a target=_blank id="L98" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L98" rel="#L98" style="text-decoration: none; color: rgb(12, 137, 207);">  98</a><a target=_blank id="L99" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L99" rel="#L99" style="text-decoration: none; color: rgb(12, 137, 207);">  99</a><a target=_blank id="L100" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L100" rel="#L100" style="text-decoration: none; color: rgb(12, 137, 207);"> 100</a><a target=_blank id="L101" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L101" rel="#L101" style="text-decoration: none; color: rgb(12, 137, 207);"> 101</a><a target=_blank id="L102" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L102" rel="#L102" style="text-decoration: none; color: rgb(12, 137, 207);"> 102</a><a target=_blank id="L103" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L103" rel="#L103" style="text-decoration: none; color: rgb(12, 137, 207);"> 103</a><a target=_blank id="L104" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L104" rel="#L104" style="text-decoration: none; color: rgb(12, 137, 207);"> 104</a><a target=_blank id="L105" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L105" rel="#L105" style="text-decoration: none; color: rgb(12, 137, 207);"> 105</a><a target=_blank id="L106" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L106" rel="#L106" style="text-decoration: none; color: rgb(12, 137, 207);"> 106</a><a target=_blank id="L107" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L107" rel="#L107" style="text-decoration: none; color: rgb(12, 137, 207);"> 107</a><a target=_blank id="L108" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L108" rel="#L108" style="text-decoration: none; color: rgb(12, 137, 207);"> 108</a><a target=_blank id="L109" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L109" rel="#L109" style="text-decoration: none; color: rgb(12, 137, 207);"> 109</a><a target=_blank id="L110" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L110" rel="#L110" style="text-decoration: none; color: rgb(12, 137, 207);"> 110</a><a target=_blank id="L111" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L111" rel="#L111" style="text-decoration: none; color: rgb(12, 137, 207);"> 111</a><a target=_blank id="L112" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L112" rel="#L112" style="text-decoration: none; color: rgb(12, 137, 207);"> 112</a><a target=_blank id="L113" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L113" rel="#L113" style="text-decoration: none; color: rgb(12, 137, 207);"> 113</a><a target=_blank id="L114" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L114" rel="#L114" style="text-decoration: none; color: rgb(12, 137, 207);"> 114</a><a target=_blank id="L115" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L115" rel="#L115" style="text-decoration: none; color: rgb(12, 137, 207);"> 115</a><a target=_blank id="L116" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L116" rel="#L116" style="text-decoration: none; color: rgb(12, 137, 207);"> 116</a><a target=_blank id="L117" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L117" rel="#L117" style="text-decoration: none; color: rgb(12, 137, 207);"> 117</a>
package ;
import java.io.IOException;
import java.io.PrintWriter;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import cn.com.wkt.weixin.service.WXPersonalService;
import cn.com.wkt.weixin.util.ConstantUtil;
/**
* 第二步:验证服务器地址的有效性 开发者提交信息后,微信服务器将发送GET请求到填写的服务器地址URL上,
* GET请求携带四个参数:signature、timestamp、nonce、echostr
* 开发者通过检验signature对请求进行校验(下面有校验方式)。 若确认此次GET请求来自微信服务器,请原样返回echostr参数内容, 则接入生效,
* 成为开发者成功,否则接入失败。
*
* 加密/校验流程如下: 1. 将token、timestamp、nonce三个参数进行字典序排序 2. 将三个参数字符串拼接成一个字符串进行sha1加密
* 3. 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信
*/
/*
* 字典排序(lexicographical order)是一种对于随机变量形成序列的排序方法。其方法是,按照字母顺序,或者数字小大顺序,由小到大的形成序列。
*/
@Controller
@RequestMapping("coreJoin")
public class CoreController extends HttpServlet {
@Autowired
private WXPersonalService wXPersonalService;
String TAG = "CoreController";
@RequestMapping(method = RequestMethod.GET)
@Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// 获取输出流
PrintWriter printWriter = response.getWriter();
// 根据api说明,获取上述四个参数
// 微信加密签名
String signature = request.getParameter("signature");
// 时间戳
String timestamp = request.getParameter("timestamp");
// 随机数
String nonce = request.getParameter("nonce");
// 随机字符串
String echostr = request.getParameter("echostr");
String[] parms = new String[] { ConstantUtil.APP_TOKEN, timestamp,
nonce };// 将需要字典序排列的字符串放到数组中
Arrays.sort(parms);// 按照api要求进行字典序排序
// 第二步:将三个参数字符串拼接成一个字符串进行sha1加密
// 拼接字符串
String parmsString = "";// 注意,此处不能=null。
for (int i = 0; i < parms.length; i++) {
parmsString += parms[i];
}
// sha1加密
String mParms = null;// 加密后的结果
MessageDigest digest = null;
try {
digest = java.security.MessageDigest.getInstance("SHA");
} catch (NoSuchAlgorithmException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
digest.update(parmsString.getBytes());
byte messageDigest[] = digest.digest();
// Create Hex String
StringBuffer hexString = new StringBuffer();
// 字节数组转换为 十六进制 数
for (int i = 0; i < messageDigest.length; i++) {
String shaHex = Integer.toHexString(messageDigest[i] & 0xFF);
if (shaHex.length() < 2) {
hexString.append(0);
}
hexString.append(shaHex);
}
mParms = hexString.toString();// 加密结果
/*
* api要求: 若确认此次GET请求来自微信服务器,请原样返回echostr参数内容, 则接入生效, 成为开发者成功,否则接入失败。
*/
// 第三步: 开发者获得加密后的字符串可与signature对比,标识该请求来源于微信接入成功。
if (mParms.equals(signature)) {
printWriter.write(echostr);
} else {
// 接入失败,不用回写
System.out.println(TAG + "接入失败");
}
}
@RequestMapping(method = RequestMethod.POST)
@Override
protected void doPost(HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
throws ServletException, IOException {
// 将请求、响应的编码均设置为UTF-8(防止中文乱码)
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
// 调用核心业务类接收消息、处理消息
String respMessage = wXPersonalService.processRequest(request);
// 响应消息
PrintWriter out = response.getWriter();
out.print(respMessage);
out.close();
}
}
 来自CODE的代码片
snippet_file_0.txt
解析,处理如下
<a target=_blank id="L1" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L1" rel="#L1" style="text-decoration: none; color: rgb(12, 137, 207);">  1</a><a target=_blank id="L2" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L2" rel="#L2" style="text-decoration: none; color: rgb(12, 137, 207);">  2</a><a target=_blank id="L3" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L3" rel="#L3" style="text-decoration: none; color: rgb(12, 137, 207);">  3</a><a target=_blank id="L4" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L4" rel="#L4" style="text-decoration: none; color: rgb(12, 137, 207);">  4</a><a target=_blank id="L5" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L5" rel="#L5" style="text-decoration: none; color: rgb(12, 137, 207);">  5</a><a target=_blank id="L6" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L6" rel="#L6" style="text-decoration: none; color: rgb(12, 137, 207);">  6</a><a target=_blank id="L7" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L7" rel="#L7" style="text-decoration: none; color: rgb(12, 137, 207);">  7</a><a target=_blank id="L8" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L8" rel="#L8" style="text-decoration: none; color: rgb(12, 137, 207);">  8</a><a target=_blank id="L9" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L9" rel="#L9" style="text-decoration: none; color: rgb(12, 137, 207);">  9</a><a target=_blank id="L10" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L10" rel="#L10" style="text-decoration: none; color: rgb(12, 137, 207);"> 10</a><a target=_blank id="L11" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L11" rel="#L11" style="text-decoration: none; color: rgb(12, 137, 207);"> 11</a><a target=_blank id="L12" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L12" rel="#L12" style="text-decoration: none; color: rgb(12, 137, 207);"> 12</a><a target=_blank id="L13" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L13" rel="#L13" style="text-decoration: none; color: rgb(12, 137, 207);"> 13</a><a target=_blank id="L14" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L14" rel="#L14" style="text-decoration: none; color: rgb(12, 137, 207);"> 14</a><a target=_blank id="L15" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L15" rel="#L15" style="text-decoration: none; color: rgb(12, 137, 207);"> 15</a><a target=_blank id="L16" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L16" rel="#L16" style="text-decoration: none; color: rgb(12, 137, 207);"> 16</a><a target=_blank id="L17" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L17" rel="#L17" style="text-decoration: none; color: rgb(12, 137, 207);"> 17</a><a target=_blank id="L18" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L18" rel="#L18" style="text-decoration: none; color: rgb(12, 137, 207);"> 18</a><a target=_blank id="L19" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L19" rel="#L19" style="text-decoration: none; color: rgb(12, 137, 207);"> 19</a><a target=_blank id="L20" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L20" rel="#L20" style="text-decoration: none; color: rgb(12, 137, 207);"> 20</a><a target=_blank id="L21" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L21" rel="#L21" style="text-decoration: none; color: rgb(12, 137, 207);"> 21</a><a target=_blank id="L22" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L22" rel="#L22" style="text-decoration: none; color: rgb(12, 137, 207);"> 22</a><a target=_blank id="L23" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L23" rel="#L23" style="text-decoration: none; color: rgb(12, 137, 207);"> 23</a><a target=_blank id="L24" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L24" rel="#L24" style="text-decoration: none; color: rgb(12, 137, 207);"> 24</a><a target=_blank id="L25" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L25" rel="#L25" style="text-decoration: none; color: rgb(12, 137, 207);"> 25</a><a target=_blank id="L26" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L26" rel="#L26" style="text-decoration: none; color: rgb(12, 137, 207);"> 26</a><a target=_blank id="L27" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L27" rel="#L27" style="text-decoration: none; color: rgb(12, 137, 207);"> 27</a><a target=_blank id="L28" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L28" rel="#L28" style="text-decoration: none; color: rgb(12, 137, 207);"> 28</a><a target=_blank id="L29" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L29" rel="#L29" style="text-decoration: none; color: rgb(12, 137, 207);"> 29</a><a target=_blank id="L30" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L30" rel="#L30" style="text-decoration: none; color: rgb(12, 137, 207);"> 30</a><a target=_blank id="L31" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L31" rel="#L31" style="text-decoration: none; color: rgb(12, 137, 207);"> 31</a><a target=_blank id="L32" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L32" rel="#L32" style="text-decoration: none; color: rgb(12, 137, 207);"> 32</a><a target=_blank id="L33" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L33" rel="#L33" style="text-decoration: none; color: rgb(12, 137, 207);"> 33</a><a target=_blank id="L34" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L34" rel="#L34" style="text-decoration: none; color: rgb(12, 137, 207);"> 34</a><a target=_blank id="L35" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L35" rel="#L35" style="text-decoration: none; color: rgb(12, 137, 207);"> 35</a><a target=_blank id="L36" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L36" rel="#L36" style="text-decoration: none; color: rgb(12, 137, 207);"> 36</a><a target=_blank id="L37" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L37" rel="#L37" style="text-decoration: none; color: rgb(12, 137, 207);"> 37</a><a target=_blank id="L38" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L38" rel="#L38" style="text-decoration: none; color: rgb(12, 137, 207);"> 38</a><a target=_blank id="L39" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L39" rel="#L39" style="text-decoration: none; color: rgb(12, 137, 207);"> 39</a><a target=_blank id="L40" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L40" rel="#L40" style="text-decoration: none; color: rgb(12, 137, 207);"> 40</a><a target=_blank id="L41" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L41" rel="#L41" style="text-decoration: none; color: rgb(12, 137, 207);"> 41</a><a target=_blank id="L42" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L42" rel="#L42" style="text-decoration: none; color: rgb(12, 137, 207);"> 42</a><a target=_blank id="L43" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L43" rel="#L43" style="text-decoration: none; color: rgb(12, 137, 207);"> 43</a><a target=_blank id="L44" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L44" rel="#L44" style="text-decoration: none; color: rgb(12, 137, 207);"> 44</a><a target=_blank id="L45" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L45" rel="#L45" style="text-decoration: none; color: rgb(12, 137, 207);"> 45</a><a target=_blank id="L46" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L46" rel="#L46" style="text-decoration: none; color: rgb(12, 137, 207);"> 46</a><a target=_blank id="L47" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L47" rel="#L47" style="text-decoration: none; color: rgb(12, 137, 207);"> 47</a><a target=_blank id="L48" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L48" rel="#L48" style="text-decoration: none; color: rgb(12, 137, 207);"> 48</a><a target=_blank id="L49" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L49" rel="#L49" style="text-decoration: none; color: rgb(12, 137, 207);"> 49</a><a target=_blank id="L50" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L50" rel="#L50" style="text-decoration: none; color: rgb(12, 137, 207);"> 50</a><a target=_blank id="L51" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L51" rel="#L51" style="text-decoration: none; color: rgb(12, 137, 207);"> 51</a><a target=_blank id="L52" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L52" rel="#L52" style="text-decoration: none; color: rgb(12, 137, 207);"> 52</a><a target=_blank id="L53" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L53" rel="#L53" style="text-decoration: none; color: rgb(12, 137, 207);"> 53</a><a target=_blank id="L54" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L54" rel="#L54" style="text-decoration: none; color: rgb(12, 137, 207);"> 54</a><a target=_blank id="L55" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L55" rel="#L55" style="text-decoration: none; color: rgb(12, 137, 207);"> 55</a><a target=_blank id="L56" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L56" rel="#L56" style="text-decoration: none; color: rgb(12, 137, 207);"> 56</a><a target=_blank id="L57" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L57" rel="#L57" style="text-decoration: none; color: rgb(12, 137, 207);"> 57</a><a target=_blank id="L58" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L58" rel="#L58" style="text-decoration: none; color: rgb(12, 137, 207);"> 58</a><a target=_blank id="L59" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L59" rel="#L59" style="text-decoration: none; color: rgb(12, 137, 207);"> 59</a><a target=_blank id="L60" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L60" rel="#L60" style="text-decoration: none; color: rgb(12, 137, 207);"> 60</a><a target=_blank id="L61" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L61" rel="#L61" style="text-decoration: none; color: rgb(12, 137, 207);"> 61</a><a target=_blank id="L62" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L62" rel="#L62" style="text-decoration: none; color: rgb(12, 137, 207);"> 62</a><a target=_blank id="L63" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L63" rel="#L63" style="text-decoration: none; color: rgb(12, 137, 207);"> 63</a><a target=_blank id="L64" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L64" rel="#L64" style="text-decoration: none; color: rgb(12, 137, 207);"> 64</a><a target=_blank id="L65" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L65" rel="#L65" style="text-decoration: none; color: rgb(12, 137, 207);"> 65</a><a target=_blank id="L66" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L66" rel="#L66" style="text-decoration: none; color: rgb(12, 137, 207);"> 66</a><a target=_blank id="L67" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L67" rel="#L67" style="text-decoration: none; color: rgb(12, 137, 207);"> 67</a><a target=_blank id="L68" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L68" rel="#L68" style="text-decoration: none; color: rgb(12, 137, 207);"> 68</a><a target=_blank id="L69" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L69" rel="#L69" style="text-decoration: none; color: rgb(12, 137, 207);"> 69</a><a target=_blank id="L70" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L70" rel="#L70" style="text-decoration: none; color: rgb(12, 137, 207);"> 70</a><a target=_blank id="L71" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L71" rel="#L71" style="text-decoration: none; color: rgb(12, 137, 207);"> 71</a><a target=_blank id="L72" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L72" rel="#L72" style="text-decoration: none; color: rgb(12, 137, 207);"> 72</a><a target=_blank id="L73" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L73" rel="#L73" style="text-decoration: none; color: rgb(12, 137, 207);"> 73</a><a target=_blank id="L74" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L74" rel="#L74" style="text-decoration: none; color: rgb(12, 137, 207);"> 74</a><a target=_blank id="L75" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L75" rel="#L75" style="text-decoration: none; color: rgb(12, 137, 207);"> 75</a><a target=_blank id="L76" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L76" rel="#L76" style="text-decoration: none; color: rgb(12, 137, 207);"> 76</a><a target=_blank id="L77" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L77" rel="#L77" style="text-decoration: none; color: rgb(12, 137, 207);"> 77</a><a target=_blank id="L78" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L78" rel="#L78" style="text-decoration: none; color: rgb(12, 137, 207);"> 78</a><a target=_blank id="L79" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L79" rel="#L79" style="text-decoration: none; color: rgb(12, 137, 207);"> 79</a><a target=_blank id="L80" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L80" rel="#L80" style="text-decoration: none; color: rgb(12, 137, 207);"> 80</a><a target=_blank id="L81" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L81" rel="#L81" style="text-decoration: none; color: rgb(12, 137, 207);"> 81</a><a target=_blank id="L82" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L82" rel="#L82" style="text-decoration: none; color: rgb(12, 137, 207);"> 82</a><a target=_blank id="L83" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L83" rel="#L83" style="text-decoration: none; color: rgb(12, 137, 207);"> 83</a><a target=_blank id="L84" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L84" rel="#L84" style="text-decoration: none; color: rgb(12, 137, 207);"> 84</a><a target=_blank id="L85" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L85" rel="#L85" style="text-decoration: none; color: rgb(12, 137, 207);"> 85</a><a target=_blank id="L86" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L86" rel="#L86" style="text-decoration: none; color: rgb(12, 137, 207);"> 86</a><a target=_blank id="L87" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L87" rel="#L87" style="text-decoration: none; color: rgb(12, 137, 207);"> 87</a><a target=_blank id="L88" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L88" rel="#L88" style="text-decoration: none; color: rgb(12, 137, 207);"> 88</a><a target=_blank id="L89" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L89" rel="#L89" style="text-decoration: none; color: rgb(12, 137, 207);"> 89</a><a target=_blank id="L90" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L90" rel="#L90" style="text-decoration: none; color: rgb(12, 137, 207);"> 90</a><a target=_blank id="L91" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L91" rel="#L91" style="text-decoration: none; color: rgb(12, 137, 207);"> 91</a><a target=_blank id="L92" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L92" rel="#L92" style="text-decoration: none; color: rgb(12, 137, 207);"> 92</a><a target=_blank id="L93" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L93" rel="#L93" style="text-decoration: none; color: rgb(12, 137, 207);"> 93</a>
/**
* 处理微信返回参数
* @param request
* @return
*/
public String processRequest(HttpServletRequest request) {
String respMessage = null;
try {
// 默认返回的文本消息内容
String respContent = "请求处理异常,请稍候尝试!";
// xml请求解析
Map<String, String> requestMap = MessageUtil.parseXml(request);
// 发送方帐号(open_id)
String fromUserName = requestMap.get("FromUserName");
// 公众帐号
String toUserName = requestMap.get("ToUserName");
// 消息类型
String msgType = requestMap.get("MsgType");
// 回复文本消息
TextMessage textMessage = new TextMessage();
textMessage.setToUserName(fromUserName);
textMessage.setFromUserName(toUserName);
textMessage.setCreateTime(new Date().getTime());
textMessage.setMsgType(MessageUtil.RESP_MESSAGE_TYPE_TEXT);
textMessage.setMsgId(0);
// 文本消息
if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_TEXT)) {
respContent = "您发送的是文本消息!";
}
// 图片消息
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_IMAGE)) {
respContent = "您发送的是图片消息!";
}
// 地理位置消息
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_LOCATION)) {
respContent = "您发送的是地理位置消息!";
}
// 链接消息
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_LINK)) {
respContent = "您发送的是链接消息!";
}
// 音频消息
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_VOICE)) {
respContent = "您发送的是音频消息!";
}
// 事件推送
else if (msgType.equals(MessageUtil.REQ_MESSAGE_TYPE_EVENT)) {
// 事件类型
String eventType = requestMap.get("Event");
// 订阅
if (eventType.equals(MessageUtil.EVENT_TYPE_SUBSCRIBE)) {
respContent = "mo-爱心 盼星星,盼月亮,你终于来鸟~\n"
+ "闲话少说,商会云APP是一个实名交流的商圈,来来往往的都是商人,时不时来个线上微课,线下论坛沙龙什么的。"
+ "有时也组织大佬上非洲考察个金矿,回老家投资个地产,上山区修个铁路,去欧洲见个总理啥的。你关注或不关注我,我就在这里不离不弃,么么哒~mo-亲亲";
}
// 取消订阅
else if (eventType.equals(MessageUtil.EVENT_TYPE_UNSUBSCRIBE)) {
// TODO 取消订阅后用户再收不到公众号发送的消息,因此不需要回复消息
}
// 自定义菜单点击事件
else if (eventType.equals(MessageUtil.EVENT_TYPE_CLICK)) {
// 事件KEY值,与创建自定义菜单时指定的KEY值对应
String eventKey = requestMap.get("EventKey");
if (eventKey.equals("11")) {
respContent = "授权登录菜单项被点击";
} else if (eventKey.equals("22")) {
// 调用推送方法
System.out.println("------------>OPENID=" + fromUserName);
try {
wxPersonalDao.unBundlingOpenId(fromUserName);
respContent = "您好,您的微信号与商会云账号已解绑成功!";
} catch (Exception e) {
respContent = "您好,您的微信号与商会云账号解绑失败!";
}
} else if (eventKey.equals("20_PROMANAGE")) {
// 推送模版
respContent = "模版申请中。。。";
}
}
}
textMessage.setContent(respContent);
respMessage = MessageUtil.textMessageToXml(textMessage);
} catch (Exception e) {
e.printStackTrace();
}
return respMessage;
}
 来自CODE的代码片
snippet_file_0.txt

<a target=_blank id="L1" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L1" rel="#L1" style="text-decoration: none; color: rgb(12, 137, 207);">   1</a><a target=_blank id="L2" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L2" rel="#L2" style="text-decoration: none; color: rgb(12, 137, 207);">   2</a><a target=_blank id="L3" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L3" rel="#L3" style="text-decoration: none; color: rgb(12, 137, 207);">   3</a><a target=_blank id="L4" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L4" rel="#L4" style="text-decoration: none; color: rgb(12, 137, 207);">   4</a><a target=_blank id="L5" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L5" rel="#L5" style="text-decoration: none; color: rgb(12, 137, 207);">   5</a><a target=_blank id="L6" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L6" rel="#L6" style="text-decoration: none; color: rgb(12, 137, 207);">   6</a><a target=_blank id="L7" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L7" rel="#L7" style="text-decoration: none; color: rgb(12, 137, 207);">   7</a><a target=_blank id="L8" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L8" rel="#L8" style="text-decoration: none; color: rgb(12, 137, 207);">   8</a><a target=_blank id="L9" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L9" rel="#L9" style="text-decoration: none; color: rgb(12, 137, 207);">   9</a><a target=_blank id="L10" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L10" rel="#L10" style="text-decoration: none; color: rgb(12, 137, 207);">  10</a><a target=_blank id="L11" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L11" rel="#L11" style="text-decoration: none; color: rgb(12, 137, 207);">  11</a><a target=_blank id="L12" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L12" rel="#L12" style="text-decoration: none; color: rgb(12, 137, 207);">  12</a><a target=_blank id="L13" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L13" rel="#L13" style="text-decoration: none; color: rgb(12, 137, 207);">  13</a><a target=_blank id="L14" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L14" rel="#L14" style="text-decoration: none; color: rgb(12, 137, 207);">  14</a><a target=_blank id="L15" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L15" rel="#L15" style="text-decoration: none; color: rgb(12, 137, 207);">  15</a><a target=_blank id="L16" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L16" rel="#L16" style="text-decoration: none; color: rgb(12, 137, 207);">  16</a><a target=_blank id="L17" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L17" rel="#L17" style="text-decoration: none; color: rgb(12, 137, 207);">  17</a><a target=_blank id="L18" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L18" rel="#L18" style="text-decoration: none; color: rgb(12, 137, 207);">  18</a><a target=_blank id="L19" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L19" rel="#L19" style="text-decoration: none; color: rgb(12, 137, 207);">  19</a><a target=_blank id="L20" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L20" rel="#L20" style="text-decoration: none; color: rgb(12, 137, 207);">  20</a><a target=_blank id="L21" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L21" rel="#L21" style="text-decoration: none; color: rgb(12, 137, 207);">  21</a><a target=_blank id="L22" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L22" rel="#L22" style="text-decoration: none; color: rgb(12, 137, 207);">  22</a><a target=_blank id="L23" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L23" rel="#L23" style="text-decoration: none; color: rgb(12, 137, 207);">  23</a><a target=_blank id="L24" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L24" rel="#L24" style="text-decoration: none; color: rgb(12, 137, 207);">  24</a><a target=_blank id="L25" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L25" rel="#L25" style="text-decoration: none; color: rgb(12, 137, 207);">  25</a><a target=_blank id="L26" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L26" rel="#L26" style="text-decoration: none; color: rgb(12, 137, 207);">  26</a><a target=_blank id="L27" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L27" rel="#L27" style="text-decoration: none; color: rgb(12, 137, 207);">  27</a><a target=_blank id="L28" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L28" rel="#L28" style="text-decoration: none; color: rgb(12, 137, 207);">  28</a><a target=_blank id="L29" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L29" rel="#L29" style="text-decoration: none; color: rgb(12, 137, 207);">  29</a><a target=_blank id="L30" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L30" rel="#L30" style="text-decoration: none; color: rgb(12, 137, 207);">  30</a><a target=_blank id="L31" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L31" rel="#L31" style="text-decoration: none; color: rgb(12, 137, 207);">  31</a><a target=_blank id="L32" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L32" rel="#L32" style="text-decoration: none; color: rgb(12, 137, 207);">  32</a><a target=_blank id="L33" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L33" rel="#L33" style="text-decoration: none; color: rgb(12, 137, 207);">  33</a><a target=_blank id="L34" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L34" rel="#L34" style="text-decoration: none; color: rgb(12, 137, 207);">  34</a><a target=_blank id="L35" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L35" rel="#L35" style="text-decoration: none; color: rgb(12, 137, 207);">  35</a><a target=_blank id="L36" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L36" rel="#L36" style="text-decoration: none; color: rgb(12, 137, 207);">  36</a><a target=_blank id="L37" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L37" rel="#L37" style="text-decoration: none; color: rgb(12, 137, 207);">  37</a><a target=_blank id="L38" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L38" rel="#L38" style="text-decoration: none; color: rgb(12, 137, 207);">  38</a><a target=_blank id="L39" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L39" rel="#L39" style="text-decoration: none; color: rgb(12, 137, 207);">  39</a><a target=_blank id="L40" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L40" rel="#L40" style="text-decoration: none; color: rgb(12, 137, 207);">  40</a><a target=_blank id="L41" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L41" rel="#L41" style="text-decoration: none; color: rgb(12, 137, 207);">  41</a><a target=_blank id="L42" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L42" rel="#L42" style="text-decoration: none; color: rgb(12, 137, 207);">  42</a><a target=_blank id="L43" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L43" rel="#L43" style="text-decoration: none; color: rgb(12, 137, 207);">  43</a><a target=_blank id="L44" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L44" rel="#L44" style="text-decoration: none; color: rgb(12, 137, 207);">  44</a><a target=_blank id="L45" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L45" rel="#L45" style="text-decoration: none; color: rgb(12, 137, 207);">  45</a><a target=_blank id="L46" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L46" rel="#L46" style="text-decoration: none; color: rgb(12, 137, 207);">  46</a><a target=_blank id="L47" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L47" rel="#L47" style="text-decoration: none; color: rgb(12, 137, 207);">  47</a><a target=_blank id="L48" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L48" rel="#L48" style="text-decoration: none; color: rgb(12, 137, 207);">  48</a><a target=_blank id="L49" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L49" rel="#L49" style="text-decoration: none; color: rgb(12, 137, 207);">  49</a><a target=_blank id="L50" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L50" rel="#L50" style="text-decoration: none; color: rgb(12, 137, 207);">  50</a><a target=_blank id="L51" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L51" rel="#L51" style="text-decoration: none; color: rgb(12, 137, 207);">  51</a><a target=_blank id="L52" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L52" rel="#L52" style="text-decoration: none; color: rgb(12, 137, 207);">  52</a><a target=_blank id="L53" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L53" rel="#L53" style="text-decoration: none; color: rgb(12, 137, 207);">  53</a><a target=_blank id="L54" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L54" rel="#L54" style="text-decoration: none; color: rgb(12, 137, 207);">  54</a><a target=_blank id="L55" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L55" rel="#L55" style="text-decoration: none; color: rgb(12, 137, 207);">  55</a><a target=_blank id="L56" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L56" rel="#L56" style="text-decoration: none; color: rgb(12, 137, 207);">  56</a><a target=_blank id="L57" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L57" rel="#L57" style="text-decoration: none; color: rgb(12, 137, 207);">  57</a><a target=_blank id="L58" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L58" rel="#L58" style="text-decoration: none; color: rgb(12, 137, 207);">  58</a><a target=_blank id="L59" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L59" rel="#L59" style="text-decoration: none; color: rgb(12, 137, 207);">  59</a><a target=_blank id="L60" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L60" rel="#L60" style="text-decoration: none; color: rgb(12, 137, 207);">  60</a><a target=_blank id="L61" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L61" rel="#L61" style="text-decoration: none; color: rgb(12, 137, 207);">  61</a><a target=_blank id="L62" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L62" rel="#L62" style="text-decoration: none; color: rgb(12, 137, 207);">  62</a><a target=_blank id="L63" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L63" rel="#L63" style="text-decoration: none; color: rgb(12, 137, 207);">  63</a><a target=_blank id="L64" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L64" rel="#L64" style="text-decoration: none; color: rgb(12, 137, 207);">  64</a><a target=_blank id="L65" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L65" rel="#L65" style="text-decoration: none; color: rgb(12, 137, 207);">  65</a><a target=_blank id="L66" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L66" rel="#L66" style="text-decoration: none; color: rgb(12, 137, 207);">  66</a><a target=_blank id="L67" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L67" rel="#L67" style="text-decoration: none; color: rgb(12, 137, 207);">  67</a><a target=_blank id="L68" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L68" rel="#L68" style="text-decoration: none; color: rgb(12, 137, 207);">  68</a><a target=_blank id="L69" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L69" rel="#L69" style="text-decoration: none; color: rgb(12, 137, 207);">  69</a><a target=_blank id="L70" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L70" rel="#L70" style="text-decoration: none; color: rgb(12, 137, 207);">  70</a><a target=_blank id="L71" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L71" rel="#L71" style="text-decoration: none; color: rgb(12, 137, 207);">  71</a><a target=_blank id="L72" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L72" rel="#L72" style="text-decoration: none; color: rgb(12, 137, 207);">  72</a><a target=_blank id="L73" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L73" rel="#L73" style="text-decoration: none; color: rgb(12, 137, 207);">  73</a><a target=_blank id="L74" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L74" rel="#L74" style="text-decoration: none; color: rgb(12, 137, 207);">  74</a><a target=_blank id="L75" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L75" rel="#L75" style="text-decoration: none; color: rgb(12, 137, 207);">  75</a><a target=_blank id="L76" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L76" rel="#L76" style="text-decoration: none; color: rgb(12, 137, 207);">  76</a><a target=_blank id="L77" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L77" rel="#L77" style="text-decoration: none; color: rgb(12, 137, 207);">  77</a><a target=_blank id="L78" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L78" rel="#L78" style="text-decoration: none; color: rgb(12, 137, 207);">  78</a><a target=_blank id="L79" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L79" rel="#L79" style="text-decoration: none; color: rgb(12, 137, 207);">  79</a><a target=_blank id="L80" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L80" rel="#L80" style="text-decoration: none; color: rgb(12, 137, 207);">  80</a><a target=_blank id="L81" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L81" rel="#L81" style="text-decoration: none; color: rgb(12, 137, 207);">  81</a><a target=_blank id="L82" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L82" rel="#L82" style="text-decoration: none; color: rgb(12, 137, 207);">  82</a><a target=_blank id="L83" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L83" rel="#L83" style="text-decoration: none; color: rgb(12, 137, 207);">  83</a><a target=_blank id="L84" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L84" rel="#L84" style="text-decoration: none; color: rgb(12, 137, 207);">  84</a><a target=_blank id="L85" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L85" rel="#L85" style="text-decoration: none; color: rgb(12, 137, 207);">  85</a><a target=_blank id="L86" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L86" rel="#L86" style="text-decoration: none; color: rgb(12, 137, 207);">  86</a><a target=_blank id="L87" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L87" rel="#L87" style="text-decoration: none; color: rgb(12, 137, 207);">  87</a><a target=_blank id="L88" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L88" rel="#L88" style="text-decoration: none; color: rgb(12, 137, 207);">  88</a><a target=_blank id="L89" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L89" rel="#L89" style="text-decoration: none; color: rgb(12, 137, 207);">  89</a><a target=_blank id="L90" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L90" rel="#L90" style="text-decoration: none; color: rgb(12, 137, 207);">  90</a><a target=_blank id="L91" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L91" rel="#L91" style="text-decoration: none; color: rgb(12, 137, 207);">  91</a><a target=_blank id="L92" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L92" rel="#L92" style="text-decoration: none; color: rgb(12, 137, 207);">  92</a><a target=_blank id="L93" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L93" rel="#L93" style="text-decoration: none; color: rgb(12, 137, 207);">  93</a><a target=_blank id="L94" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L94" rel="#L94" style="text-decoration: none; color: rgb(12, 137, 207);">  94</a><a target=_blank id="L95" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L95" rel="#L95" style="text-decoration: none; color: rgb(12, 137, 207);">  95</a><a target=_blank id="L96" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L96" rel="#L96" style="text-decoration: none; color: rgb(12, 137, 207);">  96</a><a target=_blank id="L97" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L97" rel="#L97" style="text-decoration: none; color: rgb(12, 137, 207);">  97</a><a target=_blank id="L98" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L98" rel="#L98" style="text-decoration: none; color: rgb(12, 137, 207);">  98</a><a target=_blank id="L99" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L99" rel="#L99" style="text-decoration: none; color: rgb(12, 137, 207);">  99</a><a target=_blank id="L100" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L100" rel="#L100" style="text-decoration: none; color: rgb(12, 137, 207);"> 100</a><a target=_blank id="L101" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L101" rel="#L101" style="text-decoration: none; color: rgb(12, 137, 207);"> 101</a><a target=_blank id="L102" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L102" rel="#L102" style="text-decoration: none; color: rgb(12, 137, 207);"> 102</a><a target=_blank id="L103" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L103" rel="#L103" style="text-decoration: none; color: rgb(12, 137, 207);"> 103</a><a target=_blank id="L104" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L104" rel="#L104" style="text-decoration: none; color: rgb(12, 137, 207);"> 104</a><a target=_blank id="L105" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L105" rel="#L105" style="text-decoration: none; color: rgb(12, 137, 207);"> 105</a><a target=_blank id="L106" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L106" rel="#L106" style="text-decoration: none; color: rgb(12, 137, 207);"> 106</a><a target=_blank id="L107" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L107" rel="#L107" style="text-decoration: none; color: rgb(12, 137, 207);"> 107</a><a target=_blank id="L108" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L108" rel="#L108" style="text-decoration: none; color: rgb(12, 137, 207);"> 108</a><a target=_blank id="L109" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L109" rel="#L109" style="text-decoration: none; color: rgb(12, 137, 207);"> 109</a><a target=_blank id="L110" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L110" rel="#L110" style="text-decoration: none; color: rgb(12, 137, 207);"> 110</a><a target=_blank id="L111" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L111" rel="#L111" style="text-decoration: none; color: rgb(12, 137, 207);"> 111</a><a target=_blank id="L112" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L112" rel="#L112" style="text-decoration: none; color: rgb(12, 137, 207);"> 112</a><a target=_blank id="L113" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L113" rel="#L113" style="text-decoration: none; color: rgb(12, 137, 207);"> 113</a><a target=_blank id="L114" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L114" rel="#L114" style="text-decoration: none; color: rgb(12, 137, 207);"> 114</a><a target=_blank id="L115" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L115" rel="#L115" style="text-decoration: none; color: rgb(12, 137, 207);"> 115</a><a target=_blank id="L116" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L116" rel="#L116" style="text-decoration: none; color: rgb(12, 137, 207);"> 116</a><a target=_blank id="L117" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L117" rel="#L117" style="text-decoration: none; color: rgb(12, 137, 207);"> 117</a><a target=_blank id="L118" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L118" rel="#L118" style="text-decoration: none; color: rgb(12, 137, 207);"> 118</a><a target=_blank id="L119" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L119" rel="#L119" style="text-decoration: none; color: rgb(12, 137, 207);"> 119</a><a target=_blank id="L120" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L120" rel="#L120" style="text-decoration: none; color: rgb(12, 137, 207);"> 120</a><a target=_blank id="L121" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L121" rel="#L121" style="text-decoration: none; color: rgb(12, 137, 207);"> 121</a><a target=_blank id="L122" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L122" rel="#L122" style="text-decoration: none; color: rgb(12, 137, 207);"> 122</a><a target=_blank id="L123" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L123" rel="#L123" style="text-decoration: none; color: rgb(12, 137, 207);"> 123</a><a target=_blank id="L124" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L124" rel="#L124" style="text-decoration: none; color: rgb(12, 137, 207);"> 124</a><a target=_blank id="L125" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L125" rel="#L125" style="text-decoration: none; color: rgb(12, 137, 207);"> 125</a><a target=_blank id="L126" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L126" rel="#L126" style="text-decoration: none; color: rgb(12, 137, 207);"> 126</a><a target=_blank id="L127" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L127" rel="#L127" style="text-decoration: none; color: rgb(12, 137, 207);"> 127</a><a target=_blank id="L128" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L128" rel="#L128" style="text-decoration: none; color: rgb(12, 137, 207);"> 128</a><a target=_blank id="L129" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L129" rel="#L129" style="text-decoration: none; color: rgb(12, 137, 207);"> 129</a><a target=_blank id="L130" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L130" rel="#L130" style="text-decoration: none; color: rgb(12, 137, 207);"> 130</a><a target=_blank id="L131" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L131" rel="#L131" style="text-decoration: none; color: rgb(12, 137, 207);"> 131</a><a target=_blank id="L132" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L132" rel="#L132" style="text-decoration: none; color: rgb(12, 137, 207);"> 132</a><a target=_blank id="L133" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L133" rel="#L133" style="text-decoration: none; color: rgb(12, 137, 207);"> 133</a><a target=_blank id="L134" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L134" rel="#L134" style="text-decoration: none; color: rgb(12, 137, 207);"> 134</a><a target=_blank id="L135" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L135" rel="#L135" style="text-decoration: none; color: rgb(12, 137, 207);"> 135</a><a target=_blank id="L136" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L136" rel="#L136" style="text-decoration: none; color: rgb(12, 137, 207);"> 136</a><a target=_blank id="L137" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L137" rel="#L137" style="text-decoration: none; color: rgb(12, 137, 207);"> 137</a><a target=_blank id="L138" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L138" rel="#L138" style="text-decoration: none; color: rgb(12, 137, 207);"> 138</a><a target=_blank id="L139" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L139" rel="#L139" style="text-decoration: none; color: rgb(12, 137, 207);"> 139</a><a target=_blank id="L140" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L140" rel="#L140" style="text-decoration: none; color: rgb(12, 137, 207);"> 140</a><a target=_blank id="L141" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L141" rel="#L141" style="text-decoration: none; color: rgb(12, 137, 207);"> 141</a><a target=_blank id="L142" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L142" rel="#L142" style="text-decoration: none; color: rgb(12, 137, 207);"> 142</a><a target=_blank id="L143" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L143" rel="#L143" style="text-decoration: none; color: rgb(12, 137, 207);"> 143</a><a target=_blank id="L144" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L144" rel="#L144" style="text-decoration: none; color: rgb(12, 137, 207);"> 144</a><a target=_blank id="L145" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L145" rel="#L145" style="text-decoration: none; color: rgb(12, 137, 207);"> 145</a><a target=_blank id="L146" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L146" rel="#L146" style="text-decoration: none; color: rgb(12, 137, 207);"> 146</a><a target=_blank id="L147" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L147" rel="#L147" style="text-decoration: none; color: rgb(12, 137, 207);"> 147</a><a target=_blank id="L148" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L148" rel="#L148" style="text-decoration: none; color: rgb(12, 137, 207);"> 148</a><a target=_blank id="L149" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L149" rel="#L149" style="text-decoration: none; color: rgb(12, 137, 207);"> 149</a><a target=_blank id="L150" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L150" rel="#L150" style="text-decoration: none; color: rgb(12, 137, 207);"> 150</a><a target=_blank id="L151" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L151" rel="#L151" style="text-decoration: none; color: rgb(12, 137, 207);"> 151</a><a target=_blank id="L152" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L152" rel="#L152" style="text-decoration: none; color: rgb(12, 137, 207);"> 152</a><a target=_blank id="L153" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L153" rel="#L153" style="text-decoration: none; color: rgb(12, 137, 207);"> 153</a><a target=_blank id="L154" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L154" rel="#L154" style="text-decoration: none; color: rgb(12, 137, 207);"> 154</a><a target=_blank id="L155" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L155" rel="#L155" style="text-decoration: none; color: rgb(12, 137, 207);"> 155</a><a target=_blank id="L156" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L156" rel="#L156" style="text-decoration: none; color: rgb(12, 137, 207);"> 156</a><a target=_blank id="L157" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L157" rel="#L157" style="text-decoration: none; color: rgb(12, 137, 207);"> 157</a><a target=_blank id="L158" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L158" rel="#L158" style="text-decoration: none; color: rgb(12, 137, 207);"> 158</a><a target=_blank id="L159" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L159" rel="#L159" style="text-decoration: none; color: rgb(12, 137, 207);"> 159</a><a target=_blank id="L160" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L160" rel="#L160" style="text-decoration: none; color: rgb(12, 137, 207);"> 160</a><a target=_blank id="L161" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L161" rel="#L161" style="text-decoration: none; color: rgb(12, 137, 207);"> 161</a><a target=_blank id="L162" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L162" rel="#L162" style="text-decoration: none; color: rgb(12, 137, 207);"> 162</a><a target=_blank id="L163" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L163" rel="#L163" style="text-decoration: none; color: rgb(12, 137, 207);"> 163</a><a target=_blank id="L164" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L164" rel="#L164" style="text-decoration: none; color: rgb(12, 137, 207);"> 164</a><a target=_blank id="L165" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L165" rel="#L165" style="text-decoration: none; color: rgb(12, 137, 207);"> 165</a><a target=_blank id="L166" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L166" rel="#L166" style="text-decoration: none; color: rgb(12, 137, 207);"> 166</a><a target=_blank id="L167" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L167" rel="#L167" style="text-decoration: none; color: rgb(12, 137, 207);"> 167</a><a target=_blank id="L168" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L168" rel="#L168" style="text-decoration: none; color: rgb(12, 137, 207);"> 168</a><a target=_blank id="L169" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L169" rel="#L169" style="text-decoration: none; color: rgb(12, 137, 207);"> 169</a><a target=_blank id="L170" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L170" rel="#L170" style="text-decoration: none; color: rgb(12, 137, 207);"> 170</a><a target=_blank id="L171" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L171" rel="#L171" style="text-decoration: none; color: rgb(12, 137, 207);"> 171</a><a target=_blank id="L172" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L172" rel="#L172" style="text-decoration: none; color: rgb(12, 137, 207);"> 172</a><a target=_blank id="L173" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L173" rel="#L173" style="text-decoration: none; color: rgb(12, 137, 207);"> 173</a><a target=_blank id="L174" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L174" rel="#L174" style="text-decoration: none; color: rgb(12, 137, 207);"> 174</a><a target=_blank id="L175" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L175" rel="#L175" style="text-decoration: none; color: rgb(12, 137, 207);"> 175</a><a target=_blank id="L176" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L176" rel="#L176" style="text-decoration: none; color: rgb(12, 137, 207);"> 176</a><a target=_blank id="L177" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L177" rel="#L177" style="text-decoration: none; color: rgb(12, 137, 207);"> 177</a><a target=_blank id="L178" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L178" rel="#L178" style="text-decoration: none; color: rgb(12, 137, 207);"> 178</a><a target=_blank id="L179" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L179" rel="#L179" style="text-decoration: none; color: rgb(12, 137, 207);"> 179</a><a target=_blank id="L180" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L180" rel="#L180" style="text-decoration: none; color: rgb(12, 137, 207);"> 180</a><a target=_blank id="L181" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L181" rel="#L181" style="text-decoration: none; color: rgb(12, 137, 207);"> 181</a><a target=_blank id="L182" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L182" rel="#L182" style="text-decoration: none; color: rgb(12, 137, 207);"> 182</a><a target=_blank id="L183" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L183" rel="#L183" style="text-decoration: none; color: rgb(12, 137, 207);"> 183</a><a target=_blank id="L184" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L184" rel="#L184" style="text-decoration: none; color: rgb(12, 137, 207);"> 184</a><a target=_blank id="L185" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L185" rel="#L185" style="text-decoration: none; color: rgb(12, 137, 207);"> 185</a><a target=_blank id="L186" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L186" rel="#L186" style="text-decoration: none; color: rgb(12, 137, 207);"> 186</a><a target=_blank id="L187" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L187" rel="#L187" style="text-decoration: none; color: rgb(12, 137, 207);"> 187</a><a target=_blank id="L188" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L188" rel="#L188" style="text-decoration: none; color: rgb(12, 137, 207);"> 188</a><a target=_blank id="L189" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L189" rel="#L189" style="text-decoration: none; color: rgb(12, 137, 207);"> 189</a><a target=_blank id="L190" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L190" rel="#L190" style="text-decoration: none; color: rgb(12, 137, 207);"> 190</a><a target=_blank id="L191" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L191" rel="#L191" style="text-decoration: none; color: rgb(12, 137, 207);"> 191</a><a target=_blank id="L192" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L192" rel="#L192" style="text-decoration: none; color: rgb(12, 137, 207);"> 192</a><a target=_blank id="L193" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L193" rel="#L193" style="text-decoration: none; color: rgb(12, 137, 207);"> 193</a><a target=_blank id="L194" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L194" rel="#L194" style="text-decoration: none; color: rgb(12, 137, 207);"> 194</a><a target=_blank id="L195" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L195" rel="#L195" style="text-decoration: none; color: rgb(12, 137, 207);"> 195</a><a target=_blank id="L196" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L196" rel="#L196" style="text-decoration: none; color: rgb(12, 137, 207);"> 196</a><a target=_blank id="L197" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L197" rel="#L197" style="text-decoration: none; color: rgb(12, 137, 207);"> 197</a><a target=_blank id="L198" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L198" rel="#L198" style="text-decoration: none; color: rgb(12, 137, 207);"> 198</a><a target=_blank id="L199" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L199" rel="#L199" style="text-decoration: none; color: rgb(12, 137, 207);"> 199</a><a target=_blank id="L200" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L200" rel="#L200" style="text-decoration: none; color: rgb(12, 137, 207);"> 200</a><a target=_blank id="L201" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L201" rel="#L201" style="text-decoration: none; color: rgb(12, 137, 207);"> 201</a><a target=_blank id="L202" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L202" rel="#L202" style="text-decoration: none; color: rgb(12, 137, 207);"> 202</a><a target=_blank id="L203" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L203" rel="#L203" style="text-decoration: none; color: rgb(12, 137, 207);"> 203</a><a target=_blank id="L204" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L204" rel="#L204" style="text-decoration: none; color: rgb(12, 137, 207);"> 204</a><a target=_blank id="L205" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L205" rel="#L205" style="text-decoration: none; color: rgb(12, 137, 207);"> 205</a><a target=_blank id="L206" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L206" rel="#L206" style="text-decoration: none; color: rgb(12, 137, 207);"> 206</a><a target=_blank id="L207" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L207" rel="#L207" style="text-decoration: none; color: rgb(12, 137, 207);"> 207</a><a target=_blank id="L208" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L208" rel="#L208" style="text-decoration: none; color: rgb(12, 137, 207);"> 208</a><a target=_blank id="L209" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L209" rel="#L209" style="text-decoration: none; color: rgb(12, 137, 207);"> 209</a><a target=_blank id="L210" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L210" rel="#L210" style="text-decoration: none; color: rgb(12, 137, 207);"> 210</a><a target=_blank id="L211" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L211" rel="#L211" style="text-decoration: none; color: rgb(12, 137, 207);"> 211</a><a target=_blank id="L212" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L212" rel="#L212" style="text-decoration: none; color: rgb(12, 137, 207);"> 212</a><a target=_blank id="L213" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L213" rel="#L213" style="text-decoration: none; color: rgb(12, 137, 207);"> 213</a><a target=_blank id="L214" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L214" rel="#L214" style="text-decoration: none; color: rgb(12, 137, 207);"> 214</a><a target=_blank id="L215" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L215" rel="#L215" style="text-decoration: none; color: rgb(12, 137, 207);"> 215</a><a target=_blank id="L216" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L216" rel="#L216" style="text-decoration: none; color: rgb(12, 137, 207);"> 216</a><a target=_blank id="L217" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L217" rel="#L217" style="text-decoration: none; color: rgb(12, 137, 207);"> 217</a><a target=_blank id="L218" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L218" rel="#L218" style="text-decoration: none; color: rgb(12, 137, 207);"> 218</a><a target=_blank id="L219" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L219" rel="#L219" style="text-decoration: none; color: rgb(12, 137, 207);"> 219</a><a target=_blank id="L220" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L220" rel="#L220" style="text-decoration: none; color: rgb(12, 137, 207);"> 220</a><a target=_blank id="L221" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L221" rel="#L221" style="text-decoration: none; color: rgb(12, 137, 207);"> 221</a><a target=_blank id="L222" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L222" rel="#L222" style="text-decoration: none; color: rgb(12, 137, 207);"> 222</a><a target=_blank id="L223" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L223" rel="#L223" style="text-decoration: none; color: rgb(12, 137, 207);"> 223</a><a target=_blank id="L224" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L224" rel="#L224" style="text-decoration: none; color: rgb(12, 137, 207);"> 224</a><a target=_blank id="L225" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L225" rel="#L225" style="text-decoration: none; color: rgb(12, 137, 207);"> 225</a><a target=_blank id="L226" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L226" rel="#L226" style="text-decoration: none; color: rgb(12, 137, 207);"> 226</a><a target=_blank id="L227" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L227" rel="#L227" style="text-decoration: none; color: rgb(12, 137, 207);"> 227</a><a target=_blank id="L228" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L228" rel="#L228" style="text-decoration: none; color: rgb(12, 137, 207);"> 228</a><a target=_blank id="L229" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L229" rel="#L229" style="text-decoration: none; color: rgb(12, 137, 207);"> 229</a><a target=_blank id="L230" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L230" rel="#L230" style="text-decoration: none; color: rgb(12, 137, 207);"> 230</a><a target=_blank id="L231" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L231" rel="#L231" style="text-decoration: none; color: rgb(12, 137, 207);"> 231</a><a target=_blank id="L232" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L232" rel="#L232" style="text-decoration: none; color: rgb(12, 137, 207);"> 232</a><a target=_blank id="L233" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L233" rel="#L233" style="text-decoration: none; color: rgb(12, 137, 207);"> 233</a><a target=_blank id="L234" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L234" rel="#L234" style="text-decoration: none; color: rgb(12, 137, 207);"> 234</a><a target=_blank id="L235" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L235" rel="#L235" style="text-decoration: none; color: rgb(12, 137, 207);"> 235</a><a target=_blank id="L236" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L236" rel="#L236" style="text-decoration: none; color: rgb(12, 137, 207);"> 236</a><a target=_blank id="L237" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L237" rel="#L237" style="text-decoration: none; color: rgb(12, 137, 207);"> 237</a><a target=_blank id="L238" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L238" rel="#L238" style="text-decoration: none; color: rgb(12, 137, 207);"> 238</a><a target=_blank id="L239" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L239" rel="#L239" style="text-decoration: none; color: rgb(12, 137, 207);"> 239</a><a target=_blank id="L240" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L240" rel="#L240" style="text-decoration: none; color: rgb(12, 137, 207);"> 240</a><a target=_blank id="L241" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L241" rel="#L241" style="text-decoration: none; color: rgb(12, 137, 207);"> 241</a><a target=_blank id="L242" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L242" rel="#L242" style="text-decoration: none; color: rgb(12, 137, 207);"> 242</a><a target=_blank id="L243" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L243" rel="#L243" style="text-decoration: none; color: rgb(12, 137, 207);"> 243</a><a target=_blank id="L244" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L244" rel="#L244" style="text-decoration: none; color: rgb(12, 137, 207);"> 244</a><a target=_blank id="L245" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L245" rel="#L245" style="text-decoration: none; color: rgb(12, 137, 207);"> 245</a><a target=_blank id="L246" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L246" rel="#L246" style="text-decoration: none; color: rgb(12, 137, 207);"> 246</a><a target=_blank id="L247" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L247" rel="#L247" style="text-decoration: none; color: rgb(12, 137, 207);"> 247</a><a target=_blank id="L248" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L248" rel="#L248" style="text-decoration: none; color: rgb(12, 137, 207);"> 248</a><a target=_blank id="L249" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L249" rel="#L249" style="text-decoration: none; color: rgb(12, 137, 207);"> 249</a><a target=_blank id="L250" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L250" rel="#L250" style="text-decoration: none; color: rgb(12, 137, 207);"> 250</a><a target=_blank id="L251" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L251" rel="#L251" style="text-decoration: none; color: rgb(12, 137, 207);"> 251</a><a target=_blank id="L252" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L252" rel="#L252" style="text-decoration: none; color: rgb(12, 137, 207);"> 252</a><a target=_blank id="L253" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L253" rel="#L253" style="text-decoration: none; color: rgb(12, 137, 207);"> 253</a><a target=_blank id="L254" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L254" rel="#L254" style="text-decoration: none; color: rgb(12, 137, 207);"> 254</a><a target=_blank id="L255" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L255" rel="#L255" style="text-decoration: none; color: rgb(12, 137, 207);"> 255</a><a target=_blank id="L256" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L256" rel="#L256" style="text-decoration: none; color: rgb(12, 137, 207);"> 256</a><a target=_blank id="L257" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L257" rel="#L257" style="text-decoration: none; color: rgb(12, 137, 207);"> 257</a><a target=_blank id="L258" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L258" rel="#L258" style="text-decoration: none; color: rgb(12, 137, 207);"> 258</a><a target=_blank id="L259" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L259" rel="#L259" style="text-decoration: none; color: rgb(12, 137, 207);"> 259</a><a target=_blank id="L260" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L260" rel="#L260" style="text-decoration: none; color: rgb(12, 137, 207);"> 260</a><a target=_blank id="L261" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L261" rel="#L261" style="text-decoration: none; color: rgb(12, 137, 207);"> 261</a><a target=_blank id="L262" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L262" rel="#L262" style="text-decoration: none; color: rgb(12, 137, 207);"> 262</a><a target=_blank id="L263" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L263" rel="#L263" style="text-decoration: none; color: rgb(12, 137, 207);"> 263</a><a target=_blank id="L264" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L264" rel="#L264" style="text-decoration: none; color: rgb(12, 137, 207);"> 264</a><a target=_blank id="L265" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L265" rel="#L265" style="text-decoration: none; color: rgb(12, 137, 207);"> 265</a><a target=_blank id="L266" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L266" rel="#L266" style="text-decoration: none; color: rgb(12, 137, 207);"> 266</a><a target=_blank id="L267" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L267" rel="#L267" style="text-decoration: none; color: rgb(12, 137, 207);"> 267</a><a target=_blank id="L268" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L268" rel="#L268" style="text-decoration: none; color: rgb(12, 137, 207);"> 268</a><a target=_blank id="L269" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L269" rel="#L269" style="text-decoration: none; color: rgb(12, 137, 207);"> 269</a><a target=_blank id="L270" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L270" rel="#L270" style="text-decoration: none; color: rgb(12, 137, 207);"> 270</a><a target=_blank id="L271" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L271" rel="#L271" style="text-decoration: none; color: rgb(12, 137, 207);"> 271</a><a target=_blank id="L272" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L272" rel="#L272" style="text-decoration: none; color: rgb(12, 137, 207);"> 272</a><a target=_blank id="L273" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L273" rel="#L273" style="text-decoration: none; color: rgb(12, 137, 207);"> 273</a><a target=_blank id="L274" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L274" rel="#L274" style="text-decoration: none; color: rgb(12, 137, 207);"> 274</a><a target=_blank id="L275" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L275" rel="#L275" style="text-decoration: none; color: rgb(12, 137, 207);"> 275</a><a target=_blank id="L276" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L276" rel="#L276" style="text-decoration: none; color: rgb(12, 137, 207);"> 276</a><a target=_blank id="L277" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L277" rel="#L277" style="text-decoration: none; color: rgb(12, 137, 207);"> 277</a><a target=_blank id="L278" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L278" rel="#L278" style="text-decoration: none; color: rgb(12, 137, 207);"> 278</a><a target=_blank id="L279" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L279" rel="#L279" style="text-decoration: none; color: rgb(12, 137, 207);"> 279</a><a target=_blank id="L280" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L280" rel="#L280" style="text-decoration: none; color: rgb(12, 137, 207);"> 280</a><a target=_blank id="L281" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L281" rel="#L281" style="text-decoration: none; color: rgb(12, 137, 207);"> 281</a><a target=_blank id="L282" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L282" rel="#L282" style="text-decoration: none; color: rgb(12, 137, 207);"> 282</a><a target=_blank id="L283" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L283" rel="#L283" style="text-decoration: none; color: rgb(12, 137, 207);"> 283</a><a target=_blank id="L284" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L284" rel="#L284" style="text-decoration: none; color: rgb(12, 137, 207);"> 284</a><a target=_blank id="L285" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L285" rel="#L285" style="text-decoration: none; color: rgb(12, 137, 207);"> 285</a><a target=_blank id="L286" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L286" rel="#L286" style="text-decoration: none; color: rgb(12, 137, 207);"> 286</a><a target=_blank id="L287" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L287" rel="#L287" style="text-decoration: none; color: rgb(12, 137, 207);"> 287</a><a target=_blank id="L288" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L288" rel="#L288" style="text-decoration: none; color: rgb(12, 137, 207);"> 288</a><a target=_blank id="L289" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L289" rel="#L289" style="text-decoration: none; color: rgb(12, 137, 207);"> 289</a><a target=_blank id="L290" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L290" rel="#L290" style="text-decoration: none; color: rgb(12, 137, 207);"> 290</a><a target=_blank id="L291" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L291" rel="#L291" style="text-decoration: none; color: rgb(12, 137, 207);"> 291</a><a target=_blank id="L292" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L292" rel="#L292" style="text-decoration: none; color: rgb(12, 137, 207);"> 292</a><a target=_blank id="L293" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L293" rel="#L293" style="text-decoration: none; color: rgb(12, 137, 207);"> 293</a><a target=_blank id="L294" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L294" rel="#L294" style="text-decoration: none; color: rgb(12, 137, 207);"> 294</a><a target=_blank id="L295" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L295" rel="#L295" style="text-decoration: none; color: rgb(12, 137, 207);"> 295</a><a target=_blank id="L296" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L296" rel="#L296" style="text-decoration: none; color: rgb(12, 137, 207);"> 296</a><a target=_blank id="L297" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L297" rel="#L297" style="text-decoration: none; color: rgb(12, 137, 207);"> 297</a><a target=_blank id="L298" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L298" rel="#L298" style="text-decoration: none; color: rgb(12, 137, 207);"> 298</a><a target=_blank id="L299" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L299" rel="#L299" style="text-decoration: none; color: rgb(12, 137, 207);"> 299</a><a target=_blank id="L300" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L300" rel="#L300" style="text-decoration: none; color: rgb(12, 137, 207);"> 300</a><a target=_blank id="L301" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L301" rel="#L301" style="text-decoration: none; color: rgb(12, 137, 207);"> 301</a><a target=_blank id="L302" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L302" rel="#L302" style="text-decoration: none; color: rgb(12, 137, 207);"> 302</a><a target=_blank id="L303" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L303" rel="#L303" style="text-decoration: none; color: rgb(12, 137, 207);"> 303</a><a target=_blank id="L304" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L304" rel="#L304" style="text-decoration: none; color: rgb(12, 137, 207);"> 304</a><a target=_blank id="L305" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L305" rel="#L305" style="text-decoration: none; color: rgb(12, 137, 207);"> 305</a><a target=_blank id="L306" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L306" rel="#L306" style="text-decoration: none; color: rgb(12, 137, 207);"> 306</a><a target=_blank id="L307" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L307" rel="#L307" style="text-decoration: none; color: rgb(12, 137, 207);"> 307</a><a target=_blank id="L308" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L308" rel="#L308" style="text-decoration: none; color: rgb(12, 137, 207);"> 308</a><a target=_blank id="L309" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L309" rel="#L309" style="text-decoration: none; color: rgb(12, 137, 207);"> 309</a><a target=_blank id="L310" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L310" rel="#L310" style="text-decoration: none; color: rgb(12, 137, 207);"> 310</a><a target=_blank id="L311" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L311" rel="#L311" style="text-decoration: none; color: rgb(12, 137, 207);"> 311</a><a target=_blank id="L312" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L312" rel="#L312" style="text-decoration: none; color: rgb(12, 137, 207);"> 312</a><a target=_blank id="L313" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L313" rel="#L313" style="text-decoration: none; color: rgb(12, 137, 207);"> 313</a><a target=_blank id="L314" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L314" rel="#L314" style="text-decoration: none; color: rgb(12, 137, 207);"> 314</a><a target=_blank id="L315" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L315" rel="#L315" style="text-decoration: none; color: rgb(12, 137, 207);"> 315</a><a target=_blank id="L316" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L316" rel="#L316" style="text-decoration: none; color: rgb(12, 137, 207);"> 316</a><a target=_blank id="L317" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L317" rel="#L317" style="text-decoration: none; color: rgb(12, 137, 207);"> 317</a><a target=_blank id="L318" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L318" rel="#L318" style="text-decoration: none; color: rgb(12, 137, 207);"> 318</a><a target=_blank id="L319" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L319" rel="#L319" style="text-decoration: none; color: rgb(12, 137, 207);"> 319</a><a target=_blank id="L320" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L320" rel="#L320" style="text-decoration: none; color: rgb(12, 137, 207);"> 320</a><a target=_blank id="L321" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L321" rel="#L321" style="text-decoration: none; color: rgb(12, 137, 207);"> 321</a><a target=_blank id="L322" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L322" rel="#L322" style="text-decoration: none; color: rgb(12, 137, 207);"> 322</a><a target=_blank id="L323" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L323" rel="#L323" style="text-decoration: none; color: rgb(12, 137, 207);"> 323</a><a target=_blank id="L324" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L324" rel="#L324" style="text-decoration: none; color: rgb(12, 137, 207);"> 324</a><a target=_blank id="L325" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L325" rel="#L325" style="text-decoration: none; color: rgb(12, 137, 207);"> 325</a><a target=_blank id="L326" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L326" rel="#L326" style="text-decoration: none; color: rgb(12, 137, 207);"> 326</a><a target=_blank id="L327" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L327" rel="#L327" style="text-decoration: none; color: rgb(12, 137, 207);"> 327</a><a target=_blank id="L328" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L328" rel="#L328" style="text-decoration: none; color: rgb(12, 137, 207);"> 328</a><a target=_blank id="L329" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L329" rel="#L329" style="text-decoration: none; color: rgb(12, 137, 207);"> 329</a><a target=_blank id="L330" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L330" rel="#L330" style="text-decoration: none; color: rgb(12, 137, 207);"> 330</a><a target=_blank id="L331" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L331" rel="#L331" style="text-decoration: none; color: rgb(12, 137, 207);"> 331</a><a target=_blank id="L332" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L332" rel="#L332" style="text-decoration: none; color: rgb(12, 137, 207);"> 332</a><a target=_blank id="L333" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L333" rel="#L333" style="text-decoration: none; color: rgb(12, 137, 207);"> 333</a><a target=_blank id="L334" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L334" rel="#L334" style="text-decoration: none; color: rgb(12, 137, 207);"> 334</a><a target=_blank id="L335" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L335" rel="#L335" style="text-decoration: none; color: rgb(12, 137, 207);"> 335</a><a target=_blank id="L336" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L336" rel="#L336" style="text-decoration: none; color: rgb(12, 137, 207);"> 336</a><a target=_blank id="L337" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L337" rel="#L337" style="text-decoration: none; color: rgb(12, 137, 207);"> 337</a><a target=_blank id="L338" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L338" rel="#L338" style="text-decoration: none; color: rgb(12, 137, 207);"> 338</a><a target=_blank id="L339" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L339" rel="#L339" style="text-decoration: none; color: rgb(12, 137, 207);"> 339</a><a target=_blank id="L340" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L340" rel="#L340" style="text-decoration: none; color: rgb(12, 137, 207);"> 340</a><a target=_blank id="L341" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L341" rel="#L341" style="text-decoration: none; color: rgb(12, 137, 207);"> 341</a><a target=_blank id="L342" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L342" rel="#L342" style="text-decoration: none; color: rgb(12, 137, 207);"> 342</a><a target=_blank id="L343" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L343" rel="#L343" style="text-decoration: none; color: rgb(12, 137, 207);"> 343</a><a target=_blank id="L344" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L344" rel="#L344" style="text-decoration: none; color: rgb(12, 137, 207);"> 344</a><a target=_blank id="L345" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L345" rel="#L345" style="text-decoration: none; color: rgb(12, 137, 207);"> 345</a><a target=_blank id="L346" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L346" rel="#L346" style="text-decoration: none; color: rgb(12, 137, 207);"> 346</a><a target=_blank id="L347" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L347" rel="#L347" style="text-decoration: none; color: rgb(12, 137, 207);"> 347</a><a target=_blank id="L348" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L348" rel="#L348" style="text-decoration: none; color: rgb(12, 137, 207);"> 348</a><a target=_blank id="L349" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L349" rel="#L349" style="text-decoration: none; color: rgb(12, 137, 207);"> 349</a><a target=_blank id="L350" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L350" rel="#L350" style="text-decoration: none; color: rgb(12, 137, 207);"> 350</a><a target=_blank id="L351" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L351" rel="#L351" style="text-decoration: none; color: rgb(12, 137, 207);"> 351</a><a target=_blank id="L352" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L352" rel="#L352" style="text-decoration: none; color: rgb(12, 137, 207);"> 352</a><a target=_blank id="L353" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L353" rel="#L353" style="text-decoration: none; color: rgb(12, 137, 207);"> 353</a><a target=_blank id="L354" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L354" rel="#L354" style="text-decoration: none; color: rgb(12, 137, 207);"> 354</a><a target=_blank id="L355" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L355" rel="#L355" style="text-decoration: none; color: rgb(12, 137, 207);"> 355</a><a target=_blank id="L356" href="http://blog.csdn.net/qq_17191653/article/details/52252241#L356" rel="#L356" style="text-decoration: none; color: rgb(12, 137, 207);"> 356</a>
package ;
import java.io.InputStream;
import java.io.Writer;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import cn.com.wkt.weixin.bean.TextMessage;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.core.util.QuickWriter;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XppDriver;
public class MessageUtil {
/**
* 返回消息类型:文本
*/
public static final String RESP_MESSAGE_TYPE_TEXT = "text";
/**
* 返回消息类型:音乐
*/
public static final String RESP_MESSAGE_TYPE_MUSIC = "music";
/**
* 返回消息类型:图文
*/
public static final String RESP_MESSAGE_TYPE_NEWS = "news";
/**
* 请求消息类型:文本
*/
public static final String REQ_MESSAGE_TYPE_TEXT = "text";
/**
* 请求消息类型:图片
*/
public static final String REQ_MESSAGE_TYPE_IMAGE = "image";
/**
* 请求消息类型:链接
*/
public static final String REQ_MESSAGE_TYPE_LINK = "link";
/**
* 请求消息类型:地理位置
*/
public static final String REQ_MESSAGE_TYPE_LOCATION = "location";
/**
* 请求消息类型:音频
*/
public static final String REQ_MESSAGE_TYPE_VOICE = "voice";
/**
* 请求消息类型:推送
*/
public static final String REQ_MESSAGE_TYPE_EVENT = "event";
/**
* 事件类型:subscribe(订阅)
*/
public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";
/**
* 事件类型:unsubscribe(取消订阅)
*/
public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";
/**
* 事件类型:CLICK(自己定义菜单点击事件)
*/
public static final String EVENT_TYPE_CLICK = "CLICK";
//定义一个私有的静态全局变量来保存该类的唯一实例
private static MessageUtil messageUtil;
/// 构造函数必须是私有的
/// 这样在外部便无法使用 new 来创建该类的实例
private MessageUtil()
{
}
/// 定义一个全局访问点
/// 设置为静态方法
/// 则在类的外部便无需实例化就可以调用该方法
public static MessageUtil getInstance()
{
//这里可以保证只实例化一次
//即在第一次调用时实例化
//以后调用便不会再实例化
if ( messageUtil == null)
{
messageUtil = new MessageUtil();
}
return messageUtil;
}
/**
* 解析微信发来的请求(XML)
*
* @param request
* @return
* @throws Exception
*/
public static Map<String, String> parseXml(HttpServletRequest request) throws Exception {
// 将解析结果存储在HashMap中
Map<String, String> map = new HashMap<String, String>();
// 从request中取得输入流
InputStream inputStream = request.getInputStream();
// 读取输入流
SAXReader reader = new SAXReader();
Document document = reader.read(inputStream);
String requestXml = document.asXML();
String subXml = requestXml.split(">")[0]+">";
requestXml = requestXml.substring(subXml.length());
// 得到xml根元素
Element root = document.getRootElement();
// 得到根元素的全部子节点
List<Element> elementList = root.elements();
// 遍历全部子节点
for (Element e : elementList) {
map.put(e.getName(), e.getText());
}
map.put("requestXml", requestXml);
// 释放资源
inputStream.close();
inputStream = null;
return map;
}
/**
* 将请求的数据转化xml
* @param request
* @return
*/
public String parseMsgXml(HttpServletRequest request){
String responseMsg = null;
try {
InputStream is = request.getInputStream();
int size = is.available();
byte[] jsonBytes = new byte[size];
is.read(jsonBytes);
responseMsg = new String(jsonBytes, "UTF-8");
is.close();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return responseMsg ;
}
/**
* 文本消息对象转换成xml
*
* @param textMessage 文本消息对象
* @return xml
*/
public static String textMessageToXml(TextMessage textMessage) {
xstream.alias("xml", textMessage.getClass());
return xstream.toXML(textMessage);
}
/**
* 音乐消息对象转换成xml
*
* @param musicMessage 音乐消息对象
* @return xml
*/
// public String musicMessageToXml(MusicMessage musicMessage) {
//
// xstream.alias("xml", musicMessage.getClass());
//
// return xstream.toXML(musicMessage);
//
// }
/**
* 图文消息对象转换成xml
* @param newsMessage 图文消息对象
* @return xml
*/
// public String newsMessageToXml(NewsMessage newsMessage) {
//
// xstream.alias("xml", newsMessage.getClass());
//
// xstream.alias("item", new Article().getClass());
//
// return xstream.toXML(newsMessage);
//
// }
/**
* 扩展xstream,使其支持CDATA块
*
* @date 2013-05-19
*/
private static XStream xstream = new XStream(new XppDriver(){
public HierarchicalStreamWriter createWriter(Writer out) {
return new PrettyPrintWriter(out){
// 对所有xml节点的转换都增加CDATA标记
boolean cdata = true;
@SuppressWarnings("rawtypes")
public void startNode(String name, Class clazz) {
super.startNode(name, clazz);
}
protected void writeText(QuickWriter writer, String text) {
if (cdata) {
writer.write("<![CDATA[");
writer.write(text);
writer.write("]]>");
} else {
writer.write(text);
}
}
};
};
});
}
 来自CODE的代码片
snippet_file_0.txt

总结:
1、没有启动服务器配置,所有无法接收到微信服务端发来的请求
2、代码太乱,不过已经实现了自身需要的功能。
0 0
原创粉丝点击