where([ 'id' => $form->data['active_id'], 'status' => StatusEnum::ENABLED, 'mall_id' => $form->mall_id, 'is_initiator_free' => StatusEnum::ENABLED ]) ->exists() ) { return $item; } $item['mch_order_info']['pay_money'] = max(bcsub($item['mch_order_info']['pay_money'], $item['mch_order_info']['goods_price'], 2), 0); $item['mch_order_info']['group_buy_price'] = max(bcsub($item['mch_order_info']['group_buy_price'], $item['mch_order_info']['goods_price'], 2), 0); $item['mch_order_info']['is_free'] = 1; // 免费开团标识 $form->marketing['deduct']['is_free_open_group'] = ['name' => '优惠金额', 'money' => $item['mch_order_info']['goods_price']]; return $item; } }