From 32420f572c9e4d2f0c424214bc92f75e7dfe56f1 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期二, 14 一月 2025 09:01:37 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
index d9033aa..0545c40 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
@@ -2,12 +2,14 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
+using Newtonsoft.Json;
using StackExchange.Profiling;
using WIDESEA_Core;
using WIDESEA_Core.Authorization;
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;
@@ -37,6 +39,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")]
@@ -97,5 +123,22 @@
}
}
+ /// <summary>
+ /// 鏇存柊瀵嗙爜
+ /// </summary>
+ /// <param name="password">瀵嗙爜</param>
+ /// <param name="userName">鐢ㄦ埛鍚�</param>
+ /// <returns></returns>
+ [HttpPost,Route("ModifyUserPwd")]
+ public WebResponseContent ModifyUserPwd(string password, string userName)
+ {
+ return Service.ModifyUserPwd(password,userName);
+ }
+ }
+
+ public class SwaggerLoginRequest
+ {
+ public string name { get; set; }
+ public string pwd { get; set; }
}
}
--
Gitblit v1.9.3