<select id="selectByTicket" resultType="LoginTicket">
select
(id,user_id,ticket,status,expired)
from login_ticket
where ticket = #{ticket}
</select>
报错原因
select后面不要括号
<select id="selectByTicket" resultType="LoginTicket">
select
id,user_id,ticket,status,expired
from login_ticket
where ticket = #{ticket}
</select>
这样就不会出错了
sql语句要记牢!