|
|
@ -85,8 +85,12 @@ export default class Hook implements HookType { |
|
|
|
}, |
|
|
|
}, |
|
|
|
ncMeta = Noco.ncMeta |
|
|
|
ncMeta = Noco.ncMeta |
|
|
|
) { |
|
|
|
) { |
|
|
|
let hooks = await NocoCache.getList(CacheScope.HOOK, [param.fk_model_id]); |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.HOOK, [ |
|
|
|
if (!hooks.length) { |
|
|
|
param.fk_model_id, |
|
|
|
|
|
|
|
]); |
|
|
|
|
|
|
|
let { list: hooks } = cachedList; |
|
|
|
|
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
|
|
|
|
if (!isEmptyList && !hooks.length) { |
|
|
|
hooks = await ncMeta.metaList(null, null, MetaTable.HOOKS, { |
|
|
|
hooks = await ncMeta.metaList(null, null, MetaTable.HOOKS, { |
|
|
|
condition: { |
|
|
|
condition: { |
|
|
|
fk_model_id: param.fk_model_id, |
|
|
|
fk_model_id: param.fk_model_id, |
|
|
|