This commit is contained in:
suyl
2021-07-16 17:05:49 +08:00
parent 10811a669b
commit a7f28b59de

View File

@@ -1228,7 +1228,11 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i
user, _ := dao.GetUserByID(db, "mobile", store.MarketManPhone)
if roles, _ := dao.GetRole(db, user.Name, ""); len(roles) > 0 {
role := roles[0]
role.StoreIDs = role.StoreIDs + "," + utils.Int2Str(store.ID)
if role.StoreIDs != "" {
role.StoreIDs = role.StoreIDs + "," + utils.Int2Str(store.ID)
} else {
role.StoreIDs = utils.Int2Str(store.ID)
}
dao.UpdateEntity(db, role, "StoreIDs")
}
}