|
|
@ -238,7 +238,7 @@ namespace SqlSugar |
|
|
|
string orderByValue = (!isRowNumber && this.OrderByValue.IsValuable()) ? GetOrderByString : null; |
|
|
|
if (this.IsCount) { orderByValue = null; } |
|
|
|
sql.AppendFormat(SqlTemplate, GetSelectValue, GetTableNameString, GetWhereValueString, groupByValue, orderByValue); |
|
|
|
sql.Replace("{$:OrderByString:$}", isRowNumber ? (this.IsCount ? null : rowNumberString) : null); |
|
|
|
sql.Replace(UtilConstants.OrderReplace, isRowNumber ? (this.IsCount ? null : rowNumberString) : null); |
|
|
|
if (this.IsCount) { return sql.ToString(); } |
|
|
|
var result = ToPageSql(sql.ToString(), this.Take, this.Skip); |
|
|
|
if (ExternalPageIndex > 0) |
|
|
|