|
@@ -4,7 +4,7 @@ namespace app\index\controller;
|
|
|
|
|
|
use think\Controller;
|
|
use think\Controller;
|
|
|
|
|
|
-use app\common\library\Tlssigapiv2;
|
|
|
|
|
|
+use Redis;
|
|
use think\Db;
|
|
use think\Db;
|
|
use app\common\library\Easemob;
|
|
use app\common\library\Easemob;
|
|
class Plantask extends Controller
|
|
class Plantask extends Controller
|
|
@@ -26,6 +26,17 @@ class Plantask extends Controller
|
|
}
|
|
}
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
+ //redis
|
|
|
|
+ $redis = new Redis();
|
|
|
|
+ $redisconfig = config("redis");
|
|
|
|
+ $redis->connect($redisconfig["host"], $redisconfig["port"]);
|
|
|
|
+ if ($redisconfig['redis_pwd']) {
|
|
|
|
+ $redis->auth($redisconfig['redis_pwd']);
|
|
|
|
+ }
|
|
|
|
+ if($redisconfig['redis_selectdb'] > 0){
|
|
|
|
+ $redis->select($redisconfig['redis_selectdb']);
|
|
|
|
+ }
|
|
|
|
+
|
|
$money_to_jewel = config('site.money_to_jewel') ?: 10; //余额兑换金币
|
|
$money_to_jewel = config('site.money_to_jewel') ?: 10; //余额兑换金币
|
|
// $getempirical_conf = config("site.getempirical");
|
|
// $getempirical_conf = config("site.getempirical");
|
|
|
|
|
|
@@ -106,6 +117,16 @@ class Plantask extends Controller
|
|
//增加送礼用户的财富等级
|
|
//增加送礼用户的财富等级
|
|
$res_wealth = \app\common\model\User::add_wealth_level($giftuserparty['user_id'],$giftValue);
|
|
$res_wealth = \app\common\model\User::add_wealth_level($giftuserparty['user_id'],$giftValue);
|
|
|
|
|
|
|
|
+ // tcp 获取房间用户周前三名 getPartyUserTop里面摘出来的一部分
|
|
|
|
+ //[环信]更新财富榜前3。
|
|
|
|
+ $avatarArr = $redis->hGet("user_jewel_top3",$partyInfo['id']);
|
|
|
|
+ $easemob = new Easemob();
|
|
|
|
+ $matedata = [
|
|
|
|
+ 'wealth_top3_userlist' => $avatarArr,
|
|
|
|
+ ];
|
|
|
|
+ $easemob->room_setRoomCustomAttributeForced($partyInfo['easemob_room_id'],$partyInfo['user_id'],$matedata);
|
|
|
|
+
|
|
|
|
+ //结束
|
|
$rs_up = Db::name('gift_user_party')->where('id',$giftuserparty['id'])->update(['task_status'=>1]);
|
|
$rs_up = Db::name('gift_user_party')->where('id',$giftuserparty['id'])->update(['task_status'=>1]);
|
|
if($rs_up === false){
|
|
if($rs_up === false){
|
|
Db::rollback();
|
|
Db::rollback();
|