Skip to content

Commit

Permalink
Fix: 提交订单检查无货skuId错误
Browse files Browse the repository at this point in the history
  • Loading branch information
meooxx committed Feb 6, 2021
1 parent 2b25505 commit 8a8f85c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ async function submitOrderFromShoppingCart(date, skuIds, params = {}, area) {
process.exit();
} else {
if (res.noStockSkuIds) {
res.noStockSkuIds.forEach(skuId => {
skuIdsSet.delete(skuId);
skuIdsSet.forEach(skuId => {
if (res.noStockSkuIds.indexOf(skuId) !== -1) {
skuIdsSet.delete(skuId);
}
});
if (skuIdsSet.size === 0) {
console.log(`所有sku都没库存了`);
Expand Down
1 change: 1 addition & 0 deletions timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = async (d, fn, im = false) => {
getDiffTime(),
getDiffTime(),
getDiffTime(),
getDiffTime(),
]);
console.log(
'多次请求中最快的一次与服务器时间差(根据这个值设置提前多少ms开始),',
Expand Down

0 comments on commit 8a8f85c

Please sign in to comment.