// Path: src/main/java/org/myazure/weixin/constant/MyazureConstants.java
// public class MyazureConstants {
// 	public static final String LOG_SPLIT_LINE = "========================MYAZURE====SPLIT====LINE========================";
// 	public static final String MYAZURE_WEIXIN_ADMIN_APPID="wx86c66f041e334ba4";
// 	public static final String MYAZURE_WEIXIN_ADMIN_APPSECRET="dbee2c24cc0dd3c8bb0805de2f4e4606";
// 	public static final String MYAZURE_WEIXIN_ADMIN_OPENID="o14wavxo7TN_zRBDD3c-mIigYR4U";
// 	
// 	public static String MYAZURE_SERVER_ID;
// 	public static String MYAZURE_APP_ID;
// 	public static String MYAZURE_APP_SECRET;
// 	public static String MYAZURE_ENCODE_TOKEN;
// 	public static String MYAZURE_ENCODE_KEY;
// 	public static String MYAZURE_APP_URL;
// 	public static String MYAZURE_COMPONENT_VERIFY_TICKET;
// 	public static String MYAZURE_COMPONENT_ACCESS_TOKEN;
// 	public static String MYAZURE_PRE_AUTH_CODE;
// 	public static WXBizMsgCrypt MYAZUZRE_WXBIZMSGCRYPT;
// 	
// 	public static final String ERR_OA_NOT_FOUNDED="OfficalAccountNotFound";
// 	
// }
// 
// Path: src/main/java/org/myazure/weixin/constant/WeixinConstans.java
// public class WeixinConstans {
// 	public static ExpireKey expireKey = new DefaultExpireKey();
// 	public static final String BASE_WEIXIN_API_URI = "https://api.weixin.qq.com";
// 	public static final String PARAM_ACCESS_TOKEN = "access_token";
// 	public static final String TOKEN_STRING = "token";
// 	public static final String COMPONENT_ACCESS_TOKEN_KEY = "component.access.token";
// 	public static final String PRE_AUTH_CODE_KEY = "pre.auth.code";
// 	public static final String AUTHORIZER_ACCESS_TOKEN_KEY = "authorizer.access.token";
// 	public static final String AUTHORIZER_REFRESH_TOKEN_KEY = "authorizer.refresh.token";
// 	// WECHAT MSG INFO
// 	public static final int FUNCTION_MSG_MANAGEMENT = 1;// 消息管理权限
// 	public static final int FUNCTION_USER_MANAGEMENT = 2;
// 	public static final int FUNCTION_ACCOUNT_SERVICE_MANAGEMENT = 3;
// 	public static final int FUNCTION_WEB_SERVICE_MANAGEMENT = 4;
// 	public static final int FUNCTION_WEIXIN_STORE_MANAGEMENT = 5;
// 	public static final int FUNCTION_VICTOR_CUSTORMER_SERVICE_MANAGEMENT = 6;
// 	public static final int FUNCTION_MASS_NOTIFICATION_MANAGEMENT = 7;
// 	public static final int FUNCTION_WEIXIN_CARD_MANAGEMENT = 8;
// 	public static final int FUNCTION_SWEEP_MANAGEMENT = 9;
// 	public static final int FUNCTION_EVEN_FIWI_MANAGEMENT = 10;
// 	public static final int FUNCTION_MATERIAL_MANAGEMENT = 11;
// 	public static final int FUNCTION_WECHAT_SHAKE_PERIPHERAL_MANAGEMENT = 12;
// 	public static final int FUNCTION_WECHAT_STORE_MANAGEMENT = 13;
// 	public static final int FUNCTION_PAYMENT_MANAGEMENT = 14;
// 	public static final int FUNCTION_CUSTOM_MENU_MANAGEMENT = 15;
// }


import org.myazure.weixin.constant.MyazureConstants;
import org.myazure.weixin.constant.WeixinConstans;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import weixin.popular.bean.component.ComponentReceiveXML;
package org.myazure.weixin.handlers;


/**
 * 
 * @author WangZhen
 *
 */
public class VerifyTicketHandler {
	private static final Logger LOG = LoggerFactory.getLogger(VerifyTicketHandler.class);
	@Autowired
	private     StringRedisTemplate redisTemplate;
	
	@Autowired
	private     AuthorizeHandler authorizeHandler;
	
	/**
	 * 刷新凭证
	 * 
	 * @param eventMessage
	 */
// Path: src/main/java/org/myazure/weixin/constant/MyazureConstants.java
// public class MyazureConstants {
// 	public static final String LOG_SPLIT_LINE = "========================MYAZURE====SPLIT====LINE========================";
// 	public static final String MYAZURE_WEIXIN_ADMIN_APPID="wx86c66f041e334ba4";
// 	public static final String MYAZURE_WEIXIN_ADMIN_APPSECRET="dbee2c24cc0dd3c8bb0805de2f4e4606";
// 	public static final String MYAZURE_WEIXIN_ADMIN_OPENID="o14wavxo7TN_zRBDD3c-mIigYR4U";
// 	
// 	public static String MYAZURE_SERVER_ID;
// 	public static String MYAZURE_APP_ID;
// 	public static String MYAZURE_APP_SECRET;
// 	public static String MYAZURE_ENCODE_TOKEN;
// 	public static String MYAZURE_ENCODE_KEY;
// 	public static String MYAZURE_APP_URL;
// 	public static String MYAZURE_COMPONENT_VERIFY_TICKET;
// 	public static String MYAZURE_COMPONENT_ACCESS_TOKEN;
// 	public static String MYAZURE_PRE_AUTH_CODE;
// 	public static WXBizMsgCrypt MYAZUZRE_WXBIZMSGCRYPT;
// 	
// 	public static final String ERR_OA_NOT_FOUNDED="OfficalAccountNotFound";
// 	
// }
// 
// Path: src/main/java/org/myazure/weixin/constant/WeixinConstans.java
// public class WeixinConstans {
// 	public static ExpireKey expireKey = new DefaultExpireKey();
// 	public static final String BASE_WEIXIN_API_URI = "https://api.weixin.qq.com";
// 	public static final String PARAM_ACCESS_TOKEN = "access_token";
// 	public static final String TOKEN_STRING = "token";
// 	public static final String COMPONENT_ACCESS_TOKEN_KEY = "component.access.token";
// 	public static final String PRE_AUTH_CODE_KEY = "pre.auth.code";
// 	public static final String AUTHORIZER_ACCESS_TOKEN_KEY = "authorizer.access.token";
// 	public static final String AUTHORIZER_REFRESH_TOKEN_KEY = "authorizer.refresh.token";
// 	// WECHAT MSG INFO
// 	public static final int FUNCTION_MSG_MANAGEMENT = 1;// 消息管理权限
// 	public static final int FUNCTION_USER_MANAGEMENT = 2;
// 	public static final int FUNCTION_ACCOUNT_SERVICE_MANAGEMENT = 3;
// 	public static final int FUNCTION_WEB_SERVICE_MANAGEMENT = 4;
// 	public static final int FUNCTION_WEIXIN_STORE_MANAGEMENT = 5;
// 	public static final int FUNCTION_VICTOR_CUSTORMER_SERVICE_MANAGEMENT = 6;
// 	public static final int FUNCTION_MASS_NOTIFICATION_MANAGEMENT = 7;
// 	public static final int FUNCTION_WEIXIN_CARD_MANAGEMENT = 8;
// 	public static final int FUNCTION_SWEEP_MANAGEMENT = 9;
// 	public static final int FUNCTION_EVEN_FIWI_MANAGEMENT = 10;
// 	public static final int FUNCTION_MATERIAL_MANAGEMENT = 11;
// 	public static final int FUNCTION_WECHAT_SHAKE_PERIPHERAL_MANAGEMENT = 12;
// 	public static final int FUNCTION_WECHAT_STORE_MANAGEMENT = 13;
// 	public static final int FUNCTION_PAYMENT_MANAGEMENT = 14;
// 	public static final int FUNCTION_CUSTOM_MENU_MANAGEMENT = 15;
// }


// Path: src/main/java/org/myazure/weixin/handlers/VerifyTicketHandler.java
import org.myazure.weixin.constant.MyazureConstants;
import org.myazure.weixin.constant.WeixinConstans;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import weixin.popular.bean.component.ComponentReceiveXML;

package org.myazure.weixin.handlers;


/**
 * 
 * @author WangZhen
 *
 */
public class VerifyTicketHandler {
	private static final Logger LOG = LoggerFactory.getLogger(VerifyTicketHandler.class);
	@Autowired
	private     StringRedisTemplate redisTemplate;
	
	@Autowired
	private     AuthorizeHandler authorizeHandler;
	
	/**
	 * 刷新凭证
	 * 
	 * @param eventMessage
	 */
	public   void refreshVerifyTicket(ComponentReceiveXML eventMessage) {