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 | 13 | |
| 14 | 14 | @ApiModelProperty(value = "邮箱",required = true,example = "yudaoyuanma@123.com") |
| 15 | 15 | @NotNull(message = "邮箱必填") |
| 16 | - private String from; | |
| 16 | + @Email(message = "必须是Email格式") | |
| 17 | + private String fromAddress; | |
| 17 | 18 | |
| 18 | 19 | @ApiModelProperty(value = "用户名",required = true,example = "yudao") |
| 19 | 20 | @NotNull(message = "用户名必填") |
| 20 | - @Email(message = "必须是Email格式") | |
| 21 | 21 | private String username; |
| 22 | 22 | |
| 23 | 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 | 14 | public class MailAccountPageReqVO extends PageParam { |
| 15 | 15 | |
| 16 | 16 | @ApiModelProperty(value = "邮箱" , required = true , example = "yudaoyuanma@123.com") |
| 17 | - private String from; | |
| 17 | + private String fromAddress; | |
| 18 | 18 | |
| 19 | 19 | @ApiModelProperty(value = "用户名" , required = true , example = "yudao") |
| 20 | 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 | 16 | |
| 17 | 17 | default PageResult<MailAccountDO> selectPage(MailAccountPageReqVO pageReqVO) { |
| 18 | 18 | return selectPage(pageReqVO, new QueryWrapperX<MailAccountDO>() |
| 19 | - .likeIfPresent("from" , pageReqVO.getFrom()) | |
| 19 | + .likeIfPresent("from_address" , pageReqVO.getFromAddress()) | |
| 20 | 20 | .likeIfPresent("host" , pageReqVO.getHost()) |
| 21 | 21 | .likeIfPresent("username" , pageReqVO.getUsername()) |
| 22 | 22 | .eqIfPresent("password" , pageReqVO.getPassword()) |
| ... | ... | @@ -27,18 +27,18 @@ public interface MailAccountMapper extends BaseMapperX<MailAccountDO> { |
| 27 | 27 | default MailAccountDO selectByUserName(String userName){ |
| 28 | 28 | return selectOne(new QueryWrapperX<MailAccountDO>() |
| 29 | 29 | .eqIfPresent("username" , userName)); |
| 30 | - }; | |
| 30 | + } | |
| 31 | 31 | |
| 32 | 32 | default MailAccountDO selectByUserNameAndId(String userName,Long id){ |
| 33 | 33 | return selectOne(new QueryWrapperX<MailAccountDO>() |
| 34 | 34 | .eqIfPresent("username" , userName) |
| 35 | 35 | .neIfPresent("id" , id)); |
| 36 | - }; | |
| 36 | + } | |
| 37 | 37 | |
| 38 | 38 | default MailAccountDO selectOneByFrom(String from){ |
| 39 | 39 | return selectOne(new QueryWrapperX<MailAccountDO>() |
| 40 | - .eqIfPresent("from" , from)); | |
| 41 | - }; | |
| 40 | + .eqIfPresent("from_address" , from)); | |
| 41 | + } | |
| 42 | 42 | |
| 43 | 43 | @Select("SELECT COUNT(*) FROM system_mail_account WHERE update_time > #{maxUpdateTime}") |
| 44 | 44 | Long selectCountByUpdateTimeGt(Date maxUpdateTime); | ... | ... |