|
@@ -711,8 +711,19 @@ public interface StandardMapper {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static String orderBy(String orderBy){
|
|
|
- return isNullOrEmpty(orderBy) ? " create_time desc " : orderBy;
|
|
|
+ public static String orderBy(String orderBy) {
|
|
|
+ String base = " create_time desc ";
|
|
|
+ if (isNullOrEmpty(orderBy)) {
|
|
|
+ return base;
|
|
|
+ }
|
|
|
+
|
|
|
+ String replace = orderBy.replace(" ", "");
|
|
|
+ if (replace.contains("create_timedesc")) {
|
|
|
+ return base;
|
|
|
+ }
|
|
|
+
|
|
|
+ return orderBy + ", " + base;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|