当update时报错:com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '09d89e9444ae43269fcf924bd10a4297'
错误代码:
<update id="update" parameterType="com.ece.manager.pojo.bluetoothLock.BluetoothLockUser" >
update bluetooth_lock_user
<set >
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR}
</if>
<if test="appSecret != null">
and app_secret = #{appSecret,jdbcType=VARCHAR}
</if>
<if test="refreshToken != null">
and refresh_token = #{refreshToken,jdbcType=VARCHAR}
</if>
<if test="accessToken != null">
and access_token = #{accessToken,jdbcType=VARCHAR}
</if>
<if test="expiresIn != null">
and expires_in = #{expiresIn,jdbcType=INTEGER}
</if>
<if test="tokenType != null">
and token_type = #{tokenType,jdbcType=VARCHAR}
</if>
<if test="scope != null">
and scope = #{scope,jdbcType=VARCHAR}
</if>
<if test="uid != null">
and uid = #{uid,jdbcType=INTEGER}
</if>
<if test="userName != null">
and user_name = #{userName,jdbcType=VARCHAR}
</if>
<if test="userPwd != null">
and user_pwd = #{userPwd,jdbcType=VARCHAR}
</if>
<if test="openid != null">
and openid = #{openid,jdbcType=INTEGER}
</if>
<if test="userId != null">
and user_id = #{userId,jdbcType=INTEGER}
</if>
<if test="addTime != null">
and add_time = #{addTime,jdbcType=TIMESTAMP}
</if>
<if test="updateTime != null">
and update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
改为:
<update id="update" parameterType="com.ece.manager.pojo.bluetoothLock.BluetoothLockUser" >
update bluetooth_lock_user
<set >
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="appSecret != null">
app_secret = #{appSecret,jdbcType=VARCHAR},
</if>
<if test="refreshToken != null">
refresh_token = #{refreshToken,jdbcType=VARCHAR},
</if>
<if test="accessToken != null">
access_token = #{accessToken,jdbcType=VARCHAR},
</if>
<if test="expiresIn != null">
expires_in = #{expiresIn,jdbcType=INTEGER},
</if>
<if test="tokenType != null">
token_type = #{tokenType,jdbcType=VARCHAR},
</if>
<if test="scope != null">
scope = #{scope,jdbcType=VARCHAR},
</if>
<if test="uid != null">
uid = #{uid,jdbcType=INTEGER},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="userPwd != null">
user_pwd = #{userPwd,jdbcType=VARCHAR},
</if>
<if test="openid != null">
openid = #{openid,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="addTime != null">
add_time = #{addTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>