邮件模块 bug -修改保留字冲突

This commit is contained in:
wangjingyi 2022-05-05 18:41:11 +08:00
parent 8d6a4d40a0
commit c3335ba2ca
4 changed files with 9 additions and 10 deletions

View File

@ -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")

View File

@ -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;

View File

@ -25,8 +25,7 @@ public class MailAccountDO extends BaseDO {
/**
* 邮箱
*/
@TableField("`from`")
private String from;
private String fromAddress;
/**
* 用户名
*/

View File

@ -16,7 +16,7 @@ public interface MailAccountMapper extends BaseMapperX<MailAccountDO> {
default PageResult<MailAccountDO> selectPage(MailAccountPageReqVO pageReqVO) {
return selectPage(pageReqVO, new QueryWrapperX<MailAccountDO>()
.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<MailAccountDO> {
default MailAccountDO selectByUserName(String userName){
return selectOne(new QueryWrapperX<MailAccountDO>()
.eqIfPresent("username" , userName));
};
}
default MailAccountDO selectByUserNameAndId(String userName,Long id){
return selectOne(new QueryWrapperX<MailAccountDO>()
.eqIfPresent("username" , userName)
.neIfPresent("id" , id));
};
}
default MailAccountDO selectOneByFrom(String from){
return selectOne(new QueryWrapperX<MailAccountDO>()
.eqIfPresent("from" , from));
};
.eqIfPresent("from_address" , from));
}
@Select("SELECT COUNT(*) FROM system_mail_account WHERE update_time > #{maxUpdateTime}")
Long selectCountByUpdateTimeGt(Date maxUpdateTime);