diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 477981bdd..f114cd3ef 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1235,6 +1235,16 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i role.StoreIDs = utils.Int2Str(store.ID) } dao.UpdateEntity(db, role, "StoreIDs") + } else { + if roles, _ := dao.GetRole(db, user.Name+"城市", ""); len(roles) > 0 { + role := roles[0] + if role.StoreIDs != "" { + role.StoreIDs = role.StoreIDs + "," + utils.Int2Str(store.ID) + } else { + role.StoreIDs = utils.Int2Str(store.ID) + } + dao.UpdateEntity(db, role, "StoreIDs") + } } } return store.ID, err @@ -1823,9 +1833,10 @@ func addStoreCourierMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID err = ErrCanNotFindVendor } //同步美团配送与否状态及美团门店是否存在 - // if outStoreCourierMap.VendorID == model.VendorIDMTPS { - // SetMTPSStatus(jxcontext.AdminCtx, outStoreCourierMap.StoreID, outStoreCourierMap.Status) - // } + if outStoreCourierMap.VendorID == model.VendorIDMTPS { + //SetMTPSStatus(jxcontext.AdminCtx, outStoreCourierMap.StoreID, outStoreCourierMap.Status) + SetMTPSStatus2(outStoreCourierMap.StoreID) + } return outStoreCourierMap, err }