From cfa7d0a90e7da9b52606ab8fca364fa5bddddcd4 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 28 八月 2025 20:14:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0

---
 cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java
index d1e0d3e..912a123 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/TVipController.java
@@ -153,22 +153,23 @@
             }
             vip.setCouponList(couponVipRespList);
             String ticketJson = vip.getTicketJson();
-            JSONArray ticketJsonArray = JSONArray.parseArray(ticketJson);
-            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-
-            for (Object o : ticketJsonArray) {
-                JSONObject ticketJsonObject = (JSONObject) o;
-                TicketVipResp ticketVipResp = new TicketVipResp();
-                Integer count = ticketJsonObject.getInteger("count");
-                ticketVipResp.setName(ticketJsonObject.getString("name"));
-                ticketVipResp.setTime(ticketJsonObject.getInteger("time"));
-                ticketVipResp.setCount(ticketJsonObject.getInteger("count"));
-                ticketVipResp.setStartTime(simpleDateFormat.format(new Date()));
-                Date date = new Date();
-                // 给这个date加X天
-                date.setTime(date.getTime() + ticketJsonObject.getInteger("time") * 24 * 60 * 60 * 1000);
-                ticketVipResp.setEffectiveTime(simpleDateFormat.format(date));
-                ticketVipRespList.add(ticketVipResp);
+            if(ticketJson!=null){
+                JSONArray ticketJsonArray = JSONArray.parseArray(ticketJson);
+                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+                for (Object o : ticketJsonArray) {
+                    JSONObject ticketJsonObject = (JSONObject) o;
+                    TicketVipResp ticketVipResp = new TicketVipResp();
+                    Integer count = ticketJsonObject.getInteger("count");
+                    ticketVipResp.setName(ticketJsonObject.getString("name"));
+                    ticketVipResp.setTime(ticketJsonObject.getInteger("time"));
+                    ticketVipResp.setCount(ticketJsonObject.getInteger("count"));
+                    ticketVipResp.setStartTime(simpleDateFormat.format(new Date()));
+                    Date date = new Date();
+                    // 给这个date加X天
+                    date.setTime(date.getTime() + ticketJsonObject.getInteger("time") * 24 * 60 * 60 * 1000);
+                    ticketVipResp.setEffectiveTime(simpleDateFormat.format(date));
+                    ticketVipRespList.add(ticketVipResp);
+                }
             }
             vip.setTicketList(ticketVipRespList);
         }

--
Gitblit v1.7.1