|
@@ -6,6 +6,7 @@ import java.util.Map;
|
|
|
import java.util.Map.Entry;
|
|
import java.util.Map.Entry;
|
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
+import com.lc.ibps.api.base.query.Direction;
|
|
|
import org.apache.ibatis.session.ExecutorType;
|
|
import org.apache.ibatis.session.ExecutorType;
|
|
|
import org.apache.ibatis.session.RowBounds;
|
|
import org.apache.ibatis.session.RowBounds;
|
|
|
import org.apache.ibatis.session.SqlSession;
|
|
import org.apache.ibatis.session.SqlSession;
|
|
@@ -596,8 +597,11 @@ public class CommonDao<T> implements ICommonDao<T> {
|
|
|
if (queryFilter.getFieldSortList() !=null && queryFilter.getFieldSortList().size() > 0) {
|
|
if (queryFilter.getFieldSortList() !=null && queryFilter.getFieldSortList().size() > 0) {
|
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
|
for (FieldSort fieldSort : queryFilter.getFieldSortList()) {
|
|
for (FieldSort fieldSort : queryFilter.getFieldSortList()) {
|
|
|
- sb.append(fieldSort.getField()).append(" ")
|
|
|
|
|
- .append(fieldSort.getDirection()).append(",");
|
|
|
|
|
|
|
+ if (fieldSort.getDirection().equals(Direction.FIELD)){
|
|
|
|
|
+ sb.append(fieldSort.getField()).append(",");
|
|
|
|
|
+ }else {
|
|
|
|
|
+ sb.append(fieldSort.getField()).append(" ").append(fieldSort.getDirection()).append(",");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
sb.deleteCharAt(sb.length() - 1);
|
|
sb.deleteCharAt(sb.length() - 1);
|
|
|
params.put("orderBySql", sb.toString());
|
|
params.put("orderBySql", sb.toString());
|