瀏覽代碼

Merge remote-tracking branch 'origin/qianshan_data_bureau' into qianshan_data_bureau

Administrator 4 年之前
父節點
當前提交
f321af3c17

+ 10 - 3
boman-api/boman-domain/src/main/java/com.boman.domain/dto/FormDataDto.java

@@ -106,21 +106,28 @@ public class FormDataDto implements Serializable {
     private Long nodeId;
 
 
+    /******************************* 几个常量 **************************************/
+    public static final int MAX_PAGE_SIZE = 200;
+    public static final int DEFAULT_PAGE_SIZE = 10;
+    public static final int DEFAULT_PAGE_NO = 1;
+
+
     public int getLimit() {
         try {
             return pageNo == 0 ? 0 : (pageNo - 1) * pageSize;
         } catch (Exception e) {
             e.printStackTrace();
-            return 1;
+            return DEFAULT_PAGE_NO;
         }
     }
 
     public int getOffset(){
         try {
-            return pageSize == 0 ? 10 : pageSize;
+            int pageSize = this.pageSize == 0 ? DEFAULT_PAGE_SIZE : this.pageSize;
+            return Math.min(pageSize, MAX_PAGE_SIZE);
         } catch (Exception e) {
             e.printStackTrace();
-            return 10;
+            return DEFAULT_PAGE_SIZE;
         }
     }
 

+ 21 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/dto/UpdateDto.java

@@ -0,0 +1,21 @@
+package com.boman.domain.dto;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.Data;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author shiqian
+ * @date 2021年06月30日 16:42
+ **/
+@Data
+public class UpdateDto {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(UpdateDto.class);
+
+    private String tableName;
+
+    private JSONObject condition;
+    private JSONObject commitData;
+}