bug 修改
This commit is contained in:
@@ -130,7 +130,7 @@ class SendGift extends Model
|
||||
$host_id = Db::name('vs_room_pit')->where(['room_id'=>$p_room_id,'pit_number'=>9])->value('user_id');
|
||||
if($host_id){
|
||||
//计算主持人收益
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$p_room_id,'user_id'=>$to_uid,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$p_room_id,'user_id'=>$host_id,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
if(!$ratio){
|
||||
$ratio = 0;
|
||||
}
|
||||
@@ -382,7 +382,7 @@ class SendGift extends Model
|
||||
$host_id = Db::name('vs_room_pit')->where(['room_id'=>$room_id,'pit_number'=>9])->value('user_id');
|
||||
if($host_id){
|
||||
//计算主持人收益
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$room_id,'user_id'=>$to_uid,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$room_id,'user_id'=>$host_id,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
if(!$ratio){
|
||||
$ratio = 0;
|
||||
}
|
||||
@@ -553,17 +553,17 @@ class SendGift extends Model
|
||||
// 统计相同礼物的数量
|
||||
$giftCount = [];
|
||||
foreach ($gift_box as $key=>$gv) {
|
||||
$gift_info = Db::name('vs_gift')->where(['gid'=>$gv['gift_id']])
|
||||
$gift_infos = Db::name('vs_gift')->where(['gid'=>$gv['gift_id']])
|
||||
->field('gid as gift_id,gift_name,gift_price,file_type,base_image,play_image,gift_type,label,is_public_server')->find();
|
||||
if (isset($giftCount[$gv['gift_id']])) {
|
||||
$giftCount[$gv['gift_id']]['count']++;
|
||||
} else {
|
||||
$giftCount[$gv['gift_id']] = [
|
||||
'gift_info' => $gift_info,
|
||||
'gift_info' => $gift_infos,
|
||||
'count' => 1
|
||||
];
|
||||
}
|
||||
$gift_box[$key]['gift_name'] = $gift_info['gift_name'];
|
||||
$gift_box[$key]['gift_name'] = $gift_infos['gift_name'];
|
||||
}
|
||||
|
||||
// 构建文字消息内容
|
||||
@@ -880,7 +880,7 @@ class SendGift extends Model
|
||||
$host_id = Db::name('vs_room_pit')->where(['room_id'=>$room_id,'pit_number'=>9])->value('user_id');
|
||||
if($host_id){
|
||||
//计算主持人收益
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$room_id,'user_id'=>$to_uid,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$room_id,'user_id'=>$host_id,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
if(!$ratio){
|
||||
$ratio = 0;
|
||||
}
|
||||
@@ -1023,17 +1023,18 @@ class SendGift extends Model
|
||||
// 统计相同礼物的数量
|
||||
$giftCount = [];
|
||||
foreach ($gift_box as $key=>$gv) {
|
||||
$gift_info = Db::name('vs_gift')->where(['gid'=>$gv['gift_id']])
|
||||
$gift_infos = Db::name('vs_gift')->where(['gid'=>$gv['gift_id']])
|
||||
->field('gid as gift_id,gift_name,gift_price,file_type,base_image,play_image,gift_type,label,is_public_server')->find();
|
||||
if (isset($giftCount[$gv['gift_id']])) {
|
||||
$giftCount[$gv['gift_id']]['count']++;
|
||||
} else {
|
||||
$giftCount[$gv['gift_id']] = [
|
||||
'gift_info' => $gift_info,
|
||||
'gift_info' => $gift_infos,
|
||||
'count' => 1
|
||||
];
|
||||
}
|
||||
$gift_box[$key]['gift_name'] = $gift_info['gift_name'];
|
||||
$gift_box[$key]['gift_name'] = $gift_infos['gift_name'];
|
||||
$gift_infos= [];
|
||||
}
|
||||
|
||||
// 构建文字消息内容
|
||||
@@ -1092,6 +1093,7 @@ class SendGift extends Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
if($gift_info['label'] == 17) {
|
||||
$label_text .= $FromUserInfo['nickname'] . ' 送给 ' . $ToUserInfo['nickname'] . ' 礼物 ' . $gift_info['gift_name'] . ' x ' . $num . "\n";
|
||||
@@ -1210,7 +1212,7 @@ class SendGift extends Model
|
||||
$host_id = Db::name('vs_room_pit')->where(['room_id'=>$room_id,'pit_number'=>9])->value('user_id');
|
||||
if($host_id){
|
||||
//计算主持人收益
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$room_id,'user_id'=>$to_uid,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
$ratio = db::name('vs_room_host')->where(['room_id'=>$room_id,'user_id'=>$host_id,'delete_time'=>null,'type'=>1])->value('ratio');
|
||||
if(!$ratio){
|
||||
$ratio = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user