huanghongfa
2021-09-02 177249c76aeea0b4bf8d8816d4994e3b445b45ce
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageComEldersAuthElderlyDTO.java
@@ -1,17 +1,20 @@
package com.panzhihua.common.model.dtos.community;
import java.util.Date;
import javax.validation.constraints.Max;
import javax.validation.constraints.Pattern;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.base.CaseFormat;
import com.panzhihua.common.model.helper.encrypt.EncryptQuery;
import com.panzhihua.common.model.helper.encrypt.EncryptQueryClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Max;
import javax.validation.constraints.Pattern;
import java.util.Date;
/**
 * 分页查询表单
@@ -20,7 +23,7 @@
 * @version 1.0
 * @since 1.0
 * @date 2021-06-09
 * */
 */
@Data
@ApiModel("查询高龄老人库请求参数")
@EncryptQueryClass
@@ -33,94 +36,66 @@
    private Long pageSize = 10L;
    @ApiModelProperty(value = "排序字段, 默认createAt", example = "createAt", position = 3)
    private String sortAttr="createAt";
    private String sortAttr = "createAt";
    @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc", position = 4)
    @Pattern(regexp = "asc|desc|ASC|DESC")
    private String sortType="desc";
    @ApiModelProperty(value = "排序列", example = "create_at", hidden = true)
    public String getSortColumns(){
        String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr);
        return dbColumn;
    }
    private String sortType = "desc";
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "主键id", hidden = false, example = "1")
    private Long id;
    @Length(max=50)
    @Length(max = 50)
    @ApiModelProperty(value = "名称", hidden = false, example = "")
    private String name;
    @Length(max=50)
    @Length(max = 50)
    @EncryptQuery
    @ApiModelProperty(value = "身份证号码", hidden = false, example = "")
    private String idCard;
    @Length(max=50)
    @Length(max = 50)
    @ApiModelProperty(value = "出生年月", hidden = false, example = "")
    private String birthday;
    @Max(127)
    @ApiModelProperty(value = "人员类别(1.80-89周岁 2.90-99周岁 3.100周岁(含)以上)", hidden = false, example = "1")
    private Integer level;
    @Length(max=255)
    @Length(max = 255)
    @ApiModelProperty(value = "户籍地", hidden = false, example = "")
    private String domicile;
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "社区id", hidden = false, example = "1")
    private Long communityId;
    @Max(127)
    @ApiModelProperty(value = "是否健在(1.是  2.否)", hidden = false, example = "1")
    private Integer isExist;
    @Max(127)
    @ApiModelProperty(value = "是否办理高龄津贴(1.是 2.否)", hidden = false, example = "1")
    private Integer isBigAge;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间-开始时间", hidden = false, example = "2021-05-01 18:05:50")
    private Date createAtBegin;
    @ApiModelProperty(value = "创建时间-结束时间", hidden = false, example = "2021-05-01 18:05:50")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAtEnd;
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "创建用户", hidden = false, example = "1")
    private Long createBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "修改时间-开始时间", hidden = false, example = "2021-05-01 18:05:50")
    private Date updateAtBegin;
    @ApiModelProperty(value = "修改时间-结束时间", hidden = false, example = "2021-05-01 18:05:50")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateAtEnd;
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "修改用户", hidden = false, example = "1")
    private Long updateBy;
    @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1")
    private Long operUserId;
    @ApiModelProperty(value = "(当前操作)用户名称", hidden = true, example = "张三")
    private String operUserName;
    @ApiModelProperty(value = "排序列", example = "create_at", hidden = true)
    public String getSortColumns() {
        String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr);
        return dbColumn;
    }
}