@bytebrand/export-cars 1.21.74 → 1.21.75
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.
package/package.json
CHANGED
|
@@ -53,15 +53,16 @@ export class SantanderTransformer {
|
|
|
53
53
|
const isNew =
|
|
54
54
|
(!carData.mainData.firstRegistration || this.monthDiffLess(carData, 8)) &&
|
|
55
55
|
(!carData.mainData.mileage || carData.mainData.mileage < 1000);
|
|
56
|
+
|
|
56
57
|
if (isNew) {
|
|
57
58
|
console.log('carData', carData._id);
|
|
58
|
-
console.log('rules', JSON.stringify(rules));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
for (const rule of rules) {
|
|
62
62
|
const importFieldNumber = Number(rule.importField.match(/\d+/)[0]);
|
|
63
63
|
|
|
64
64
|
if (!isNew && this.checkFieldsOnlyForNew(importFieldNumber)) {
|
|
65
|
+
console.log(`NEW - ${rule.importField} - ${importFieldNumber}`);
|
|
65
66
|
continue;
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -95,7 +96,7 @@ export class SantanderTransformer {
|
|
|
95
96
|
if (this.configService.config.campaign === 'eauto' && carData.offer.ftpFolder === 'auto_de_eautos') {
|
|
96
97
|
set(transformedCarData, 12, get(carData, 'offer.internalNumber', null));
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
|
|
99
100
|
return transformedCarData;
|
|
100
101
|
}
|
|
101
102
|
|