mapper.xml配置
<select id="getSum" resultType="java.lang.Integer" >
select
SUM(columnName3)
from tablesName
where columnName1= #{0} and columnName2= #{1}
</select>
mapper.java修改
int getSum(String id,int age);
重点就是resultType的修改
网友评论