44import me .chanjar .weixin .common .api .WxOcrService ;
55import me .chanjar .weixin .common .bean .WxJsapiSignature ;
66import me .chanjar .weixin .common .bean .WxNetCheckResult ;
7+ import me .chanjar .weixin .common .enums .TicketType ;
78import me .chanjar .weixin .common .error .WxErrorException ;
89import me .chanjar .weixin .common .service .WxService ;
910import me .chanjar .weixin .common .util .http .MediaUploadRequestExecutor ;
1516import me .chanjar .weixin .mp .bean .result .WxMpSemanticQueryResult ;
1617import me .chanjar .weixin .mp .bean .result .WxMpUser ;
1718import me .chanjar .weixin .mp .config .WxMpConfigStorage ;
18- import me .chanjar .weixin .common .enums .TicketType ;
1919import me .chanjar .weixin .mp .enums .WxMpApiUrl ;
2020
2121import java .util .Map ;
@@ -32,9 +32,9 @@ public interface WxMpService extends WxService {
3232 * 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN
3333 * </pre>
3434 *
35+ * @param timestamp 时间戳
3536 * @param nonce 随机串
3637 * @param signature 签名
37- * @param timestamp 时间戳
3838 * @return 是否验证通过
3939 */
4040 boolean checkSignature (String timestamp , String nonce , String signature );
@@ -82,8 +82,8 @@ public interface WxMpService extends WxService {
8282 * 获得时会检查 Token是否过期,如果过期了,那么就刷新一下,否则就什么都不干
8383 * </pre>
8484 *
85- * @param forceRefresh 强制刷新
8685 * @param type ticket类型
86+ * @param forceRefresh 强制刷新
8787 * @return ticket
8888 * @throws WxErrorException .
8989 */
@@ -156,12 +156,12 @@ public interface WxMpService extends WxService {
156156 * URL格式为:https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
157157 * </pre>
158158 *
159- * @param redirectURI 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
159+ * @param redirectUri 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
160160 * @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔,网页应用目前仅填写snsapi_login即可
161161 * @param state 非必填,用于保持请求和回调的状态,授权请求后原样带回给第三方。该参数可用于防止csrf攻击(跨站请求伪造攻击),建议第三方带上该参数,可设置为简单的随机数加session进行校验
162- * @return url
162+ * @return url string
163163 */
164- String buildQrConnectUrl (String redirectURI , String scope , String state );
164+ String buildQrConnectUrl (String redirectUri , String scope , String state );
165165
166166 /**
167167 * <pre>
@@ -172,8 +172,10 @@ public interface WxMpService extends WxService {
172172 * @param redirectURI 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
173173 * @param scope scope
174174 * @param state state
175- * @return url
175+ * @return url string
176+ * @deprecated use oauth2Service.buildAuthorizationUrl() instead
176177 */
178+ @ Deprecated
177179 String oauth2buildAuthorizationUrl (String redirectURI , String scope , String state );
178180
179181 /**
@@ -186,6 +188,7 @@ public interface WxMpService extends WxService {
186188 * @return token对象
187189 * @throws WxErrorException .
188190 */
191+ @ Deprecated
189192 WxMpOAuth2AccessToken oauth2getAccessToken (String code ) throws WxErrorException ;
190193
191194 /**
@@ -197,6 +200,7 @@ public interface WxMpService extends WxService {
197200 * @return 新的token对象
198201 * @throws WxErrorException .
199202 */
203+ @ Deprecated
200204 WxMpOAuth2AccessToken oauth2refreshAccessToken (String refreshToken ) throws WxErrorException ;
201205
202206 /**
@@ -209,6 +213,7 @@ public interface WxMpService extends WxService {
209213 * @return 用户对象
210214 * @throws WxErrorException .
211215 */
216+ @ Deprecated
212217 WxMpUser oauth2getUserInfo (WxMpOAuth2AccessToken oAuth2AccessToken , String lang ) throws WxErrorException ;
213218
214219 /**
@@ -219,6 +224,7 @@ public interface WxMpService extends WxService {
219224 * @param oAuth2AccessToken token对象
220225 * @return 是否有效
221226 */
227+ @ Deprecated
222228 boolean oauth2validateAccessToken (WxMpOAuth2AccessToken oAuth2AccessToken );
223229
224230 /**
@@ -276,6 +282,7 @@ public interface WxMpService extends WxService {
276282 * </pre>
277283 *
278284 * @param appid 公众号的APPID
285+ * @throws WxErrorException the wx error exception
279286 */
280287 void clearQuota (String appid ) throws WxErrorException ;
281288
@@ -286,9 +293,11 @@ public interface WxMpService extends WxService {
286293 * 可以参考,{@link MediaUploadRequestExecutor}的实现方法
287294 * </pre>
288295 *
289- * @param data 参数数据
296+ * @param <T> the type parameter
297+ * @param <E> the type parameter
290298 * @param executor 执行器
291299 * @param url 接口地址
300+ * @param data 参数数据
292301 * @return 结果
293302 * @throws WxErrorException 异常
294303 */
@@ -297,8 +306,8 @@ public interface WxMpService extends WxService {
297306 /**
298307 * 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求.
299308 *
300- * @param queryParam 参数
301309 * @param url 请求接口地址
310+ * @param queryParam 参数
302311 * @return 接口响应字符串
303312 * @throws WxErrorException 异常
304313 */
@@ -307,8 +316,8 @@ public interface WxMpService extends WxService {
307316 /**
308317 * 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的POST请求.
309318 *
310- * @param postData 请求参数json值
311319 * @param url 请求接口地址
320+ * @param postData 请求参数json值
312321 * @return 接口响应字符串
313322 * @throws WxErrorException 异常
314323 */
@@ -321,9 +330,11 @@ public interface WxMpService extends WxService {
321330 * 可以参考,{@link MediaUploadRequestExecutor}的实现方法
322331 * </pre>
323332 *
324- * @param data 参数数据
333+ * @param <T> the type parameter
334+ * @param <E> the type parameter
325335 * @param executor 执行器
326336 * @param url 接口地址
337+ * @param data 参数数据
327338 * @return 结果
328339 * @throws WxErrorException 异常
329340 */
@@ -597,16 +608,16 @@ public interface WxMpService extends WxService {
597608 /**
598609 * .
599610 *
600- * @param tagService .
611+ * @param userTagService .
601612 */
602- void setTagService (WxMpUserTagService tagService );
613+ void setUserTagService (WxMpUserTagService userTagService );
603614
604615 /**
605616 * .
606617 *
607- * @param qrCodeService .
618+ * @param qrcodeService .
608619 */
609- void setQrCodeService (WxMpQrcodeService qrCodeService );
620+ void setQrcodeService (WxMpQrcodeService qrcodeService );
610621
611622 /**
612623 * .
@@ -712,4 +723,18 @@ public interface WxMpService extends WxService {
712723 * @param commentService .
713724 */
714725 void setCommentService (WxMpCommentService commentService );
726+
727+ /**
728+ * Gets oauth2 service.
729+ *
730+ * @return the oauth2 service
731+ */
732+ WxOAuth2Service getOAuth2Service ();
733+
734+ /**
735+ * Sets oauth2Service.
736+ *
737+ * @param oAuth2Service the o auth 2 service
738+ */
739+ void setOAuth2Service (WxOAuth2Service oAuth2Service );
715740}
0 commit comments