Commit 9d5e990b by huangchengyi

1.0

parent 0bec2ea8
Showing with 5 additions and 1 deletions
......@@ -14,13 +14,17 @@ import (
func GetDemeQuery(ctx *gin.Context) (param string, err error){
query := elastic.NewBoolQuery()
goods_name := ctx.Request.FormValue("alike_goods_en/eq")
goods_name := ctx.Request.FormValue("alike_goods_en/eq") //国外型号
if goods_name != "" { //型号搜索
replace, _ := regexp.Compile("[^A-Za-z0-9]+")
goods_name = replace.ReplaceAllString(goods_name, "")
goods_name = strings.ToUpper(goods_name)
query.Must(elastic.NewTermQuery("alike_goods_en.raw",goods_name))
}
alike_spu_id := ctx.Request.FormValue("alike_spu_id/eq") //国外型号spu_id
if alike_spu_id != "" {
query.Must(elastic.NewTermQuery("alike_spu_id",alike_spu_id))
}
page := ctx.Request.FormValue("page")
page_size := ctx.Request.FormValue("page_size")
......
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