Commit c3335ba2cacf436b14da2dbe95994fd29b7dc514
1 parent
8d6a4d40
邮件模块 bug -修改保留字冲突
Showing
4 changed files
with
9 additions
and
10 deletions
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java
| @@ -13,11 +13,11 @@ public class MailAccountBaseVO { | @@ -13,11 +13,11 @@ public class MailAccountBaseVO { | ||
| 13 | 13 | ||
| 14 | @ApiModelProperty(value = "邮箱",required = true,example = "yudaoyuanma@123.com") | 14 | @ApiModelProperty(value = "邮箱",required = true,example = "yudaoyuanma@123.com") |
| 15 | @NotNull(message = "邮箱必填") | 15 | @NotNull(message = "邮箱必填") |
| 16 | - private String from; | 16 | + @Email(message = "必须是Email格式") |
| 17 | + private String fromAddress; | ||
| 17 | 18 | ||
| 18 | @ApiModelProperty(value = "用户名",required = true,example = "yudao") | 19 | @ApiModelProperty(value = "用户名",required = true,example = "yudao") |
| 19 | @NotNull(message = "用户名必填") | 20 | @NotNull(message = "用户名必填") |
| 20 | - @Email(message = "必须是Email格式") | ||
| 21 | private String username; | 21 | private String username; |
| 22 | 22 | ||
| 23 | @ApiModelProperty(value = "网站",required = true,example = "www.iocoder.cn") | 23 | @ApiModelProperty(value = "网站",required = true,example = "www.iocoder.cn") |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java
| @@ -14,7 +14,7 @@ import lombok.ToString; | @@ -14,7 +14,7 @@ import lombok.ToString; | ||
| 14 | public class MailAccountPageReqVO extends PageParam { | 14 | public class MailAccountPageReqVO extends PageParam { |
| 15 | 15 | ||
| 16 | @ApiModelProperty(value = "邮箱" , required = true , example = "yudaoyuanma@123.com") | 16 | @ApiModelProperty(value = "邮箱" , required = true , example = "yudaoyuanma@123.com") |
| 17 | - private String from; | 17 | + private String fromAddress; |
| 18 | 18 | ||
| 19 | @ApiModelProperty(value = "用户名" , required = true , example = "yudao") | 19 | @ApiModelProperty(value = "用户名" , required = true , example = "yudao") |
| 20 | private String username; | 20 | private String username; |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailAccountMapper.java
| @@ -16,7 +16,7 @@ public interface MailAccountMapper extends BaseMapperX<MailAccountDO> { | @@ -16,7 +16,7 @@ public interface MailAccountMapper extends BaseMapperX<MailAccountDO> { | ||
| 16 | 16 | ||
| 17 | default PageResult<MailAccountDO> selectPage(MailAccountPageReqVO pageReqVO) { | 17 | default PageResult<MailAccountDO> selectPage(MailAccountPageReqVO pageReqVO) { |
| 18 | return selectPage(pageReqVO, new QueryWrapperX<MailAccountDO>() | 18 | return selectPage(pageReqVO, new QueryWrapperX<MailAccountDO>() |
| 19 | - .likeIfPresent("from" , pageReqVO.getFrom()) | 19 | + .likeIfPresent("from_address" , pageReqVO.getFromAddress()) |
| 20 | .likeIfPresent("host" , pageReqVO.getHost()) | 20 | .likeIfPresent("host" , pageReqVO.getHost()) |
| 21 | .likeIfPresent("username" , pageReqVO.getUsername()) | 21 | .likeIfPresent("username" , pageReqVO.getUsername()) |
| 22 | .eqIfPresent("password" , pageReqVO.getPassword()) | 22 | .eqIfPresent("password" , pageReqVO.getPassword()) |
| @@ -27,18 +27,18 @@ public interface MailAccountMapper extends BaseMapperX<MailAccountDO> { | @@ -27,18 +27,18 @@ public interface MailAccountMapper extends BaseMapperX<MailAccountDO> { | ||
| 27 | default MailAccountDO selectByUserName(String userName){ | 27 | default MailAccountDO selectByUserName(String userName){ |
| 28 | return selectOne(new QueryWrapperX<MailAccountDO>() | 28 | return selectOne(new QueryWrapperX<MailAccountDO>() |
| 29 | .eqIfPresent("username" , userName)); | 29 | .eqIfPresent("username" , userName)); |
| 30 | - }; | 30 | + } |
| 31 | 31 | ||
| 32 | default MailAccountDO selectByUserNameAndId(String userName,Long id){ | 32 | default MailAccountDO selectByUserNameAndId(String userName,Long id){ |
| 33 | return selectOne(new QueryWrapperX<MailAccountDO>() | 33 | return selectOne(new QueryWrapperX<MailAccountDO>() |
| 34 | .eqIfPresent("username" , userName) | 34 | .eqIfPresent("username" , userName) |
| 35 | .neIfPresent("id" , id)); | 35 | .neIfPresent("id" , id)); |
| 36 | - }; | 36 | + } |
| 37 | 37 | ||
| 38 | default MailAccountDO selectOneByFrom(String from){ | 38 | default MailAccountDO selectOneByFrom(String from){ |
| 39 | return selectOne(new QueryWrapperX<MailAccountDO>() | 39 | return selectOne(new QueryWrapperX<MailAccountDO>() |
| 40 | - .eqIfPresent("from" , from)); | ||
| 41 | - }; | 40 | + .eqIfPresent("from_address" , from)); |
| 41 | + } | ||
| 42 | 42 | ||
| 43 | @Select("SELECT COUNT(*) FROM system_mail_account WHERE update_time > #{maxUpdateTime}") | 43 | @Select("SELECT COUNT(*) FROM system_mail_account WHERE update_time > #{maxUpdateTime}") |
| 44 | Long selectCountByUpdateTimeGt(Date maxUpdateTime); | 44 | Long selectCountByUpdateTimeGt(Date maxUpdateTime); |