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
import (
"flag"
"github.com/go-kratos/kratos/pkg/log"
"search_server/boot"
"search_server/service"
)
func main() {
var path string
flag.StringVar(&path, "config", "conf/config.ini", "配置文件")
flag.Parse()
if err := boot.Boot(path); err != nil {
log.Error("%s", err)
}
service.AutoSpu("a")
//logger.Warn("test")
//logger.Warn("warn555555555555555555555555555555")
//logger.Info("info记录日志555555555555555555555555555555")
//logger.Error("Error记录日志555555555555555555555555555555")
//logger.Fatal("Fatal记录日志555555555555555555555555555555")
//var path string
//flag.StringVar(&path, "config", "conf/config.ini", "配置文件")
//flag.Parse()
//if err := boot.Boot(path); err != nil {
// log.Error("%s", err)
//}
//client := client.
//c := course.NewCourseService("go.micro.api.jtthink.course", client)
//course_rsp, _ := c.ListForTop(context.TODO(), &course.ListRequest{Size: 10})
//fmt.Println(course_rsp.Result)
// 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