diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java index b785b74cc..8e392d476 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountBaseVO.java +++ b/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 { @ApiModelProperty(value = "邮箱",required = true,example = "yudaoyuanma@123.com") @NotNull(message = "邮箱必填") - private String from; + @Email(message = "必须是Email格式") + private String fromAddress; @ApiModelProperty(value = "用户名",required = true,example = "yudao") @NotNull(message = "用户名必填") - @Email(message = "必须是Email格式") private String username; @ApiModelProperty(value = "网站",required = true,example = "www.iocoder.cn") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java index 2ae2ad162..327c8465d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/mail/vo/account/MailAccountPageReqVO.java +++ b/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; public class MailAccountPageReqVO extends PageParam { @ApiModelProperty(value = "邮箱" , required = true , example = "yudaoyuanma@123.com") - private String from; + private String fromAddress; @ApiModelProperty(value = "用户名" , required = true , example = "yudao") private String username; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java index 7b17104ec..910440df7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/mail/MailAccountDO.java @@ -25,8 +25,7 @@ public class MailAccountDO extends BaseDO { /** * 邮箱 */ - @TableField("`from`") - private String from; + private String fromAddress; /** * 用户名 */ diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailAccountMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailAccountMapper.java index e869ecf22..1e4f263ac 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/mail/MailAccountMapper.java +++ b/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 { default PageResult selectPage(MailAccountPageReqVO pageReqVO) { return selectPage(pageReqVO, new QueryWrapperX() - .likeIfPresent("from" , pageReqVO.getFrom()) + .likeIfPresent("from_address" , pageReqVO.getFromAddress()) .likeIfPresent("host" , pageReqVO.getHost()) .likeIfPresent("username" , pageReqVO.getUsername()) .eqIfPresent("password" , pageReqVO.getPassword()) @@ -27,18 +27,18 @@ public interface MailAccountMapper extends BaseMapperX { default MailAccountDO selectByUserName(String userName){ return selectOne(new QueryWrapperX() .eqIfPresent("username" , userName)); - }; + } default MailAccountDO selectByUserNameAndId(String userName,Long id){ return selectOne(new QueryWrapperX() .eqIfPresent("username" , userName) .neIfPresent("id" , id)); - }; + } default MailAccountDO selectOneByFrom(String from){ return selectOne(new QueryWrapperX() - .eqIfPresent("from" , from)); - }; + .eqIfPresent("from_address" , from)); + } @Select("SELECT COUNT(*) FROM system_mail_account WHERE update_time > #{maxUpdateTime}") Long selectCountByUpdateTimeGt(Date maxUpdateTime);