fix: 删除邮件用户关联模板
This commit is contained in:
parent
4b37f707a3
commit
a3dfe63e92
|
@ -20,9 +20,6 @@ public class EmailUsersAddDto {
|
|||
@NotNull(message = "邮箱不能为空")
|
||||
private String email;
|
||||
|
||||
@Schema(name = "emailTemplate", title = "邮件模板")
|
||||
private Long emailTemplate;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@NotNull(message = "密码不能为空")
|
||||
|
|
|
@ -24,9 +24,6 @@ public class EmailUsersUpdateDto {
|
|||
@NotNull(message = "邮箱不能为空")
|
||||
private String email;
|
||||
|
||||
@Schema(name = "emailTemplate", title = "邮件模板")
|
||||
private Long emailTemplate;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@NotNull(message = "密码不能为空")
|
||||
|
|
|
@ -25,9 +25,6 @@ public class EmailUsers extends BaseEntity {
|
|||
@Schema(name = "email", title = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(name = "emailTemplate", title = "使用邮件模板")
|
||||
private Long emailTemplate;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package cn.bunny.dao.vo.system.email;
|
||||
|
||||
import cn.bunny.dao.vo.BaseVo;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
|
@ -18,11 +15,6 @@ public class EmailUsersVo extends BaseVo {
|
|||
@Schema(name = "email", title = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(name = "emailTemplate", title = "使用邮件模板")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
@JSONField(serializeUsing = ToStringSerializer.class)
|
||||
private Long emailTemplate;
|
||||
|
||||
@Schema(name = "password", title = "密码")
|
||||
private String password;
|
||||
|
||||
|
|
|
@ -49,13 +49,6 @@ public class EmailTemplateController {
|
|||
return Mono.just(Result.success(pageResult));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询所有邮件模板", description = "查询所有邮件模板")
|
||||
@GetMapping("getAllEmailTemplates")
|
||||
public Mono<Result<List<EmailTemplateVo>>> getAllEmailTemplates() {
|
||||
List<EmailTemplateVo> voList = emailTemplateService.getAllEmailTemplates();
|
||||
return Mono.just(Result.success(voList));
|
||||
}
|
||||
|
||||
@Operation(summary = "添加邮件模板表", description = "添加邮件模板表")
|
||||
@PostMapping("addEmailTemplate")
|
||||
public Mono<Result<String>> addEmailTemplate(@Valid @RequestBody EmailTemplateAddDto dto) {
|
||||
|
|
|
@ -49,11 +49,4 @@ public interface EmailTemplateService extends IService<EmailTemplate> {
|
|||
* @param ids 删除id列表
|
||||
*/
|
||||
void deleteEmailTemplate(List<Long> ids);
|
||||
|
||||
/**
|
||||
* * 查询所有邮件模板
|
||||
*
|
||||
* @return 邮箱模板返回内容列表
|
||||
*/
|
||||
List<EmailTemplateVo> getAllEmailTemplates();
|
||||
}
|
||||
|
|
|
@ -103,18 +103,4 @@ public class EmailTemplateServiceImpl extends ServiceImpl<EmailTemplateMapper, E
|
|||
|
||||
baseMapper.deleteBatchIdsWithPhysics(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* * 查询所有邮件模板
|
||||
*
|
||||
* @return 邮箱模板返回内容列表
|
||||
*/
|
||||
@Override
|
||||
public List<EmailTemplateVo> getAllEmailTemplates() {
|
||||
return list().stream().map(emailTemplate -> {
|
||||
EmailTemplateVo emailTemplateVo = new EmailTemplateVo();
|
||||
BeanUtils.copyProperties(emailTemplate, emailTemplateVo);
|
||||
return emailTemplateVo;
|
||||
}).toList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
<id column="update_user" property="updateUser"/>
|
||||
<id column="is_deleted" property="isDeleted"/>
|
||||
<id column="email" property="email"/>
|
||||
<id column="email_template" property="emailTemplate"/>
|
||||
<id column="password" property="password"/>
|
||||
<id column="host" property="host"/>
|
||||
<id column="port" property="port"/>
|
||||
|
@ -21,7 +20,7 @@
|
|||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, update_time, create_user, update_user, is_deleted, email, email_template, password, host, port, smtp_agreement, is_default
|
||||
id, create_time, update_time, create_user, update_user, is_deleted, email, password, host, port, smtp_agreement, is_default
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询邮箱用户发送配置内容 -->
|
||||
|
|
Loading…
Reference in New Issue