Synchronization code

This commit is contained in:
sunkaixuan 2023-10-31 22:48:08 +08:00
parent 9a1dc3ab36
commit ac8bfadac3

View File

@ -87,6 +87,10 @@ namespace SqlSugar
sql.Replace(UtilConstants.ReplaceKey, isRowNumber ? (isIgnoreOrderBy ? null : rowNumberString) : null);
if (isIgnoreOrderBy) { this.OrderByValue = oldOrderBy; return sql.ToString(); }
var result = ToPageSql(sql.ToString(), this.Take, this.Skip);
if (this.Take == 1 && this.Skip == 0&&oldOrderBy== "ORDER BY sysdate ")
{
result = $" {sql.ToString()} {(this.WhereInfos.Any()?"AND":"WHERE")} ROWNUM = 1 ";
}
if (ExternalPageIndex > 0)
{
if (externalOrderBy.IsNullOrEmpty())