Commit 66629755 authored by 王波's avatar 王波

修改订单

parent e51cef0d
......@@ -62,9 +62,13 @@ export default async function updateGrowOrderGoods(
//筛选符合任务的订单并添加到下单表
let targetOrders = []
orderResult.forEach(v => {
// @ts-ignore
// 商品订单包含目标商品 且orderId为新订单
if (itemIdsArr.includes(v.itemId) && !orderList.some(order => order.orderId === v.orderId)) {
if (
// 商品订单包含目标商品 且orderId为新订单
itemIdsArr.includes(v.itemId) &&
// @ts-ignore
!orderList.some(order => order.orderId === v.orderId) &&
!targetOrders.some(order => order.orderId === v.orderId)
) {
if (targetOrders.length + completeTimes >= times) {
return
}
......@@ -73,7 +77,6 @@ export default async function updateGrowOrderGoods(
activityId: activityInfo._id,
itemId: v.itemId,
orderId: v.orderId,
payTime: v.payTime,
tId: v.tId,
createTime: Date.now(),
createDay: today
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment