mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 10:38:42 +08:00 
			
		
		
		
	修复开放平台拼写错误的方法名 updateComponentAccessTokent
This commit is contained in:
		| @ -37,7 +37,7 @@ public interface WxOpenConfigStorage { | |||||||
|  |  | ||||||
|   void expireComponentAccessToken(); |   void expireComponentAccessToken(); | ||||||
|  |  | ||||||
|   void updateComponentAccessTokent(WxOpenComponentAccessToken componentAccessToken); |   void updateComponentAccessToken(WxOpenComponentAccessToken componentAccessToken); | ||||||
|  |  | ||||||
|   String getHttpProxyHost(); |   String getHttpProxyHost(); | ||||||
|  |  | ||||||
| @ -59,7 +59,7 @@ public interface WxOpenConfigStorage { | |||||||
|    * @param componentAccessToken 新的accessToken值 |    * @param componentAccessToken 新的accessToken值 | ||||||
|    * @param expiresInSeconds     过期时间,以秒为单位 |    * @param expiresInSeconds     过期时间,以秒为单位 | ||||||
|    */ |    */ | ||||||
|   void updateComponentAccessTokent(String componentAccessToken, int expiresInSeconds); |   void updateComponentAccessToken(String componentAccessToken, int expiresInSeconds); | ||||||
|  |  | ||||||
|   /** |   /** | ||||||
|    * 是否自动刷新token |    * 是否自动刷新token | ||||||
|  | |||||||
| @ -124,7 +124,7 @@ public class WxOpenComponentServiceImpl implements WxOpenComponentService { | |||||||
|  |  | ||||||
|       String responseContent = this.getWxOpenService().post(API_COMPONENT_TOKEN_URL, jsonObject.toString()); |       String responseContent = this.getWxOpenService().post(API_COMPONENT_TOKEN_URL, jsonObject.toString()); | ||||||
|       WxOpenComponentAccessToken componentAccessToken = WxOpenComponentAccessToken.fromJson(responseContent); |       WxOpenComponentAccessToken componentAccessToken = WxOpenComponentAccessToken.fromJson(responseContent); | ||||||
|       getWxOpenConfigStorage().updateComponentAccessTokent(componentAccessToken); |       getWxOpenConfigStorage().updateComponentAccessToken(componentAccessToken); | ||||||
|     } |     } | ||||||
|     return this.getWxOpenConfigStorage().getComponentAccessToken(); |     return this.getWxOpenConfigStorage().getComponentAccessToken(); | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -108,8 +108,8 @@ public class WxOpenInMemoryConfigStorage implements WxOpenConfigStorage { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   public void updateComponentAccessTokent(WxOpenComponentAccessToken componentAccessToken) { |   public void updateComponentAccessToken(WxOpenComponentAccessToken componentAccessToken) { | ||||||
|     updateComponentAccessTokent(componentAccessToken.getComponentAccessToken(), componentAccessToken.getExpiresIn()); |     updateComponentAccessToken(componentAccessToken.getComponentAccessToken(), componentAccessToken.getExpiresIn()); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
| @ -168,7 +168,7 @@ public class WxOpenInMemoryConfigStorage implements WxOpenConfigStorage { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   public void updateComponentAccessTokent(String componentAccessToken, int expiresInSeconds) { |   public void updateComponentAccessToken(String componentAccessToken, int expiresInSeconds) { | ||||||
|     this.componentAccessToken = componentAccessToken; |     this.componentAccessToken = componentAccessToken; | ||||||
|     this.componentExpiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L; |     this.componentExpiresTime = System.currentTimeMillis() + (expiresInSeconds - 200) * 1000L; | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -91,7 +91,7 @@ public class WxOpenInRedisConfigStorage extends WxOpenInMemoryConfigStorage { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   public void updateComponentAccessTokent(String componentAccessToken, int expiresInSeconds) { |   public void updateComponentAccessToken(String componentAccessToken, int expiresInSeconds) { | ||||||
|     try (Jedis jedis = this.jedisPool.getResource()) { |     try (Jedis jedis = this.jedisPool.getResource()) { | ||||||
|       jedis.setex(this.componentAccessTokenKey, expiresInSeconds - 200, componentAccessToken); |       jedis.setex(this.componentAccessTokenKey, expiresInSeconds - 200, componentAccessToken); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -76,6 +76,7 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ | |||||||
|    * @return |    * @return | ||||||
|    * @throws WxErrorException |    * @throws WxErrorException | ||||||
|    */ |    */ | ||||||
|  |   @Override | ||||||
|   public WxOpenMaDomainResult modifyDomain(String action, List<String> requestdomainList, List<String> wsrequestdomainList, List<String> uploaddomainList, List<String> downloaddomainList) throws WxErrorException { |   public WxOpenMaDomainResult modifyDomain(String action, List<String> requestdomainList, List<String> wsrequestdomainList, List<String> uploaddomainList, List<String> downloaddomainList) throws WxErrorException { | ||||||
|  |  | ||||||
| //    if (!"get".equals(action) && (requestdomainList == null || wsrequestdomainList == null || uploaddomainList == null || downloaddomainList == null)) { | //    if (!"get".equals(action) && (requestdomainList == null || wsrequestdomainList == null || uploaddomainList == null || downloaddomainList == null)) { | ||||||
| @ -252,6 +253,7 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ | |||||||
|    * @return |    * @return | ||||||
|    * @throws WxErrorException |    * @throws WxErrorException | ||||||
|    */ |    */ | ||||||
|  |   @Override | ||||||
|   public WxOpenMaSubmitAuditResult submitAudit(WxOpenMaSubmitAuditMessage submitAuditMessage) throws WxErrorException { |   public WxOpenMaSubmitAuditResult submitAudit(WxOpenMaSubmitAuditMessage submitAuditMessage) throws WxErrorException { | ||||||
|     String response = post(API_SUBMIT_AUDIT, GSON.toJson(submitAuditMessage)); |     String response = post(API_SUBMIT_AUDIT, GSON.toJson(submitAuditMessage)); | ||||||
|     return WxMaGsonBuilder.create().fromJson(response, WxOpenMaSubmitAuditResult.class); |     return WxMaGsonBuilder.create().fromJson(response, WxOpenMaSubmitAuditResult.class); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang