From a38b50675f2cf8e813bd337ca2f9d9456cc421d3 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 17 十月 2024 09:50:14 +0800
Subject: [PATCH] WCS

---
 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 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"
new file mode 100644
index 0000000..e0dbf29
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
@@ -0,0 +1,56 @@
+锘縩amespace WIDESEA_WMSServer.Controllers;
+
+[Route("api/Sys_User")]
+[ApiController]
+public class Sys_UserController : ApiBaseController<ISys_UserService, Sys_User>
+{
+    private readonly IHttpContextAccessor _httpContextAccessor;
+
+    public Sys_UserController(ISys_UserService userService, IHttpContextAccessor httpContextAccessor) : base(userService)
+    {
+        _httpContextAccessor = httpContextAccessor;
+    }
+
+    [HttpPost, Route("login"), AllowAnonymous]
+    public IActionResult Login([FromBody] LoginInfo loginInfo)
+    {
+        return Json(Service.Login(loginInfo));
+    }
+
+    [HttpPost, Route("getCurrentUserInfo")]
+    public WebResponseContent GetCurrentUser()
+    {
+        return Service.GetCurrentUserInfo();
+    }
+
+    [HttpPost, Route("modifyPwd")]
+    public IActionResult ModifyPwd(string oldPwd, string newPwd)
+    {
+        return Json(Service.ModifyPwd(oldPwd, newPwd));
+    }
+    [HttpPost, Route("UpdateInfo")]
+    public IActionResult UpdateInfo(int user_Id, string roleName, string userName, string userTrueName, string address, int gender, string remark)
+    {
+        return Json(Service.UpdateInfo(user_Id, roleName, userName, userTrueName, address, gender, remark));
+    }
+
+    [HttpGet, Route("getVierificationCode"), AllowAnonymous]
+    public IActionResult GetVierificationCode()
+    {
+        //var html = MiniProfiler.Current.RenderIncludes(_httpContextAccessor.HttpContext);
+        string code = "1234" /*VierificationCode.RandomText()*/;
+        var data = new
+        {
+            img = VierificationCode.CreateBase64Imgage(code),
+            uuid = Guid.NewGuid()
+        };
+
+        return Json(data);
+    }
+
+    [HttpGet, Route("SerializeJwt"), AllowAnonymous]
+    public WebResponseContent SerializeJwt(string code)
+    {
+        return WebResponseContent.Instance.OK(data: JwtHelper.SerializeJwt(code));
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3