|
|
@ -117,8 +117,6 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
int succecssCount = 0; |
|
|
|
for (WxSubscribeMessageFormDTO msg : msgList) { |
|
|
|
try { |
|
|
|
ValidatorUtils.validateEntity(msg); |
|
|
|
|
|
|
|
String userId = msg.getUserId(); |
|
|
|
String clientType = msg.getClientType(); |
|
|
|
String customerId = msg.getCustomerId(); |
|
|
@ -238,9 +236,9 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
} catch (Exception e) { |
|
|
|
String errMsg = e.getMessage(); |
|
|
|
//ValidateException错误信息为getMsg
|
|
|
|
if (StringUtils.isBlank(errMsg) && e instanceof ValidateException) { |
|
|
|
errMsg = ((ValidateException) e).getMsg(); |
|
|
|
} |
|
|
|
// if (StringUtils.isBlank(errMsg) && e instanceof ValidateException) {
|
|
|
|
// errMsg = ((ValidateException) e).getMsg();
|
|
|
|
// }
|
|
|
|
if (e instanceof WxSubscribeException){ |
|
|
|
//存表
|
|
|
|
WxmpMsgSendRecordEntity wxmpMsgSendRecordEntity = initRecord(msg, ((WxSubscribeException) e).getOpenId(), WxmpMessageConstant.ERROR); |
|
|
@ -257,6 +255,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
} |
|
|
|
logger.info("{}条消息中的{}条发送成功", msgList.size(), succecssCount); |
|
|
|
} |
|
|
|
//初始化记录对象
|
|
|
|
private WxmpMsgSendRecordEntity initRecord(WxSubscribeMessageFormDTO msg, String openId, String status){ |
|
|
|
WxmpMsgSendRecordEntity wxmpMsgSendRecordEntity = new WxmpMsgSendRecordEntity(); |
|
|
|
wxmpMsgSendRecordEntity.setCustomerId(msg.getCustomerId()); |
|
|
|