|
@@ -0,0 +1,123 @@
|
|
|
+package com.fuzamei.entity;
|
|
|
+
|
|
|
+import javax.validation.constraints.Digits;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+
|
|
|
+import org.hibernate.validator.constraints.NotEmpty;
|
|
|
+import org.hibernate.validator.constraints.Range;
|
|
|
+/**
|
|
|
+5 * Bean Validation 中内置的 constraint
|
|
|
+6 * @Null 被注释的元素必须为 null
|
|
|
+7 * @NotNull 被注释的元素必须不为 null
|
|
|
+8 * @AssertTrue 被注释的元素必须为 true
|
|
|
+9 * @AssertFalse 被注释的元素必须为 false
|
|
|
+10 * @Min(value) 被注释的元素必须是一个数字,其值必须大于等于指定的最小值
|
|
|
+11 * @Max(value) 被注释的元素必须是一个数字,其值必须小于等于指定的最大值
|
|
|
+12 * @DecimalMin(value) 被注释的元素必须是一个数字,其值必须大于等于指定的最小值
|
|
|
+13 * @DecimalMax(value) 被注释的元素必须是一个数字,其值必须小于等于指定的最大值
|
|
|
+14 * @Size(max=, min=) 被注释的元素的大小必须在指定的范围内
|
|
|
+15 * @Digits (integer, fraction) 被注释的元素必须是一个数字,其值必须在可接受的范围内
|
|
|
+16 * @Past 被注释的元素必须是一个过去的日期
|
|
|
+17 * @Future 被注释的元素必须是一个将来的日期
|
|
|
+18 * @Pattern(regex=,flag=) 被注释的元素必须符合指定的正则表达式
|
|
|
+19 * Hibernate Validator 附加的 constraint
|
|
|
+20 * @NotBlank(message =) 验证字符串非null,且长度必须大于0
|
|
|
+21 * @Email 被注释的元素必须是电子邮箱地址
|
|
|
+22 * @Length(min=,max=) 被注释的字符串的大小必须在指定的范围内
|
|
|
+23 * @NotEmpty 被注释的字符串的必须非空
|
|
|
+24 * @Range(min=,max=,message=) 被注释的元素必须在合适的范围内
|
|
|
+25 */
|
|
|
+/*@NotNull 和 @NotEmpty 和@NotBlank 区别
|
|
|
+@NotEmpty 用在集合类上面
|
|
|
+@NotBlank 用在String上面
|
|
|
+@NotNull 用在基本类型上
|
|
|
+如果在基本类型上面用NotEmpty或者NotBlank 会出现上面的错*/
|
|
|
+/**
|
|
|
+ *
|
|
|
+ * @author ylx
|
|
|
+ * @version 1.0
|
|
|
+ * @descible 操作记录模块中查询的操作接受的实体类信息
|
|
|
+ */
|
|
|
+public class OperationHistoryBO {
|
|
|
+ @NotNull(message="用户id号不能为空")
|
|
|
+ @Min(value=0,message="必须是一个大于0的数字")
|
|
|
+ private Integer userId;
|
|
|
+
|
|
|
+ @NotNull(message="页数不能为空")
|
|
|
+ @Range(min=1,max=Integer.MAX_VALUE,message="页数最小值应该为1")
|
|
|
+ private Integer page;
|
|
|
+
|
|
|
+ private String account;
|
|
|
+
|
|
|
+ private String role;
|
|
|
+
|
|
|
+ private String type;
|
|
|
+
|
|
|
+ private Long startTime;
|
|
|
+
|
|
|
+ private Long endTime;
|
|
|
+
|
|
|
+ public Integer getUserId() {
|
|
|
+ return userId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setUserId(Integer userId) {
|
|
|
+ this.userId = userId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getPage() {
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPage(Integer page) {
|
|
|
+ this.page = page;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getAccount() {
|
|
|
+ return account;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAccount(String account) {
|
|
|
+ this.account = account;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getRole() {
|
|
|
+ return role;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setRole(String role) {
|
|
|
+ this.role = role;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getType() {
|
|
|
+ return type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setType(String type) {
|
|
|
+ this.type = type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getStartTime() {
|
|
|
+ return startTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setStartTime(Long startTime) {
|
|
|
+ this.startTime = startTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getEndTime() {
|
|
|
+ return endTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEndTime(Long endTime) {
|
|
|
+ this.endTime = endTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return "OperationHistoryBO [userId=" + userId + ", page=" + page + ", account=" + account + ", role=" + role
|
|
|
+ + ", type=" + type + ", startTime=" + startTime + ", endTime=" + endTime + "]";
|
|
|
+ }
|
|
|
+
|
|
|
+}
|