错误写法
<select id="selectBookCountByOrgId" resultType="java.lang.Integer">
SELECT count(*) FROM book WHERE org_id IN
(
<if test="orgId != '0'">
#{orgId},
</if>
'0'
)
AND del = 0
</select>
正确写法
<select id="selectBookCountByOrgId" resultType="java.lang.Integer">
SELECT count(*) FROM book WHERE org_id IN
(
<if test="orgId != '0'.toString()">
#{orgId},
</if>
'0'
)
AND del = 0
</select>