1
This commit is contained in:
@@ -71,12 +71,7 @@ func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
if shopInfo.ShopLat <= 9999999 {
|
||||
shopInfo.ShopLat *= 10
|
||||
}
|
||||
// 获取品牌名称
|
||||
brandInfo, err := dao.GetBrands(dao.GetDB(), "", storeDetail.BrandID, "", false, "")
|
||||
if err != nil {
|
||||
return "", -1, err
|
||||
}
|
||||
shopInfo.ShopName = brandInfo[0].Name + "-" + storeDetail.Name
|
||||
|
||||
if globals.EnableStoreWrite {
|
||||
shopStatus, err = api.MtpsAPI.ShopCreate(shopInfo)
|
||||
if err == nil {
|
||||
@@ -187,3 +182,13 @@ func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// 美团配送,修改门店名称
|
||||
func UpdateStoreName(storeId, name string) (err error) {
|
||||
shopInfo := &mtpsapi.ShopInfo{
|
||||
ShopID: storeId,
|
||||
ShopName: name,
|
||||
}
|
||||
_, err = api.MtpsAPI.ShopUpdate(shopInfo)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user