错误写法:
<select id="findTopicPresetByCompanyIDAndCategory" parameterType="map" resultType="com.seeyon.esn.entity.portal.TopicPreset">
select * from topicPreset where companyID = #{companyID}
<if test="category=="0" '> and (category is null or category = "0")</if>
<if test="category=='1' "> and category = "1"</if>
</select>
正确写法:test里面 应该为单引号套双引号
<select id="findTopicPresetByCompanyIDAndCategory" parameterType="map" resultType="com.seeyon.esn.entity.portal.TopicPreset">
select * from topicPreset where companyID = #{companyID}
<if test='category=="0" '> and (category is null or category = "0")</if>
<if test='category=="1" '> and category = "1"</if>
</select>