From 140164ad217c8a9b5023575ab146ffec4b07c6ce Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期三, 21 十二月 2022 16:34:32 +0800
Subject: [PATCH] App密码重置接口,App生产看板接口
---
VueWebApi/DLL/DAL/LoginDAL.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/VueWebApi/DLL/DAL/LoginDAL.cs b/VueWebApi/DLL/DAL/LoginDAL.cs
index 523a63f..9629540 100644
--- a/VueWebApi/DLL/DAL/LoginDAL.cs
+++ b/VueWebApi/DLL/DAL/LoginDAL.cs
@@ -201,9 +201,9 @@
{
usercode = usercode,
oper_date = DateTime.Now.ToString(),
- oper_type = "PC",
+ oper_type = "PC/APP",
description = username + "淇敼浜嗗瘑鐮�",
- origin = "PC"
+ origin = "PC/APP"
}
});
bool aa = DapperHelper.DoTransaction(list);
@@ -226,6 +226,50 @@
}
#endregion
+ #region[瀵嗙爜閲嶇疆]
+ public static ToMessage ResettUserPassword(string usercode, string username)
+ {
+ var sql = "";
+ List<object> list = new List<object>();
+ var dynamicParams = new DynamicParameters();
+
+ //閲嶇疆瀵嗙爜
+ sql = @"update [dbo].[TUser] set password=@newpassword where usercode=@usercode and username=@username";
+ list.Add(new { str = sql, parm = new { usercode = usercode, username = username,newpassword ="123456" } });
+ //鍐欏叆鎿嶄綔璁板綍琛�
+ sql = @"insert into T_Bas_User_Operlog(usercode,oper_date,oper_type,description,origin) values(@usercode,@oper_date,@oper_type,@description,@origin)";
+ list.Add(new
+ {
+ str = sql,
+ parm = new
+ {
+ usercode = usercode,
+ oper_date = DateTime.Now.ToString(),
+ oper_type = "PC/APP",
+ description = username + "閲嶇疆浜嗗瘑鐮�",
+ origin = "PC/APP"
+ }
+ });
+ bool aa = DapperHelper.DoTransaction(list);
+ if (aa)
+ {
+ mes.code = "200";
+ mes.count = 0;
+ mes.Message = "閲嶇疆瀵嗙爜鎴愬姛!";
+ mes.data = null;
+ }
+ else
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "閲嶇疆瀵嗙爜澶辫触!";
+ mes.data = null;
+ }
+
+ return mes;
+ }
+ #endregion
+
#region[PC鐧诲嚭]
public static ToMessage LoginOut(int userid, string usercode, string username, string usertype)
{
@@ -242,7 +286,7 @@
cont = DapperHelper.SQL(sql, dynamicParams);
if (cont > 0)
{
- redis.Remove(Enterprise+"LoginUserID" + usertype + userid, 0); //鍒犻櫎redis
+ redis.Remove(Enterprise + "LoginUserID" + usertype + userid, 0); //鍒犻櫎redis
mes.code = "200";
mes.count = 0;
mes.Message = "鐧诲嚭鎴愬姛!";
@@ -283,7 +327,7 @@
cont = DapperHelper.SQL(sql, dynamicParams);
if (cont > 0)
{
- redis.Remove(Enterprise+"LoginUserID" + usertype + userid, 1); //鍒犻櫎redis
+ redis.Remove(Enterprise + "LoginUserID" + usertype + userid, 1); //鍒犻櫎redis
mes.code = "200";
mes.count = 0;
mes.Message = "鐧诲嚭鎴愬姛!";
--
Gitblit v1.9.3