|
@@ -903,12 +903,15 @@ class StoreOrder extends BaseModel
|
|
|
$product_id = StoreCart::where('id',$v)->value('product_id');
|
|
$product_id = StoreCart::where('id',$v)->value('product_id');
|
|
|
$is_explosive = StoreProduct::where('id',$product_id)->value('is_explosive');
|
|
$is_explosive = StoreProduct::where('id',$product_id)->value('is_explosive');
|
|
|
if ($is_explosive == 1){
|
|
if ($is_explosive == 1){
|
|
|
- $type = 0;
|
|
|
|
|
|
|
+ $type = 3;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if ($type == 1) {
|
|
if ($type == 1) {
|
|
|
self::team_rewards($order, 2); //分发团队奖励 2复购
|
|
self::team_rewards($order, 2); //分发团队奖励 2复购
|
|
|
|
|
+ }elseif ($type==3){
|
|
|
|
|
+ self::team_rewards($order, 3); //分发团队奖励 1首单
|
|
|
|
|
+ User::where('uid', $order['uid'])->update(['is_first' => 1]); //修改用户是否首单
|
|
|
} else {
|
|
} else {
|
|
|
self::team_rewards($order, 1); //分发团队奖励 1首单
|
|
self::team_rewards($order, 1); //分发团队奖励 1首单
|
|
|
User::where('uid', $order['uid'])->update(['is_first' => 1]); //修改用户是否首单
|
|
User::where('uid', $order['uid'])->update(['is_first' => 1]); //修改用户是否首单
|
|
@@ -932,6 +935,9 @@ class StoreOrder extends BaseModel
|
|
|
} elseif ($type == 2) {
|
|
} elseif ($type == 2) {
|
|
|
$field = 'ratio';
|
|
$field = 'ratio';
|
|
|
$title = '复购奖励';
|
|
$title = '复购奖励';
|
|
|
|
|
+ }elseif ($type == 3){
|
|
|
|
|
+ $field = 'first_ratio';
|
|
|
|
|
+ $title = '报单商品奖励';
|
|
|
}
|
|
}
|
|
|
if ($uid>0){
|
|
if ($uid>0){
|
|
|
$user_info = User::getUserInfo($uid);
|
|
$user_info = User::getUserInfo($uid);
|