Commit 8e62b868 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 460789f7 79a51646
......@@ -66,6 +66,10 @@ namespace Edu.WebApi.Controllers.User
var OldPassWord = base.ParmJObj.GetStringValue("OldPassWord");
var NewPassWord = base.ParmJObj.GetStringValue("NewPassWord");
var NewSurePassWord = base.ParmJObj.GetStringValue("NewSurePassWord");
if (string.IsNullOrWhiteSpace(OldPassWord) || string.IsNullOrWhiteSpace(NewPassWord) || string.IsNullOrWhiteSpace(NewSurePassWord))
{
return ApiResult.Failed(message: "请输入密码");
}
if (OldPassWord.Equals(NewPassWord))
{
return ApiResult.Failed(message: "新密码与旧密码不能一致");
......@@ -77,6 +81,10 @@ namespace Edu.WebApi.Controllers.User
{
return ApiResult.Failed(message: "员工信息不存在");
}
if (extModel.Password != Common.DES.Encrypt(OldPassWord))
{
return ApiResult.Failed(message: "旧密码输入错误");
}
if (extModel.Password == Common.DES.Encrypt(NewSurePassWord))
{
return ApiResult.Failed(message: "新密码与旧密码不能一致");
......@@ -99,7 +107,7 @@ namespace Edu.WebApi.Controllers.User
bool result = accountModule.SetBatchResetPassword(list, NewPassWord);
if (result)
{
return ApiResult.Failed(message: "更新密码成功");
return ApiResult.Success(message: "更新密码成功");
}
else
{
......@@ -245,7 +253,9 @@ namespace Edu.WebApi.Controllers.User
#endregion
#endregion
return ApiResult.Success("", new { EmployeeListResult = employeeListResult,
return ApiResult.Success("", new
{
EmployeeListResult = employeeListResult,
OrderNoCompleteNum = orderList.Count(),
CourseNum = guestList.Count(),
TotalCommiommission = totalCommiommission,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment