xiatian %!s(int64=4) %!d(string=hai) anos
pai
achega
b810a99db8
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  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...");
+    }
+});
+
 
 ***** ***** ***** ***** ***** ***** *****
 配置文件变更部分