package com.panzhihua.common.model.dtos.grid;
|
|
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.Pattern;
|
|
import org.hibernate.validator.constraints.Length;
|
|
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 PageEventGridNearbyDTO {
|
|
@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", message = "排序方式参数错误")
|
private String sortType = "desc";
|
@Length(max = 255)
|
@ApiModelProperty(value = "发生的精度纬度信息(逗号隔开'经度,维度')", hidden = false, example = "104.060748,30.65769",
|
required = true)
|
@NotNull
|
private String happentLatLng;
|
@ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1")
|
private Long userId;
|
@ApiModelProperty(value = "(当前操作)用户ID", hidden = true, example = "1")
|
private Long userName;
|
|
public String getSortColumns() {
|
String dbColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, sortAttr);
|
return dbColumn;
|
}
|
|
}
|