MySQL string +0 can be converted to a number:
<!--Find whether the version satisfies the interval--> <select id="isVersion" resultType="java.lang.String" parameterType="map"> SELECT version_id from job_release_version where src_version+0<=#{version}+0 and tgt_version+0>=#{version}+0 and job_id=#{jobId} limit 1 </select>