mitao
2025-05-20 179c4d64313c9b7572778da4aaaf6c6584fe457d
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/PageSysConfDTO.java
@@ -1,15 +1,18 @@
package com.panzhihua.common.model.dtos.community;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.base.CaseFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import javax.validation.constraints.Max;
import javax.validation.constraints.Pattern;
import java.util.Date;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.base.CaseFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * 分页查询表单
@@ -18,7 +21,7 @@
 * @version 1.0
 * @since 1.0
 * @date 2021-06-09
 * */
 */
@Data
@ApiModel("查询系统配置请求参数")
public class PageSysConfDTO {
@@ -30,65 +33,47 @@
    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)
    @ApiModelProperty(value = "参数唯一编码", hidden = false, example = "")
    private String code;
    @Length(max=65535)
    @Length(max = 65535)
    @ApiModelProperty(value = "参数值", hidden = false, example = "")
    private String value;
    @Length(max=100)
    @Length(max = 100)
    @ApiModelProperty(value = "参数描述", hidden = false, example = "")
    private String describe;
    @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;
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "社区id", hidden = false, example = "1")
    private Long communityId;
    @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;
    }
}