礼物列表新建控制器和方法

This commit is contained in:
2026-01-02 17:14:40 +08:00
parent 09147525a0
commit 686f24e090
2 changed files with 108 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace app\api\controller;
use app\common\controller\BaseCom;
class GiftNew extends BaseCom
{
/*
* 获取礼物列表
* @param int $label 礼物标签
* @param int $type 类型1-房间送礼礼物2-排麦设置插麦礼物3-拍卖位选择拍卖礼物4-歌手添加歌单礼物5-动态打赏礼物
* @return array
*/
public function get_gift_list()
{
$key_name = "api:gift_new:get_gift_list:" . $this->uid;
redis_lock_exits($key_name);
$label = input('label', 0);
$type = input('type');
if (empty($type)) {
return V(0, 'type参数错误');
}
$reslut = model('GiftNew')->get_gift_list($this->uid, $type, $label);
redis_unlocks($key_name);
return V($reslut['code'], $reslut['msg'], $reslut['data']);
}
}