|
@@ -1,11 +1,12 @@
|
|
const { CloudQuery, CloudObject } = require("../lib/ncloud");
|
|
const { CloudQuery, CloudObject } = require("../lib/ncloud");
|
|
-const { DepartList, DoctorList, HotDotList} = require("./data");
|
|
|
|
|
|
+const { DepartList, DoctorList, HotDotList,DrugList} = require("./data");
|
|
inportDapartAndDoctor()
|
|
inportDapartAndDoctor()
|
|
|
|
|
|
DataMap = {
|
|
DataMap = {
|
|
Doctor:{},
|
|
Doctor:{},
|
|
Department:{},
|
|
Department:{},
|
|
HotDot:{},
|
|
HotDot:{},
|
|
|
|
+ Drug:{},
|
|
}
|
|
}
|
|
|
|
|
|
async function inportDapartAndDoctor(){
|
|
async function inportDapartAndDoctor(){
|
|
@@ -24,14 +25,22 @@ async function inportDapartAndDoctor(){
|
|
// }
|
|
// }
|
|
|
|
|
|
// 导入热点数据
|
|
// 导入热点数据
|
|
- let hotDotList = HotDotList
|
|
|
|
- for (let index = 0; index < hotDotList.length; index++) {
|
|
|
|
- let hotDot = hotDotList[index];
|
|
|
|
- hotDot = await importObject("HotDot",hotDot)
|
|
|
|
|
|
+ // let hotDotList = HotDotList
|
|
|
|
+ // for (let index = 0; index < hotDotList.length; index++) {
|
|
|
|
+ // let hotDot = hotDotList[index];
|
|
|
|
+ // hotDot = await importObject("HotDot",hotDot)
|
|
|
|
+ // }
|
|
|
|
+ // let query = new CloudQuery('HotDot');
|
|
|
|
+ // query.equalTo('category', 'HotDot');
|
|
|
|
+ // console.log(await query.find())
|
|
|
|
+
|
|
|
|
+ // 导入药品数据
|
|
|
|
+ let drugList = DrugList
|
|
|
|
+ for (let index = 0; index < drugList.length; index++) {
|
|
|
|
+ let drug = drugList[index];
|
|
|
|
+ drug = await importObject("Drug",drug)
|
|
}
|
|
}
|
|
- let query = new CloudQuery('HotDot');
|
|
|
|
- query.equalTo('category', 'HotDot');
|
|
|
|
- console.log(await query.find())
|
|
|
|
|
|
+
|
|
// console.log(DataMap["Doctor"])
|
|
// console.log(DataMap["Doctor"])
|
|
}
|
|
}
|
|
|
|
|