房间热度卡开发-调试

This commit is contained in:
2026-01-23 17:20:31 +08:00
parent 62bd53e386
commit 10d86207ba

View File

@@ -31,6 +31,10 @@ class Gift extends Model
$giftType[$key]['id'] = $value['id']; $giftType[$key]['id'] = $value['id'];
$giftType[$key]['name'] = $value['name']; $giftType[$key]['name'] = $value['name'];
} }
//增加房间热度卡
if(!in_array(1013,$no_label)){
$giftType[] = ['id' => 1013, 'name' => '房间热度卡'];
}
return ['code' => 1, 'msg' => '获取成功', 'data' => $giftType]; return ['code' => 1, 'msg' => '获取成功', 'data' => $giftType];
} }
@@ -45,6 +49,30 @@ class Gift extends Model
$is_lock = 1; $is_lock = 1;
} }
} }
if($label == 1013){//房间热度卡
$list = db::name('vs_user_decorate')
->field('a.udid,a.num,b.title,b.base_image,b.price,b.ext_value')
->alias('a')
->join('vs_decorate b','a.did=b.did')
->where([
'a.user_id'=>$user_id,
'a.type'=>13,
'a.num' => ['>',0]
])
->order('a.num desc')
->select();
$return_data = [];
if($list){
foreach ($list as $k=>$v) {
$return_data[$k]['gift_id'] = $v['udid'];
$return_data[$k]['gift_name'] = $v['title'];
$return_data[$k]['base_image'] = $v['base_image'];
$return_data[$k]['gift_price'] = $v['price'];
$return_data[$k]['gift_num'] = $v['num'];
}
}
return ['code' => 1, 'msg' => '获取成功', 'data' => $return_data];
}
//先从缓存获取 //先从缓存获取
if($is_lock){ if($is_lock){