diff --git a/server/src/main/java/edp/davinci/dto/dashboardDto/DashboardCreate.java b/server/src/main/java/edp/davinci/dto/dashboardDto/DashboardCreate.java index 272b0f736..e716e3d7b 100644 --- a/server/src/main/java/edp/davinci/dto/dashboardDto/DashboardCreate.java +++ b/server/src/main/java/edp/davinci/dto/dashboardDto/DashboardCreate.java @@ -37,8 +37,8 @@ public class DashboardCreate { @Min(value = 1L, message = "Invalid dashboard portal id") private Long dashboardPortalId; - @Min(value = (short) 0, message = "Invalid dashboard type") - @Max(value = (short) 1, message = "Invalid dashboard type") + @Min(value = 0, message = "Invalid dashboard type") + @Max(value = 1, message = "Invalid dashboard type") private Short type = 0; private Integer index = 0; diff --git a/server/src/main/java/edp/davinci/dto/roleDto/RelRoleProjectDto.java b/server/src/main/java/edp/davinci/dto/roleDto/RelRoleProjectDto.java index 1ca41160a..d410ea56a 100644 --- a/server/src/main/java/edp/davinci/dto/roleDto/RelRoleProjectDto.java +++ b/server/src/main/java/edp/davinci/dto/roleDto/RelRoleProjectDto.java @@ -29,24 +29,24 @@ @NotNull public class RelRoleProjectDto { - @Min(value = (short) 0, message = "Invalid source permission") - @Max(value = (short) 3, message = "Invalid source permission") + @Min(value = 0, message = "Invalid source permission") + @Max(value = 3, message = "Invalid source permission") private Short sourcePermission = 1; - @Min(value = (short) 0, message = "Invalid view permission") - @Max(value = (short) 3, message = "Invalid view permission") + @Min(value = 0, message = "Invalid view permission") + @Max(value = 3, message = "Invalid view permission") private Short viewPermission = 1; - @Min(value = (short) 0, message = "Invalid widget permission") - @Max(value = (short) 3, message = "Invalid widget permission") + @Min(value = 0, message = "Invalid widget permission") + @Max(value = 3, message = "Invalid widget permission") private Short widgetPermission = 1; - @Min(value = (short) 0, message = "Invalid viz permission") - @Max(value = (short) 3, message = "Invalid viz permission") + @Min(value = 0, message = "Invalid viz permission") + @Max(value = 3, message = "Invalid viz permission") private Short vizPermission = 1; - @Min(value = (short) 0, message = "Invalid schedule permission") - @Max(value = (short) 3, message = "Invalid schedule permission") + @Min(value = 0, message = "Invalid schedule permission") + @Max(value = 3, message = "Invalid schedule permission") private Short schedulePermission = 1; private Boolean sharePermission = false; diff --git a/server/src/main/java/edp/davinci/dto/sourceDto/UploadMeta.java b/server/src/main/java/edp/davinci/dto/sourceDto/UploadMeta.java index 998fa599f..a48a1dda4 100644 --- a/server/src/main/java/edp/davinci/dto/sourceDto/UploadMeta.java +++ b/server/src/main/java/edp/davinci/dto/sourceDto/UploadMeta.java @@ -34,7 +34,7 @@ public class UploadMeta { @NotBlank(message = "table name cannot be EMPTY") private String tableName; - @Min(value = (short) 0, message = "Invalid mode") - @Max(value = (short) 2, message = "Invalid mode") + @Min(value = 0, message = "Invalid mode") + @Max(value = 2, message = "Invalid mode") private short mode = UploadModeEnum.NEW.getMode(); } diff --git a/server/src/main/java/edp/davinci/model/Dashboard.java b/server/src/main/java/edp/davinci/model/Dashboard.java index b3d066e39..ac3b83e69 100644 --- a/server/src/main/java/edp/davinci/model/Dashboard.java +++ b/server/src/main/java/edp/davinci/model/Dashboard.java @@ -41,8 +41,8 @@ public class Dashboard extends RecordInfo { @Min(value = 1L, message = "Invalid dashboard portal id") private Long dashboardPortalId; - @Min(value = (short) 0, message = "Invalid dashboard type") - @Max(value = (short) 2, message = "Invalid dashboard type") + @Min(value = 0, message = "Invalid dashboard type") + @Max(value = 2, message = "Invalid dashboard type") private Short type; private Integer index = 0;