Pārlūkot izejas kodu

默认配置密码 部分功能失效

新疆影视学院高职
ndbs pirms 2 gadiem
vecāks
revīzija
95efe0fc27
6 mainītis faili ar 49 papildinājumiem un 13 dzēšanām
  1. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs
  2. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs
  3. +17
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs
  4. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
  5. +9
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs
  6. +8
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs

+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs Parādīt failu

@@ -913,7 +913,7 @@ namespace Learun.Application.Organization
/// 重置密码
/// </summary>
/// <param name="keyValue">账号主键</param>
public void ResetPassword(string keyValue)
public void ResetPassword(string keyValue, string defaultpwd)
{
try
{
@@ -927,7 +927,7 @@ namespace Learun.Application.Organization
{
cache.Remove(cacheKeyId + item, CacheId.user);
}
string password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["defaultpwd"], 32).ToLower();
string password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();
userService.RevisePasswordBatch(keyValue, password);
}
catch (Exception ex)
@@ -964,7 +964,7 @@ namespace Learun.Application.Organization
/// 重置密码(八位)
/// </summary>
/// <param name="keyValue">账号主键</param>
public void ResetPasswordEight(string keyValue)
public void ResetPasswordEight(string keyValue, string defaultpwd)
{
try
{
@@ -972,7 +972,7 @@ namespace Learun.Application.Organization
{
cache.Remove(cacheKeyId + item, CacheId.user);
}
string password = Md5Helper.Encrypt(ConfigurationManager.AppSettings["defaultpwdeight"], 32).ToLower();
string password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();
userService.RevisePasswordBatch(keyValue, password);
}
catch (Exception ex)


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserIBLL.cs Parādīt failu

@@ -130,12 +130,12 @@ namespace Learun.Application.Organization
/// 重置密码
/// </summary>
/// <param name="keyValue">账号主键</param>
void ResetPassword(string keyValue);
void ResetPassword(string keyValue, string defaultpwd);
/// <summary>
/// 重置密码(八位)
/// </summary>
/// <param name="keyValue">账号主键</param>
void ResetPasswordEight(string keyValue);
void ResetPasswordEight(string keyValue, string defaultpwd);
/// <summary>
/// 修改用户状态
/// </summary>
@@ -186,7 +186,7 @@ namespace Learun.Application.Organization
/// <param name="userId">用户ID</param>
void GetImg(string userId);

void setPassword(string userid,string pwd);
void setPassword(string userid, string pwd);
List<UserEntity> GetStudents();
#endregion



+ 17
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs Parādīt failu

@@ -6,6 +6,8 @@ using Learun.Application.Base.AuthorizeModule;
using System.Linq;
using System;
using Learun.Application.Base.SystemModule;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Configuration;

namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
{
@@ -22,6 +24,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
private DepartmentIBLL departmentIBLL = new DepartmentBLL();
private UserRelationIBLL userRelationIBLL = new UserRelationBLL();
private RoleIBLL roleIBLL = new RoleBLL();
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();


#region 获取视图
@@ -334,7 +337,13 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[AjaxOnly]
public ActionResult ResetPassword(string keyValue)
{
userIBLL.ResetPassword(keyValue);
string defpwd = ConfigurationManager.AppSettings["defaultpwd"];
//读取默认密码配置中已启用的密码
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null)
{
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd;
}
userIBLL.ResetPassword(keyValue, defpwd);
return Success("操作成功!");
}
/// <summary>
@@ -346,7 +355,13 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
[AjaxOnly]
public ActionResult ResetPasswordEight(string keyValue)
{
userIBLL.ResetPasswordEight(keyValue);
string defpwd = ConfigurationManager.AppSettings["defaultpwdeight"];
//读取默认密码配置中已启用的密码
if (sys_DefaultPwdConfigIBLL.GetEnabledEntity() != null)
{
defpwd = sys_DefaultPwdConfigIBLL.GetEnabledEntity().Pwd;
}
userIBLL.ResetPasswordEight(keyValue, defpwd);
return Success("操作成功!");
}



+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs Parādīt failu

@@ -425,6 +425,13 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
UserIBLL userIBLL = new UserBLL();
var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "教师");
var roleId = Config.GetValue("GenerateTeachersRoleId");
var defaultpwd = Config.GetValue("defaultpwd");
//读取默认密码配置中已启用的密码
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
if (Sys_DefaultPwdConfigEntity != null)
{
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd;
}
var studentList = new List<UserEntity>();
foreach (var tEntity in teacherList)
{
@@ -444,7 +451,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi
userbase.F_Account = tEntity.EmpNo;
userbase.F_RealName = tEntity.EmpName;
userbase.F_EnCode = tEntity.EmpNo;
userbase.F_Password = Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32).ToLower();
userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url;
userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1;
userbase.F_DeleteMark = 0;


+ 9
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs Parādīt failu

@@ -776,9 +776,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
UserIBLL userIBLL = new UserBLL();
try
{

var stuInfoBasicEntities = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(m => m.CheckMark != "0");
var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "学生");
var roleId = Config.GetValue("GenerateStudentsRoleId");
var defaultpwd = Config.GetValue("defaultpwd");
//读取默认密码配置中已启用的密码
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
if (Sys_DefaultPwdConfigEntity != null)
{
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd;
}
var studentList = new List<UserEntity>();
foreach (var tEntity in stuInfoBasicEntities)
{
@@ -800,7 +808,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
userbase.F_Account = tEntity.StuNo;
userbase.F_RealName = tEntity.StuName;
userbase.F_EnCode = tEntity.StuNo;
userbase.F_Password = Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32).ToLower();
userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();
userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url;
userbase.F_Gender = tEntity.GenderNo.HasValue ? Convert.ToInt32(tEntity.GenderNo.Value) : 1;
userbase.F_DeleteMark = 0;


+ 8
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs Parādīt failu

@@ -1279,7 +1279,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
UserRelationIBLL userRelationIBLL = new UserRelationBLL();
UserIBLL userIBLL = new UserBLL();

var defaultpwd = Config.GetValue("defaultpwd");
//读取默认密码配置中已启用的密码
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
if (Sys_DefaultPwdConfigEntity != null)
{
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd;
}
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
@@ -1308,7 +1314,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
F_Account = entity.StuNo,
F_RealName = entity.StuName,
F_EnCode = entity.StuNo,
F_Password = Md5Helper.Encrypt(Config.GetValue("defaultpwd"), 32).ToLower(),
F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower(),
F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url,
F_Gender = entity.GenderNo == "1" ? 1 : 0,
F_DeleteMark = 0,


Notiek ielāde…
Atcelt
Saglabāt