Commit e3206259 authored by zp's avatar zp

排序

parent 60cfec93
...@@ -1859,7 +1859,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1859,7 +1859,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,";
} }
...@@ -1867,7 +1867,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1867,7 +1867,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,";
} }
...@@ -1875,7 +1875,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1875,7 +1875,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,";
} }
...@@ -1883,7 +1883,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1883,7 +1883,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,";
} }
...@@ -1891,7 +1891,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1891,7 +1891,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,";
} }
...@@ -1899,7 +1899,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1899,7 +1899,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,";
} }
...@@ -1907,7 +1907,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1907,7 +1907,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,";
} }
...@@ -1915,7 +1915,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1915,7 +1915,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,";
} }
...@@ -1923,7 +1923,7 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1923,7 +1923,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,";
} }
...@@ -1931,14 +1931,14 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1931,14 +1931,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