|
@@ -94,7 +94,16 @@ public class AlarmRecordIndexController {
|
|
TWechat wechat = wechatService.getOne(wechatQuery);
|
|
TWechat wechat = wechatService.getOne(wechatQuery);
|
|
// 微信公众号推送
|
|
// 微信公众号推送
|
|
if(wechat != null) {
|
|
if(wechat != null) {
|
|
- wechatService.sendAlarmMessage(wechat.getOpenId(), clientId, name, companyType, alarmContent, alarmRecordVo.getOccurrenceTime());
|
|
|
|
|
|
+ String sendContent = alarmContent;
|
|
|
|
+ if (sendContent.length() > 20) {
|
|
|
|
+ // 如果超过20个字符
|
|
|
|
+ if(StringUtils.isEmpty(ifForeign) || ifForeign.equals("0")) {
|
|
|
|
+ sendContent = "请前往后台查看详细信息";
|
|
|
|
+ } else {
|
|
|
|
+ sendContent = "Check in the system";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ wechatService.sendAlarmMessage(wechat.getOpenId(), clientId, name, companyType, sendContent, alarmRecordVo.getOccurrenceTime());
|
|
}
|
|
}
|
|
if (ifForeign.equals("1")) {
|
|
if (ifForeign.equals("1")) {
|
|
String subject = "Error message from Magic Candy Machine";
|
|
String subject = "Error message from Magic Candy Machine";
|