mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Synchronization code
This commit is contained in:
parent
9a1dc3ab36
commit
ac8bfadac3
@ -87,6 +87,10 @@ namespace SqlSugar
|
|||||||
sql.Replace(UtilConstants.ReplaceKey, isRowNumber ? (isIgnoreOrderBy ? null : rowNumberString) : null);
|
sql.Replace(UtilConstants.ReplaceKey, isRowNumber ? (isIgnoreOrderBy ? null : rowNumberString) : null);
|
||||||
if (isIgnoreOrderBy) { this.OrderByValue = oldOrderBy; return sql.ToString(); }
|
if (isIgnoreOrderBy) { this.OrderByValue = oldOrderBy; return sql.ToString(); }
|
||||||
var result = ToPageSql(sql.ToString(), this.Take, this.Skip);
|
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 (ExternalPageIndex > 0)
|
||||||
{
|
{
|
||||||
if (externalOrderBy.IsNullOrEmpty())
|
if (externalOrderBy.IsNullOrEmpty())
|
||||||
|
Loading…
Reference in New Issue
Block a user