数据库有数据但是mybatis查询出来所有字段均是null
申明
未必能解决您的问题,具体问题具体分析!
修改mybatis xml
mapper 接口类
public interface xxxMapper {
xxx selectByIdCard(String idCard);
}
该接口对应的 xml文件
(安装了mybatis的ieda插件,这个xml配置是自动生成的,有点问题)
<select id="selectByIdCard" resultType="com.ppmoney.xxx.xxInfo">
select
<include refid="Base_Column_List"/>
from xx_table
where idcard_no = #{idCard,jdbcType=VARCHAR}
</select>
改为
<select id="selectByIdCard" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from xx_table
where idcard_no = #{idCard,jdbcType=VARCHAR}
</select>
问题解决@!