|
|
@@ -7,8 +7,7 @@ import aiController from '../api/yjbdc/aiController.js';
|
|
7
|
7
|
async function runScript(){
|
|
8
|
8
|
try {
|
|
9
|
9
|
|
|
10
|
|
- //按照高频单词的使用频率排序,列出所有单词
|
|
11
|
|
- const sql="select * from MiaoguoLiteracy where ID<=114758 order by ID desc;";
|
|
|
10
|
+ const sql="SELECT * FROM kylx365_db.MiaoguoLiteracy where SearchType='shici' and JSONString like '%Paraphrase\":[\"%' order by ID desc;";
|
|
12
|
11
|
|
|
13
|
12
|
let list = await commonModel.RunSql(null,sql);
|
|
14
|
13
|
let count=list.length;
|
|
|
@@ -24,21 +23,11 @@ async function runScript(){
|
|
24
|
23
|
json=JSON.parse(item.JSONString);
|
|
25
|
24
|
|
|
26
|
25
|
if (json.ENG){
|
|
27
|
|
- if (json.ENG.Paraphrase && !stringUtils.IsArray(json.ENG.Paraphrase)){
|
|
28
|
|
- json.ENG.Paraphrase=[json.ENG.Paraphrase];
|
|
29
|
|
- //console.log(json.ENG.Paraphras);
|
|
30
|
|
- b=true;
|
|
|
26
|
+ json.ENG=null;
|
|
|
27
|
+ //console.log(json.ENG.Paraphras);
|
|
|
28
|
+ b=true;
|
|
31
|
29
|
|
|
32
|
|
- if (json.ENG.Paraphrase[0].PartOfSpeech=="")
|
|
33
|
|
- json.ENG.Paraphrase[0].PartOfSpeech="释义";
|
|
34
|
30
|
|
|
35
|
|
-
|
|
36
|
|
- if (json.ENG.Paraphrase[0].ParaphraseList && !stringUtils.IsArray(json.ENG.Paraphrase[0].ParaphraseList)){
|
|
37
|
|
- json.ENG.Paraphrase[0].ParaphraseList=[json.ENG.Paraphrase[0].ParaphraseList];
|
|
38
|
|
- //console.log(json.ENG.Paraphrase[0].ParaphraseList);
|
|
39
|
|
- b=true;
|
|
40
|
|
- }
|
|
41
|
|
- }
|
|
42
|
31
|
|
|
43
|
32
|
}
|
|
44
|
33
|
}
|