Merge pull request '修改拉新订单金额判断' (#121) from fix into master
Reviewed-on: #121
This commit is contained in:
commit
360762f3f8
@ -111,6 +111,7 @@ class StoreConsumptionUserDao extends BaseDao
|
||||
$orderValidAmount = bcadd($spreadGroupOrder['pay_price'], $spreadGroupOrder['red_pack'], 2);
|
||||
$orderValidAmount = min($orderValidAmount, $this->maxAmount);
|
||||
$spreadScope = $this->getScope($spreadConsumption, $orderValidAmount);
|
||||
$spreadScope['start'] = $orderValidAmount;
|
||||
if ($groupOrder['pay_price'] < $spreadScope['start']) {
|
||||
// 当前用户的订单不在推荐人的档位区间,作为发起人参加活动
|
||||
return $this->promoter($userId, $groupOrder, 0);
|
||||
@ -125,6 +126,7 @@ class StoreConsumptionUserDao extends BaseDao
|
||||
$spreadOrderIds = $this->isFinished($spreadUserId, $spreadScope);
|
||||
if ($spreadOrderIds !== false) {
|
||||
$spreadOrderIds = "{$spreadGroupOrder['group_order_id']}," . $spreadOrderIds;
|
||||
// 使用了红包,订单有效金额需要乘以80%
|
||||
$orderValidAmount = $spreadGroupOrder['red_pack'] > 0 ? bcmul($orderValidAmount, 0.8, 2) : $orderValidAmount;
|
||||
$this->send($spreadConsumption, $spreadScope['rate'], $spreadUserId, $spreadOrderIds, $orderValidAmount);
|
||||
$storeActivityOrderDao->batchRepeal(explode(',', $spreadOrderIds));
|
||||
|
Loading…
x
Reference in New Issue
Block a user