11
11
import me .chanjar .weixin .mp .bean .result .WxMpMassUploadResult ;
12
12
import me .chanjar .weixin .mp .enums .WxMpApiUrl ;
13
13
14
+ import static me .chanjar .weixin .mp .enums .WxMpApiUrl .*;
15
+
14
16
/**
15
17
* <pre>
16
18
* 群发消息服务类
@@ -26,31 +28,31 @@ public class WxMpMassMessageServiceImpl implements WxMpMassMessageService {
26
28
27
29
@ Override
28
30
public WxMpMassUploadResult massNewsUpload (WxMpMassNews news ) throws WxErrorException {
29
- String responseContent = this .wxMpService .post (WxMpApiUrl . MassMessage .MEDIA_UPLOAD_NEWS_URL , news .toJson ());
31
+ String responseContent = this .wxMpService .post (MassMessage .MEDIA_UPLOAD_NEWS_URL , news .toJson ());
30
32
return WxMpMassUploadResult .fromJson (responseContent );
31
33
}
32
34
33
35
@ Override
34
36
public WxMpMassUploadResult massVideoUpload (WxMpMassVideo video ) throws WxErrorException {
35
- String responseContent = this .wxMpService .post (WxMpApiUrl . MassMessage .MEDIA_UPLOAD_VIDEO_URL , video .toJson ());
37
+ String responseContent = this .wxMpService .post (MassMessage .MEDIA_UPLOAD_VIDEO_URL , video .toJson ());
36
38
return WxMpMassUploadResult .fromJson (responseContent );
37
39
}
38
40
39
41
@ Override
40
42
public WxMpMassSendResult massGroupMessageSend (WxMpMassTagMessage message ) throws WxErrorException {
41
- String responseContent = this .wxMpService .post (WxMpApiUrl . MassMessage .MESSAGE_MASS_SENDALL_URL , message .toJson ());
43
+ String responseContent = this .wxMpService .post (MassMessage .MESSAGE_MASS_SENDALL_URL , message .toJson ());
42
44
return WxMpMassSendResult .fromJson (responseContent );
43
45
}
44
46
45
47
@ Override
46
48
public WxMpMassSendResult massOpenIdsMessageSend (WxMpMassOpenIdsMessage message ) throws WxErrorException {
47
- String responseContent = this .wxMpService .post (WxMpApiUrl . MassMessage .MESSAGE_MASS_SEND_URL , message .toJson ());
49
+ String responseContent = this .wxMpService .post (MassMessage .MESSAGE_MASS_SEND_URL , message .toJson ());
48
50
return WxMpMassSendResult .fromJson (responseContent );
49
51
}
50
52
51
53
@ Override
52
54
public WxMpMassSendResult massMessagePreview (WxMpMassPreviewMessage wxMpMassPreviewMessage ) throws WxErrorException {
53
- String responseContent = this .wxMpService .post (WxMpApiUrl . MassMessage .MESSAGE_MASS_PREVIEW_URL , wxMpMassPreviewMessage .toJson ());
55
+ String responseContent = this .wxMpService .post (MassMessage .MESSAGE_MASS_PREVIEW_URL , wxMpMassPreviewMessage .toJson ());
54
56
return WxMpMassSendResult .fromJson (responseContent );
55
57
}
56
58
@@ -59,7 +61,7 @@ public void delete(Long msgId, Integer articleIndex) throws WxErrorException {
59
61
JsonObject jsonObject = new JsonObject ();
60
62
jsonObject .addProperty ("msg_id" , msgId );
61
63
jsonObject .addProperty ("article_idx" , articleIndex );
62
- this .wxMpService .post (WxMpApiUrl . MassMessage .MESSAGE_MASS_DELETE_URL , jsonObject .toString ());
64
+ this .wxMpService .post (MassMessage .MESSAGE_MASS_DELETE_URL , jsonObject .toString ());
63
65
}
64
66
65
67
}
0 commit comments