From 3e778155459a2d5a2f0214f57ff83c3760ed8381 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 10 二月 2025 14:36:43 +0800
Subject: [PATCH] 添加WMSapi接口调用接口日志记录、添加WMSswagger访问接口账号密码、添加WMS到期时间6-30
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
index 3a25466..70c7c86 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
@@ -8,6 +8,7 @@
using WIDESEA_Core.BaseController;
using WIDESEA_Core.Caches;
using WIDESEA_Core.Const;
+using WIDESEA_Core.Extensions;
using WIDESEA_Core.Helper;
using WIDESEA_Core.HttpContextUser;
using WIDESEA_Core.Utilities;
@@ -34,6 +35,30 @@
public IActionResult Login([FromBody] LoginInfo loginInfo)
{
return Json(Service.Login(loginInfo));
+ }
+
+ [HttpPost, Route("swgLogin"), AllowAnonymous]
+ public dynamic SwgLogin([FromBody] SwaggerLoginRequest loginRequest)
+ {
+ if (loginRequest is null)
+ {
+ return new { result = false };
+ }
+
+ try
+ {
+ if (loginRequest.name == "admin" && loginRequest.pwd == $"admin!{DateTime.Now.ToString("yyyyMMdd")}")
+ {
+ HttpContext.SuccessSwagger();
+ return new { result = true };
+ }
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+ return new { result = false };
}
[HttpPost, Route("getCurrentUserInfo")]
@@ -94,5 +119,10 @@
}
}
+ public class SwaggerLoginRequest
+ {
+ public string name { get; set; }
+ public string pwd { get; set; }
+ }
}
}
--
Gitblit v1.9.3