添加蜂鸟门店名称生成错误
This commit is contained in:
@@ -56,11 +56,8 @@ func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
CreditCode: storeDetail.LicenceCode,
|
||||
BusinessLicencePicHash: storeDetail.Licence,
|
||||
}
|
||||
if len(brandInfo) >= 0 {
|
||||
createStore.HeadShopName = brandInfo[0].Name + "-" + storeDetail.Name
|
||||
} else {
|
||||
createStore.HeadShopName = storeDetail.Name
|
||||
}
|
||||
createStore.BranchShopName = storeDetail.Name
|
||||
createStore.HeadShopName = brandInfo[0].Name + "-" + storeDetail.Name
|
||||
|
||||
fnShopId, err := api.FnAPI.CreateStore(createStore)
|
||||
if err != nil {
|
||||
@@ -135,10 +132,9 @@ func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
CreditCode: storeDetail.LicenceCode,
|
||||
BusinessLicencePicHash: storeDetail.Licence,
|
||||
}
|
||||
if len(brandInfo) >= 0 {
|
||||
if storeDetail.Name != fnStore.Name {
|
||||
updateStore.HeadShopName = brandInfo[0].Name + "-" + storeDetail.Name
|
||||
} else {
|
||||
updateStore.HeadShopName = storeDetail.Name
|
||||
updateStore.BranchShopName = storeDetail.Name
|
||||
}
|
||||
|
||||
return api.FnAPI.UpdateStore(updateStore)
|
||||
|
||||
@@ -69,6 +69,12 @@ func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.S
|
||||
DeliveryServiceCodes: utils.Int2Str(mtpsapi.DeliveryServiceCodeRapid),
|
||||
}
|
||||
shopStatus := mtpsapi.ShopStatusAuditCreated
|
||||
// 获取品牌名称
|
||||
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 {
|
||||
|
||||
@@ -720,7 +720,7 @@ func (c *StoreController) GetStoreCategoryMap() {
|
||||
// 获取门店分类
|
||||
categoryList, err := cms.GetStoreCategoryMap(params.Ctx, params.ParentID, params.Level, params.StoreID)
|
||||
// 门店为b2b
|
||||
if store[0].BrandID == model.B2BNumberId {
|
||||
if store[0].BrandID == model.B2BNumberId || params.StoreID == model.MatterStoreID{
|
||||
// 获取用户权限,如果是普通用户不展示b2b相关目录,如果是门店老板或者管理则展示全部
|
||||
userAuth, err := auth2.GetTokenInfo(params.Token)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user