feat: 用户多应用成员关系与微信扫码登录
- 新增 user_app / user_identity 模型、应用注册表与成员关系服务,启动时校验配置覆盖 - 新增微信开放平台扫码登录:二维码地址、回调与 ticket 换取 token - 管理端接口改为路由层声明 appIds + 角色鉴权,新增批量用户信息、锁定、授权与个人配置 - 删除账号同步清理成员关系与外部身份,避免关系被新账号复用 - 补充多应用、应用配置、注册表测试与迁移/建号脚本
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
import mongoose from 'mongoose';
|
||||
import { UserSchema } from "./schema/user.js"
|
||||
import { UserAppSchema } from "./schema/user_app.js"
|
||||
import { UserIdentitySchema } from "./schema/user_identity.js"
|
||||
import config from '../conf.json' with { type: 'json' };
|
||||
import logger from '../utils/logger.js';
|
||||
|
||||
@@ -9,6 +11,8 @@ class MongoDBSchema {
|
||||
constructor() {
|
||||
this.dbConnection = null;
|
||||
this.User = null;
|
||||
this.UserApp = null;
|
||||
this.UserIdentity = null;
|
||||
}
|
||||
|
||||
init() {
|
||||
@@ -35,6 +39,8 @@ class MongoDBSchema {
|
||||
);
|
||||
|
||||
this.User = this.dbConnection.model('user', UserSchema)
|
||||
this.UserApp = this.dbConnection.model('user_app', UserAppSchema)
|
||||
this.UserIdentity = this.dbConnection.model('user_identity', UserIdentitySchema)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user