diff --git a/src/main/java/com/zcloud/service/messages/impl/InsideMessagesImpl.java b/src/main/java/com/zcloud/service/messages/impl/InsideMessagesImpl.java index e5a56c5d..e76fd399 100644 --- a/src/main/java/com/zcloud/service/messages/impl/InsideMessagesImpl.java +++ b/src/main/java/com/zcloud/service/messages/impl/InsideMessagesImpl.java @@ -1,5 +1,6 @@ package com.zcloud.service.messages.impl; +import cn.hutool.core.util.StrUtil; import com.zcloud.entity.PageData; import com.zcloud.entity.messages.PushRecords; import com.zcloud.service.bus.NoticeCorpService; @@ -24,7 +25,8 @@ public class InsideMessagesImpl implements PushMessages { mes.put("BIANMA", pushRecords.getTemplateId()); mes.put("SENDER_ID", "九公司应急管理"); mes.put("SENDER_NAME", "九公司应急管理"); - mes.put("SYNOPSIS", pushRecords.getMessageTitle()); + String messageTitle = pushRecords.getMessageTitle(); + mes.put("SYNOPSIS", StrUtil.isEmpty(messageTitle) ? "安全事故通知" : messageTitle); mes.put("CORPINFO_ID", "48a8ca9815814c979814ddcf041c5cd5"); mes.put("RECEIVER_ID", userId); PageData content = new PageData(); diff --git a/src/main/java/com/zcloud/service/messages/impl/MessagesServiceImpl.java b/src/main/java/com/zcloud/service/messages/impl/MessagesServiceImpl.java index ee039429..aa0b500b 100644 --- a/src/main/java/com/zcloud/service/messages/impl/MessagesServiceImpl.java +++ b/src/main/java/com/zcloud/service/messages/impl/MessagesServiceImpl.java @@ -8,12 +8,10 @@ import com.zcloud.service.messages.PushMessages; import com.zcloud.util.DateUtil; import com.zcloud.util.UuidUtil; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.Map; -@Slf4j @Service @RequiredArgsConstructor public class MessagesServiceImpl implements MessagesService { diff --git a/src/main/java/com/zcloud/util/SendSmsUtil.java b/src/main/java/com/zcloud/util/SendSmsUtil.java index 4937e4f8..dac7f698 100644 --- a/src/main/java/com/zcloud/util/SendSmsUtil.java +++ b/src/main/java/com/zcloud/util/SendSmsUtil.java @@ -81,10 +81,10 @@ public class SendSmsUtil { } /** - * 发送自定义短信 无需模版 + * 发送自定义短信 无需再平台申请模版 使用自定义模版即可 * * @param mobile 手机号 - * @param template 模板 例如 xxx${var}xxx + * @param template 自定义模板 例如 xxx${var}xxx * @param content 替换内容 * @return 是否成功 */