Commit b608d6c7 by mushishixian

fix

parent d9df57c4
......@@ -11,6 +11,7 @@ api_md5_str = fh6y5t4rr351d2c3bryi
[goods]
api_url = http://192.168.2.232:60004
sz_api_url = http://192.168.2.232:60004
[es]
url = http://192.168.2.232:9200
......
......@@ -152,5 +152,5 @@ func GetData(keyword, supplierName string) (res interface{}) {
}
func QuoteTest(c *gin.Context) {
c.String(200,"测试")
c.String(200, "测试")
}
......@@ -2,6 +2,7 @@ package service
import (
"encoding/json"
"fmt"
"github.com/imroc/req"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
......@@ -50,7 +51,9 @@ func (qs *QuoteService) GetGoodsBySupplierName(r requests.GetGoodsBySupplierRequ
if err != nil {
return
}
fmt.Println(esResult)
goodsIds := GetGoodsIdsByEs(esResult)
fmt.Println(goodsIds)
goodsList, err := GetGoodsInfo(goodsIds)
dullData, err := transformer.DullDataInfo(r.Keyword, goodsList)
quoteTransformer := transformer.QuoteTransformer{}
......
......@@ -7,7 +7,7 @@ import (
"github.com/syyongx/php2go"
"reflect"
"search_server/boot"
"search_server/pkg/common"
"search_server/service"
)
func StrRandom(lenNum int) string {
......@@ -39,18 +39,8 @@ func main() {
if err := boot.Boot(path); err != nil {
fmt.Println(err)
}
//log.SetFormatter(new(LogFormatter))
////设置output,默认为stderr,可以为任何io.Writer,比如文件*os.File
//str, _ := os.Getwd()
//file, _ := os.OpenFile(str+"/logs/search/1.log", os.O_CREATE|os.O_WRONLY, 0666)
//log.SetOutput(file)
//fmt.Println(str)
//log.Error("sadsadsadsa")
//log.Error("sadsadsadsa")
//log_report.WriteSearchErrorLog("sdasdasdas")
common.Output(1000, "ceshiceshi", nil)
//log.Error("sadsadsadsa")
//controller.GetData("LM358","arrow")
res, _ := service.GetGoodsInfo([]string{"74163","116492","74123","106095","116451","162774","74152","116078","74122","74132"})
fmt.Println(len(res))
}
......
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