11package me .chanjar .weixin .cp .api .impl ;
22
33import com .google .gson .JsonObject ;
4- import lombok .NonNull ;
54import lombok .RequiredArgsConstructor ;
65import lombok .extern .slf4j .Slf4j ;
76import me .chanjar .weixin .common .error .WxErrorException ;
1110import me .chanjar .weixin .cp .bean .school .*;
1211import org .apache .commons .lang3 .StringUtils ;
1312
14- import javax .validation .constraints .NotNull ;
1513import java .util .List ;
1614import java .util .Optional ;
1715
@@ -30,7 +28,7 @@ public class WxCpSchoolServiceImpl implements WxCpSchoolService {
3028 private final WxCpService cpService ;
3129
3230 @ 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 {
3432 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_TEACHER_CUSTOMIZE_HEALTH_INFO );
3533 JsonObject jsonObject = new JsonObject ();
3634 jsonObject .addProperty ("date" , date );
@@ -43,7 +41,7 @@ public WxCpCustomizeHealthInfo getTeacherCustomizeHealthInfo(@NotNull String dat
4341 }
4442
4543 @ 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 {
4745 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_STUDENT_CUSTOMIZE_HEALTH_INFO );
4846 JsonObject jsonObject = new JsonObject ();
4947 jsonObject .addProperty ("date" , date );
@@ -56,7 +54,7 @@ public WxCpCustomizeHealthInfo getStudentCustomizeHealthInfo(@NotNull String dat
5654 }
5755
5856 @ 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 {
6058 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_HEALTH_QRCODE );
6159 JsonObject jsonObject = new JsonObject ();
6260 jsonObject .addProperty ("type" , type );
@@ -66,7 +64,7 @@ public WxCpResultList getHealthQrCode(@NotNull List<String> userIds, @NotNull In
6664 }
6765
6866 @ Override
69- public WxCpPaymentResult getPaymentResult (@ NotNull String paymentId ) throws WxErrorException {
67+ public WxCpPaymentResult getPaymentResult (String paymentId ) throws WxErrorException {
7068 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_PAYMENT_RESULT );
7169 JsonObject jsonObject = new JsonObject ();
7270 jsonObject .addProperty ("payment_id" , paymentId );
@@ -75,7 +73,7 @@ public WxCpPaymentResult getPaymentResult(@NotNull String paymentId) throws WxEr
7573 }
7674
7775 @ Override
78- public WxCpTrade getTrade (@ NotNull String paymentId , @ NotNull String tradeNo ) throws WxErrorException {
76+ public WxCpTrade getTrade (String paymentId , String tradeNo ) throws WxErrorException {
7977 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_TRADE );
8078 JsonObject jsonObject = new JsonObject ();
8179 jsonObject .addProperty ("payment_id" , paymentId );
@@ -85,19 +83,19 @@ public WxCpTrade getTrade(@NotNull String paymentId, @NotNull String tradeNo) th
8583 }
8684
8785 @ Override
88- public WxCpSchoolLivingInfo getLivingInfo (@ NotNull String livingId ) throws WxErrorException {
86+ public WxCpSchoolLivingInfo getLivingInfo (String livingId ) throws WxErrorException {
8987 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_LIVING_INFO ) + livingId ;
9088 String responseContent = this .cpService .get (apiUrl , null );
9189 return WxCpSchoolLivingInfo .fromJson (responseContent );
9290 }
9391
9492 @ 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 {
9694 return this .cpService .getLivingService ().getUserAllLivingId (userId , cursor , limit );
9795 }
9896
9997 @ Override
100- public WxCpSchoolWatchStat getWatchStat (@ NonNull String livingId , String nextKey ) throws WxErrorException {
98+ public WxCpSchoolWatchStat getWatchStat (String livingId , String nextKey ) throws WxErrorException {
10199 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_WATCH_STAT );
102100 JsonObject jsonObject = new JsonObject ();
103101 if (StringUtils .isNotBlank (nextKey )) {
@@ -109,7 +107,7 @@ public WxCpSchoolWatchStat getWatchStat(@NonNull String livingId, String nextKey
109107 }
110108
111109 @ Override
112- public WxCpSchoolUnwatchStat getUnwatchStat (@ NonNull String livingId , String nextKey ) throws WxErrorException {
110+ public WxCpSchoolUnwatchStat getUnwatchStat (String livingId , String nextKey ) throws WxErrorException {
113111 String apiUrl = this .cpService .getWxCpConfigStorage ().getApiUrl (GET_UNWATCH_STAT );
114112 JsonObject jsonObject = new JsonObject ();
115113 if (StringUtils .isNotBlank (nextKey )) {
@@ -121,7 +119,7 @@ public WxCpSchoolUnwatchStat getUnwatchStat(@NonNull String livingId, String nex
121119 }
122120
123121 @ Override
124- public WxCpLivingResult deleteReplayData (@ NonNull String livingId ) throws WxErrorException {
122+ public WxCpLivingResult deleteReplayData (String livingId ) throws WxErrorException {
125123 return cpService .getLivingService ().deleteReplayData (livingId );
126124 }
127125
0 commit comments