mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 03:55:06 +08:00
mp:优化前端消息发送的缓存逻辑
This commit is contained in:
@ -34,6 +34,9 @@ public interface ErrorCodeConstants {
|
||||
// ========== 公众号素材 1006004000============
|
||||
ErrorCode MATERIAL_UPLOAD_FAIL = new ErrorCode(1006004000, "上传素材失败,原因:{}");
|
||||
|
||||
// ========== 公众号素材 1006005000============
|
||||
ErrorCode MESSAGE_SEND_FAIL = new ErrorCode(1006005000, "发送消息失败,原因:{}");
|
||||
|
||||
// TODO 要处理下
|
||||
ErrorCode MENU_NOT_EXISTS = new ErrorCode(1006001002, "菜单不存在");
|
||||
|
||||
|
@ -31,6 +31,9 @@ import org.springframework.validation.annotation.Validated;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Validator;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.MESSAGE_SEND_FAIL;
|
||||
|
||||
/**
|
||||
* 粉丝消息表 Service 实现类
|
||||
*
|
||||
@ -115,7 +118,7 @@ public class MpMessageServiceImpl implements MpMessageService {
|
||||
try {
|
||||
mpService.getKefuService().sendKefuMessageWithResponse(wxMessage);
|
||||
} catch (WxErrorException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw exception(MESSAGE_SEND_FAIL, e.getError().getErrorMsg());
|
||||
}
|
||||
|
||||
// 记录消息
|
||||
|
Reference in New Issue
Block a user