|
@@ -81,7 +81,7 @@ class Plantask extends Controller
|
|
|
'have_paid' => ['gt',0],
|
|
|
'paidtasktime' => 0,
|
|
|
];
|
|
|
- $order_list = Db::name('unishop_order')->where($map)->limit(10)->select();
|
|
|
+ $order_list = Db::name('unishop_order')->where($map)->order('id asc')->limit(10)->select();
|
|
|
if(empty($order_list)){
|
|
|
echo '没有数据';
|
|
|
exit;
|
|
@@ -94,7 +94,7 @@ class Plantask extends Controller
|
|
|
|
|
|
//买家立刻得到积分
|
|
|
if($order['order_shouyi'] > 0){
|
|
|
- $rs_wallet = $walletmodel->lockChangeAccountRemain($order['user_id'],'score',$order['order_shouyi'],5,'下单收益','unishop_order',$order['id']);
|
|
|
+ $rs_wallet = $walletmodel->lockChangeAccountRemain($order['user_id'],'score',$order['order_shouyi'],5,'下单收益','unishop_order',$order['id'],$order['user_id']);
|
|
|
if($rs_wallet['status'] === false){
|
|
|
echo $rs_wallet['msg'];
|
|
|
Db::rollback();
|
|
@@ -108,7 +108,7 @@ class Plantask extends Controller
|
|
|
$bili = config('site.orderpaid_zhitui_bili') ?: 5;
|
|
|
$score = bcdiv(bcmul($order['order_price'],$bili,2),100,2);
|
|
|
if($score > 0){
|
|
|
- $rs_wallet = $walletmodel->lockChangeAccountRemain($intro_uid,'score',$score,3,'直推代理奖励','unishop_order',$order['id']);
|
|
|
+ $rs_wallet = $walletmodel->lockChangeAccountRemain($intro_uid,'score',$score,3,'直推代理奖励','unishop_order',$order['id'],$order['user_id']);
|
|
|
if($rs_wallet['status'] === false){
|
|
|
echo $rs_wallet['msg'];
|
|
|
Db::rollback();
|
|
@@ -123,7 +123,7 @@ class Plantask extends Controller
|
|
|
$bili = config('site.orderpaid_jiantui_bili') ?: 1;
|
|
|
$score = bcdiv(bcmul($order['order_price'],$bili,2),100,2);
|
|
|
if($score > 0){
|
|
|
- $rs_wallet = $walletmodel->lockChangeAccountRemain($top_uid,'score',$score,4,'间推代理奖励','unishop_order',$order['id']);
|
|
|
+ $rs_wallet = $walletmodel->lockChangeAccountRemain($top_uid,'score',$score,4,'间推代理奖励','unishop_order',$order['id'],$order['user_id']);
|
|
|
if($rs_wallet['status'] === false){
|
|
|
echo $rs_wallet['msg'];
|
|
|
Db::rollback();
|
|
@@ -144,7 +144,7 @@ class Plantask extends Controller
|
|
|
}
|
|
|
|
|
|
Db::commit();
|
|
|
- echo '成功';
|
|
|
+ echo '成功'.count($order_list);
|
|
|
}
|
|
|
|
|
|
//自动结算10日前订单
|