问题描述
postman请求报错java.lang.NumberFormatException: For input string:“2210200001”
dao层写法
String getResRegion(@Param(value = "resTypeId") String resTypeId, @Param(value = "resId") String resId);
原始错误xml写法
<select id="getResRegion" parameterType="String" resultType="String">
<choose>
<when test="resTypeId == 2210200001">
SELECT REGION_ID regionId FROM RM_AREA WHERE ID = #{resId,jdbcType=NUMERIC}
</when>
<when test="resTypeId == 1121000002">
SELECT REGION_ID regionId FROM CM_CABLE WHERE ID = #{resId,jdbcType=NUMERIC}
</when>
<otherwise>
SELECT REGION_ID regionId FROM CM_Facility WHERE ID = #{resId,jdbcType=NUMERIC}
</otherwise>
</choose>
</select>
修改后