All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.javaclub.base.domain.query.AdminUserQuery Maven / Gradle / Ivy

/* Automatic generated by CrudCodeGenerator wirtten by Gerald Chen
 *
 * @(#)AdminUserQuery.java  2023-09-06
 *
 * Copyright (c) 2023 - 2099. All Rights Reserved.
 *
 */

package com.github.javaclub.base.domain.query;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.javaclub.base.domain.AdminUser;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * AdminUserQuery 查询条件
 *
 * @version $Id: AdminUserQuery.java 2023-09-06 19:11:12 Exp $
 */
@Data
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "AdminUser 查询条件")
public class AdminUserQuery extends BaseQuery {

	private static final long serialVersionUID = 1693998671724L;
	
	@ApiModelProperty(value = "邮箱")
	private String email;

	@ApiModelProperty(value = "用户名精确匹配")
	private String username;
	
	@ApiModelProperty(value = "用户名 LIKE 匹配")
	private String usernameLike;

	@ApiModelProperty(value = "手机号")
	private String mobile;

	@ApiModelProperty(value = "姓名 LIKE 匹配")
	private String nameLike;
	
	@ApiModelProperty(value = "后台管理查询", hidden = true)
	private boolean queryManageList;

	
	public AdminUserQuery() {
	}

	public QueryWrapper queryWrapper() {
		QueryWrapper q = super.buildBaseQuery();
		
		q.eq(null != getEmail(), "email", getEmail());
		q.eq(null != getUsername(), "username", getUsername());
		q.eq(null != getMobile(), "mobile", getMobile());
		if (isQueryManageList()) {
			q.gt("id", 0);
		}

		q.like(null != getNameLike(), "name", getNameLike());
		q.like(null != getUsernameLike(), "username", getUsernameLike());

		return q;
	}
	
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy