Workaround:
1. Check the XML configuration of the MyBatis
2. There must be a mismatch somewhere, such as "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>
Modified to:
[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>
Resolve MyBatis Error Result Maps collection does not contain value for Java.lang.Integer