mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package com.panzhihua.common.model.dtos.grid;
 
import java.util.Date;
 
import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
 
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;
 
/**
 * 分页查询表单
 *
 * @author cedoo email:cedoo(a)qq.com
 * @version 1.0
 * @since 1.0
 * @date 2021-05-26
 */
@Data
@ApiModel("查询社区活动 》随手拍请求参数")
public class PageComActEasyPhotoDTO {
 
    @ApiModelProperty(value = "分页-当前页数", example = "1")
    private Long pageNum = 1L;
 
    @ApiModelProperty(value = "分页-每页记录数", example = "10")
    private Long pageSize = 10L;
 
    @ApiModelProperty(value = "排序字段, 默认createAt", example = "createAt")
    private String sortAttr = "createAt";
 
    @ApiModelProperty(value = "排序方式: asc/desc(默认)", example = "desc")
    @Pattern(regexp = "asc|desc|ASC|DESC")
    private String sortType = "desc";
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "自增id", hidden = false, example = "1")
    private Long id;
    @NotNull()
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "发起人id", hidden = false, example = "1")
    private Long sponsorId;
    @NotBlank()
    @Length(max = 100)
    @ApiModelProperty(value = "发生地址", hidden = false, example = "")
    private String happenAddr;
    @NotBlank(message = "地址备注不能为空")
    @Length(max = 50)
    @ApiModelProperty(value = "地址备注", hidden = false, example = "")
    private String addrRemark;
    @NotNull()
    @Max(127)
    @ApiModelProperty(value = "状态 1待处理 2已处理", hidden = false, example = "1")
    private Integer status;
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "处理人id", hidden = false, example = "1")
    private Long handlerId;
    @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;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "审核时间-开始时间", hidden = false, example = "2021-05-01 18:05:50")
    private Date examineAtBegin;
    @ApiModelProperty(value = "审核时间-结束时间", hidden = false, example = "2021-05-01 18:05:50")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date examineAtEnd;
    @Length(max = 65535)
    @ApiModelProperty(value = "详情", hidden = false, example = "")
    private String detail;
    @Length(max = 65535)
    @ApiModelProperty(value = "图片路径列表,逗号分隔", hidden = false, example = "")
    private String photoPathList;
    @Length(max = 65535)
    @ApiModelProperty(value = "处理结果", hidden = false, example = "")
    private String handleResult;
    @Length(max = 65535)
    @ApiModelProperty(value = "处理结果,图片路径列表,逗号分隔", hidden = false, example = "")
    private String handlePhotoList;
    @Max(9223372036854775807L)
    @ApiModelProperty(value = "社区id", hidden = false, example = "1")
    private Long communityId;
    @Max(127)
    @ApiModelProperty(value = "是否匿名发布 0 否 1 是", hidden = false, example = "1")
    private Integer isHide;
    @Max(127)
    @ApiModelProperty(value = "是否需要反馈 0 不需要 1 需要", hidden = false, example = "1")
    private Integer isNeedFeedBack;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "反馈时间-开始时间", hidden = false, example = "2021-05-01 18:05:50")
    private Date feedbackAtBegin;
    @ApiModelProperty(value = "反馈时间-结束时间", hidden = false, example = "2021-05-01 18:05:50")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date feedbackAtEnd;
    @Length(max = 500)
    @ApiModelProperty(value = "驳回原因", hidden = false, example = "")
    private String rejectReason;
    @Length(max = 65535)
    @ApiModelProperty(value = "封面图片", hidden = false, example = "")
    private String cover;
    @Max(127)
    @ApiModelProperty(value = "是否删除 0 否 1 是", hidden = false, example = "1")
    private Integer delTag;
    @Max(127)
    @ApiModelProperty(value = "是否上报社区处理(0.否 1.是)", hidden = false, example = "1")
    private Integer isReport;
    @Max(127)
    @ApiModelProperty(value = "是否公示(0.否 1.是)", hidden = false, example = "1")
    private Integer isPublicity;
    @ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1")
    private Long userId;
 
    public String getSortColumns() {
        String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr);
        return dbColumn;
    }
 
}