As a native English speaker, I’d say that “do you mind” tends to give a preconception that what someone is about to ask is something that the other will find inconvenient. Being asked to have dinner is usually a pleasant invitation, so I’d recommend “Would you like to have dinner with us” instead.