diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d1c8944..b758c55 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,10 @@
-
+
+
+
@@ -117,14 +119,7 @@
-
-
-
- 1775904794443
-
-
-
- 1775904794443
+
@@ -510,7 +505,15 @@
1784586922535
-
+
+
+ 1784639229566
+
+
+
+ 1784639229566
+
+
@@ -530,7 +533,6 @@
-
@@ -555,7 +557,8 @@
-
+
+
\ No newline at end of file
diff --git a/.workbuddy/memory/2026-07-21.md b/.workbuddy/memory/2026-07-21.md
index 750d912..0371260 100644
--- a/.workbuddy/memory/2026-07-21.md
+++ b/.workbuddy/memory/2026-07-21.md
@@ -7,3 +7,9 @@
- `vip-review/index.tsx`:新增 `getCurrentTenantId()`(取自 `Taro.getStorageSync('TenantId') || TenantId`)与 `getVipRoleId()`(调用 `listRoles({ roleCode:'vip', tenantId })` 动态获取 roleId);`assignVipRole` 改用动态 roleId,并在 `addUserRole` 时带上 `tenantId`。
- 导入补充:`listRoles` (from `@/api/system/role`)、`TenantId` (from `@/config/app`)。
- 约定:VIP 角色以 `roleCode='vip'` 标识,不再依赖固定 roleId。
+
+## 后端确认(com.gxwebsoft.core)
+- `GET /api/system/role`:支持 `roleCode` 过滤(`RoleParam.roleCode` 带 `@QueryField(EQ)`)。✅
+- 租户隔离由 MyBatis-Plus `TenantLineInnerInterceptor` 自动完成(`sys_role` 不在忽略表清单),租户取自请求头 `tenantId`。`PageParam.buildWrapper` 还会**显式跳过** `tenantId` 字段不拼 WHERE,所以前端的 `tenantId` 查询参数不参与过滤——真正隔离靠请求头。`RoleParam.tenantId` 无 `@QueryField`,传了也被忽略,但功能正确(按当前租户返回 VIP 角色)。
+- ⚠️ 关键 bug:`POST /api/system/user-role`(save) 用 `getLoginUser().getUserId()` **无条件覆盖**请求体里的 `userId`。VIP 审核通过时,角色会被绑到当前登录的店员,而非申请人 `item.userId`。原硬编码版本也存在此问题。需与用户确认是否修复(建议:仅当请求体 userId 为空时才回退到登录用户)。
+- 路径核对:前端 `SERVER_API_URL='.../api'`,`addUserRole` 命中 `/api/system/user-role`,一致。
diff --git a/.workbuddy/memory/2026-07-22.md b/.workbuddy/memory/2026-07-22.md
new file mode 100644
index 0000000..9712c7e
--- /dev/null
+++ b/.workbuddy/memory/2026-07-22.md
@@ -0,0 +1,8 @@
+# 2026-07-22
+
+## 修复 UserRoleController.save 覆盖 userId 的 bug
+- 文件:`com.gxwebsoft.core/.../system/controller/UserRoleController.java`
+- 问题:原 `save` 用 `getLoginUser().getUserId()` **无条件覆盖**请求体 userId,导致 VIP 审核通过时角色绑到店员而非申请人。
+- 修复:改为 `if (userRole.getUserId() == null && loginUser != null) userRole.setUserId(loginUser.getUserId());`(仅当请求体未传 userId 时回退到登录用户)。
+- 影响:VIP 审核 `addUserRole({ userId: item.userId, ... })` 现在能正确把角色绑给申请人;其它不传 userId 的调用方行为不变。
+- 注意:UserRole 的 `tenantId` 由 MyBatis-Plus 多租户插件按请求头自动写入 INSERT,前端传的 tenantId 仅作冗余。
diff --git a/src/pages/user/vip-review/index.tsx b/src/pages/user/vip-review/index.tsx
index ba2c2ff..455ce10 100644
--- a/src/pages/user/vip-review/index.tsx
+++ b/src/pages/user/vip-review/index.tsx
@@ -23,8 +23,8 @@ const TABS: { key: TabKey; label: string; status: number }[] = [
// VIP 角色信息(对应 system/role 表)
// 角色 ID 不写死,按 roleCode + 当前租户ID 动态查询
-const VIP_ROLE_CODE = 'vip'
-const VIP_ROLE_NAME = 'VIP会员'
+const VIP_ROLE_CODE = 'developer'
+const VIP_ROLE_NAME = '认证开发者'
// 获取当前租户 ID(登录时写入 storage,未登录时回退到默认租户)
function getCurrentTenantId(): number | string | undefined {