|
|
@ -181,7 +181,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
jsonObject.put(WxmpMessageConstant.TEMPLATE_ID, templateId); |
|
|
|
data.put(WxmpMessageConstant.TITLE, new JSONObject().put("value", ("您有一条" + msg.getBehaviorType()).substring(0,WxmpMessageConstant.TITLE_LIMIT))); |
|
|
|
data.put(WxmpMessageConstant.MESSAGE_CONTENT, new JSONObject().put("value", msg.getMessageContent().substring(0,WxmpMessageConstant.MESSAGE_CONTENT_LIMIT))); |
|
|
|
data.put(WxmpMessageConstant.MESSAGE_TIME, new JSONObject().put("value", msg.getMessageTime())); |
|
|
|
data.put(WxmpMessageConstant.MESSAGE_TIME, new JSONObject().put("value", new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()))); |
|
|
|
jsonObject.put(WxmpMessageConstant.DATA, data); |
|
|
|
EnvEnum envEnum = EnvEnum.getCurrentEnv(); |
|
|
|
//选填项
|
|
|
@ -273,11 +273,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
|
wxmpMsgSendRecordEntity.setBehaviorType(msg.getBehaviorType()); |
|
|
|
wxmpMsgSendRecordEntity.setTitle("您有一条" + msg.getBehaviorType()); |
|
|
|
wxmpMsgSendRecordEntity.setMessageContent(msg.getMessageContent()); |
|
|
|
try { |
|
|
|
wxmpMsgSendRecordEntity.setMessageTime(new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(msg.getMessageTime())); |
|
|
|
} catch (ParseException e) { |
|
|
|
wxmpMsgSendRecordEntity.setMessageTime(new Date()); |
|
|
|
} |
|
|
|
wxmpMsgSendRecordEntity.setResult(status); |
|
|
|
return wxmpMsgSendRecordEntity; |
|
|
|
} |
|
|
|