<select id="getCountNumByRule" resultType="Long" parameterType="java.util.Map" >
select count(1)
from op_exception
<where>
<if test="host != null">
and host = #{host,jdbcType=VARCHAR}
</if>
<if test = "exceptionType != null">
and type = #{exceptionType}
</if>
<if test = "content != null">
and content like CONCAT('%','${content}','%') 是$ ,不会#
</if>
<if test = "startTime != null">
and create_time >= #{startTime}
</if>
<if test = "endTime != null">
and create_time <= #{endTime}
</if>
</where>
</select>
select count(1)
from op_exception
<where>
<if test="host != null">
and host = #{host,jdbcType=VARCHAR}
</if>
<if test = "exceptionType != null">
and type = #{exceptionType}
</if>
<if test = "content != null">
and content like CONCAT('%','${content}','%') 是$ ,不会#
</if>
<if test = "startTime != null">
and create_time >= #{startTime}
</if>
<if test = "endTime != null">
and create_time <= #{endTime}
</if>
</where>
</select>