还原orderBy

yun-zuoyi
wynne1005 5 years ago
parent 8ee28db80b
commit a400bf5aa7

@ -154,30 +154,19 @@ public abstract class BaseBean implements Serializable {
// @ApiParam(value = "多列排序") // @ApiParam(value = "多列排序")
// @AnnoOutputColumn(hidden = true) // @AnnoOutputColumn(hidden = true)
// public LinkedHashMap<String,Integer> sortParamMap; // public LinkedHashMap<String,Integer> sortParamMap;
//
// //排序方式 //排序方式
// public String orderBy(){ public String orderBy(){
// StringBuffer result = new StringBuffer(" order by "); String result = "";
// if (orderByParam!=null&&orderByParam.trim().length()>0) {
// if (sortParamMap != null && sortParamMap.size() != 0) { result = " order by " + orderByParam;
// for (String key : sortParamMap.keySet()) { if(ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) {
// packOrderByHql(result,orderByParam,ascOrDesc); result += " asc";
// } }else{
// } else if (orderByParam != null && orderByParam.trim().length() > 0) { result += " desc";
// packOrderByHql(result,orderByParam,ascOrDesc); }
// }else{
// return "";
// }
// return result.subSequence(0, result.length() - 1).toString();
// }
private void packOrderByHql(StringBuffer stringBuffer, String orderByParam, Integer ascOrDesc) {
stringBuffer.append(" ").append(orderByParam);
if (ascOrDesc == null || ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) {
stringBuffer.append(" asc");
} else {
stringBuffer.append(" desc,");
} }
return result;
} }
} }

Loading…
Cancel
Save