aa
This commit is contained in:
@@ -19,19 +19,26 @@ import (
|
||||
)
|
||||
|
||||
type tEbaiSupplierInfo struct {
|
||||
SupplierID string `json:"supplierID"`
|
||||
Logo string `json:"logo"`
|
||||
SupplierID string `json:"supplierID"`
|
||||
Logo string `json:"logo"`
|
||||
CategoryID1 int
|
||||
CategoryID2 int
|
||||
BusinessFormID int //门店业态
|
||||
}
|
||||
|
||||
var (
|
||||
ebaiSupplierInfo = map[string]*tEbaiSupplierInfo{
|
||||
EbaiSupplierIDsc: &tEbaiSupplierInfo{
|
||||
SupplierID: EbaiSupplierIDsc,
|
||||
Logo: "http://image.jxc4.com/image/4573e7789c647d4961f8955e3733dbd6.tem.jpg",
|
||||
SupplierID: EbaiSupplierIDsc,
|
||||
Logo: "http://image.jxc4.com/image/4573e7789c647d4961f8955e3733dbd6.tem.jpg",
|
||||
CategoryID1: 166,
|
||||
CategoryID2: 222,
|
||||
BusinessFormID: 1672214913,
|
||||
},
|
||||
EbaiSupplierIDc4: &tEbaiSupplierInfo{
|
||||
SupplierID: EbaiSupplierIDc4,
|
||||
Logo: "",
|
||||
SupplierID: EbaiSupplierIDc4,
|
||||
Logo: "",
|
||||
BusinessFormID: 2233065879,
|
||||
},
|
||||
}
|
||||
)
|
||||
@@ -578,7 +585,7 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
} else {
|
||||
param["name"] = brand.Name + "(" + storeDetail.Name + ")"
|
||||
}
|
||||
param["supplier_id"] = params["supplier_id"]
|
||||
param["supplier_id"] = params["supplierID"]
|
||||
//省市区
|
||||
placeCity, err := dao.GetPlaceByCode(db, storeDetail.CityCode)
|
||||
param["city"] = placeCity.EbaiCode
|
||||
@@ -593,17 +600,49 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
} else {
|
||||
phone = model.VendorStoreTel
|
||||
}
|
||||
ebaiInfo := ebaiSupplierInfo[param["supplier_id"].(string)]
|
||||
param["phone"] = phone
|
||||
param["ivr_phone"] = phone
|
||||
param["service_phone"] = storeDetail.Tel1
|
||||
param["address"] = params["address"]
|
||||
param["longitude"] = jxutils.IntCoordinate2Standard(storeDetail.Lng)
|
||||
param["latitude"] = jxutils.IntCoordinate2Standard(storeDetail.Lat)
|
||||
param["coord_type"] = "amap" //高德坐标系
|
||||
param["shop_logo"] = ebaiInfo.Logo
|
||||
param["categorys"] = []map[string]int{
|
||||
map[string]int{
|
||||
"category1": ebaiInfo.CategoryID1,
|
||||
"category2": ebaiInfo.CategoryID2,
|
||||
},
|
||||
}
|
||||
time1map := map[string]string{
|
||||
"start": jxutils.JxOperationTime2StrTime(storeDetail.OpenTime1),
|
||||
"end": jxutils.JxOperationTime2StrTime(storeDetail.CloseTime1),
|
||||
}
|
||||
var time2map = make(map[string]string)
|
||||
if storeDetail.OpenTime2 != 0 && storeDetail.CloseTime2 != 0 {
|
||||
time2map["start"] = jxutils.JxOperationTime2StrTime(storeDetail.OpenTime2)
|
||||
time2map["end"] = jxutils.JxOperationTime2StrTime(storeDetail.CloseTime2)
|
||||
}
|
||||
var timeLis []map[string]string
|
||||
timeLis = append(timeLis, time1map)
|
||||
if time2map != nil {
|
||||
timeLis = append(timeLis, time2map)
|
||||
}
|
||||
param["business_time"] = timeLis
|
||||
param["business_form_id"] = ebaiInfo.BusinessFormID
|
||||
if baiduShopID, err := api.EbaiAPI.ShopCreate(param); err == nil {
|
||||
//上传资质
|
||||
|
||||
api.EbaiAPI.ShopCreate(params)
|
||||
return utils.Int64ToStr(baiduShopID), err
|
||||
}
|
||||
return vendorStoreID, err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) DeleteStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.StoreDetail) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user