4
4
import me .chanjar .weixin .common .api .WxOcrService ;
5
5
import me .chanjar .weixin .common .bean .WxJsapiSignature ;
6
6
import me .chanjar .weixin .common .bean .WxNetCheckResult ;
7
+ import me .chanjar .weixin .common .enums .TicketType ;
7
8
import me .chanjar .weixin .common .error .WxErrorException ;
8
9
import me .chanjar .weixin .common .service .WxService ;
9
10
import me .chanjar .weixin .common .util .http .MediaUploadRequestExecutor ;
15
16
import me .chanjar .weixin .mp .bean .result .WxMpSemanticQueryResult ;
16
17
import me .chanjar .weixin .mp .bean .result .WxMpUser ;
17
18
import me .chanjar .weixin .mp .config .WxMpConfigStorage ;
18
- import me .chanjar .weixin .common .enums .TicketType ;
19
19
import me .chanjar .weixin .mp .enums .WxMpApiUrl ;
20
20
21
21
import java .util .Map ;
@@ -32,9 +32,9 @@ public interface WxMpService extends WxService {
32
32
* 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN
33
33
* </pre>
34
34
*
35
+ * @param timestamp 时间戳
35
36
* @param nonce 随机串
36
37
* @param signature 签名
37
- * @param timestamp 时间戳
38
38
* @return 是否验证通过
39
39
*/
40
40
boolean checkSignature (String timestamp , String nonce , String signature );
@@ -82,8 +82,8 @@ public interface WxMpService extends WxService {
82
82
* 获得时会检查 Token是否过期,如果过期了,那么就刷新一下,否则就什么都不干
83
83
* </pre>
84
84
*
85
- * @param forceRefresh 强制刷新
86
85
* @param type ticket类型
86
+ * @param forceRefresh 强制刷新
87
87
* @return ticket
88
88
* @throws WxErrorException .
89
89
*/
@@ -156,12 +156,12 @@ public interface WxMpService extends WxService {
156
156
* URL格式为:https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
157
157
* </pre>
158
158
*
159
- * @param redirectURI 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
159
+ * @param redirectUri 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
160
160
* @param scope 应用授权作用域,拥有多个作用域用逗号(,)分隔,网页应用目前仅填写snsapi_login即可
161
161
* @param state 非必填,用于保持请求和回调的状态,授权请求后原样带回给第三方。该参数可用于防止csrf攻击(跨站请求伪造攻击),建议第三方带上该参数,可设置为简单的随机数加session进行校验
162
- * @return url
162
+ * @return url string
163
163
*/
164
- String buildQrConnectUrl (String redirectURI , String scope , String state );
164
+ String buildQrConnectUrl (String redirectUri , String scope , String state );
165
165
166
166
/**
167
167
* <pre>
@@ -172,8 +172,10 @@ public interface WxMpService extends WxService {
172
172
* @param redirectURI 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
173
173
* @param scope scope
174
174
* @param state state
175
- * @return url
175
+ * @return url string
176
+ * @deprecated use oauth2Service.buildAuthorizationUrl() instead
176
177
*/
178
+ @ Deprecated
177
179
String oauth2buildAuthorizationUrl (String redirectURI , String scope , String state );
178
180
179
181
/**
@@ -186,6 +188,7 @@ public interface WxMpService extends WxService {
186
188
* @return token对象
187
189
* @throws WxErrorException .
188
190
*/
191
+ @ Deprecated
189
192
WxMpOAuth2AccessToken oauth2getAccessToken (String code ) throws WxErrorException ;
190
193
191
194
/**
@@ -197,6 +200,7 @@ public interface WxMpService extends WxService {
197
200
* @return 新的token对象
198
201
* @throws WxErrorException .
199
202
*/
203
+ @ Deprecated
200
204
WxMpOAuth2AccessToken oauth2refreshAccessToken (String refreshToken ) throws WxErrorException ;
201
205
202
206
/**
@@ -209,6 +213,7 @@ public interface WxMpService extends WxService {
209
213
* @return 用户对象
210
214
* @throws WxErrorException .
211
215
*/
216
+ @ Deprecated
212
217
WxMpUser oauth2getUserInfo (WxMpOAuth2AccessToken oAuth2AccessToken , String lang ) throws WxErrorException ;
213
218
214
219
/**
@@ -219,6 +224,7 @@ public interface WxMpService extends WxService {
219
224
* @param oAuth2AccessToken token对象
220
225
* @return 是否有效
221
226
*/
227
+ @ Deprecated
222
228
boolean oauth2validateAccessToken (WxMpOAuth2AccessToken oAuth2AccessToken );
223
229
224
230
/**
@@ -276,6 +282,7 @@ public interface WxMpService extends WxService {
276
282
* </pre>
277
283
*
278
284
* @param appid 公众号的APPID
285
+ * @throws WxErrorException the wx error exception
279
286
*/
280
287
void clearQuota (String appid ) throws WxErrorException ;
281
288
@@ -286,9 +293,11 @@ public interface WxMpService extends WxService {
286
293
* 可以参考,{@link MediaUploadRequestExecutor}的实现方法
287
294
* </pre>
288
295
*
289
- * @param data 参数数据
296
+ * @param <T> the type parameter
297
+ * @param <E> the type parameter
290
298
* @param executor 执行器
291
299
* @param url 接口地址
300
+ * @param data 参数数据
292
301
* @return 结果
293
302
* @throws WxErrorException 异常
294
303
*/
@@ -297,8 +306,8 @@ public interface WxMpService extends WxService {
297
306
/**
298
307
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求.
299
308
*
300
- * @param queryParam 参数
301
309
* @param url 请求接口地址
310
+ * @param queryParam 参数
302
311
* @return 接口响应字符串
303
312
* @throws WxErrorException 异常
304
313
*/
@@ -307,8 +316,8 @@ public interface WxMpService extends WxService {
307
316
/**
308
317
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的POST请求.
309
318
*
310
- * @param postData 请求参数json值
311
319
* @param url 请求接口地址
320
+ * @param postData 请求参数json值
312
321
* @return 接口响应字符串
313
322
* @throws WxErrorException 异常
314
323
*/
@@ -321,9 +330,11 @@ public interface WxMpService extends WxService {
321
330
* 可以参考,{@link MediaUploadRequestExecutor}的实现方法
322
331
* </pre>
323
332
*
324
- * @param data 参数数据
333
+ * @param <T> the type parameter
334
+ * @param <E> the type parameter
325
335
* @param executor 执行器
326
336
* @param url 接口地址
337
+ * @param data 参数数据
327
338
* @return 结果
328
339
* @throws WxErrorException 异常
329
340
*/
@@ -597,16 +608,16 @@ public interface WxMpService extends WxService {
597
608
/**
598
609
* .
599
610
*
600
- * @param tagService .
611
+ * @param userTagService .
601
612
*/
602
- void setTagService (WxMpUserTagService tagService );
613
+ void setUserTagService (WxMpUserTagService userTagService );
603
614
604
615
/**
605
616
* .
606
617
*
607
- * @param qrCodeService .
618
+ * @param qrcodeService .
608
619
*/
609
- void setQrCodeService (WxMpQrcodeService qrCodeService );
620
+ void setQrcodeService (WxMpQrcodeService qrcodeService );
610
621
611
622
/**
612
623
* .
@@ -712,4 +723,18 @@ public interface WxMpService extends WxService {
712
723
* @param commentService .
713
724
*/
714
725
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 );
715
740
}
0 commit comments