From f179f0e6b7debdfcf7bca62a48e4427679742c0e Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 22 Aug 2024 11:58:38 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/package.json | 2 +- server/services/heytripService.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/package.json b/server/package.json index 117fc66..b0567ba 100644 --- a/server/package.json +++ b/server/package.json @@ -5,7 +5,7 @@ "scripts": { "start": "node bin/www", "dev": "nodemon bin/www", - "prd": "pm2 start bin/www", + "prd": "pm2 start", "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { diff --git a/server/services/heytripService.js b/server/services/heytripService.js index da56271..6160afe 100644 --- a/server/services/heytripService.js +++ b/server/services/heytripService.js @@ -66,7 +66,7 @@ class Heytrip { const { count, rows } = await Hotelinfo.findAndCountAll({ // const [ rows ] = await Hotelinfo.findAll({ include: [ - { model: HeytripIds, as: 'aid', attributes: ['hotel_id', 'update_flag'], where: { update_flag: { [Op.ne]: 99 } } }, + { model: HeytripIds, as: 'aid', attributes: [], where: { update_flag: { [Op.ne]: 99 } } }, { model: Hotelinfo2, as: 'locale_info', @@ -314,7 +314,7 @@ class Heytrip { if (isEmpty(rows)) { return { next: !isEmpty(allIds), data: allIds }; } - const _BaseInfoExists = await Hotelinfo.findAll({ where: { hotel_id: allIds }, logging: false }); + const _BaseInfoExists = await Hotelinfo.findAll({ where: { hotel_id: allIds }, }); const updateIds = _BaseInfoExists.map((item) => `${item.hotel_id}`); // console.log('updateIds', updateIds);