outputskns.js
520 Bytes
const skns = require('../data/skns.json');
const {DuDataModel} = require('../models');
const _ = require('lodash');
let inx = 0;
async function doing() {
const alldu = await DuDataModel.findAll();
_.forEach(skns, s => {
const find = alldu.find(du => du.productId === s.productId)
if (find) {
console.log(`${s.productId},${s.yhId},${find.articleNumber}`);
inx++;
} else {
console.error('cuowu0==================', s.productId)
}
})
console.log(inx, skns.length)
}
doing();