抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

[TOC]

@auther by sizaif

解决方法

首先,这个肯定是因为数据库表中的字段名,和实体类中的字段名映射失败引起的;

1: 查看 是否拼写错误

<!--映射表-->
<resultMap id="UsersMap" type="com.sizaif.emsdemo.pojo.User.Users">
    <!--column数据库中的字段,property实体类中的属性-->
    <result column="id" property="id" jdbcType="INTEGER"/>
    <result column="createDate" property="createDate" jdbcType="VARCHAR" />
    <result column="modifyDate" property="modifyDate" jdbcType="VARCHAR" />
    <result column="isEnabled" property="isEnabled" jdbcType="INTEGER"/>
    <result column="isLocked" property="isLocked" jdbcType="INTEGER"/>
    <result column="lastLoginDate" property="lastLoginDate" jdbcType="VARCHAR" />
    <result column="lastLoginIp" property="lastLoginIp" jdbcType="VARCHAR" />
    <result column="lockDate" property="lockDate" jdbcType="VARCHAR" />
    <result column="uname" property="name" jdbcType="VARCHAR"/>
    <result column="encodePassword" property="password" jdbcType="VARCHAR"/>
    <result column="role" property="role" jdbcType="VARCHAR"/>
</resultMap>

2: 查看 sql动态插入或更新语句中字段是否拼写错误与实体类中字段不符**

<if test="XXX实体类字段名 != null">
	XXX数据库字段名,
</if>

评论吧



本站总访问量为 访客数为

鲁 ICP 备 20018157 号-1
Copyright 2021 - 2022 sizaif. All Rights Reserved