|
@@ -37,24 +37,23 @@ class Plantask extends Controller
|
|
$redis->select($redisconfig['redis_selectdb']);
|
|
$redis->select($redisconfig['redis_selectdb']);
|
|
}
|
|
}
|
|
|
|
|
|
- $money_to_jewel = config('site.money_to_jewel') ?: 10; //余额兑换金币
|
|
|
|
|
|
+ //$money_to_jewel = config('site.money_to_jewel') ?: 10000; //余额兑换金币
|
|
// $getempirical_conf = config("site.getempirical");
|
|
// $getempirical_conf = config("site.getempirical");
|
|
|
|
|
|
foreach($tasklist as $key => $giftuserparty){
|
|
foreach($tasklist as $key => $giftuserparty){
|
|
- echo $giftuserparty['id'].'<br>';
|
|
|
|
|
|
+ //echo $giftuserparty['id'].'<br>';
|
|
|
|
|
|
$giftValue = $giftuserparty['value'];
|
|
$giftValue = $giftuserparty['value'];
|
|
$hotValue = $giftValue;
|
|
$hotValue = $giftValue;
|
|
|
|
|
|
//用户信息
|
|
//用户信息
|
|
- $authuser_info = Db::name('user')->field('nickname')->where('id',$giftuserparty['user_id'])->find();
|
|
|
|
- $touserInfo = Db::name('user')->field('nickname')->where('id',$giftuserparty['user_to_id'])->find();
|
|
|
|
- $party_id = $giftuserparty['party_id'];
|
|
|
|
|
|
+ //$authuser_info = Db::name('user')->field('nickname')->where('id',$giftuserparty['user_id'])->find();
|
|
|
|
+ //$touserInfo = Db::name('user')->field('nickname')->where('id',$giftuserparty['user_to_id'])->find();
|
|
|
|
|
|
|
|
|
|
//添加获赠用户余额
|
|
//添加获赠用户余额
|
|
- $user_id = $giftuserparty['user_to_id'];
|
|
|
|
- if($giftuserparty['getvalue'] > 0){
|
|
|
|
|
|
+ //$user_id = $giftuserparty['user_to_id'];
|
|
|
|
+ /*if($giftuserparty['getvalue'] > 0){
|
|
$getMoney = bcdiv($giftuserparty['getvalue'],$money_to_jewel,2);
|
|
$getMoney = bcdiv($giftuserparty['getvalue'],$money_to_jewel,2);
|
|
if($getMoney > 0){
|
|
if($getMoney > 0){
|
|
$rs_wallet = model('wallet')->lockChangeAccountRemain($user_id,$getMoney,'+',0,"{$authuser_info['nickname']}送你{$giftuserparty['gift_name']}x{$giftuserparty['number']}",101,'money');
|
|
$rs_wallet = model('wallet')->lockChangeAccountRemain($user_id,$getMoney,'+',0,"{$authuser_info['nickname']}送你{$giftuserparty['gift_name']}x{$giftuserparty['number']}",101,'money');
|
|
@@ -63,10 +62,10 @@ class Plantask extends Controller
|
|
$this->error($rs_wallet['msg']);
|
|
$this->error($rs_wallet['msg']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
$partyInfo = \app\common\model\Party::field("id,room_type,party_name,party_hot,user_id,platRate,guilderRate,easemob_room_id")->where(["id"=>$giftuserparty['party_id']])->find();
|
|
$partyInfo = \app\common\model\Party::field("id,room_type,party_name,party_hot,user_id,platRate,guilderRate,easemob_room_id")->where(["id"=>$giftuserparty['party_id']])->find();
|
|
//增加房主抽成
|
|
//增加房主抽成
|
|
- if ($partyInfo && $giftuserparty['guildervalue'] > 0) {
|
|
|
|
|
|
+ /*if ($partyInfo && $giftuserparty['guildervalue'] > 0) {
|
|
$guilderMoney = bcdiv($giftuserparty['guildervalue'],$money_to_jewel,2);
|
|
$guilderMoney = bcdiv($giftuserparty['guildervalue'],$money_to_jewel,2);
|
|
if($guilderMoney > 0){
|
|
if($guilderMoney > 0){
|
|
$rs_wallet = model('wallet')->lockChangeAccountRemain($partyInfo->user_id,$guilderMoney,'+',0,"{$authuser_info['nickname']}送礼物{$giftuserparty['gift_name']}x{$giftuserparty['number']}给{$touserInfo['nickname']},房间礼物抽成",102,'money');
|
|
$rs_wallet = model('wallet')->lockChangeAccountRemain($partyInfo->user_id,$guilderMoney,'+',0,"{$authuser_info['nickname']}送礼物{$giftuserparty['gift_name']}x{$giftuserparty['number']}给{$touserInfo['nickname']},房间礼物抽成",102,'money');
|
|
@@ -75,7 +74,7 @@ class Plantask extends Controller
|
|
$this->error($rs_wallet['msg']);
|
|
$this->error($rs_wallet['msg']);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
//更新麦位魅力值
|
|
//更新麦位魅力值
|
|
$this->updateSeatCharm($partyInfo['easemob_room_id'],$giftuserparty['seat_num'],$hotValue,$partyInfo,$redis);
|
|
$this->updateSeatCharm($partyInfo['easemob_room_id'],$giftuserparty['seat_num'],$hotValue,$partyInfo,$redis);
|
|
@@ -106,16 +105,16 @@ class Plantask extends Controller
|
|
}*/
|
|
}*/
|
|
|
|
|
|
//增加被送礼物用户的魅力等级
|
|
//增加被送礼物用户的魅力等级
|
|
- $res_charm = \app\common\model\User::add_charm_level($giftuserparty['user_to_id'],$giftValue);
|
|
|
|
|
|
+ //$res_charm = \app\common\model\User::add_charm_level($giftuserparty['user_to_id'],$giftValue);
|
|
|
|
|
|
// +exp
|
|
// +exp
|
|
// \app\common\model\TaskLog::tofinish($giftuserparty['user_id'],"OBHqCX4g",$giftuserparty['number']);
|
|
// \app\common\model\TaskLog::tofinish($giftuserparty['user_id'],"OBHqCX4g",$giftuserparty['number']);
|
|
|
|
|
|
// +message
|
|
// +message
|
|
- \app\common\model\Message::addMessage($giftuserparty['user_to_id'],"礼物通知","收到 ".$authuser_info['nickname']." 赠送的".$giftuserparty['gift_name']." x".$giftuserparty['number']." 价值 ".$giftValue ." 金币");
|
|
|
|
|
|
+ //\app\common\model\Message::addMessage($giftuserparty['user_to_id'],"礼物通知","收到 ".$authuser_info['nickname']." 赠送的".$giftuserparty['gift_name']." x".$giftuserparty['number']." 价值 ".$giftValue ." 金币");
|
|
|
|
|
|
//增加送礼用户的财富等级
|
|
//增加送礼用户的财富等级
|
|
- $res_wealth = \app\common\model\User::add_wealth_level($giftuserparty['user_id'],$giftValue);
|
|
|
|
|
|
+ //$res_wealth = \app\common\model\User::add_wealth_level($giftuserparty['user_id'],$giftValue);
|
|
|
|
|
|
|
|
|
|
|
|
|