whistle.hedctestapi 1.1.1 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,8 @@ const appSettingsDev = {
|
|
6
6
|
get_apps_api: 'https://data.happyelements.cn/api/v1/app/all',
|
7
7
|
};
|
8
8
|
const appSettingsProd = {
|
9
|
-
mongodb_url: 'mongodb://admin:123456@10.130.147.133:27017,10.130.147.133:27018,10.130.147.133:27019/nohost?replicaSet=2104011535&authSource=admin',
|
9
|
+
// mongodb_url: 'mongodb://admin:123456@10.130.147.133:27017,10.130.147.133:27018,10.130.147.133:27019/nohost?replicaSet=2104011535&authSource=admin',
|
10
|
+
mongodb_url: 'mongodb://admin:123456@10.130.80.21:27017/nohost',
|
10
11
|
get_apps_api: 'https://data.happyelements.cn/api/v1/app/all',
|
11
12
|
};
|
12
13
|
const envConfig = {
|
@@ -14,7 +15,7 @@ const envConfig = {
|
|
14
15
|
development: appSettingsDev,
|
15
16
|
localdev: appSettingsDev
|
16
17
|
};
|
17
|
-
const env = envConfig[process.env.NODE_ENV] ? envConfig[process.env.NODE_ENV] :
|
18
|
+
const env = envConfig[process.env.NODE_ENV] ? envConfig[process.env.NODE_ENV] : appSettingsProd;
|
18
19
|
|
19
20
|
|
20
|
-
module.exports = env;
|
21
|
+
module.exports = env;
|
@@ -20,8 +20,8 @@ const appSettings = require('../config/app-settings');
|
|
20
20
|
|
21
21
|
|
22
22
|
function findAll(filter) {
|
23
|
-
logger.debug('begin to findAll');
|
24
|
-
console.log('attrubute findAll filter:'
|
23
|
+
logger.debug('begin to findAll', filter);
|
24
|
+
console.log('attrubute findAll filter:');
|
25
25
|
if(filter && !filter instanceof Object){
|
26
26
|
logger.error('filter is not object');
|
27
27
|
return;
|
@@ -42,7 +42,7 @@ function findAll(filter) {
|
|
42
42
|
}
|
43
43
|
|
44
44
|
function remove(filter) {
|
45
|
-
logger.debug('begin to remove');
|
45
|
+
logger.debug('begin to remove attrs by filter', filter);
|
46
46
|
if (!filter) {
|
47
47
|
return -1;
|
48
48
|
}
|
@@ -88,6 +88,7 @@ async function findAllWithPage(params) {
|
|
88
88
|
}
|
89
89
|
|
90
90
|
function insertBatch(datas) {
|
91
|
+
logger.debug('begin to insertBatch', datas);
|
91
92
|
attributeSchema.collection.insert(datas, onInsert);
|
92
93
|
}
|
93
94
|
|
@@ -87,6 +87,7 @@ function getExcelObjs(ctx) {
|
|
87
87
|
// return {status: 500, msg: msg}
|
88
88
|
// }
|
89
89
|
mongoXlsx.xlsx2MongoData(filePath, schemaModel, async (err, data) => {
|
90
|
+
logger.debug("begin to parse excel data",data);
|
90
91
|
const filter = { appName: appName };
|
91
92
|
await eventDao.remove(filter);
|
92
93
|
await attributeDao.remove(filter);
|