Result map does not contain a value for java.lang.Integer
2017-09-13 09:26
483 查看
Result map does not contain a value for java.lang.Integer
myBatis返回count(*)得到的int值Mapper.xml:
<select id="select" resultMap="java.lang.Integer" parameterType="java.lang.Integer" >
SELECT CASE WHEN moneyIS NULL THEN 0 ELSE moneyEND AS money
FROM (
select SUM(money) AS money
from ABC
where user_id = #{user_id,jdbcType=INTEGER} AND state = 11 AND is_del = 0
) t
</select>
Mapper..java:
int selectTotalMoney(Integer userid);
经过测试,将resultMap="java.lang.Integer" 改成 resultType="java.lang.Integer" 也可以解决问题。
相关文章推荐
- Result map does not contain a value for Java.lang.Integer 报错解决办法
- Result Maps collection does not contain value for java.lang.Integer
- MyBatis出错Result Maps collection does not contain value for java.lang.Integer
- MyBatis出错Result Maps collection does not contain value for java.lang.Integer
- Mybatis 错误:Result Maps collection does not contain value for java.util.Map
- java.lang.IllegalArgumentException: Result Maps collection does not contain value forcom.imooc.bean
- Result Maps collection does not contain value for java.lang.Long
- Result Maps collection does not contain value for java.lang.Long 错误
- Result Maps collection does not contain value for java.util.Map
- Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for com
- MyBatis出现java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for
- Could not find parameter map Java.util.Map Parameter Maps collection does not contain value for java
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for xxxx
- Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sojs
- spring整合mybatis bug解决java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for ...
- Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for U
- Result Maps collection does not contain value for StudentMapper.StudentMap
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for study.my