@Select({
"<script>",
"select count(1) from tb_hotel ",
"<where>",
"houseState=0",
"<if test='#{i}!=0'>",
"AND houseId Like concat(#{i},'%')",
"</if>",
"</where>",
"</script>"
})
int selectHX(int i);
<if test='#{i}!=0'>
这行有问题,修改为 <if test='i != 0'>