Files
mokeegateway/memory/session-20260613-1.md
2026-07-16 00:10:03 +08:00

74 lines
3.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: session-20260613-1
description: 2026-06-13 会话 — 数据库地址变更、11个前后端字段不匹配bug修复、42个文件加注释、5个新bug修复图标/操作日志/登录日志/选择系统/用户编辑跳登录)
metadata:
type: session
date: 2026-06-13
sessionNumber: 1
startTime: 2026-06-13T00:00:00+08:00
---
# 2026-06-13 会话
## 会话摘要
数据库地址从VPN网段切换到内网全项目前后端字段匹配审计修复11个bug42个Java/Vue文件加中文注释修复5个功能bug图标不显示、操作日志缺报文、登录日志缺字段、选择系统未记录、用户编辑跳登录
## 关键操作
### 一、数据库地址变更
- MySQL + Redis 地址: `10.20.1.122``10.1.1.122`
- 14个文件全局替换yml/py/md
### 二、前后端字段匹配审计 + Bug修复
共发现11个问题修复了9个
- BUG1: ApiList/ApiForm `s.id``s.systemId` (SystemVO无id字段)
- BUG2: OperationLogList `operateTime``createdAt`
- BUG3: MenuRouterVO 加 `sortOrder`/`status`
- BUG4: UserController加email过滤
- BUG5: RoleServiceImpl联表填充systemName + SysRole加transient systemName
- BUG6: ApiForm编辑补apiDesc
- BUG7: LoginLogList接口 `loginTime``createdAt`
- BUG9: DictController补全CRUD (listTypes/add/update/delete/getById)
- 登录日志systemName: `WHERE system_id=?``WHERE id=?`
### 三、PUT路由405修复
前端 `PUT /admin/role/{id}` 后端 `@PutMapping` 不匹配。
SystemController/UserController: `@PutMapping` (id在body)
RoleController/MenuController/SystemApiController: `@PutMapping("/{id}")` (id在URL)
MenuList.vue统一用URL传id
### 四、42个文件加中文注释
- 后端23个: 10 Controller + 10 Service + 3 Entity/VO
- 前端19个: 4配置 + 15页面
### 五、5个新Bug修复
1. **图标不显示**: icons.ts改 `import * as Icons` 全量支持动态图标
2. **用户编辑跳登录**: `assignRoles``invalidateUserSession` 删除Redis会话admin编辑自己时自己的token被清理。改为同步角色到Redis不删session
3. **操作日志**: actionTag加中文映射(新增/编辑/删除), 加"查看"弹窗显示传入/返回报文, 加responseBody字段
4. **登录日志**: 加realName字段 (实体+DDL+AuthService+前端)
5. **选择系统**: selectSystem更新最近登录日志的systemId
### 六、服务器状态
- TCP端口检测改为HTTP健康检查
- 每个微服务独立JVM信息
### 七、前端拦截器
- request.ts 401还原直接跳登录
### 八、系统列表权限
- 新增 `GET /zgapi/v1/admin/system/list`
- super_admin@gateway → 全部系统
- 其他 → 仅绑定的系统 (JOIN sys_user_system)
### 九、数据库
- QA+PROD执行: sys_login_log加real_name, sys_operation_log加response_body
## 修改文件清单
详见会话日志中各Bug修复记录
## 重要信息
- 数据库: 10.1.1.122:3306
- 微服务端口: gateway:32000, auth:32001, admin:32002
- 前端构建: `npm run build:prod` (跳过vue-tsc类型检查)
- Node版本: 服务器Node 18Vite 5.4兼容