|
|
@@ -136,17 +136,15 @@ namespace BPA.SAAS.Manage.Application.Org.Services |
|
|
|
/// <summary> |
|
|
|
/// 重置密码 |
|
|
|
/// </summary> |
|
|
|
/// <param name="Id"></param> |
|
|
|
/// <param name="id"></param> |
|
|
|
/// <returns></returns> |
|
|
|
public async Task<bool> ResetPwd(string Id) |
|
|
|
public async Task<bool> ResetPwd(string id) |
|
|
|
{ |
|
|
|
var user = _db.Queryable<BPA_Users>().First(t => t.Id == Id); |
|
|
|
|
|
|
|
var user = _db.Queryable<BPA_Users>().First(t => t.Id == id); |
|
|
|
if (user == null) |
|
|
|
return false; |
|
|
|
string pwd = MD5Encryption.Encrypt("123456").ToLower(); |
|
|
|
|
|
|
|
return await _db.Updateable<BPA_Users>(t => t.Password == pwd).Where(t => t.Id == Id).ExecuteCommandHasChangeAsync(); |
|
|
|
user.Password = MD5Encryption.Encrypt("123456").ToLower(); |
|
|
|
return await _db.Updateable(user).ExecuteCommandHasChangeAsync(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|