@@ -6,8 +6,9 @@ return [
'logtype' => [
1 => '邀请奖励',
2 => '积分兑换',
- 3 => '直推代理奖励',
- 4 => '兼推代理奖励',
+ 3 => '直推代理奖励', //支付后立刻获得
+ 4 => '兼推代理奖励', //支付后立刻获得
+ 5 => '下单收益', //支付后立刻获得
],
'moneyname' => [
'money' => '佣金',
@@ -92,6 +92,16 @@ class Plantask extends Controller
foreach($order_list as $key => $order){
+ //买家立刻得到积分
+ if($order['order_shouyi'] > 0){
+ $rs_wallet = $walletmodel->lockChangeAccountRemain($order['user_id'],'score',$order['order_shouyi'],5,'下单收益','unishop_order',$order['id']);
+ if($rs_wallet['status'] === false){
+ echo $rs_wallet['msg'];
+ Db::rollback();
+ exit;
+ }
+
//直推代理商获益
$intro_uid = Db::name('user')->where('id',$order['user_id'])->value('intro_uid');
if($intro_uid){