Просмотр исходного кода

Merge branch 'dev_v1.1.63_wh' of BaseService/jyMicroservices into feature/v1.1.63

王浩 7 месяцев назад
Родитель
Сommit
dfc943e8ec
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      jyBXCore/rpc/service/operator.go

+ 5 - 5
jyBXCore/rpc/service/operator.go

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