|
@@ -77,6 +77,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$where = [];
|
|
|
$where["user_id"] = $user_id;
|
|
@@ -200,6 +206,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$redPartyInfo = $redis->get($this->roomTypeArr[$room_type]."_".$partyInfo["id"]);
|
|
@@ -231,6 +243,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$redis->zRem($this->roomTypeArr[$room_type]."Rank",$party_id);
|
|
|
$redis->del($this->roomTypeArr[$room_type]."_".$party_id);
|
|
|
$this->success("删除成功!");
|
|
@@ -257,6 +275,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$redisPartyRankList = $redis->zRevRange($this->roomTypeArr[$room_type]."Rank",0,-1,true);
|
|
|
|
|
|
$partyModel = new \app\common\model\Party();
|
|
@@ -306,6 +330,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$res = [];
|
|
|
|
|
@@ -361,6 +391,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$redis->zIncrBy($this->roomTypeArr[$room_type]."Rank", $party_hot, $party_id);
|
|
|
return $this->success("更新成功!");
|
|
@@ -407,6 +443,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$redisData = $redis->get($this->roomTypeArr[$room_type]."_".$party_id);
|
|
|
if($redisData) {
|
|
|
$partyInfo = json_decode($redisData,true);
|
|
@@ -441,6 +483,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$res = $redis->hGetAll("online_".$party_id);
|
|
|
$user_ids = [];$userList = [];
|
|
@@ -464,6 +512,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$redis->zAdd("party_user_".$party_id,$this->auth->u_id,$user_id);
|
|
|
|
|
|
|
|
@@ -585,6 +639,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$lsetList = [];
|
|
@@ -616,10 +676,17 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
+
|
|
|
$redis->zRem("party_user_".$party_id,$user_u_id);
|
|
|
|
|
|
|
|
|
- $redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+
|
|
|
$redis->HDel("online_" . $party_id, $this->auth->id);
|
|
|
|
|
|
|
|
@@ -660,6 +727,12 @@ class Party extends Common
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
|
|
@@ -686,6 +759,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$partyModel = new \app\common\model\Party();
|
|
|
$data = [];
|
|
@@ -724,6 +803,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$partycellectionModel = new \app\common\model\PartyCellection();
|
|
|
|
|
@@ -768,6 +853,12 @@ class Party extends Common
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }*/
|
|
|
|
|
|
|
|
|
|
|
@@ -891,6 +982,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$partyInfo = $redis->get($this->roomTypeArr[$room_type]."_".$party_id);
|
|
|
if($partyInfo) {
|
|
|
$partyInfo = json_decode($partyInfo,true);
|
|
@@ -950,6 +1047,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$data = [];
|
|
|
$data["user_id"] = $user_id;
|
|
@@ -984,6 +1087,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$hget=$redis->hGetAll("party_manage_".$party_id);
|
|
@@ -1016,6 +1125,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$res = $redis->hDel("party_manage_".$party_id,$id."-".$item);
|
|
|
if($res !== false) {
|
|
|
$this->success("移除成功!",$res);
|
|
@@ -1047,6 +1162,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$partyInfo = $redis->get($this->roomTypeArr[$room_type]."_".$party_id);
|
|
|
if($partyInfo) {
|
|
|
$partyInfo = json_decode($partyInfo,true);
|
|
@@ -1079,6 +1200,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$data = unserialize($redis->hGet("party_lineup",$party_id));
|
|
|
$data[$userid]["user_id"] = $userInfo['id'];
|
|
|
$data[$userid]["avatar"] = $userInfo['avatar'];
|
|
@@ -1113,6 +1240,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$data=unserialize($redis->hGet("party_lineup",$party_id));
|
|
|
if($data && $is_empty != 1) {
|
|
|
foreach($data as $k => $v) {
|
|
@@ -1141,6 +1274,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$data = $redis->hGet("party_lineup",$party_id);
|
|
|
$dataArr = unserialize($data);
|
|
|
$datas = [];
|
|
@@ -1177,6 +1316,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$partyInfo = $redis->get($this->roomTypeArr[$room_type]."_".$party_id);
|
|
|
if($partyInfo) {
|
|
|
$partyInfo = json_decode($partyInfo,true);
|
|
@@ -1389,6 +1534,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"], 86400 * 31);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$userjewellogModel = new \app\common\model\UserJewelLog();
|
|
|
$usersoundcoinlogModel = new \app\common\model\UserSoundcoinLog();
|
|
@@ -1651,6 +1802,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
$redis->zAdd($this->roomTypeArr[$room_type]."Rank", $partyInfo['party_hot'], $partyInfo["id"]);
|
|
|
|
|
|
|
|
@@ -1684,6 +1841,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$weekday = $this->firstOfWeek(date("Y-m-d H:i:s"));
|
|
@@ -1725,6 +1888,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
$users = $redis->zRange("hourCharm_".$party_id,0,-1,true);
|
|
@@ -1756,6 +1925,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
if ($userId) {
|
|
|
$redis->zRem("hourCharm_" . $party_id, $userId);
|
|
@@ -1793,6 +1968,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
$party_ids = \app\common\model\Party::where(["status"=>1])->column("id");
|
|
|
|
|
@@ -1829,6 +2010,12 @@ class Party extends Common
|
|
|
$redis = new Redis();
|
|
|
$redisconfig = config("redis");
|
|
|
$redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
+ $redis->auth(config('redis_pwd'));
|
|
|
+ }
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
+ $redis->select(config('redis_selectdb'));
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|