feat: oauthUser新增索引,用于查询第三方认证的用户信息

This commit is contained in:
Pan Qiancheng 2026-01-16 16:51:29 +08:00
parent cf63a53109
commit 7312545eda
5 changed files with 71 additions and 6 deletions

View File

@ -44,5 +44,18 @@ export const entityDesc = {
loaded: '#008000',
}
}
}
},
indexes: [
{
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
name: 'idx_oauthUser_composite',
attributes: [{
name: 'user',
}, {
name: 'providerUserId',
}, {
name: 'providerConfig',
}]
}
]
};

View File

@ -58,5 +58,18 @@ export const desc = {
}
},
actionType: "crud",
actions
actions,
indexes: [
{
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
name: 'idx_oauthUser_composite',
attributes: [{
name: "userId",
}, {
name: 'providerUserId',
}, {
name: "providerConfigId",
}]
}
]
};

View File

@ -47,5 +47,18 @@ exports.entityDesc = {
loaded: '#008000',
}
}
}
},
indexes: [
{
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
name: 'idx_oauthUser_composite',
attributes: [{
name: 'user',
}, {
name: 'providerUserId',
}, {
name: 'providerConfig',
}]
}
]
};

View File

@ -61,5 +61,18 @@ exports.desc = {
}
},
actionType: "crud",
actions: Action_1.actions
actions: Action_1.actions,
indexes: [
{
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
name: 'idx_oauthUser_composite',
attributes: [{
name: "userId",
}, {
name: 'providerUserId',
}, {
name: "providerConfigId",
}]
}
]
};

View File

@ -47,7 +47,7 @@ export const LoadActionDef: ActionDef<LoadAction, LoadState> = {
export const entityDesc: EntityDesc<Schema, Action, '', {
loadState: LoadState;
}> = {
}> = {
locales: {
zh_CN: {
name: '用户登录连接',
@ -87,6 +87,19 @@ export const entityDesc: EntityDesc<Schema, Action, '', {
loaded: '#008000',
}
}
}
},
indexes: [
{
// 业务上可能涉及的间接授权查询,建立索引以避免全表扫描
name: 'idx_oauthUser_composite',
attributes: [{
name: 'user',
}, {
name: 'providerUserId',
}, {
name: 'providerConfig',
}]
}
]
};