请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

更新用户是报错

更新用户时报错

Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Column ‘operator’ cannot be null

The error may involve com.cole.dao.SysUserMapper.updateByPrimaryKey-Inline

The error occurred while setting parameters

SQL: update sys_user set username = ?, telephone = ?, mail = ?, password = ?, dept_id = ?, status = ?, remark = ?, operator = ?, operate_time = ?, operate_ip = ? where id = ?

Cause: java.sql.SQLIntegrityConstraintViolationException: Column ‘operator’ cannot be null

; SQL []; Column ‘operator’ cannot be null; nested exception is java.sql.SQLIntegrityConstraintViolationException: Column ‘operator’ cannot be null

正在回答

1回答

你好,你可以把更新的operator这个字段赋值一个值,比如当前登录的用户名,也可以将数据库里该字段设置为允许为null,就可以了

0 回复 有任何疑惑可以回复我~
  • 提问者 weixin_慕标4370201 #1
    非常感谢!我将三个关于operator的值设置为NOT NULL就可以了
    回复 有任何疑惑可以回复我~ 2020-07-12 05:59:31
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信