注释掉很多之前为了兼容旧数据的脚本(数据量大会导致启动时耗时很久)
增加重置密码功能
This commit is contained in:
@@ -106,5 +106,15 @@ namespace dy.net.repository
|
||||
return (res ? 0 : -1, res ? "初始用户成功" : "初始化用户失败");
|
||||
}
|
||||
}
|
||||
|
||||
public bool ResetPwd(string pwd)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(pwd)) pwd = "douyin2026";
|
||||
var password = Md5Util.Md5(pwd);
|
||||
|
||||
string sql = $" Update login_user_info SET Password='{password}'";
|
||||
|
||||
return this.Db.Ado.ExecuteCommand(sql) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user