数据缓存处理

This commit is contained in:
2025-12-24 16:21:07 +08:00
parent 0dfccdd617
commit f3e692f3fc
9 changed files with 650 additions and 46 deletions

View File

@@ -7,17 +7,6 @@ use think\Db;
class Room extends BaseCom
{
//创建房间前的检测
public function check_create_room()
{return V(1, '可以创建房间');
//检测用户的签约徒弟
$signCount = db::name('vs_user_sign')->where(['parent_user_id' => $this->uid ,'end_time' => ['>', time()]] )->count();
if($signCount < 10){
$need_sign_num = 10 - $signCount;
return V(0, '还需签约'.$need_sign_num.'人,才能创建房间!');
}
return V(1, '可以创建房间');
}
//创建房间