跨校身份更改
This commit is contained in:
Vendored
+44
-104
@@ -114,10 +114,17 @@ export interface SysUserRequest {
|
||||
email?: string;
|
||||
gender?: number;
|
||||
profilePicture?: string;
|
||||
roles?: number[];
|
||||
/** 身份归属学校(schoolId 解析后的真实组 id;编辑必传,新增可不传按 groupId 解析) */
|
||||
schoolId?: number;
|
||||
/** 用户身份角色(SysRoleEnum.key 1-7),按 schoolId 全量覆盖保存;空数组=清空该校身份 */
|
||||
roleIds?: number[];
|
||||
disabled?: number;
|
||||
expired?: boolean;
|
||||
}
|
||||
export interface UserIdentityVo {
|
||||
schoolId?: number;
|
||||
roleIds?: number[];
|
||||
}
|
||||
export interface SysGroupSortRequest {
|
||||
pid: number;
|
||||
ids: number[];
|
||||
@@ -146,10 +153,6 @@ export interface PushTestRequest {
|
||||
interfacePath?: string;
|
||||
targetIds?: number[];
|
||||
}
|
||||
export interface IdentitySwitchRequest {
|
||||
roleId: number;
|
||||
schoolId: number;
|
||||
}
|
||||
export interface SchoolAppAuthzRequest {
|
||||
schid: number;
|
||||
appid: number;
|
||||
@@ -233,20 +236,6 @@ export interface SysGroupVo {
|
||||
sort?: number;
|
||||
children?: SysGroupVo[];
|
||||
}
|
||||
export interface IdentityCurrentVo {
|
||||
roleId?: number;
|
||||
roleName?: string;
|
||||
schoolId?: number;
|
||||
schoolName?: string;
|
||||
fallback?: boolean;
|
||||
}
|
||||
export interface IdentityOptionVo {
|
||||
roleId?: number;
|
||||
roleName?: string;
|
||||
schoolId?: number;
|
||||
schoolName?: string;
|
||||
isMain?: boolean;
|
||||
}
|
||||
export interface AppItem {
|
||||
id?: number;
|
||||
name?: string;
|
||||
@@ -320,6 +309,8 @@ export interface SysUserVo {
|
||||
type?: number;
|
||||
sortNo?: number;
|
||||
groupStatus?: number;
|
||||
/** 主校身份名(如「老师/校领导」):列表「用户身份」列展示字段(roles 列已停写) */
|
||||
identityNames?: string;
|
||||
expired?: boolean;
|
||||
createTime?: string;
|
||||
updateTime?: string;
|
||||
@@ -1282,6 +1273,40 @@ declare global {
|
||||
>(
|
||||
config: Config
|
||||
): Alova2Method<number[], 'SysUser.getUserGroups', Config>;
|
||||
/**
|
||||
* ---
|
||||
*
|
||||
* [GET]
|
||||
*
|
||||
* **path:** /api/sysuser/UserIdentity
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* **Query Parameters**
|
||||
* ```ts
|
||||
* type QueryParameters = {
|
||||
* userId: number
|
||||
* groupId: number
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* **Response**
|
||||
* ```ts
|
||||
* type Response = UserIdentityVo
|
||||
* ```
|
||||
*/
|
||||
userIdentity<
|
||||
Config extends Alova2MethodConfig<UserIdentityVo> & {
|
||||
params: {
|
||||
userId: number;
|
||||
groupId: number;
|
||||
};
|
||||
}
|
||||
>(
|
||||
config: Config
|
||||
): Alova2Method<UserIdentityVo, 'SysUser.userIdentity', Config>;
|
||||
/**
|
||||
* ---
|
||||
*
|
||||
@@ -1836,91 +1861,6 @@ declare global {
|
||||
config: Config
|
||||
): Alova2Method<Blob, 'PushSubscription.download', Config>;
|
||||
};
|
||||
Identity: {
|
||||
/**
|
||||
* ---
|
||||
*
|
||||
* [POST]
|
||||
*
|
||||
* **path:** /api/identity/switch
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* **RequestBody**
|
||||
* ```ts
|
||||
* type RequestBody = {
|
||||
* roleId: number
|
||||
* schoolId: number
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* **Response**
|
||||
* ```ts
|
||||
* type Response = {
|
||||
* roleId?: number
|
||||
* roleName?: string
|
||||
* schoolId?: number
|
||||
* schoolName?: string
|
||||
* fallback?: boolean
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
switchIdentity<
|
||||
Config extends Alova2MethodConfig<IdentityCurrentVo> & {
|
||||
data: IdentitySwitchRequest;
|
||||
}
|
||||
>(
|
||||
config: Config
|
||||
): Alova2Method<IdentityCurrentVo, 'Identity.switchIdentity', Config>;
|
||||
/**
|
||||
* ---
|
||||
*
|
||||
* [GET]
|
||||
*
|
||||
* **path:** /api/identity/current
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* **Response**
|
||||
* ```ts
|
||||
* type Response = {
|
||||
* roleId?: number
|
||||
* roleName?: string
|
||||
* schoolId?: number
|
||||
* schoolName?: string
|
||||
* fallback?: boolean
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
current<Config extends Alova2MethodConfig<IdentityCurrentVo>>(
|
||||
config?: Config
|
||||
): Alova2Method<IdentityCurrentVo, 'Identity.current', Config>;
|
||||
/**
|
||||
* ---
|
||||
*
|
||||
* [GET]
|
||||
*
|
||||
* **path:** /api/identity/available
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* **Response**
|
||||
* ```ts
|
||||
* type Response = Array<{
|
||||
* roleId?: number
|
||||
* roleName?: string
|
||||
* schoolId?: number
|
||||
* schoolName?: string
|
||||
* isMain?: boolean
|
||||
* }>
|
||||
* ```
|
||||
*/
|
||||
available<Config extends Alova2MethodConfig<IdentityOptionVo[]>>(
|
||||
config?: Config
|
||||
): Alova2Method<IdentityOptionVo[], 'Identity.available', Config>;
|
||||
};
|
||||
GroupAuthz: {
|
||||
/**
|
||||
* ---
|
||||
|
||||
Reference in New Issue
Block a user