com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '09d89e9444ae

当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>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值