This commit is contained in:
邹宗楠
2023-05-25 16:07:39 +08:00
parent d8714def74
commit 0e3c4ab7fa
4 changed files with 55 additions and 8 deletions

View File

@@ -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
}