|
@@ -72,7 +72,7 @@ class Livebc extends Api
|
|
$this->error(__('Operation frequently'));
|
|
$this->error(__('Operation frequently'));
|
|
}*/
|
|
}*/
|
|
|
|
|
|
- $user_id = input('user_id');// 赠送对象
|
|
|
|
|
|
+ /*$user_id = input('user_id');// 赠送对象
|
|
$gift_id = input('gift_id');// 礼物ID
|
|
$gift_id = input('gift_id');// 礼物ID
|
|
|
|
|
|
if (!$user_id || !$gift_id )
|
|
if (!$user_id || !$gift_id )
|
|
@@ -152,7 +152,7 @@ class Livebc extends Api
|
|
}
|
|
}
|
|
|
|
|
|
//排行榜
|
|
//排行榜
|
|
- /*$redis = new Redis();
|
|
|
|
|
|
+ $redis = new Redis();
|
|
$redisconfig = config("redis");
|
|
$redisconfig = config("redis");
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
|
|
|
@@ -160,24 +160,24 @@ class Livebc extends Api
|
|
$redis->zIncrBy("livebc_jewel_get_" . $partyid, $giftinfo['value'], $user_id);
|
|
$redis->zIncrBy("livebc_jewel_get_" . $partyid, $giftinfo['value'], $user_id);
|
|
|
|
|
|
// 添加redis记录做贡献排行榜
|
|
// 添加redis记录做贡献排行榜
|
|
- $redis->zIncrBy("livebc_jewel_to_" . $partyid, $giftinfo['value'], $this->auth->id);*/
|
|
|
|
- }
|
|
|
|
|
|
+ $redis->zIncrBy("livebc_jewel_to_" . $partyid, $giftinfo['value'], $this->auth->id);
|
|
|
|
+ }*/
|
|
|
|
|
|
// tcp 获取房间用户周前三名
|
|
// tcp 获取房间用户周前三名
|
|
- $partyUserTop = $this->getPartyUserTop($partyid);
|
|
|
|
- $returnData["partyUserTop"] = $partyUserTop;
|
|
|
|
|
|
+ $partyUserTop = $this->getPartyUserTop(54);
|
|
|
|
+ /* $returnData["partyUserTop"] = $partyUserTop;
|
|
$returnData["image"] = one_domain_image($giftinfo["image"]);
|
|
$returnData["image"] = one_domain_image($giftinfo["image"]);
|
|
$returnData["gif_image"] = one_domain_image($giftinfo["special"]);
|
|
$returnData["gif_image"] = one_domain_image($giftinfo["special"]);
|
|
|
|
|
|
Db::commit();
|
|
Db::commit();
|
|
- $this->success("赠送成功!",$returnData);
|
|
|
|
|
|
+ $this->success("赠送成功!",$returnData);*/
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 用户赠送礼物后房间内用户排行,贡献榜前三名
|
|
* 用户赠送礼物后房间内用户排行,贡献榜前三名
|
|
*/
|
|
*/
|
|
- private function getPartyUserTop($party_id) {
|
|
|
|
|
|
+ public function getPartyUserTop($party_id) {
|
|
$redis = new Redis();
|
|
$redis = new Redis();
|
|
$redisconfig = config("redis");
|
|
$redisconfig = config("redis");
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|