|
@@ -12,8 +12,10 @@ using XF.Domain.Exceptions;
|
|
using XF.Utility.AppIdentityModel;
|
|
using XF.Utility.AppIdentityModel;
|
|
using Hotline.Share.Dtos;
|
|
using Hotline.Share.Dtos;
|
|
using Hotline.Share.Dtos.Users;
|
|
using Hotline.Share.Dtos.Users;
|
|
|
|
+using Hotline.Share.Enums.Order;
|
|
using Microsoft.Extensions.Options;
|
|
using Microsoft.Extensions.Options;
|
|
using XF.Domain.Options;
|
|
using XF.Domain.Options;
|
|
|
|
+using XF.Utility.EnumExtensions;
|
|
|
|
|
|
namespace Hotline.Api.Controllers;
|
|
namespace Hotline.Api.Controllers;
|
|
|
|
|
|
@@ -102,7 +104,7 @@ public class UserController : BaseController
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword),
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword),
|
|
d => d.Name.Contains(dto.Keyword!) || d.PhoneNo.Contains(dto.Keyword!))
|
|
d => d.Name.Contains(dto.Keyword!) || d.PhoneNo.Contains(dto.Keyword!))
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgCode), d => d.OrgCode == dto.OrgCode)
|
|
.WhereIF(!string.IsNullOrEmpty(dto.OrgCode), d => d.OrgCode == dto.OrgCode)
|
|
- .WhereIF(!string.IsNullOrEmpty(dto.Role), d => d.Account.Roles.Select(d => d.DisplayName).Contains(dto.Role))
|
|
|
|
|
|
+ .WhereIF(!string.IsNullOrEmpty(dto.Role), d => d.Account.Roles.Any(x=>x.Id == dto.Role))
|
|
.OrderBy(d => d.Account.Status)
|
|
.OrderBy(d => d.Account.Status)
|
|
.OrderBy(d => d.Organization.OrgCode)
|
|
.OrderBy(d => d.Organization.OrgCode)
|
|
.OrderByDescending(d => d.CreationTime)
|
|
.OrderByDescending(d => d.CreationTime)
|
|
@@ -314,7 +316,7 @@ public class UserController : BaseController
|
|
{
|
|
{
|
|
return new
|
|
return new
|
|
{
|
|
{
|
|
- //GenderOptions =
|
|
|
|
|
|
+ GenderOptions = EnumExts.GetDescriptions<EGender>()
|
|
};
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|