|
@@ -90,8 +90,11 @@ public class SearchProductServiceImpl implements SearchProductService {
|
|
filter += "p_time > " + time;
|
|
filter += "p_time > " + time;
|
|
}
|
|
}
|
|
if (promotionFlag == 1) {
|
|
if (promotionFlag == 1) {
|
|
-// p_promotions_id > 0
|
|
|
|
- filter += "AND p_promotions_id > 0";
|
|
|
|
|
|
+ if (newFlag == 1) {
|
|
|
|
+ filter += "AND p_promotions_id > 0";
|
|
|
|
+ } else {
|
|
|
|
+ filter += "p_promotions_id > 0";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 阿里云搜索
|
|
// 阿里云搜索
|
|
ResponseJson<String> result = queryProduct(queryStr, filter, identity, pageNum, pageSize, sortField, sortType);
|
|
ResponseJson<String> result = queryProduct(queryStr, filter, identity, pageNum, pageSize, sortField, sortType);
|
|
@@ -140,8 +143,11 @@ public class SearchProductServiceImpl implements SearchProductService {
|
|
filter += "p_time > " + time;
|
|
filter += "p_time > " + time;
|
|
}
|
|
}
|
|
if (promotionFlag == 1) {
|
|
if (promotionFlag == 1) {
|
|
-// p_promotions_id > 0
|
|
|
|
- filter += "AND p_promotions_id > 0";
|
|
|
|
|
|
+ if (newFlag == 1) {
|
|
|
|
+ filter += "AND p_promotions_id > 0";
|
|
|
|
+ } else {
|
|
|
|
+ filter += "p_promotions_id > 0";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
SearchParams searchParams = searchOpenService.getParams(queryStr, identity, filter);
|
|
SearchParams searchParams = searchOpenService.getParams(queryStr, identity, filter);
|
|
ResponseJson<Set<HashMap<String, Object>>> result = getBrandResult(searchParams, queryStr);
|
|
ResponseJson<Set<HashMap<String, Object>>> result = getBrandResult(searchParams, queryStr);
|
|
@@ -164,6 +170,11 @@ public class SearchProductServiceImpl implements SearchProductService {
|
|
map.put("id", brandId);
|
|
map.put("id", brandId);
|
|
map.put("name", brandName);
|
|
map.put("name", brandName);
|
|
maps.add(map);
|
|
maps.add(map);
|
|
|
|
+ }else{
|
|
|
|
+ HashMap<String, Object> map = new HashMap<>();
|
|
|
|
+ map.put("id", brandId);
|
|
|
|
+ map.put("name", "其他");
|
|
|
|
+ maps.add(map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 阿里云查询出json转换成商品pojo
|
|
// 阿里云查询出json转换成商品pojo
|
|
@@ -226,7 +237,12 @@ public class SearchProductServiceImpl implements SearchProductService {
|
|
filter += "p_time > " + time;
|
|
filter += "p_time > " + time;
|
|
}
|
|
}
|
|
if (promotionFlag == 1) {
|
|
if (promotionFlag == 1) {
|
|
- filter += "AND p_promotions_id > 0";
|
|
|
|
|
|
+ if (newFlag == 1) {
|
|
|
|
+ filter += "AND p_promotions_id > 0";
|
|
|
|
+ } else {
|
|
|
|
+ filter += "p_promotions_id > 0";
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
SearchParams searchParams = searchOpenService.getScrollProductParams(queryStr, identity, requestPageSize, sortField, sortType);
|
|
SearchParams searchParams = searchOpenService.getScrollProductParams(queryStr, identity, requestPageSize, sortField, sortType);
|
|
String thisFilter = searchParams.getFilter();
|
|
String thisFilter = searchParams.getFilter();
|