Commit 18fabaf1 by mushishixian

fix

parent 204e81fb
Showing with 11 additions and 12 deletions
package service
import (
"fmt"
"github.com/imroc/req"
"github.com/tidwall/gjson"
"github.com/uniplaces/carbon"
"gopkg.in/olivere/elastic.v5"
"regexp"
"search_server/pkg/config"
"search_server/pkg/es"
"search_server/protopb/bom"
"search_server/requests"
"strings"
......@@ -73,22 +71,23 @@ func GetGoodsInfo(goodsIdsStr string) (goodsList []*bom.GoodsModel, err error) {
}
//根据供应商获取商品信息
func GetGoodsInfoBySupplier(req requests.QuoteIndexRequest) error{
supplierIndex := config.Get("es.search_supplier").String()
//获取查询条件
queryString := getSupplierQuery(req)
res, err := es.CurlES(supplierIndex, queryString)
if err != nil {
return err
}
fmt.Println(supplierIndex)
func GetGoodsInfoBySupplier(req requests.QuoteIndexRequest) error {
//supplierIndex := config.Get("es.search_supplier").String()
////获取查询条件
//queryString := getSupplierQuery(req)
//res, err := es.CurlES(supplierIndex, queryString)
//if err != nil {
// return err
//}
//fmt.Println(supplierIndex)
return nil
}
func getSupplierIndex(supplierId string) string {
return "temp"
}
func getSupplierQuery(req requests.QuoteIndexRequest) string {
func getSupplierQuery(req requests.QuoteIndexRequest) (string, error) {
req.SupplierId = strings.TrimSpace(req.SupplierId)
source := elastic.NewSearchSource()
query := elastic.NewBoolQuery()
......
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 sign in to comment