From bf3d681bbfa33a98e67bf6ac7338f49d4ac4cd47 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 24 四月 2026 11:29:38 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/WebAPIController.cs |   76 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 0f44ead..bbc9e01 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -23993,5 +23993,81 @@
             }
         }
         #endregion
+
+        /// <summary>
+        /// APP鐧诲綍鏉冮檺楠岃瘉鎺ュ彛
+        /// </summary>
+        [Route("Auth/CheckAppLoginAuth")]
+        [HttpPost]
+        public object CheckAppLoginAuth()
+        {
+            try
+            {
+                // 鑾峰彇璇锋眰鍙傛暟
+                string orgID = HttpContext.Current.Request.Form["orgID"] ?? "";
+                string orgName = HttpContext.Current.Request.Form["orgName"] ?? "";
+                string serverUrl = HttpContext.Current.Request.Form["serverUrl"] ?? "";
+                string phoneType = HttpContext.Current.Request.Form["phoneType"] ?? "";
+                string userAccount = HttpContext.Current.Request.Form["userAccount"] ?? "";
+                string other = HttpContext.Current.Request.Form["other"] ?? "";
+                // 鍙傛暟楠岃瘉
+                if (string.IsNullOrEmpty(userAccount))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "璐﹀彿涓嶈兘涓虹┖!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (string.IsNullOrEmpty(orgID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "缁勭粐ID涓嶈兘涓虹┖!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                // 鍙傛暟瀹夊叏澶勭悊锛堥槻姝㈡敞鍏ワ級
+                orgID = orgID.Replace("'", "''");
+                orgName = orgName.Replace("'", "''");
+                serverUrl = serverUrl.Replace("'", "''");
+                phoneType = phoneType.Replace("'", "''");
+                userAccount = userAccount.Replace("'", "''");
+
+                // 鎵ц鍥哄畾瀛樺偍杩囩▼
+                string sql = $"EXEC SP_CheckAppLoginAuth '{orgID}', '{orgName}', '{serverUrl}', '{phoneType}','{userAccount}','{other}'";
+                ds = oCN.RunProcReturn(sql, "SP_CheckAppLoginAuth");
+
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    int result = Convert.ToInt32(ds.Tables[0].Rows[0]["Result"]);
+                    string message = ds.Tables[0].Rows[0]["Message"].ToString();
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = message;
+                    objJsonResult.data = ds.Tables[0];
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "楠岃瘉鎺ュ彛杩斿洖寮傚父!";
+                    objJsonResult.data = null;
+                }
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
     }
 }

--
Gitblit v1.9.1