【完善】代码生成对 DM 达梦数据的兼容性
【优化】新增 sslEnable 字段,支持 outlook 邮箱
This commit is contained in:
parent
ca93a858fd
commit
ddafd44114
@ -54,7 +54,6 @@ public class CodegenBuilderTest extends BaseMockitoUnitTest {
|
||||
when(metaInfo.getJdbcType()).thenReturn(JdbcType.BIGINT);
|
||||
when(tableField.getComment()).thenReturn("编号");
|
||||
when(tableField.isKeyFlag()).thenReturn(true);
|
||||
when(tableField.isKeyIdentityFlag()).thenReturn(true);
|
||||
IColumnType columnType = mock(IColumnType.class);
|
||||
when(tableField.getColumnType()).thenReturn(columnType);
|
||||
when(columnType.getType()).thenReturn("Long");
|
||||
|
@ -196,7 +196,6 @@ CREATE TABLE IF NOT EXISTS "infra_codegen_column" (
|
||||
"column_comment" varchar(500) NOT NULL,
|
||||
"nullable" tinyint not null,
|
||||
"primary_key" tinyint not null,
|
||||
"auto_increment" varchar(5) not null,
|
||||
"ordinal_position" int not null,
|
||||
"java_type" varchar(32) NOT NULL,
|
||||
"java_field" varchar(64) NOT NULL,
|
||||
|
@ -30,6 +30,9 @@ public class MailAccountRespVO {
|
||||
@Schema(description = "是否开启 ssl", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
private Boolean sslEnable;
|
||||
|
||||
@Schema(description = "是否开启 starttls", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
private Boolean starttlsEnable;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.mail.vo.account;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 邮箱账号创建/修改 Request VO")
|
||||
@Data
|
||||
@ -38,4 +37,8 @@ public class MailAccountSaveReqVO {
|
||||
@NotNull(message = "是否开启 ssl 必填")
|
||||
private Boolean sslEnable;
|
||||
|
||||
@Schema(description = "是否开启 starttls", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
@NotNull(message = "是否开启 starttls 必填")
|
||||
private Boolean starttlsEnable;
|
||||
|
||||
}
|
||||
|
@ -49,5 +49,9 @@ public class MailAccountDO extends BaseDO {
|
||||
* 是否开启 SSL
|
||||
*/
|
||||
private Boolean sslEnable;
|
||||
/**
|
||||
* 是否开启 STARTTLS
|
||||
*/
|
||||
private Boolean starttlsEnable;
|
||||
|
||||
}
|
||||
|
@ -120,7 +120,8 @@ public class MailSendServiceImpl implements MailSendService {
|
||||
String from = StrUtil.isNotEmpty(nickname) ? nickname + " <" + account.getMail() + ">" : account.getMail();
|
||||
return new MailAccount().setFrom(from).setAuth(true)
|
||||
.setUser(account.getUsername()).setPass(account.getPassword().toCharArray())
|
||||
.setHost(account.getHost()).setPort(account.getPort()).setSslEnable(account.getSslEnable());
|
||||
.setHost(account.getHost()).setPort(account.getPort())
|
||||
.setSslEnable(account.getSslEnable()).setStarttlsEnable(account.getStarttlsEnable());
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
@ -520,6 +520,7 @@ CREATE TABLE IF NOT EXISTS "system_mail_account" (
|
||||
"host" varchar NOT NULL,
|
||||
"port" int NOT NULL,
|
||||
"ssl_enable" bit NOT NULL,
|
||||
"starttls_enable" bit NOT NULL,
|
||||
"creator" varchar DEFAULT '',
|
||||
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updater" varchar DEFAULT '',
|
||||
|
Loading…
Reference in New Issue
Block a user