测试:bug处理

This commit is contained in:
2026-01-14 16:33:41 +08:00
parent 8bcee346ff
commit 06983dfe46
2 changed files with 12 additions and 4 deletions

View File

@@ -173,7 +173,7 @@ class GiveGift extends adminApi
if (!empty($gift_ids_list)) {
$gift_list = db::name('vs_gift')
->where('gid', 'in', array_unique($gift_ids_list))
->field('gid,gift_name,gift_price')
->field('gid,gift_name,gift_price,type,label')
->select();
foreach ($gift_list as $gift) {
$gifts[$gift['gid']] = $gift;
@@ -206,8 +206,11 @@ class GiveGift extends adminApi
// 礼物信息
$gift_info = isset($gifts[$value['gift_id']]) ? $gifts[$value['gift_id']] : null;
$value['gift_name'] = $gift_info ? $gift_info['gift_name'].'-'.$value['gift_id'] : '';
$value['gift_price'] = $gift_info ? $gift_info['gift_price'] : 0;
if($gift_info && $gift_info['label']==2){
$value['gift_price'] ="未知(盲盒)";
}else{
$value['gift_price'] = $gift_info ? $gift_info['gift_price'] : 0;
}
// 房间信息处理
if($value['from'] == 1){
$value['room'] = '聊天送礼';

View File

@@ -1140,6 +1140,7 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
$pan_xlh_num = $pan_xlh['num'] ?? 0;
}
$pan_xlh_num++;
$pan_xlh_num_bf = $pan_xlh_num;
cache::set('pan_xlh_num_'.$gift_bag_id.'_'.$pan_xlh['id'], $pan_xlh_num,$this->cache_time);
$main_prize_updates[] = [
'num' => $pan_xlh_num,
@@ -1283,7 +1284,11 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
}
// 8. 处理推送消息
if ($is_zhong_jiang == 1) {
$pan_xlh_num = cache::get('pan_xlh_num_'.$gift_bag_id.'_'.$pan_xlh['id']);
if(cache::get('pan_xlh_num_'.$gift_bag_id.'_'.$pan_xlh['id'])){
$pan_xlh_num = cache::get('pan_xlh_num_'.$gift_bag_id.'_'.$pan_xlh['id']);
}else{
$pan_xlh_num = $pan_xlh_num_bf;
}
$this->handlePrizeNotification($user_id, $room_id, $pan_xlh_num, $pan_xlh['id'],$ext['locking_condition']['locking_gift_id']);
}
//删除缓存