Commit 208f5105 by hcy001

更新类似型号搜索

parent 251aa622
......@@ -64,7 +64,7 @@ func (qs *OptimumService) getQueryAttr(ctx *gin.Context) {
"2001€5.5V€0", #属性值id+属性值+是否选中
"2003€5.6V€0"
]
}
}alike
}
}
......@@ -86,7 +86,7 @@ func (qs *OptimumService) GetOptimumAttr(ctx *gin.Context) (results model.LyResp
return
}
//查询es
esResult, err := es.CurlEsPrimary("goods_optimum", queryString)
esResult, err := es.CurlES("goods_optimum", queryString)
if err != nil {
results.ErrorCode = 1002;
results.ErrorMsg = err.Error()
......
......@@ -17,9 +17,14 @@ func GetDemeQuery(ctx *gin.Context,target string) (param string, err error){
query.Must(elastic.NewTermQuery("supplier_type",1))
}
goods_name := common.DrawLetterNum(ctx.Request.FormValue("alike_spu_name/eq")) //国外型号
goods_name := common.DrawLetterNum(ctx.Request.FormValue("goods_name/eq")) //国外型号
if goods_name != "" { //型号搜索
query.Must(elastic.NewTermQuery("alike_spu_name.raw",goods_name))
query.Must(elastic.NewTermQuery("auto_goods_name.raw",goods_name))
}
alike_spu_name := common.DrawLetterNum(ctx.Request.FormValue("alike_spu_name/eq")) //国外型号
if alike_spu_name != "" { //类似型号搜索
query.Must(elastic.NewTermQuery("alike_spu_name.raw",alike_spu_name))
}
alike_spu_id := ctx.Request.FormValue("alike_spu_id/eq") //国外型号spu_id
if alike_spu_id != "" {
......
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