你的userid不是数字格式的话,sql语句里面的userid要用单引号扩起内容
.....userid='{userid}'..............
yw00001是你的userId吧 你看一下你的sql语句生成的是什么
select count(*) from userTB where userid=yw00001 and pwd=@@pwd