From 573c491b4a1ba60e12a5678a01c1546c0077c1ee Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 30 七月 2019 09:07:42 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java b/fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java
index 78d19cb..0b1963a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/web/WebSearchController.java
@@ -179,7 +179,15 @@
 				sf.setStartTkRate(Integer.parseInt(rate));
 			} catch (Exception e) {
 			}
-
+		if (!StringUtil.isNullOrEmpty(order))
+			if (Integer.parseInt(order) == 0)
+				sf.setSort(TaoBaoUtil.SORT_SALE_HIGH_TO_LOW);
+			else if (Integer.parseInt(order) == 2)
+				sf.setSort(TaoBaoUtil.SORT_PRICE_LOW_TO_HIGH);
+			else if (Integer.parseInt(order) == 3)
+				sf.setSort(TaoBaoUtil.SORT_PRICE_HIGH_TO_LOW);
+			else if (Integer.parseInt(order) == 4)
+				sf.setSort(TaoBaoUtil.SORT_TKRATE_HIGH_TO_LOW);
 		if (StringUtil.isNullOrEmpty(kw))
 			recommend = true;
 
@@ -243,12 +251,12 @@
 						}
 				} else {
 					TaoBaoGoodsBriefExtra taoBaoGoodsBriefExtra;
-					if(taoBaoGoodsBriefs!=null)
-					for (TaoBaoGoodsBrief taoBaoGoodsBrief : taoBaoGoodsBriefs) {
-						taoBaoGoodsBriefExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief,
-								proportion.toString(), "");
-						listExtra.add(taoBaoGoodsBriefExtra);
-					}
+					if (taoBaoGoodsBriefs != null)
+						for (TaoBaoGoodsBrief taoBaoGoodsBrief : taoBaoGoodsBriefs) {
+							taoBaoGoodsBriefExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief,
+									proportion.toString(), "");
+							listExtra.add(taoBaoGoodsBriefExtra);
+						}
 				}
 				count = result.getTaoBaoHead().getDocsfound();
 			}

--
Gitblit v1.8.0