|
@@ -608,8 +608,14 @@ public interface StandardlyMapper {
|
|
wholeSql.append(" from ").append(tableName);
|
|
wholeSql.append(" from ").append(tableName);
|
|
// 条件
|
|
// 条件
|
|
packCondition(packCondition, wholeSql);
|
|
packCondition(packCondition, wholeSql);
|
|
-
|
|
|
|
- wholeSql.append(" order by ").append(orderBy).append(" limit ").append(limit);
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(orderBy)){
|
|
|
|
+ String[] s = orderBy.split(" ");
|
|
|
|
+ if (s.length > 2){
|
|
|
|
+ wholeSql.append(" order by ").append(s[0]).append(" ").append(s[1]).append(" limit ").append(limit);
|
|
|
|
+ }else {
|
|
|
|
+ wholeSql.append(" order by ").append(orderBy).append(" limit ").append(limit);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (isNotEmpty(offset)) {
|
|
if (isNotEmpty(offset)) {
|
|
wholeSql.append(", ").append(offset);
|
|
wholeSql.append(", ").append(offset);
|
|
}
|
|
}
|