From 5dab4426911016866b657197d6598b7a2da157c4 Mon Sep 17 00:00:00 2001
From: chenzx <m15572880737@163.com>
Date: 星期二, 17 十二月 2024 19:03:14 +0800
Subject: [PATCH] 20241217接口更新

---
 GasolineBlend.BLL/SubsidyDataBLL.cs |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/GasolineBlend.BLL/SubsidyDataBLL.cs b/GasolineBlend.BLL/SubsidyDataBLL.cs
index 60e6ede..d4afa6f 100644
--- a/GasolineBlend.BLL/SubsidyDataBLL.cs
+++ b/GasolineBlend.BLL/SubsidyDataBLL.cs
@@ -61,6 +61,10 @@
                     string responseBody = response.Content.ReadAsStringAsync().Result;
                     // 灏咼SON瀛楃涓插弽搴忓垪鍖栦负JObject
                     JObject jsonData = JObject.Parse(responseBody);
+                    if ((int)jsonData["error_code"] != 0) {
+
+                        return null;
+                    }
                     // 璁块棶宓屽鐨凧SON灞炴��
                     City = (string)jsonData["result"]["city"];
                     Region = (string)jsonData["result"]["district"];
@@ -222,9 +226,9 @@
         {
                 try
                 {
-                int IsVIP = _acc.GetIsPolicyVIPList(UserId);
-      
-                    int Count = _sir.GetSubsidyInquiryRecordToDayCount(UserId);
+                int IsVIP =34;
+                //int IsVIP = _acc.GetIsPolicyVIPList(UserId);
+                int Count = _sir.GetSubsidyInquiryRecordToDayCount(UserId);
                     if (Count>= IsVIP) {
                         Console.WriteLine("浠婃棩鏀跨瓥娲炲療棰濆害宸茬粡鐢ㄥ畬锛屽鏈夐渶瑕佽鑱旂郴绠$悊鍛�!");
                         return "-1";
@@ -246,7 +250,7 @@
                 // 璁剧疆API鐨刄RL
                 string apiUrl = "http://122.51.217.202/v1/workflows/run";
                 // 璁剧疆鎺堟潈浠ょ墝
-                string bearerToken = "app-rkZ7HxYgO77OHUsLruW9ozhY";
+                string bearerToken = "app-Glt4LjjBtby9DXoK2ohHunxO";
                 // 璁剧疆璇锋眰鐨凧SON鍐呭
                 string jsonContent = $@"{{
             ""user"": ""rensofter"",
@@ -285,11 +289,11 @@
                         // 瑙f瀽data瀛楁涓殑JSON瀛楃涓�
                         var datatxt = JObject.Parse(outputs);
                         // 鎻愬彇output瀛楁
-                        string text = datatxt["text"].ToString();
+                        string text = datatxt["data"].ToString();
 
 
                         bool isInsert = _sir.AddSubsidyInquiryRecordData(UserId, CompanyName, text);
-                            if (!isInsert&& text == null)
+                            if (!isInsert&& data == null)
                             {
                                 Console.WriteLine("璇锋眰澶辫触");
                                 return null;
@@ -310,7 +314,5 @@
                 }
         
         }
-
-
     }
 }

--
Gitblit v1.8.0