1
1
package me .chanjar .weixin .cp .api .impl ;
2
2
3
3
import com .google .gson .JsonObject ;
4
- import lombok .NonNull ;
5
4
import lombok .RequiredArgsConstructor ;
6
5
import lombok .extern .slf4j .Slf4j ;
7
6
import me .chanjar .weixin .common .error .WxErrorException ;
11
10
import me .chanjar .weixin .cp .bean .school .*;
12
11
import org .apache .commons .lang3 .StringUtils ;
13
12
14
- import javax .validation .constraints .NotNull ;
15
13
import java .util .List ;
16
14
import java .util .Optional ;
17
15
@@ -30,7 +28,7 @@ public class WxCpSchoolServiceImpl implements WxCpSchoolService {
30
28
private final WxCpService cpService ;
31
29
32
30
@ Override
33
- public WxCpCustomizeHealthInfo getTeacherCustomizeHealthInfo (@ NotNull String date , String nextKey , Integer limit ) throws WxErrorException {
31
+ public WxCpCustomizeHealthInfo getTeacherCustomizeHealthInfo (String date , String nextKey , Integer limit ) throws WxErrorException {
34
32
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_TEACHER_CUSTOMIZE_HEALTH_INFO );
35
33
JsonObject jsonObject = new JsonObject ();
36
34
jsonObject .addProperty ("date" , date );
@@ -43,7 +41,7 @@ public WxCpCustomizeHealthInfo getTeacherCustomizeHealthInfo(@NotNull String dat
43
41
}
44
42
45
43
@ Override
46
- public WxCpCustomizeHealthInfo getStudentCustomizeHealthInfo (@ NotNull String date , String nextKey , Integer limit ) throws WxErrorException {
44
+ public WxCpCustomizeHealthInfo getStudentCustomizeHealthInfo (String date , String nextKey , Integer limit ) throws WxErrorException {
47
45
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_STUDENT_CUSTOMIZE_HEALTH_INFO );
48
46
JsonObject jsonObject = new JsonObject ();
49
47
jsonObject .addProperty ("date" , date );
@@ -56,7 +54,7 @@ public WxCpCustomizeHealthInfo getStudentCustomizeHealthInfo(@NotNull String dat
56
54
}
57
55
58
56
@ Override
59
- public WxCpResultList getHealthQrCode (@ NotNull List <String > userIds , @ NotNull Integer type ) throws WxErrorException {
57
+ public WxCpResultList getHealthQrCode (List <String > userIds , Integer type ) throws WxErrorException {
60
58
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_HEALTH_QRCODE );
61
59
JsonObject jsonObject = new JsonObject ();
62
60
jsonObject .addProperty ("type" , type );
@@ -66,7 +64,7 @@ public WxCpResultList getHealthQrCode(@NotNull List<String> userIds, @NotNull In
66
64
}
67
65
68
66
@ Override
69
- public WxCpPaymentResult getPaymentResult (@ NotNull String paymentId ) throws WxErrorException {
67
+ public WxCpPaymentResult getPaymentResult (String paymentId ) throws WxErrorException {
70
68
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_PAYMENT_RESULT );
71
69
JsonObject jsonObject = new JsonObject ();
72
70
jsonObject .addProperty ("payment_id" , paymentId );
@@ -75,7 +73,7 @@ public WxCpPaymentResult getPaymentResult(@NotNull String paymentId) throws WxEr
75
73
}
76
74
77
75
@ Override
78
- public WxCpTrade getTrade (@ NotNull String paymentId , @ NotNull String tradeNo ) throws WxErrorException {
76
+ public WxCpTrade getTrade (String paymentId , String tradeNo ) throws WxErrorException {
79
77
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_TRADE );
80
78
JsonObject jsonObject = new JsonObject ();
81
79
jsonObject .addProperty ("payment_id" , paymentId );
@@ -85,19 +83,19 @@ public WxCpTrade getTrade(@NotNull String paymentId, @NotNull String tradeNo) th
85
83
}
86
84
87
85
@ Override
88
- public WxCpSchoolLivingInfo getLivingInfo (@ NotNull String livingId ) throws WxErrorException {
86
+ public WxCpSchoolLivingInfo getLivingInfo (String livingId ) throws WxErrorException {
89
87
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_LIVING_INFO ) + livingId ;
90
88
String responseContent = this .cpService .get (apiUrl , null );
91
89
return WxCpSchoolLivingInfo .fromJson (responseContent );
92
90
}
93
91
94
92
@ Override
95
- public WxCpLivingResult .LivingIdResult getUserAllLivingId (@ NonNull String userId , String cursor , Integer limit ) throws WxErrorException {
93
+ public WxCpLivingResult .LivingIdResult getUserAllLivingId (String userId , String cursor , Integer limit ) throws WxErrorException {
96
94
return this .cpService .getLivingService ().getUserAllLivingId (userId , cursor , limit );
97
95
}
98
96
99
97
@ Override
100
- public WxCpSchoolWatchStat getWatchStat (@ NonNull String livingId , String nextKey ) throws WxErrorException {
98
+ public WxCpSchoolWatchStat getWatchStat (String livingId , String nextKey ) throws WxErrorException {
101
99
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_WATCH_STAT );
102
100
JsonObject jsonObject = new JsonObject ();
103
101
if (StringUtils .isNotBlank (nextKey )) {
@@ -109,7 +107,7 @@ public WxCpSchoolWatchStat getWatchStat(@NonNull String livingId, String nextKey
109
107
}
110
108
111
109
@ Override
112
- public WxCpSchoolUnwatchStat getUnwatchStat (@ NonNull String livingId , String nextKey ) throws WxErrorException {
110
+ public WxCpSchoolUnwatchStat getUnwatchStat (String livingId , String nextKey ) throws WxErrorException {
113
111
String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_UNWATCH_STAT );
114
112
JsonObject jsonObject = new JsonObject ();
115
113
if (StringUtils .isNotBlank (nextKey )) {
@@ -121,7 +119,7 @@ public WxCpSchoolUnwatchStat getUnwatchStat(@NonNull String livingId, String nex
121
119
}
122
120
123
121
@ Override
124
- public WxCpLivingResult deleteReplayData (@ NonNull String livingId ) throws WxErrorException {
122
+ public WxCpLivingResult deleteReplayData (String livingId ) throws WxErrorException {
125
123
return cpService .getLivingService ().deleteReplayData (livingId );
126
124
}
127
125
0 commit comments