|
@@ -13,7 +13,7 @@ import com.szwl.service.TAdminService;
|
|
|
import com.szwl.service.TAlarmRecordService;
|
|
|
import com.szwl.service.TEquipmentService;
|
|
|
import com.szwl.service.TWechatService;
|
|
|
-import com.szwl.util.TimeZoneUtil;
|
|
|
+import com.szwl.util.TimezoneFmtUtil;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
@@ -94,7 +94,7 @@ public class AlarmRecordIndexController {
|
|
|
String timeZone = admin.getTimeZone();
|
|
|
timeZone = StringUtils.isEmpty(timeZone) ? "Asia/Shanghai" : timeZone;
|
|
|
// 根据时区获取时间
|
|
|
- String localTime = TimeZoneUtil.getTimeByZoneID(timeZone);
|
|
|
+ String localTime = TimezoneFmtUtil.getTimeByZoneID(timeZone);
|
|
|
// 查询是否绑定微信
|
|
|
LambdaQueryWrapper<TWechat> wechatQuery = Wrappers.lambdaQuery();
|
|
|
wechatQuery.eq(TWechat::getAdminId, admin.getId());
|
|
@@ -109,23 +109,21 @@ public class AlarmRecordIndexController {
|
|
|
wechatService.sendAlarmMessage(wechat.getOpenId(), clientId, name, companyType, sendContent, alarmRecordVo.getOccurrenceTime());
|
|
|
}
|
|
|
if (ifForeign.equals("1")) {
|
|
|
- String subject = "Error message from Magic Candy Machine";
|
|
|
+ String subject = "Error message from Cotton Candy Machine";
|
|
|
StringBuffer content = new StringBuffer();
|
|
|
- String str1 = "Dear customer<br>" +
|
|
|
- "<br>" +
|
|
|
- " Machine name: ";
|
|
|
- String str2 = "<br>" + " Time&Date: ";
|
|
|
- String str3 = "<br>" + " Error Message: ";
|
|
|
- String str4 = "<br>" + "<br>" +
|
|
|
- " This is an automatic-sent mail to inform you that there is an error occurred on one of your Magic Candy machines, please kindly check the details as above.<br>";
|
|
|
- String str5 = " <br>You don't have to reply this mail. What you need to do is to follow the instructions on the touch screen to clear the error and recover the machine. If there is any question or more information you need. Please do not be hesitated to contact your distributor.<br>" +
|
|
|
+ String str1 = " <b>Machine name: </b>";
|
|
|
+ String str2 = "<br>" + " <b>Error message: </b>";
|
|
|
+ String str3 = "<br>" + " Time&Date: ";
|
|
|
+ String str4 = "<br>" + "<br>" + "Dear customer:<br>";
|
|
|
+ String str5 = " This is an automatic-sent mail to inform you that there is an error occurred on one of your Cotton Candy machines, please kindly check the details as above.<br>";
|
|
|
+ String str6 = " <br>You don't have to reply this mail. What you need to do is to follow the instructions on the touch screen to clear the error and recover the machine. If there is any question or more information you need. Please do not be hesitated to contact your distributor.<br>" +
|
|
|
"<br>" +
|
|
|
" Thank you for choosing our machine!<br>" +
|
|
|
"<br>" +
|
|
|
"<br>" +
|
|
|
"Best Regards.<br>" +
|
|
|
- "Magic Candy Service Team";
|
|
|
- content.append(str1).append(name).append(str2).append(localTime).append(str3).append(alarmContent).append(str4).append(str5);
|
|
|
+ "Cotton Candy Service Team";
|
|
|
+ content.append(str1).append(name).append(str2).append(alarmContent).append(str3).append(localTime).append(str4).append(str5).append(str6);
|
|
|
if (StringUtils.isNotEmpty(messageReceiver)) {
|
|
|
String[] split = messageReceiver.split(",");
|
|
|
for (String s : split) {
|