|
|
@@ -13,7 +13,6 @@ import constantClass from '../../util/constant/index.js';
|
|
13
|
13
|
import aiController from '../../api/yjbdc/aiController.js';
|
|
14
|
14
|
import miaoguo from '../../model/miaoguo.js';
|
|
15
|
15
|
|
|
16
|
|
-
|
|
17
|
16
|
//获得加资料数据
|
|
18
|
17
|
export async function GetMiaoguoAISearch(ctx) {
|
|
19
|
18
|
let param = {
|
|
|
@@ -33,7 +32,7 @@ export async function GetMiaoguoAISearch(ctx) {
|
|
33
|
32
|
const cacheKey = `GetMiaoguoAISearch_${param.Word}_${param.SearchType}_${param.Author}_${param.ShiciUrl}`;
|
|
34
|
33
|
let result = globalCache.get(cacheKey);
|
|
35
|
34
|
|
|
36
|
|
- if (!result) {
|
|
|
35
|
+ if (!result || result==0) {
|
|
37
|
36
|
// 缓存未命中,从数据库获取
|
|
38
|
37
|
let literacyItem=await miaoguo.GetLiteracyItem(param);
|
|
39
|
38
|
if (literacyItem && literacyItem.length>0){
|