xiatian 4 anni fa
parent
commit
b810a99db8
1 ha cambiato i file con 14 aggiunte e 0 eliminazioni
  1. 14 0
      upgrade-202104/2021-待升级说明.txt

+ 14 - 0
upgrade-202104/2021-待升级说明.txt

@@ -41,6 +41,20 @@ todo
 ***** ***** ***** ***** ***** ***** *****
 题库试卷结构刷入课程ID,执行examcloud-oe-tool工程下FillCourseIdService
 
+题库试题属性增加code字段,老数据刷入id值为code,执行脚本:
+
+var index=0;
+var total=db.getCollection('property').find().count();
+db.getCollection('property').find().forEach( function (doc) {
+    index++;
+    doc.code=doc._id.str;
+    db.property.save(doc);
+    print(index+"/"+total);
+    if(index==total){
+        print("finish...");
+    }
+});
+
 
 ***** ***** ***** ***** ***** ***** *****
 配置文件变更部分