mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
统一使用WxErrorException
This commit is contained in:
parent
e5bd65f2db
commit
5ec5ae8bbe
@ -94,7 +94,7 @@ public interface WxMpMassMessageService {
|
||||
*
|
||||
* @return wxMpMassSendResult
|
||||
*/
|
||||
WxMpMassSendResult massMessagePreview(WxMpMassPreviewMessage wxMpMassPreviewMessage) throws Exception;
|
||||
WxMpMassSendResult massMessagePreview(WxMpMassPreviewMessage wxMpMassPreviewMessage) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@ -114,6 +114,6 @@ public interface WxMpMassMessageService {
|
||||
* @param msgId 发送出去的消息ID
|
||||
* @param articleIndex 要删除的文章在图文消息中的位置,第一篇编号为1,该字段不填或填0会删除全部文章
|
||||
*/
|
||||
void delete(Integer msgId, Integer articleIndex) throws Exception;
|
||||
void delete(Integer msgId, Integer articleIndex) throws WxErrorException;
|
||||
|
||||
}
|
||||
|
@ -51,13 +51,13 @@ public class WxMpMassMessageServiceImpl implements WxMpMassMessageService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpMassSendResult massMessagePreview(WxMpMassPreviewMessage wxMpMassPreviewMessage) throws Exception {
|
||||
public WxMpMassSendResult massMessagePreview(WxMpMassPreviewMessage wxMpMassPreviewMessage) throws WxErrorException {
|
||||
String responseContent = this.wxMpService.post(MESSAGE_MASS_PREVIEW_URL, wxMpMassPreviewMessage.toJson());
|
||||
return WxMpMassSendResult.fromJson(responseContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Integer msgId, Integer articleIndex) throws Exception {
|
||||
public void delete(Integer msgId, Integer articleIndex) throws WxErrorException {
|
||||
JsonObject jsonObject = new JsonObject();
|
||||
jsonObject.addProperty("msg_id", msgId);
|
||||
jsonObject.addProperty("article_idx", articleIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user