Commit 3a5ed520 by huangchengyi

1.0

parent 88ad28cd
package main
import (
"github.com/gin-gonic/gin"
"search_server/framework/gin_"
"search_server/protopb/mouser"
"os"
"search_server/service"
)
func main() {
MouserService := service.NewMouserServiceImpl()
rsp := &mouser.MouserResponse{}
err = MouserService.MouserGetData(*gin.Context, request.(*mouser.MouserRequest), rsp)
return rsp, err
//MouserService := service.NewMouserServiceImpl()
//MouserGetData(MouserService)
dd := service.OutLink("LM358")
print("niin")
print(dd)
os.Exit(1)
}
//处理请求
func MouserGetData(c *service.MouserServiceImpl) gin_.Endpoint {
rsp := &mouser.MouserResponse{}
err = c.MouserGetData(context, request.(*mouser.MouserRequest), rsp)
return rsp, err
}
\ No newline at end of file
This diff could not be displayed because it is too large.
......@@ -3,6 +3,7 @@ module search_server
go 1.14
require (
github.com/basgys/goxml2json v1.1.0
github.com/gin-contrib/cors v1.3.1
github.com/gin-gonic/gin v1.6.3
github.com/go-ini/ini v1.57.0
......@@ -14,6 +15,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.14.3 // indirect
github.com/ichunt2019/logger v1.0.5
github.com/idoubi/goz v1.0.0
github.com/imroc/req v0.3.0
github.com/jinzhu/gorm v1.9.12
github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1 // indirect
......
package model
//联营请求外链后格式化数据
type LyClearData struct {
GoodsID string `json:"goods_id"`
GoodsName string `json:"goods_name"`
}
//联营请求外链后格式化数据
type LyClearDataItem struct {
GoodsName string `json:"goods_name"`
GoodsNameTemp string `json:"goods_name_temp"`
BrandName string `json:"brand_name"`
Desc string `json:"desc"`
GoodsSn string `json:"goods_sn"`
Docurl string `json:"docurl"`
Url string `json:"url"`
GoodsImg string `json:"goods_img"`
Cat string `json:"cat"`
RestrictionMessage string `json:"RestrictionMessage"`
increment int `json:"increment"`
SinglePrice float64 `json:"single_price"`
PriceTemp []PriceTempItem `json:"price_temp"`
}
type PriceTempItem struct {
Purchases int `json:"purchases"`
PriceUs float64 `json:"price_us"`
PriceCn float64 `json:"price_cn"`
PriceAc float64 `json:"price_ac"`
}
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