lrf před 7 měsíci
rodič
revize
f6f08c0ca3

+ 6 - 2
src/config/config.local.ts

@@ -35,6 +35,10 @@ export default {
   swagger: {
     swaggerPath: '/doc/api',
   },
+  modulesConfig: {
+    es: `http://${redisHost}/cxyy/es`,
+    mq: `http://${redisHost}/cxyy/mq`,
+  },
   typeorm: {
     dataSource: {
       default: {
@@ -45,8 +49,8 @@ export default {
         port: 54321,
         entities: ['./entity'],
         type: 'postgres',
-        synchronize: false, // 如果第一次使用,不存在表,有同步的需求可以写 true,注意会丢数据
-        logging: false,
+        synchronize: true, // 如果第一次使用,不存在表,有同步的需求可以写 true,注意会丢数据
+        logging: true,
       },
       logs: {
         database: logsDB,

+ 1 - 1
src/service/elasticsearch/es.service.ts

@@ -53,7 +53,7 @@ export class ESService {
     const initIndexUrl = `${this.esServiceHttpPrefix}/init/indices`;
     const result = await Axios.post(initIndexUrl, {}, { responseType: 'json' });
     if (result.status !== 200) return;
-    const tableList = get(result, 'data');
+    const tableList = get(result, 'data.data', []);
     if (!tableList) return;
     for (const index of tableList) {
       this.initData(index);