...
|
...
|
@@ -25,14 +25,17 @@ const importDb = async(appendSkns, inx = 0, success = 0) => { |
|
|
});
|
|
|
//14321 and not exists (select 1 from channel_sku_compare B where A.product_id=B.product_id and A.size_id=B.size_id)
|
|
|
const results = await Promise.all(storages.map(async sku => {
|
|
|
return mysqlPool.insert('insert into `channel_sku_compare` (`product_id`, `sku`, `size_id`, `low_rate`, `high_rate`, `status`, `update_uid`) values (:productId, :sku, :sizeId, :lowRate, :highRate, :status, :updateUid)', {
|
|
|
return mysqlPool.insert('insert into `channel_sku_compare` (`product_id`, `sku`, `size_id`, `low_rate`, `high_rate`, `status`, `update_uid`, `channel_price`, `update_time`, `channel_url`) values (:productId, :sku, :sizeId, :lowRate, :highRate, :status, :updateUid, :channelPrice, :updateTime, :channelUrl)', {
|
|
|
productId: skn.productId,
|
|
|
sku: sku.id,
|
|
|
sizeId: sku.size_id,
|
|
|
lowRate: 0.05,
|
|
|
highRate: 0.02,
|
|
|
status: 0,
|
|
|
updateUid: 0
|
|
|
updateUid: 0,
|
|
|
channelPrice: 0,
|
|
|
updateTime: 0,
|
|
|
channelUrl: ''
|
|
|
});
|
|
|
}));
|
|
|
success += results.filter(r => r).length;
|
...
|
...
|
|