日期:2014-05-20 浏览次数:20681 次
<select id="countForToday" resultType="int" parameterType="string"> select count(*) from knowledgearticle where ka_date = current_date <if test="classid!=null and classid != ''"> and ka_classid = #{classid} </if> </select>
<isNotEmpty prepend="and" property="classid"> ka_classid = #classid# </isNotEmpty>
------解决方案--------------------
又是你啊!首先,参数是可以这么传的,parameterType="java.lang.String"
#{classid}是否和你 传入的参数名称一样?
在确认下,绝对可以是你那样传的,调试下,看看是否类型错误!
------解决方案--------------------
无能为力了,自己多测测吧,其实大多数问题还是只能靠自己