用户详情 加家族成员-解约
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\adminapi\controller;
|
||||
|
||||
use app\admin\model\AdminLog;
|
||||
use app\common\controller\adminApi;
|
||||
use think\Cache;
|
||||
use think\Config;
|
||||
use think\Db;
|
||||
use think\Hook;
|
||||
@@ -165,6 +166,12 @@ class Gift extends adminApi
|
||||
if(!$id){
|
||||
return V(0,"添加失败");
|
||||
}
|
||||
//删除缓存
|
||||
$cache_key = 'gift_list_'.$label.'_1';
|
||||
Cache::rm($cache_key);
|
||||
$cache_key = 'gift_list_'.$label;
|
||||
Cache::rm($cache_key);
|
||||
|
||||
return V(1,"成功",['id'=>$id]);
|
||||
}
|
||||
/*
|
||||
@@ -256,6 +263,11 @@ class Gift extends adminApi
|
||||
if(!$result){
|
||||
return V(0,"修改失败,礼物内容无更改");
|
||||
}
|
||||
//删除缓存
|
||||
$cache_key = 'gift_list_'.$gift_data['label'].'_1';
|
||||
Cache::rm($cache_key);
|
||||
$cache_key = 'gift_list_'.$gift_data['label'];
|
||||
Cache::rm($cache_key);
|
||||
return V(1,"成功", ['id'=>$gid]);
|
||||
}
|
||||
|
||||
|
||||
@@ -965,10 +965,22 @@ class User extends adminApi
|
||||
}
|
||||
$resultt = db::name('vs_user_sign')
|
||||
->where(['id' => $user_sign_id])
|
||||
->update(['end_time' => time(),'sign_user_type' => 3]);
|
||||
->update(['end_time' => time(),'sign_user_type' => 4,'type'=>4,'status' => 2]);
|
||||
if(!$resultt){
|
||||
return V(0, "操作失败");
|
||||
}
|
||||
//处理家族
|
||||
$myFamily = db::name('vs_family')
|
||||
->where(['user_id' => $user_sign['sign_user_id'],'type' => 0,'pid' => $user_sign['parent_user_id'],'deletetime' => 0])->find();
|
||||
if($myFamily){
|
||||
$mySignFamily = db::name('vs_family')->where(['user_id' => $user_sign['parent_user_id'],'type' => 1])->find();
|
||||
//删除群成员
|
||||
model('api/Tencent')->delete_group_member('f'.$mySignFamily['id'], $user_sign['sign_user_id']);
|
||||
//退出家族
|
||||
db::name('vs_family')->where('id', $myFamily['id'])->update(['deletetime' => time()]);
|
||||
}
|
||||
|
||||
|
||||
return V(1, "操作成功");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model;
|
||||
use think\Cache;
|
||||
use think\Model;
|
||||
use think\Db;
|
||||
use think\Session;
|
||||
@@ -424,6 +425,10 @@ class Decorate extends Model
|
||||
model('Chat')->sendMsg(1035,$room_id,$text,$uid);
|
||||
}
|
||||
}
|
||||
//更新装备缓存
|
||||
$cache_key = 'user_base_info_'.$uid;
|
||||
Cache::rm($cache_key);
|
||||
|
||||
return ['code' => 1, 'msg' => "设置成功", 'data' => null];
|
||||
} catch (\Exception $e) {
|
||||
// 回滚事务
|
||||
@@ -446,6 +451,9 @@ class Decorate extends Model
|
||||
if (!$reslut) {
|
||||
return ['code' => 0, 'msg' => "取消装扮失败", 'data' => null];
|
||||
}
|
||||
//更新装备缓存
|
||||
$cache_key = 'user_base_info_'.$uid;
|
||||
Cache::rm($cache_key);
|
||||
return ['code' => 1, 'msg' => "取消成功", 'data' => null];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\model;
|
||||
use think\Cache;
|
||||
use think\Db;
|
||||
use think\Model;
|
||||
use think\Session;
|
||||
@@ -259,6 +260,9 @@ class Nobility extends Model
|
||||
return ['code' => 0, 'msg' => '失败', 'data' => null];
|
||||
}
|
||||
}
|
||||
//更新装备缓存
|
||||
$cache_key = 'user_base_info_'.$user_id;
|
||||
Cache::rm($cache_key);
|
||||
return ['code' => 1, 'msg' => '成功'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user