From 134812303e608706fb2a980c0dfa79f8f749f455 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期二, 02 十二月 2025 11:19:13 +0800
Subject: [PATCH] 格式化代码
---
Wms/Wms/Controllers/WeatherForecastController.cs | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/Wms/Wms/Controllers/WeatherForecastController.cs b/Wms/Wms/Controllers/WeatherForecastController.cs
index a46ab50..6e8d005 100644
--- a/Wms/Wms/Controllers/WeatherForecastController.cs
+++ b/Wms/Wms/Controllers/WeatherForecastController.cs
@@ -59,15 +59,15 @@
{
var userId = await _userMan.LoginAdmin(model.LoginName, model.LoginPwd);
- if (userId != -1) //
+ if (userId != -1 && userId != -2) //
{
if (userId != 0) //姝g‘杩斿洖
{
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>
- {
- {"loginID", userId.ToString()},
- {"LoginName", model.LoginName}
- };
+ {
+ {"loginID", userId.ToString()},
+ {"LoginName", model.LoginName}
+ };
var tnToken = tokenHelper.CreateToken(keyValuePairs);
return tnToken.TokenStr;
}
@@ -77,10 +77,14 @@
throw Oops.Bah("褰撳墠璐﹀彿宸茶绂佺敤");
}
}
- else //璐﹀彿瀵嗙爜閿欒
+ else if (userId == -1) //璐﹀彿瀵嗙爜閿欒
{
throw Oops.Bah("褰撳墠璐﹀彿鎴栧瘑鐮侀敊璇�");
}
+ else
+ {
+ throw Oops.Bah("褰撳墠璐﹀彿宸茶閿佸畾锛岃鑱旂郴绠$悊鍛樺鐞�");
+ }
}
else //鏁版嵁鏍煎紡閿欒
{
--
Gitblit v1.8.0