فهرست منبع

Merge remote-tracking branch 'origin/master'

zhengqiang 5 سال پیش
والد
کامیت
ddd285c649

+ 1 - 1
src/main/java/com/jpsoft/smart/modules/base/controller/AlarmInfoController.java

@@ -329,7 +329,7 @@ public class AlarmInfoController {
                 AccessControl accessControl = accessControlService.findByOwnerId(owner.getId());
                 if(accessControl != null){
                     openId = accessControl.getOpenId();
-                    boolean result = WechatMessageUtil.sendAlarmNoticeMessage("报警警报", content, openId, "","8dpP8XM1XaiiIByXiuAeFIZeNjEow1AleG_h8O2xyVA","wx7e70eb62a8459869","909d17e353268da57c4f18cc09798049");
+                    boolean result = WechatMessageUtil.sendAlarmNoticeMessage("报警警报", content,alarmInfo.getCreateTime(), openId, "","8dpP8XM1XaiiIByXiuAeFIZeNjEow1AleG_h8O2xyVA","wx7e70eb62a8459869","909d17e353268da57c4f18cc09798049");
                     if(result) {
                         //修改阅读状态
                         alarmInfo.setIsRead(true);

+ 2 - 2
src/main/java/com/jpsoft/smart/modules/common/utils/WechatMessageUtil.java

@@ -279,7 +279,7 @@ public class WechatMessageUtil {
 	 * @param openId 发送人
 	 * @return
 	 */
-	public static boolean sendAlarmNoticeMessage(String noticeName,String content,String openId,String noticeDetailId,String noticeTemplateId,String appId,String appSecret) {
+	public static boolean sendAlarmNoticeMessage(String noticeName,String content,Date createTime,String openId,String noticeDetailId,String noticeTemplateId,String appId,String appSecret) {
 
 
 		JSONObject sendData = new JSONObject();
@@ -290,7 +290,7 @@ public class WechatMessageUtil {
 		first.put("color", "#173177");
 
 		JSONObject keyword1 = new JSONObject();
-		keyword1.put("value", sdf.format(new Date()));
+		keyword1.put("value", sdf.format(createTime));
 		keyword1.put("color", "#173177");