修正Model类一处connection判断