From 65b56ae96a426ce150a9d1424b8632ef5809530e Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 15 Apr 2025 10:30:22 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86-=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=9C=8D=E5=8A=A1=E5=99=A8=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1399846236291072]通知配置管理-新增邮件服务器配置,保存失败 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1399846236291072 --- .../module/tenant/api/mailserver/MailServerSaveApi.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/module/tenant/api/mailserver/MailServerSaveApi.java b/src/main/java/neatlogic/module/tenant/api/mailserver/MailServerSaveApi.java index 35de4949..7f4054d5 100644 --- a/src/main/java/neatlogic/module/tenant/api/mailserver/MailServerSaveApi.java +++ b/src/main/java/neatlogic/module/tenant/api/mailserver/MailServerSaveApi.java @@ -28,6 +28,7 @@ import neatlogic.framework.restful.annotation.*; import neatlogic.framework.restful.constvalue.OperationTypeEnum; import neatlogic.framework.restful.core.privateapi.PrivateApiComponentBase; import neatlogic.framework.util.RegexUtils; +import neatlogic.framework.util.SnowflakeUtil; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -74,7 +75,11 @@ public class MailServerSaveApi extends PrivateApiComponentBase { public Object myDoService(JSONObject jsonObj) throws Exception { MailServerVo mailServerVo = jsonObj.toJavaObject(MailServerVo.class); NotifyConfigVo notifyConfigVo = new NotifyConfigVo(); - notifyConfigVo.setId(mailServerVo.getId()); + if (mailServerVo.getId() != null) { + notifyConfigVo.setId(mailServerVo.getId()); + } else { + notifyConfigVo.setId(SnowflakeUtil.uniqueLong()); + } notifyConfigVo.setName(mailServerVo.getName()); notifyConfigVo.setIsActive(0); notifyConfigVo.setIsDefault(0); -- Gitee