From 745d27feae34022ccb708aba034123e08e4e9e14 Mon Sep 17 00:00:00 2001
From: 1098226878@qq.com <1098226878@qq.com>
Date: 星期二, 28 十二月 2021 22:21:16 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 java110-bean/src/main/java/com/java110/vo/ResultVo.java |   36 ++++++++++++++++++++++++++++++++++--
 1 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/java110-bean/src/main/java/com/java110/vo/ResultVo.java b/java110-bean/src/main/java/com/java110/vo/ResultVo.java
index ee7ea09..89e4b00 100755
--- a/java110-bean/src/main/java/com/java110/vo/ResultVo.java
+++ b/java110-bean/src/main/java/com/java110/vo/ResultVo.java
@@ -42,6 +42,8 @@
     public static final int DEFAULT_RECORD = 1;
     public static final int DEFAULT_TOTAL = 1;
 
+    public static final int CODE_WAIT_PAY = 41;// 鏀粯鏈畬鎴�
+
     // 鍒嗛〉椤垫暟
     private int page;
     // 琛屾暟
@@ -51,7 +53,7 @@
     private int records;
 
     // 鎬昏褰曟暟
-    private int total;
+    private long total;
 
     //鐘舵��
     private int code;
@@ -83,6 +85,14 @@
     }
 
     public ResultVo(int records, int total, Object data) {
+        this.code = CODE_OK;
+        this.msg = MSG_OK;
+        this.records = records;
+        this.total = total;
+        this.data = data;
+    }
+
+    public ResultVo(int records, long total, Object data) {
         this.code = CODE_OK;
         this.msg = MSG_OK;
         this.records = records;
@@ -147,7 +157,7 @@
         this.records = records;
     }
 
-    public int getTotal() {
+    public long getTotal() {
         return total;
     }
 
@@ -240,6 +250,17 @@
      *
      * @return
      */
+    public static ResponseEntity<String> error(String msg,HttpStatus status) {
+        ResultVo resultVo = new ResultVo(CODE_ERROR, msg);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), status);
+        return responseEntity;
+    }
+
+    /**
+     * 鎴愬姛閫氱敤鍥炲
+     *
+     * @return
+     */
     public static ResponseEntity<String> error(String msg) {
         ResultVo resultVo = new ResultVo(CODE_ERROR, msg);
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
@@ -247,6 +268,17 @@
     }
 
     /**
+     * 鎴愬姛閫氱敤鍥炲
+     *
+     * @return
+     */
+    public static ResponseEntity<String> error(String msg,Object data) {
+        ResultVo resultVo = new ResultVo(CODE_ERROR, msg,data);
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+        return responseEntity;
+    }
+
+    /**
      * 鍒涘缓ResponseEntity瀵硅薄
      *
      * @param records 椤垫暟

--
Gitblit v1.8.0