org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.NumberFormatException: For input string: "x"
Cause: java.lang.NumberFormatException: For input string: "x"
<if test="timeList !=null and ! timeList.isEmpty()"> <choose> <when test="forecastType == '月'"> and SUBSTR(FORECAST_DATA, 1, 7) in <foreach collection="timeList" item="time" open="(" separator="," close=")"> #{time} </foreach> </when> </choose> </if>
改成
<if test="timeList !=null and ! timeList.isEmpty()"> <choose> <when test="forecastType == '月'.toString()"> and SUBSTR(FORECAST_DATA, 1, 7) in <foreach collection="timeList" item="time" open="(" separator="," close=")"> #{time} </foreach> </when> </choose> </if>