|
|
@ -44,9 +44,10 @@ namespace Pingchuan.BeijingSafeguard.DAL |
|
|
|
return db.Execute(sql); |
|
|
|
} |
|
|
|
|
|
|
|
public static Pagination<User> Query(int pageIndex, int pageSize) |
|
|
|
public static Pagination<User> Query(int orgId, int pageIndex, int pageSize) |
|
|
|
{ |
|
|
|
string sql = $@"select * from users order by create_time desc"; |
|
|
|
string condition = orgId == 0 ? string.Empty : $"where org_id = {orgId}"; |
|
|
|
string sql = $@"select * from users {condition} order by create_time desc"; |
|
|
|
Page<User> users = db.Page<User>(pageIndex, pageSize, sql); |
|
|
|
return Pagination<User>.FromPage(users); |
|
|
|
} |
|
|
|