|
@@ -113,9 +113,12 @@ namespace GxPress.Repository.Implement
|
|
|
|
|
|
var admin = await GetByAccountAsync(request.Account);
|
|
|
if (admin == null) throw new BusinessException("不存在该账号");
|
|
|
-
|
|
|
var pwd = EncryptProvider.Md5($"{request.Password}{request.Account}");
|
|
|
if (admin.Password != pwd) throw new BusinessException("密码错误");
|
|
|
+ //修改IP
|
|
|
+ admin.Ip = request.Ip;
|
|
|
+ admin.LoginTime = DateTime.Now;
|
|
|
+ await _repository.UpdateAsync(admin);
|
|
|
//新增获取菜单数据
|
|
|
var result = new AdminSignInResult { AdminId = admin.Id, RoleId = admin.RoleId, Menus = StringUtils.StringCollectionToStringList(admin.Menus).ToList(), Name = admin.Name };
|
|
|
return result;
|
|
@@ -171,6 +174,7 @@ namespace GxPress.Repository.Implement
|
|
|
};
|
|
|
var list = await GetPageListAsync(request.Page, request.PerPage);
|
|
|
var items = list.Select(user => _mapper.Map<AdminPageResult>(user)).ToList();
|
|
|
+
|
|
|
pagedList.Items = items;
|
|
|
return pagedList;
|
|
|
}
|