装载自:
http://blog.csdn.net/u010442302/article/details/72902441?locationNum=9&fps=1
<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定位成该日期的零点整
- 顶
- 1
时间: 2024-11-06 11:35:29