Skip to content

[Bug] 新增用户时,sys_log 无法记录该操作 #121

@sunscorch

Description

@sunscorch

请您确认

  • 尝试最新 dev 分支代码,仍有相同问题
  • 阅读使用指南
  • 查找常见问题
  • 根据报错信息(自行翻译英文)百度或 Google 一下
  • 搜索是否有其他人提交过类似的 Issue,如果对应 Issue 尚未解决,您可以先订阅关注该 Issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 Issue)
  • 阅读源码并在 IDE 中进行断点调试

Bug 描述

新增用户时,sys_log 无法记录该操作

### Cause: org.postgresql.util.PSQLException: ERROR: null value in column "description" of relation "sys_log" violates not-null constraint
  Detail: Failing row contains (664594263052390422, 1026257337753845760, null, 用户管理, http://localhost:8000/system/user, POST, {"sec-fetch-mode":"cors","referer":"http://localhost:5173/system..., {"gender":1,"status":1,"username":"lei","nickname":"11","passwor..., 200, {"traceId":"1026257337753845760","Access-Control-Expose-Headers"..., {"code":"1","msg":"用户名长度为 4-64 个字符,支持大..., 11, 127.0.0.1, 内网IP, Chrome 129.0.0.0, Linux, 2, 用户名长度为 4-64 个字符,支持大小写字母、数..., 1, 2024-12-31 22:20:19.859973).
; ERROR: null value in column "description" of relation "sys_log" violates not-null constraint```



### 复现步骤

新增一个用户,查看系统日志。
看起来好像是由于top.continew.starter.log.model 中的LogRecord 中的description 为null导致的
没有仔细看starter 项目,不确定如何fix

### 预期结果

能在sys_log中看到操作新增用户的记录

### 环境信息

```markdown
ContiNew Admin version(s):dev

额外补充

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions