错误描述:
Error updating database.Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :' uuid_filename = ?
', expect IDENTIFIER, actual IDENTIFIER pos 260, line 11, column 35, token IDENTIFIER uuid_filename :
UPDATE mes_file_treefile
SET file_name = ?,
modify_time = ?,
status = ?
uuid_filename = ?
where id = ?
解决:就是在某行的后面少加了一个逗号 ,加上就好了
<update id="updateTreeFiles">
<if test="id != null" >
UPDATE mes_file_treefile
<set>
<if test="file_name != null and file_name != '' ">
file_name = #{file_name},
</if>
<if test="modify_time != null ">
modify_time = #{modify_time},
</if>
<if test="status != null ">
status = #{status} //这里少加了一个逗号
</if>
<if test="uuid_filename != null and uuid_filename != '' ">
uuid_filename = #{uuid_filename}
</if>
</set>
where id = #{id}
</if>
</update>
版权声明:本文为kangrushuai原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。