Commit 91df7588 authored by zp's avatar zp

排序

parent 1b95417f
...@@ -1889,7 +1889,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1889,7 +1889,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "day": case "day":
sort = "ret_1day "; sort = "ret_1day ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1897,7 +1897,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1897,7 +1897,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "week": case "week":
sort = "ret_1w "; sort = "ret_1w ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1905,7 +1905,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1905,7 +1905,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "month": case "month":
sort = "ret_1m "; sort = "ret_1m ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1913,7 +1913,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1913,7 +1913,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "season": case "season":
sort = "ret_3m "; sort = "ret_3m ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1921,7 +1921,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1921,7 +1921,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "halfAYear": case "halfAYear":
sort = "ret_6m "; sort = "ret_6m ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1929,7 +1929,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1929,7 +1929,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "year": case "year":
sort = "ret_1y "; sort = "ret_1y ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1937,7 +1937,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1937,7 +1937,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "twoYear": case "twoYear":
sort = "ret_2y "; sort = "ret_2y ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1945,7 +1945,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1945,7 +1945,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "threeYear": case "threeYear":
sort = "ret_3y "; sort = "ret_3y ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1953,7 +1953,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1953,7 +1953,7 @@ public class ProductServiceImpl implements ProductService, Constant {
case "fiveYear": case "fiveYear":
sort = "ret_5y "; sort = "ret_5y ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
...@@ -1961,14 +1961,14 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1961,14 +1961,14 @@ public class ProductServiceImpl implements ProductService, Constant {
case "retIncep": case "retIncep":
sort = "ret_incep "; sort = "ret_incep ";
if (StringUtils.isNotEmpty(req.getRankSort())) { if (StringUtils.isNotEmpty(req.getRankSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort() + ",";
} else { } else {
sort = sort + "desc,"; sort = sort + "desc,";
} }
break; break;
} }
sort = (StringUtils.isEmpty(sort) ? sort : sort + ", ") + " net_nav "; sort = sort + " net_nav ";
if (StringUtils.isNotEmpty(req.getNetSort())) { if (StringUtils.isNotEmpty(req.getNetSort())) {
sort = sort + req.getNetSort(); sort = sort + req.getNetSort();
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment