This commit is contained in:
owenchen committed 2026-08-27 15:58:44 +08:00
1 parent 4b92ee5fab
commit a2a03f5475
35 files changed
+373 -201

No files matched your search

@@ -48,7 +48,7 @@ namespace CloudBuilder.Security.Entity
public const string DB_PKEY_ID = "pkey_id";
public const string DB_LOCKED_BY_ACTOR = "locked_by_actor";
private string ProviderName { get; set; }
private string ProviderName { get; set; }
public static SecurityLockEntity GetInstance(string providerName)
{
@@ -154,7 +154,7 @@ namespace CloudBuilder.Security.Entity
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ENTITY_NAME ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_LOCK} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {offset},{limit} ";
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_SECURITY_LOCK} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)