This is a bad joke on multiple levels. First, why are you specifically noting that both the bar and bartender are racist? This isn't relevant to the punchline in any way. Too much information in a joke ruins it. Second, you use the word "dog" twice and the wording of the dialogue is unnecessarily verbose. Jokes need to be quick and snappy; timing matters. Even if the joke itself is funny, it's pure cringe if you can't tell it properly. A badly told joke is worse than a bad joke.
Third, there's not even a punchline here. This kind of joke only works when there is some kind of double-entendre or pun, sort of like this:>a robber approaches a man and points a gun at him>the man says: "Are you going to hold me up?">the robber says: "Why, are you falling down?"
It's funny because "hold up" has two different connotations; it's a play on words.
In your joke there is no play on words, but the way it's being told makes it sound like there ought to be one. "Dog" is not an slur for a Chinese person that I'm aware of, so the bartender's slur most probably revolves around Chinese people eating dogs.
The reason this is a problem is that the joke appears to turn on the word "serve." You can serve a person directly, or you can serve a particular dish to
a person. If "dog" had multiple meanings, ie "dog" was a known derogatory slur for an Asian person, it would be funny: the bartender says "we don't serve dogs," meaning "we don't serve Chinese people," but the Chinese guy interprets it as "we don't serve dogs as food." Thus, the joke would be that the bartender makes a racist comment that goes over the Chinese person's head, but the Chinese person ends up inadvertently reinforcing a different stereotype.
However, that's not what's actually happening here. There's no double-entendre on either "dog" or "serve" here; both parties are talking about the same thing. In other words, the bartender is insinuating that the Chinese person eats dogs, and the Chinese person is agreeing with him. Unless you consider the idea of Chinese people eating dogs to be funny enough on its own, there's nothing to laugh at here.
Here is a version of this joke that would actually make sense:>A dog walks into a bar>the bartender says "we don't serve dogs here">the dog says "that must be why there aren't any Chinks around."
The punchline is a play on the word "serve." The bartender is informing the dog that dogs are not welcome as customers, and the dog throws it back at him as something racist.
Anyway, final judgement: cringe/10. Better luck next time.