mybatis 返回类型为 java.lang.String 接收为null的情景

<select id="selectOnly" parameterType="java.util.Map" resultType="java.lang.Sring">
select temp_table from orders_status where chaxun=#{chaxun};
</select>
String db_tempTable = sqlSession.selectOne(MybatisNamespace.ordersStatus_selectOnly,chaxun);  拿到的是 null

改为下面的就可以了
<select id="selectOnly" parameterType="java.util.Map" resultType="string">
select temp_table from orders_status where chaxun=#{chaxun};
</select>

posted on 2018-03-26 17:44  --LP--  阅读(917)  评论(0编辑  收藏  举报

导航