完善系统管理员添加手机号码、邮箱地址查询条件

pull/20/MERGE
yepingping 2023-02-09 06:03:14 +00:00 committed by smallbun
parent b25b275e7d
commit 519e3d1e79
2 changed files with 12 additions and 0 deletions

View File

@ -144,6 +144,8 @@ public interface AdministratorConverter {
//查询条件
//@formatter:off
predicate = StringUtils.isBlank(query.getUsername()) ? predicate : ExpressionUtils.and(predicate, user.username.eq(query.getUsername()));
predicate = StringUtils.isBlank(query.getPhone()) ? predicate : ExpressionUtils.and(predicate, user.phone.like("%" + query.getPhone() + "%"));
predicate = StringUtils.isBlank(query.getEmail()) ? predicate : ExpressionUtils.and(predicate, user.email.like("%" + query.getEmail() + "%"));
//@formatter:on
return predicate;
}

View File

@ -37,4 +37,14 @@ public class AdministratorListQuery {
*/
@Parameter(description = "用户名")
private String username;
/**
* phone
*/
@Parameter(description = "手机号码")
private String phone;
/**
* email
*/
@Parameter(description = "邮箱地址")
private String email;
}