|
@@ -134,7 +134,23 @@ public class Windturbineinfodaytop3Service implements BaseService<Windturbineinf
|
|
|
List<Windturbineinfodaytop3> list=null;
|
|
|
|
|
|
Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
- example.setOrderByClause("windturbineid ASC");
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
|
|
|
+ {
|
|
|
+ StringBuilder sb=new StringBuilder();
|
|
|
+ sb.append(" ").append(tablepar.getOrderByColumn());
|
|
|
+ if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
|
|
|
+ {
|
|
|
+ sb.append(" ").append(tablepar.getIsAsc());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ sb.append(" asc ");
|
|
|
+ }
|
|
|
+ example.setOrderByClause(tablepar.getOrderByColumn());
|
|
|
+ }else {
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
|
|
@@ -157,7 +173,21 @@ public class Windturbineinfodaytop3Service implements BaseService<Windturbineinf
|
|
|
List<Windturbineinfodaytop3> list=null;
|
|
|
|
|
|
Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
- example.setOrderByClause("windturbineid ASC");
|
|
|
+ if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
|
|
|
+ {
|
|
|
+ StringBuilder sb=new StringBuilder();
|
|
|
+ sb.append(" ").append(tablepar.getOrderByColumn());
|
|
|
+ if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
|
|
|
+ {
|
|
|
+ sb.append(" ").append(tablepar.getIsAsc());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ sb.append(" asc ");
|
|
|
+ }
|
|
|
+ example.setOrderByClause(tablepar.getOrderByColumn());
|
|
|
+ }else {
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+ }
|
|
|
|
|
|
PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
|
|
@@ -180,7 +210,21 @@ public class Windturbineinfodaytop3Service implements BaseService<Windturbineinf
|
|
|
List<Windturbineinfodaytop3> list=null;
|
|
|
|
|
|
Windturbineinfodaytop3Example example=new Windturbineinfodaytop3Example();
|
|
|
- example.setOrderByClause("windturbineid ASC");
|
|
|
+ if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
|
|
|
+ {
|
|
|
+ StringBuilder sb=new StringBuilder();
|
|
|
+ sb.append(" ").append(tablepar.getOrderByColumn());
|
|
|
+ if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
|
|
|
+ {
|
|
|
+ sb.append(" ").append(tablepar.getIsAsc());
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ sb.append(" asc ");
|
|
|
+ }
|
|
|
+ example.setOrderByClause(tablepar.getOrderByColumn());
|
|
|
+ }else {
|
|
|
+ example.setOrderByClause("windturbineid ASC");
|
|
|
+ }
|
|
|
|
|
|
PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
|
|
|
|