Showing
1 changed file
with
5 additions
and
2 deletions
@@ -25,14 +25,17 @@ const importDb = async(appendSkns, inx = 0, success = 0) => { | @@ -25,14 +25,17 @@ const importDb = async(appendSkns, inx = 0, success = 0) => { | ||
25 | }); | 25 | }); |
26 | //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) | 26 | //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) |
27 | const results = await Promise.all(storages.map(async sku => { | 27 | const results = await Promise.all(storages.map(async sku => { |
28 | - 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)', { | 28 | + 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)', { |
29 | productId: skn.productId, | 29 | productId: skn.productId, |
30 | sku: sku.id, | 30 | sku: sku.id, |
31 | sizeId: sku.size_id, | 31 | sizeId: sku.size_id, |
32 | lowRate: 0.05, | 32 | lowRate: 0.05, |
33 | highRate: 0.02, | 33 | highRate: 0.02, |
34 | status: 0, | 34 | status: 0, |
35 | - updateUid: 0 | 35 | + updateUid: 0, |
36 | + channelPrice: 0, | ||
37 | + updateTime: 0, | ||
38 | + channelUrl: '' | ||
36 | }); | 39 | }); |
37 | })); | 40 | })); |
38 | success += results.filter(r => r).length; | 41 | success += results.filter(r => r).length; |
-
Please register or login to post a comment