Commit 0773d030 by mushishixian

修复

parent 87928310
Showing with 35 additions and 46 deletions
package main
import (
"github.com/micro/go-micro/v2"
"search_server/protopb/bom"
"search_server/service"
"log"
)
func main() {
cService:=micro.NewService(
micro.Name("go.micro.server.search"))
cService.Init()
err:=bom.RegisterBomServiceHandler(cService.Server(),service.NewBomServiceImpl())
if err!=nil{
log.Fatal(err)
}
if err = cService.Run(); err != nil {
log.Println(err)
}
}
\ No newline at end of file
package main package main
import (
"flag"
"github.com/go-kratos/kratos/pkg/log"
"search_server/boot"
"search_server/service"
)
func main() { func main() {
var path string //var path string
flag.StringVar(&path, "config", "conf/config.ini", "配置文件") //flag.StringVar(&path, "config", "conf/config.ini", "配置文件")
flag.Parse() //flag.Parse()
if err := boot.Boot(path); err != nil { //if err := boot.Boot(path); err != nil {
log.Error("%s", err) // log.Error("%s", err)
} //}
service.AutoSpu("a") //client := client.
//logger.Warn("test") //c := course.NewCourseService("go.micro.api.jtthink.course", client)
//logger.Warn("warn555555555555555555555555555555") //course_rsp, _ := c.ListForTop(context.TODO(), &course.ListRequest{Size: 10})
//logger.Info("info记录日志555555555555555555555555555555") //fmt.Println(course_rsp.Result)
//logger.Error("Error记录日志555555555555555555555555555555")
//logger.Fatal("Fatal记录日志555555555555555555555555555555")
// fmt.Println(es.CurlES(config.Get("es.index_name").String(), `{
// "query": {
// "bool": {
// "filter": [
// {
// "term": {
// "goods_id": "1154020374326836400"
// }
// }
// ]
// }
// },
// "sort": [
// {
// "single_price": {
// "order": "asc"
// }
// },
// {
// "_score": {
// "order": "desc"
// }
// }
// ],
// "from": 0,
// "size": 10
//}`))
} }
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