<select id="selectByParamCount" resultType="java.lang.Integer"
parameterType="com.sss.fin.cif.vo.admin.BankCardAuditQuery">
select count(1) from tablename
<where>
<if test="operatorDateStart != null and operatorDateStart !=‘‘ " >
operator_date >= #{operatorDateStart,jdbcType=VARCHAR}
</if>
<if test="operatorDateEnd != null and operatorDateEnd !=‘‘ " >
<![CDATA[
and operator_date <= concat(#{operatorDateEnd,jdbcType=VARCHAR},‘235959‘)
]]>
</if>
</where>
</select>
<![CDATA[ ]]> 转义< (小于号)
sql语句中,默认把yyyyMMdd定位成该日期的零点整