From 72e72b8733cd2fd063f251bc7450c9e36b01f352 Mon Sep 17 00:00:00 2001
From: 童刚 <pBP8jclM@8yTJ@4h>
Date: 星期三, 03 八月 2022 18:58:12 +0800
Subject: [PATCH] 111

---
 src/main/java/com/hz/util/http/dto/HttpHzResponse.java |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/hz/util/http/dto/HttpHzResponse.java b/src/main/java/com/hz/util/http/dto/HttpHzResponse.java
index 2b663e6..2efbe3b 100644
--- a/src/main/java/com/hz/util/http/dto/HttpHzResponse.java
+++ b/src/main/java/com/hz/util/http/dto/HttpHzResponse.java
@@ -1,5 +1,7 @@
 package com.hz.util.http.dto;
 
+import com.hx.exception.TipsException;
+
 /**
  * 璇锋眰杩斿洖缁熶竴dto
  */
@@ -12,8 +14,26 @@
     /**杩斿洖淇℃伅*/
     private String data;
 
-    /**璇锋眰杩斿洖鐘舵��*/
+    /**璇锋眰杩斿洖鐘舵��-鎴愬姛*/
     public static final String CODE_200 = "200";
+    /**璇锋眰杩斿洖鐘舵��-鎴愬姛*/
+    public static final String CODE_201 = "201";
+
+    /**灏佽鏍¢獙璇锋眰鐮佹柟娉曪紝娌℃湁杩涜閿欒鎻愮ず*/
+    public boolean checkRequesCode(){
+        if(CODE_200.equals(code) || CODE_201.equals(code)){
+            return true;
+        }
+        return false;
+    }
+
+    /**灏佽鏍¢獙璇锋眰鐮佹柟娉曪紝杩涜閿欒鎻愮ず*/
+    public void checkRequesThrow(){
+        if(!CODE_200.equals(code) && !CODE_201.equals(code)){
+            throw new TipsException("璇锋眰URL澶辫触锛�"+this.msg);
+        }
+
+    }
 
     public String getCode() {
         return code;

--
Gitblit v1.8.0