|
@@ -635,7 +635,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
}
|
|
|
//价格处理
|
|
|
if operator.Price != "" {
|
|
|
- priceArr := strings.Split(operator.Price, "-")
|
|
|
+ priceArr := strings.Split(operator.Price, "_")
|
|
|
minPrice := gconv.Int64(priceArr[0])
|
|
|
maxPrice := gconv.Int64(priceArr[1])
|
|
|
bidamountArr := []string{`
|
|
@@ -647,7 +647,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
{
|
|
|
"range": {
|
|
|
"bidamount": {
|
|
|
- "gte": %s
|
|
|
+ "gte": "%s"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -661,7 +661,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
{
|
|
|
"range": {
|
|
|
"budget": {
|
|
|
- "gte": %s
|
|
|
+ "gte": "%s"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -675,7 +675,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- `, gconv.String(minPrice)))
|
|
|
+ `, gconv.String(maxPrice)))
|
|
|
budgetArr = append(budgetArr, fmt.Sprintf(`
|
|
|
{
|
|
|
"range": {
|
|
@@ -684,7 +684,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- `, gconv.String(minPrice)))
|
|
|
+ `, gconv.String(maxPrice)))
|
|
|
}
|
|
|
mustArr = append(mustArr, fmt.Sprintf(`{"bool":{"should":[{"bool":{"filter":[%s]}},{"bool":{"filter":[%s],"must_not":[{"exists":{"field":"bidamount"}}]}}]}}`, strings.Join(bidamountArr, ","), strings.Join(budgetArr, ",")))
|
|
|
}
|