|
@ -179,8 +179,8 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
jsonObject.put(WxmpMessageConstant.ACCESS_TOKEN, accessToken); |
|
|
jsonObject.put(WxmpMessageConstant.ACCESS_TOKEN, accessToken); |
|
|
jsonObject.put(WxmpMessageConstant.TOUSER, openId); |
|
|
jsonObject.put(WxmpMessageConstant.TOUSER, openId); |
|
|
jsonObject.put(WxmpMessageConstant.TEMPLATE_ID, templateId); |
|
|
jsonObject.put(WxmpMessageConstant.TEMPLATE_ID, templateId); |
|
|
data.put(WxmpMessageConstant.TITLE, new JSONObject().put("value", "您有一条" + msg.getBehaviorType())); |
|
|
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())); |
|
|
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", msg.getMessageTime())); |
|
|
jsonObject.put(WxmpMessageConstant.DATA, data); |
|
|
jsonObject.put(WxmpMessageConstant.DATA, data); |
|
|
EnvEnum envEnum = EnvEnum.getCurrentEnv(); |
|
|
EnvEnum envEnum = EnvEnum.getCurrentEnv(); |
|
@ -274,7 +274,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { |
|
|
wxmpMsgSendRecordEntity.setTitle("您有一条" + msg.getBehaviorType()); |
|
|
wxmpMsgSendRecordEntity.setTitle("您有一条" + msg.getBehaviorType()); |
|
|
wxmpMsgSendRecordEntity.setMessageContent(msg.getMessageContent()); |
|
|
wxmpMsgSendRecordEntity.setMessageContent(msg.getMessageContent()); |
|
|
try { |
|
|
try { |
|
|
wxmpMsgSendRecordEntity.setMessageTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(msg.getMessageTime())); |
|
|
wxmpMsgSendRecordEntity.setMessageTime(new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(msg.getMessageTime())); |
|
|
} catch (ParseException e) { |
|
|
} catch (ParseException e) { |
|
|
wxmpMsgSendRecordEntity.setMessageTime(new Date()); |
|
|
wxmpMsgSendRecordEntity.setMessageTime(new Date()); |
|
|
} |
|
|
} |
|
|