更新用户是报错
来源:8-3 新增用户接口开发-2

weixin_慕标4370201
2020-07-11
更新用户时报错
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,就可以了
012020-07-12
相似问题