标签:interval count value cdata plain amp lang lan use
解决办法:
1.检查mybatis的xml配置
2.在某处肯定有配错了的,如"resultMap" -->"resultType"
[html] view plain copy
<select id="getNumDayMoney" resultMap="java.lang.Integer" parameterType="java.lang.Integer">
<![CDATA[
select sum(money) from dw_account_recharge where user_id = #{userId}
AND addtime < UNIX_TIMESTAMP(
date_sub(curdate(), INTERVAL - 1 DAY)
)
AND addtime > UNIX_TIMESTAMP(
date_sub(curdate(), INTERVAL 1 DAY)
)
]]>
</select>
修改为:
[html] view plain copy
<select id="getNumDayMoney" resultType="java.lang.Integer" parameterType="java.lang.Integer">
<![CDATA[
select sum(money) from dw_account_recharge where user_id = #{userId}
AND addtime < UNIX_TIMESTAMP(
date_sub(curdate(), INTERVAL - 1 DAY)
)
AND addtime > UNIX_TIMESTAMP(
date_sub(curdate(), INTERVAL 1 DAY)
)
]]>
</select>
解决mybatis报错Result Maps collection does not contain value for java.lang.Integer
标签:interval count value cdata plain amp lang lan use
原文地址:https://www.cnblogs.com/sprinng/p/9003630.html