|
|
@ -66,7 +66,7 @@ class Heytrip {
|
|
|
|
const { count, rows } = await Hotelinfo.findAndCountAll({
|
|
|
|
const { count, rows } = await Hotelinfo.findAndCountAll({
|
|
|
|
// const [ rows ] = await Hotelinfo.findAll({
|
|
|
|
// const [ rows ] = await Hotelinfo.findAll({
|
|
|
|
include: [
|
|
|
|
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,
|
|
|
|
model: Hotelinfo2,
|
|
|
|
as: 'locale_info',
|
|
|
|
as: 'locale_info',
|
|
|
@ -314,7 +314,7 @@ class Heytrip {
|
|
|
|
if (isEmpty(rows)) {
|
|
|
|
if (isEmpty(rows)) {
|
|
|
|
return { next: !isEmpty(allIds), data: allIds };
|
|
|
|
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}`);
|
|
|
|
const updateIds = _BaseInfoExists.map((item) => `${item.hotel_id}`);
|
|
|
|
// console.log('updateIds', updateIds);
|
|
|
|
// console.log('updateIds', updateIds);
|
|
|
|
|
|
|
|
|
|
|
|