Commit 3e7012c7 by huangchengyi

Merge branch 'dev' of http://119.23.72.7/mushishixian/search_server into dev

# Conflicts:
#	service/common_ly_service.go
parents e76f9d77 578ce9ad
......@@ -15,7 +15,7 @@ func AutoSpu(c *gin.Context) {
if len(goods) == 0 {
errCode = 1
}
res := common.Response{
res := common.BomResponse{
ErrCode: errCode,
ErrMsg: "",
Data: goods,
......
package middleware
import (
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"search_server/pkg/config"
"time"
)
func Cors() gin.HandlerFunc {
corsDomain := config.Get("web.cors_domain").Strings(",")
return cors.New(cors.Config{
AllowOrigins: corsDomain,
AllowMethods: []string{"POST", "GET", "PUT", "DELETE"},
AllowCredentials: true,
MaxAge: 12 * time.Hour,
})
}
package model
type ApiGoods struct {
GoodsID string `json:"goods_id"`
GoodsName string `json:"goods_name"`
GoodsType int `json:"goods_type"`
SupplierID int `json:"supplier_id"`
Moq int `json:"moq"`
Mpq int `json:"mpq"`
Stock int `json:"stock"`
HkDeliveryTime string `json:"hk_delivery_time"`
CnDeliveryTime string `json:"cn_delivery_time"`
LadderPrice []LadderPrice `json:"ladder_price"`
BrandName string `json:"brand_name"`
SupplierName string `json:"supplier_name"`
BrandID int `json:"brand_id"`
IsBuy int `json:"is_buy"`
Mpl int `json:"mpl"`
Status int `json:"status"`
Pdf string `json:"pdf"`
Encap string `json:"encap"`
AcType int `json:"ac_type"`
//ErpTax bool `json:"erp_tax"`
PickType int `json:"pick_type"`
BarCode string `json:"bar_code"`
GoodsId string `json:"goods_id"`
GoodsName string `json:"goods_name"`
GoodsType int `json:"goods_type"`
SupplierId int `json:"supplier_id"`
Moq int `json:"moq"`
Mpq int `json:"mpq"`
Stock int `json:"stock"`
HkDeliveryTime string `json:"hk_delivery_time"`
CnDeliveryTime string `json:"cn_delivery_time"`
LadderPrice []LadderPrice `json:"ladder_price"`
BrandName string `json:"brand_name"`
SupplierName string `json:"supplier_name"`
BrandId int `json:"brand_id"`
ClassId1 int `json:"class_id1"`
ClassId2 int `json:"class_id2"`
Encoded string `json:"encoded"`
Packing string `json:"packing"`
GoodsUnit string `json:"goods_unit"`
GoodsImages string `json:"goods_images"`
GoodsBrief string `json:"goods_brief"`
IsBuy int `json:"is_buy"`
Mpl int `json:"mpl"`
Status int `json:"status"`
Pdf string `json:"pdf"`
Encap string `json:"encap"`
AcType int `json:"ac_type"`
OtherAttrs OtherAttrs `json:"other_attrs"`
UpdateTime int `json:"update_time"`
SkuName string `json:"sku_name"`
Attrs Attrs `json:"attrs"`
Cost string `json:"cost"`
NewCost string `json:"new_cost"`
SupplierStock int `json:"supplier_stock"`
SelfSupplierType int `json:"self_supplier_type"`
GoodsUnitName string `json:"goods_unit_name"`
PackingName string `json:"packing_name"`
MpgUnitName string `json:"mpg_unit_name"`
ScmBrandName string `json:"scm_brand_name"`
AllowCoupon int `json:"allow_coupon"`
ClassId1Name string `json:"class_id1_name"`
CLassId2Name string `json:"c_lass_id2_name"`
SpuId string `json:"spu_id,omitempty"`
BatchSn string `json:"batch_sn,omitempty"`
Canal string `json:"canal,omitempty"`
CpTime int `json:"cp_time,omitempty"`
Coefficient Coefficient `json:"coefficient,omitempty"`
OriginalPrice []OriginalPrice `json:"original_price,omitempty"`
SuppExtendFee SuppExtendFee `json:"supp_extend_fee,omitempty"`
ClassId3 int `json:"class_id3,omitempty"`
SpuName string `json:"spu_name,omitempty"`
ImagesL string `json:"images_l,omitempty"`
SpuBrief string `json:"spu_brief,omitempty"`
SpuDetail string `json:"spu_detail,omitempty"`
ClassName3 string `json:"class_name3,omitempty"`
ErpTax bool `json:"erp_tax,omitempty"`
ScmBrand ScmBrand `json:"scm_brand,omitempty"`
}
type Attr struct {
AttrName string
AttrValue string
}
type Attrs map[string]Attr
type OtherAttrs struct {
GrossWeight string `json:"gross_weight"`
}
type LadderPrice struct {
Purchases int `json:"purchases"`
Purchases int `json:"purchases"`
PriceUs float64 `json:"price_us"`
PriceCn float64 `json:"price_cn"`
PriceAc float64 `json:"price_ac"`
}
\ No newline at end of file
}
type Coefficient struct {
Cn string `json:"cn"`
Hk string `json:"hk"`
ExtraRatio string `json:"extra_ratio"`
Ratio string `json:"ratio"`
Tax float64 `json:"tax"`
}
type OriginalPrice struct {
Purchases int `json:"purchases"`
PriceCn float64 `json:"price_cn"`
PriceUs float64 `json:"price_us"`
}
type SuppExtendFee struct {
Cn struct {
Max int `json:"max"`
Price float64 `json:"price"`
} `json:"cn,omitempty"`
Hk struct{
Max int `json:"max"`
Price float64 `json:"price"`
} `json:"hk,omitempty"`
}
type ScmBrand struct {
ErpBrandName string `json:"erp_brand_name"`
ErpBrandId string `json:"erp_brand_id"`
ScmBrandId string `json:"scm_brand_id"`
}
package common
type Response struct {
ErrCode int `json:"err_code"`
ErrCode int `json:"error_code"`
ErrMsg string `json:"err_msg"`
Data interface{} `json:"data"`
}
type BomResponse struct {
ErrCode int `json:"err_code"`
ErrMsg string `json:"err_msg"`
ErrCode int `json:"error_code"`
ErrMsg string `json:"error_msg"`
Flag int `json:"flag"`
Total int `json:"total"`
Data interface{} `json:"data"`
......
......@@ -13,42 +13,17 @@ type RedisDatabase struct {
//多数据库配置
func BuildRedisConfgs() (RedisDatabaseMap map[string]RedisDatabase) {
return map[string]RedisDatabase{
"search_read": {
"search_r": {
Host: Get("default_redis_read.host").String(),
Password: Get("default_redis_read.password").String(),
MaxIdle: Get("default_redis_read.max_idle").String(),
MaxActive: Get("default_redis_read.max_active").String(),
},
"search_write": {
"search_w": {
Host: Get("default_redis_write.host").String(),
Password: Get("default_redis_write.password").String(),
MaxIdle: Get("default_redis_read.max_idle").String(),
MaxActive: Get("default_redis_read.max_active").String(),
},
"spu_read": {
Host: Get("default_redis_read.host").String(),
Password: Get("default_redis_read.password").String(),
MaxIdle: Get("default_redis_read.max_idle").String(),
MaxActive: Get("default_redis_read.max_active").String(),
},
"spu_write": {
Host: Get("default_redis_write.host").String(),
Password: Get("default_redis_write.password").String(),
MaxIdle: Get("default_redis_read.max_idle").String(),
MaxActive: Get("default_redis_read.max_active").String(),
},
"api_read": {
Host: Get("api_redis_read.host").String(),
Password: Get("api_redis_read.password").String(),
MaxIdle: Get("api_redis_read.max_idle").String(),
MaxActive: Get("api_redis_read.max_active").String(),
},
"api_write": {
Host: Get("api_redis_write.host").String(),
Password: Get("api_redis_write.password").String(),
MaxIdle: Get("api_redis_write.max_idle").String(),
MaxActive: Get("api_redis_write.max_active").String(),
},
}
}
......@@ -7,7 +7,6 @@ import (
)
type ichuntRedis struct {
RedisList map[string]*redis.Pool
}
......@@ -30,11 +29,9 @@ func Setup() (err error) {
panic(err)
}
}
return nil
}
func getConn(writeHost, password string) (pool *redis.Pool, err error) {
maxIdle, _ := config.Get("redis.max_idle").Int()
maxActive, _ := config.Get("redis.max_active").Int()
......@@ -60,6 +57,4 @@ func getConn(writeHost, password string) (pool *redis.Pool, err error) {
},
}
return
}
}
\ No newline at end of file
package mysql
import (
"fmt"
"github.com/go-xorm/xorm"
_ "github.com/go-sql-driver/mysql"
"search_server/pkg/config"
......@@ -12,7 +13,7 @@ var DatabaseConMap map[string]*xorm.Engine
func _setup() error{
func Setup() error{
DatabaseConMap = make(map[string]*xorm.Engine,0)
DatabaseList := config.BuildDatabaseList()
var err error
......@@ -23,7 +24,7 @@ func _setup() error{
host := db.Host
database := db.Database
dataSourceName := userName + ":" + password + "@tcp(" + host + ")/" + database + "?charset=utf8"
dataSourceName := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8",userName,password,host,database)
DatabaseConMap[conName], err = xorm.NewEngine("mysql", dataSourceName)
if err!=nil{
......
......@@ -3,6 +3,7 @@ package routes
import (
"github.com/gin-gonic/gin"
"search_server/controller"
"search_server/middleware"
)
//初始化路由
......@@ -10,11 +11,11 @@ func InitRouter() *gin.Engine {
r := gin.New()
r.Use(gin.Logger())
r.Use(gin.Recovery())
r.Use(middleware.Cors())
//路由
r.POST("/search/bom/autospu", controller.AutoSpu)
r.POST("/search/bom/recommend", controller.Recommend)
//r.POST("search/ZiYing/zyh", controller.Zyh)
r.POST("search/ZiYing/zyh", controller.Zyh)
//快手平台相关
//r.GET("/search/quote", controller.QuoteIndex)
......
......@@ -3,6 +3,7 @@ package service
import (
"fmt"
"github.com/gomodule/redigo/redis"
_ "github.com/gomodule/redigo/redis"
"github.com/tidwall/gjson"
"gopkg.in/olivere/elastic.v5"
"regexp"
......@@ -10,6 +11,7 @@ import (
"search_server/pkg/config"
"search_server/pkg/es"
"search_server/pkg/gredis"
_ "search_server/pkg/gredis"
"strconv"
"strings"
)
......@@ -46,7 +48,9 @@ func SearchAttr(attrOrigin, encap string) (goodsName string, err error) {
numberR, _ := regexp.Compile(common.PureNumberRegular)
pureNumber := numberR.FindString(encap)
//再去找对应属性
attrName, _ := redis.String(gredis.HGet("sku_map2", pureNumber))
redisConn := gredis.Conn("default_redis_read")
defer redisConn.Close()
attrName, _ := redis.String(redisConn.Do("HGET", "sku_map2", pureNumber))
if attrName != "" {
attrValue := attrName + "€" + pureNumber
attrsSlice = append(attrsSlice, attrValue)
......@@ -199,7 +203,9 @@ func getAttrValueByAttr(attr string) (attrValue string) {
}
} else {
//再去找没有单位的对应属性
attrName, _ = redis.String(gredis.HGet("sku_map2", attr))
redisConn := gredis.Conn("default_redis_read")
defer redisConn.Close()
attrName, _ := redis.String(redisConn.Do("HGET", "sku_map2", pureNumber))
if attrName != "" {
attrValue = attrName + "€" + attr
} else {
......
......@@ -101,7 +101,8 @@ func Recommend(req *common.RecommendRequest) (rsp *common.BomResponse) {
goodsIdList = append(goodsIdList, goodsId)
}
goodsIdListStr = strings.Join(goodsIdList, ",")
goodsList, err := GetGoodsInfo(goodsIdListStr)
goodsService := GoodsService{}
goodsList, err := goodsService.GetGoodsInfoByApi(goodsIdListStr)
response.Data = goodsList
response.Flag = req.Flag
return &response
......
package service
import (
"fmt"
"github.com/gomodule/redigo/redis"
"github.com/imroc/req"
"github.com/tidwall/gjson"
"github.com/uniplaces/carbon"
"gopkg.in/olivere/elastic.v5"
"regexp"
"search_server/model"
"search_server/pkg/common"
"search_server/pkg/config"
"search_server/protopb/bom"
"search_server/pkg/es"
"search_server/pkg/gredis"
"search_server/requests"
"strings"
)
func GetGoodsInfo(goodsIdsStr string) (goodsList []*bom.GoodsModel, err error) {
goodsServerUrl := config.Get("goods.api_url").String()
type GoodsService struct {
}
//获取商品信息,需要传入userId用于判断是否登陆
func (gs *GoodsService) GetGoodsInfo(goodsIdsStr string, userId int) (goodsListMap map[string]*model.ApiGoods, err error) {
isNewCustomer, isMember := CheckIsNewCustomer(userId)
params := req.Param{
"goods_id": goodsIdsStr,
"power[newCustomer]": isNewCustomer,
"power[member]": isMember,
}
_, goodsListMap, err = CurlGoodsInfo(goodsIdsStr, params)
return
}
//获取商品信息
func (gs *GoodsService) GetGoodsInfoByApi(goodsIdsStr string) (goodsList []*model.ApiGoods, err error) {
params := req.Param{
"goods_id": goodsIdsStr,
}
//fmt.Println(goodsIdsStr)
goodsList, _, err = CurlGoodsInfo(goodsIdsStr, params)
fmt.Println(goodsList[0].BrandId)
return
}
//isMap:是否以字典形式返回值,默认是数组
func CurlGoodsInfo(goodsIdsStr string, params req.Param) (goodsList []*model.ApiGoods, goodsListMap map[string]*model.ApiGoods, err error) {
//req.Debug = true
goodsServerUrl := config.Get("goods.api_url").String()
resp, err := req.Post(goodsServerUrl+"/synchronization", params)
if err != nil {
return
}
goodsListMap = make(map[string]*model.ApiGoods, 1000)
//先判断返回的data是不是字典,不是字典代表可能是返回字符串了
if gjson.Get(resp.String(), "data").IsObject() {
//排序操作
......@@ -29,39 +59,124 @@ func GetGoodsInfo(goodsIdsStr string) (goodsList []*bom.GoodsModel, err error) {
for _, goodsId := range goodsIdList {
for _, data := range gjson.Get(resp.String(), "data").Map() {
if goodsId == data.Get("goods_id").String() {
//还要去判断是否是bool
//还要去判断是否是false,因为商品服务可能返回 "1000":false 这样子的形式
if data.IsObject() {
var goods bom.GoodsModel
goods.GoodsName = data.Get("goods_name").String()
var goods model.ApiGoods
goods.PickType = int(data.Get("pick_type").Int())
goods.BarCode = data.Get("bar_code").String()
goods.GoodsId = data.Get("goods_id").String()
goods.BrandId = data.Get("goods_id").Int()
goods.Pdf = data.Get("pdf").String()
goods.Stock = data.Get("stock").Int()
goods.Mpq = data.Get("mpq").Int()
goods.Moq = data.Get("moq").Int()
goods.SupplierName = data.Get("supplier_name").String()
goods.BrandName = data.Get("brand_name").String()
goods.HkDeliveryType = data.Get("hk_delivery_time").String()
goods.GoodsName = data.Get("goods_name").String()
goods.GoodsType = int(data.Get("goods_type").Int())
goods.SupplierId = int(data.Get("supplier_id").Int())
goods.Mpq = int(data.Get("mpq").Int())
goods.Moq = int(data.Get("moq").Int())
goods.Stock = int(data.Get("stock").Int())
goods.HkDeliveryTime = data.Get("hk_delivery_time").String()
goods.CnDeliveryTime = data.Get("cn_delivery_time").String()
goods.IsBuy = data.Get("is_buy").Int()
goods.Mpl = data.Get("mpl").Int()
goods.BrandName = data.Get("brand_name").String()
goods.SupplierName = data.Get("supplier_name").String()
goods.BrandId = int(data.Get("goods_id").Int())
goods.ClassId1 = int(data.Get("class_id1").Int())
goods.ClassId2 = int(data.Get("class_id2").Int())
goods.Encoded = data.Get("encoded").String()
goods.Packing = data.Get("packing").String()
goods.GoodsUnit = data.Get("goods_unit").String()
goods.GoodsImages = data.Get("goods_images").String()
goods.GoodsBrief = data.Get("goods_brief").String()
goods.Mpl = int(data.Get("mpl").Int())
goods.Status = int(data.Get("status").Int())
goods.IsBuy = int(data.Get("is_buy").Int())
goods.Pdf = data.Get("pdf").String()
goods.Encap = data.Get("encap").String()
goods.SupplierId = data.Get("supplier_id").Int()
goods.Status = data.Get("status").Int()
goods.GoodsType = data.Get("goods_type").Int()
goods.AcType = data.Get("ac_type").Int()
ladderPrice := make([]*bom.LadderPrice, 0)
goods.AcType = int(data.Get("ac_type").Int())
goods.SkuName = data.Get("sku_name").String()
goods.Cost = data.Get("const").String()
goods.NewCost = data.Get("new_const").String()
goods.SupplierStock = int(data.Get("supplier_stock").Int())
goods.SelfSupplierType = int(data.Get("self_supplier_type").Int())
goods.GoodsUnitName = data.Get("goods_unit_name").String()
goods.PackingName = data.Get("packing_name").String()
goods.MpgUnitName = data.Get("mpg_unit_name").String()
goods.ScmBrandName = data.Get("scm_brand_name").String()
goods.AllowCoupon = int(data.Get("allow_coupon").Int())
goods.ClassId1Name = data.Get("class_id1_name").String()
goods.CLassId2Name = data.Get("c_lass_id2_name").String()
goods.SpuId = data.Get("spu_id").String()
goods.BatchSn = data.Get("batch_sn").String()
goods.Canal = data.Get("canal").String()
goods.CpTime = int(data.Get("cp_time").Int())
goods.ClassId3 = int(data.Get("class_id3").Int())
goods.SpuName = data.Get("spu_name").String()
goods.ImagesL = data.Get("images_l").String()
goods.SpuBrief = data.Get("spu_brief").String()
goods.SpuDetail = data.Get("spu_detail").String()
goods.ClassName3 = data.Get("class_name3").String()
goods.ErpTax = data.Get("erp_tax").Bool()
goods.SupplierId = int(data.Get("supplier_id").Int())
goods.GoodsType = int(data.Get("goods_type").Int())
//ladder_price
ladderPrice := make([]model.LadderPrice, 0)
for _, price := range data.Get("ladder_price").Array() {
ladder := bom.LadderPrice{
Purchases: price.Get("purchases").Int(),
PriceUs: float32(price.Get("price_us").Float()),
PriceCn: float32(price.Get("price_cn").Float()),
PriceAc: float32(price.Get("price_ac").Float()),
ladder := model.LadderPrice{
Purchases: int(price.Get("purchases").Int()),
PriceUs: price.Get("price_us").Float(),
PriceCn: price.Get("price_cn").Float(),
PriceAc: price.Get("price_ac").Float(),
}
ladderPrice = append(ladderPrice, &ladder)
ladderPrice = append(ladderPrice, ladder)
}
goods.LadderPrice = ladderPrice
//other_attrs
goods.OtherAttrs.GrossWeight = data.Get("other_attrs.gross_weight").String()
//Attrs
attrMap := make(map[string]model.Attr, 0)
for key, attr := range data.Get("attrs").Array() {
attr := model.Attr{
AttrName: attr.Get("attr_name").String(),
AttrValue: attr.Get("attr_value").String(),
}
attrMap[common.ToString(key)] = attr
}
goods.Attrs = attrMap
//coefficient
goods.Coefficient.Cn = data.Get("coefficient.cn").String()
goods.Coefficient.Hk = data.Get("coefficient.hk").String()
goods.Coefficient.ExtraRatio = data.Get("coefficient.extra_ratio").String()
goods.Coefficient.Ratio = data.Get("coefficient.ratio").String()
goods.Coefficient.Tax = data.Get("coefficient.tax").Float()
//original_price
originalPrice := make([]model.OriginalPrice, 0)
for _, price := range data.Get("ladder_price").Array() {
price := model.OriginalPrice{
Purchases: int(price.Get("purchases").Int()),
PriceUs: price.Get("price_us").Float(),
PriceCn: price.Get("price_cn").Float(),
}
originalPrice = append(originalPrice, price)
}
goods.OriginalPrice = originalPrice
//supp_extend_fee
goods.SuppExtendFee.Cn.Max = int(data.Get("supp_extend_fee.cn.max").Int())
goods.SuppExtendFee.Cn.Price = data.Get("supp_extend_fee.cn.price").Float()
goods.SuppExtendFee.Hk.Max = int(data.Get("supp_extend_fee.cn.max").Int())
goods.SuppExtendFee.Hk.Price = data.Get("supp_extend_fee.cn.price").Float()
//scm_brand
goods.ScmBrand.ErpBrandName = data.Get("scm_brand.erp_brand_name").String()
goods.ScmBrand.ErpBrandId = data.Get("scm_brand.erp_brand_id").String()
goods.ScmBrand.ScmBrandId = data.Get("scm_brand.scm_brand_id").String()
goodsList = append(goodsList, &goods)
goodsListMap[goodsId] = &goods
} else {
goodsListMap[goodsId] = nil
}
}
}
......@@ -70,16 +185,40 @@ func GetGoodsInfo(goodsIdsStr string) (goodsList []*bom.GoodsModel, err error) {
return
}
func CheckIsNewCustomer(userId int) (isNewCustomer, isMember bool) {
//判断新客价
if userId != 0 {
redisConn := gredis.Conn("default_redis_read")
defer redisConn.Close()
userInfoStr, err := redis.String(redisConn.Do("HGET", "api_user", userId))
if err != nil {
return
}
// 新客户显示新客价
isNewExist := gjson.Get(userInfoStr, "is_new").Exists()
isNew := gjson.Get(userInfoStr, "is_new").Int()
if isNewExist && isNew == 0 {
isNewCustomer = true
}
isMember = true
} else {
// 未登录显示新客价
isNewCustomer = true
isMember = false
}
return
}
//根据供应商获取商品信息
func GetGoodsInfoBySupplier(req requests.QuoteIndexRequest) error {
//supplierIndex := config.Get("es.search_supplier").String()
////获取查询条件
//queryString := getSupplierQuery(req)
//res, err := es.CurlES(supplierIndex, queryString)
//if err != nil {
// return err
//}
//fmt.Println(supplierIndex)
supplierIndex := config.Get("es.search_supplier").String()
//获取查询条件
queryString, err := getSupplierQuery(req)
res, err := es.CurlES(supplierIndex, queryString)
if err != nil {
return err
}
fmt.Println(res)
return nil
}
......@@ -240,7 +379,10 @@ func getSupplierQuery(req requests.QuoteIndexRequest) (string, error) {
//todo : $params['preference'] = '_primary_first';
//判断是否要排除某些品牌
//todo : 待确定需不需要接入
excludeBrandId := model.GetExcludeBrandIds(1)
for _, brandId := range excludeBrandId {
query.MustNot(elastic.NewTermQuery("brand_id", brandId))
}
searchRequest := elastic.NewSearchRequest().Source(source)
......
......@@ -6,6 +6,7 @@ import (
"reflect"
"search_server/model"
"search_server/pkg/config"
"search_server/pkg/gredis"
)
type ZyServiceImpl struct{}
......@@ -59,5 +60,12 @@ func zy(ctx *gin.Context, req *model.ZyhRequest,_type byte,isCheck byte) (rsp *m
fmt.Printf("%+v",req)
fmt.Println(reflect.TypeOf(req.ClassIdcondition))
fmt.Println(req.ClassIdcondition)
redis_s_r :=gredis.Conn("search_r")
defer func(){
redis_s_r.Close()
}()
return nil
}
......@@ -4,7 +4,7 @@ import (
"flag"
"fmt"
"search_server/boot"
"search_server/pkg/mysql"
"search_server/service"
)
func main() {
......@@ -14,20 +14,6 @@ func main() {
if err := boot.Boot(path); err != nil {
fmt.Println(err)
}
type Result struct {
BinId int `json:"bin_id"`
Bin string `json:"bin"`
}
var result []Result
mysql.Connection("bom").Raw("SELECT * FROM lie_bin").Scan(&result)
//mysql.Connection()("bom").Table("bin").Find(&result)
fmt.Println(result)
type Result2 struct {
BusinessName string `json:"business_name"`
}
var result2 []Result2
mysql.Connection("mysql").Raw("SELECT * FROM lie_business").Scan(&result2)
//mysql.GetDB("bom").Table("bin").Find(&result)
fmt.Println(result2)
service1:= service.GoodsService{}
fmt.Println(service1.GetGoodsInfoByApi("1151005920927710088,1150961641855982990,1150961724815213435"))
}
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