mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-12-30 09:25:49 +08:00
fix: 🐛 take count
[skip ci]
This commit is contained in:
@@ -124,8 +124,11 @@ public sealed class RoleService(DefaultRepository<Sys_Role> rpo) //
|
||||
req.Keywords?.Length > 0
|
||||
, a => a.Id == req.Keywords.Int64Try(0) || a.Name.Contains(req.Keywords) ||
|
||||
a.Summary.Contains(req.Keywords));
|
||||
if (req.Order == Orders.Random) {
|
||||
return ret.OrderByRandom();
|
||||
switch (req.Order) {
|
||||
case Orders.None:
|
||||
return ret;
|
||||
case Orders.Random:
|
||||
return ret.OrderByRandom();
|
||||
}
|
||||
|
||||
ret = ret.OrderByPropertyNameIf(req.Prop?.Length > 0, req.Prop, req.Order == Orders.Ascending);
|
||||
|
||||
Reference in New Issue
Block a user