This commit is contained in:
2026-01-08 18:34:02 +08:00
parent 3c8aa521ae
commit dae88e5ae6
3 changed files with 37 additions and 4 deletions

View File

@@ -39,9 +39,9 @@ class RoomPit extends BaseCom
return V(0, '请选择礼物', null);
}
}
$reslut = model('RoomPit')->apply_pit($this->uid, $room_id, $gift_id, $pit_number);
$reslut = model('RoomPit')->apply_pit($this->uid, $room_id, $pit_number,$gift_id);
}else{
$reslut = model('RoomPit')->apply_pit($this->uid, $room_id,$pit_number);
$reslut = model('RoomPit')->apply_pit($this->uid, $room_id, $pit_number);
}
redis_unlocks($key_name);

View File

@@ -85,12 +85,45 @@ class Xxiaoshi extends Controller
{
$res = db::name('vs_user_money_log')
->field('user_id,room_id,change_type,money_type,change_value,from_id,remarks,createtime')->select();
$data = [];
$coin_data = [];
$ear_data = [];
$i = 0;
if($res){
foreach ($res as $v){
//金币类型
$in_types = [2,5,6,8,13,14,15,16,23,26,27,28,30,33,35,40,51,57,58,4,7,10,17,20,24,25,32,42,50,56,59];
//钻石类型
$in_type = [9,11,12,18,19,21,22,31,28,34,41,52,53,54,55,57,3,14,29,43];
if(in_array($v['change_type'],$in_types)){
$coin_data[] = [
'user_id' => $v['user_id'],
'room_id' => $v['from_id'],
'coin' => $v['change_value'],
'before' => $v['change_value'],
'after' => $v['change_value'],
'change_type' => $v['change_type'],
'remarks' => $v['remarks'],
];
}
if(in_array($v['change_type'],$in_type)){
$ear_data[] = [
'user_id' => $v['user_id'],
'room_id' => $v['from_id'],
'earnings' => $v['change_value'],
'before' => $v['change_value'],
'after' => $v['change_value'],
'remarks' => $v['remarks'],
'change_type' => $v['change_type'],
];
}
$i ++;
}
$res = db::name('user_coin_log')->insertAll($coin_data);
$res1 = db::name('user_earnings_log')->insertAll($ear_data);
echo $i.'条数据成功插入'.$res.'===='.$res1;
}
}