a
This commit is contained in:
@@ -59,6 +59,7 @@ type StoreDetail struct {
|
|||||||
YbStorePrefix string `json:"ybStorePrefix"`
|
YbStorePrefix string `json:"ybStorePrefix"`
|
||||||
|
|
||||||
MtwmToken string `json:"mtwmToken"`
|
MtwmToken string `json:"mtwmToken"`
|
||||||
|
EbaiSupplierID string `json:"ebaiSupplierID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 带快递门店信息的
|
// 带快递门店信息的
|
||||||
@@ -103,7 +104,7 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID, vendorOrgCo
|
|||||||
SELECT t1.*,
|
SELECT t1.*,
|
||||||
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee_deduction_sill, t2.delivery_fee_deduction_fee, t2.sync_status, t2.vendor_org_code,
|
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee_deduction_sill, t2.delivery_fee_deduction_fee, t2.sync_status, t2.vendor_org_code,
|
||||||
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, t2.vendor_store_name, t2.is_order, t2.yb_app_id, t2.yb_app_key, t2.yb_store_prefix,
|
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, t2.vendor_store_name, t2.is_order, t2.yb_app_id, t2.yb_app_key, t2.yb_store_prefix,
|
||||||
t2.jds_street_code, t2.jds_street_name, t2.is_supply_goods, t2.vendor_pay_percentage, t2.mtwm_token,
|
t2.jds_street_code, t2.jds_street_name, t2.is_supply_goods, t2.vendor_pay_percentage, t2.mtwm_token, t2.ebai_supplier_id,
|
||||||
t3.value price_percentage_pack_str,
|
t3.value price_percentage_pack_str,
|
||||||
t4.value freight_deduction_pack_str,
|
t4.value freight_deduction_pack_str,
|
||||||
province.name province_name,
|
province.name province_name,
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ type StoreMap struct {
|
|||||||
YbStorePrefix string `orm:"size(255)" json:"ybStorePrefix"`
|
YbStorePrefix string `orm:"size(255)" json:"ybStorePrefix"`
|
||||||
|
|
||||||
MtwmToken string `orm:"size(255)" json:"mtwmToken"` //美团外卖商超token,有效期30天,每20天刷一次
|
MtwmToken string `orm:"size(255)" json:"mtwmToken"` //美团外卖商超token,有效期30天,每20天刷一次
|
||||||
|
EbaiSupplierID string `orm:"column(ebai_supplier_id)" json:"ebaiSupplierID"` //饿百供应商ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*StoreMap) TableUnique() [][]string {
|
func (*StoreMap) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -705,11 +705,13 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
|
|||||||
return fmt.Errorf("个人信息不全, [%v]", storeDetail.ID)
|
return fmt.Errorf("个人信息不全, [%v]", storeDetail.ID)
|
||||||
}
|
}
|
||||||
if storeDetail.StoreFrontPic == "" || storeDetail.StoreInPic == "" {
|
if storeDetail.StoreFrontPic == "" || storeDetail.StoreInPic == "" {
|
||||||
return fmt.Errorf("门面门店照必须不全!, [%v]", storeDetail.ID)
|
return fmt.Errorf("门面门店照不全!, [%v]", storeDetail.ID)
|
||||||
}
|
}
|
||||||
|
if storeDetail.EbaiSupplierID == EbaiSupplierIDsc {
|
||||||
if storeDetail.Licence2Code == "" || storeDetail.Licence2Image == "" {
|
if storeDetail.Licence2Code == "" || storeDetail.Licence2Image == "" {
|
||||||
return fmt.Errorf("食品经营许可证不全, [%v]", storeDetail.ID)
|
return fmt.Errorf("食品经营许可证不全, [%v]", storeDetail.ID)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//营业执照
|
//营业执照
|
||||||
licenceMap := make(map[string]interface{})
|
licenceMap := make(map[string]interface{})
|
||||||
@@ -739,8 +741,9 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//食品经营许可证
|
|
||||||
licence2Map := make(map[string]interface{})
|
licence2Map := make(map[string]interface{})
|
||||||
|
if storeDetail.EbaiSupplierID == EbaiSupplierIDsc {
|
||||||
|
//食品经营许可证
|
||||||
licence2Map["type_1"] = 2
|
licence2Map["type_1"] = 2
|
||||||
licence2Map["type_2"] = 202
|
licence2Map["type_2"] = 202
|
||||||
licence2Map["license_number"] = storeDetail.Licence2Code
|
licence2Map["license_number"] = storeDetail.Licence2Code
|
||||||
@@ -766,6 +769,7 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
|
|||||||
licence2Map["license_validdate"] = storeDetail.Licence2Expire
|
licence2Map["license_validdate"] = storeDetail.Licence2Expire
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//身份证
|
//身份证
|
||||||
idMap := make(map[string]interface{})
|
idMap := make(map[string]interface{})
|
||||||
@@ -800,7 +804,7 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
|
|||||||
|
|
||||||
params := make(map[string]interface{})
|
params := make(map[string]interface{})
|
||||||
maps := []map[string]interface{}{
|
maps := []map[string]interface{}{
|
||||||
licenceMap, licence2Map, idMap, map[string]interface{}{
|
licenceMap, idMap, map[string]interface{}{
|
||||||
"type_1": 5,
|
"type_1": 5,
|
||||||
"type_2": 501,
|
"type_2": 501,
|
||||||
"photos": []map[string]interface{}{
|
"photos": []map[string]interface{}{
|
||||||
@@ -820,6 +824,9 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
if storeDetail.EbaiSupplierID == EbaiSupplierIDsc {
|
||||||
|
maps = append(maps, licence2Map)
|
||||||
|
}
|
||||||
params["aptitude"] = maps
|
params["aptitude"] = maps
|
||||||
err = api.EbaiAPI.ShopAptitudeUpload("", utils.Str2Int64(storeDetail.VendorStoreID), params)
|
err = api.EbaiAPI.ShopAptitudeUpload("", utils.Str2Int64(storeDetail.VendorStoreID), params)
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user