|
@@ -58,7 +58,7 @@ class Guild extends Api
|
|
|
$idcardfind = \app\common\model\GuildJoinin::where(["user_id"=>$user_id,"status"=>0])->find();
|
|
|
if($idcardfind) $this->error("您存在加入公会的申请,正在审核中,请耐心等待!");
|
|
|
|
|
|
- $memberfind = \app\common\model\GuildMember::where(["user_id"=>$user_id,"status"=>1])->find();
|
|
|
+ $memberfind = \app\common\model\GuildMember::where(["user_id"=>$user_id])->find();
|
|
|
if($memberfind) $guild_id = $memberfind->guild_id;
|
|
|
|
|
|
if(!$guild_id) {
|
|
@@ -123,7 +123,7 @@ class Guild extends Api
|
|
|
$idcardfind = \app\common\model\GuildJoinin::where(["user_id"=>$user_id,"status"=>0])->find();
|
|
|
if($idcardfind) $this->error("您存在加入公会的申请,正在审核中,请耐心等待!");
|
|
|
|
|
|
- $memberfind = \app\common\model\GuildMember::where(["user_id"=>$user_id,"status"=>1])->find();
|
|
|
+ $memberfind = \app\common\model\GuildMember::where(["user_id"=>$user_id])->find();
|
|
|
if($memberfind) $guild_id = $memberfind->guild_id;
|
|
|
|
|
|
$guildWhere['user_id'] = $user_id;
|
|
@@ -321,7 +321,7 @@ class Guild extends Api
|
|
|
$idcardfind = \app\common\model\GuildJoinin::where(["user_id"=>$user_id,'guild_id'=>$guild_id,"status"=>0])->find();
|
|
|
if($idcardfind) $this->error("当前账号正在审核,请耐心等待!");
|
|
|
|
|
|
- $memberfind = \app\common\model\GuildMember::where(["user_id"=>$user_id,"status"=>1])->find();
|
|
|
+ $memberfind = \app\common\model\GuildMember::where(["user_id"=>$user_id])->find();
|
|
|
if($memberfind) $this->error("一个账号只能加入一个公会哟!");
|
|
|
|
|
|
// 查看是否申请过
|
|
@@ -379,7 +379,7 @@ class Guild extends Api
|
|
|
if($user_id !== $guildInfo->user_id) $this->error("身份验证失败!您不是族长,无权限更改!");
|
|
|
|
|
|
//判断重复
|
|
|
- $memberfind = \app\common\model\GuildMember::where(["user_id"=>$joininInfo['user_id'],"status"=>1])->find();
|
|
|
+ $memberfind = \app\common\model\GuildMember::where(["user_id"=>$joininInfo['user_id']])->find();
|
|
|
if($memberfind) $this->error("该用户已有家族!");
|
|
|
|
|
|
//清理其他公会未审核的数据
|
|
@@ -843,7 +843,7 @@ class Guild extends Api
|
|
|
$joinInfo = \app\common\model\GuildJoinin::where(["user_id"=>$user_id,"status"=>0])->find();
|
|
|
if($joinInfo) $this->error("您存在申请加入公会信息,请联系工会长处理完毕后方可申请开厅!");
|
|
|
// 查看是已经是公会成员
|
|
|
- $memberInfo = \app\common\model\GuildMember::where(["user_id"=>$user_id,"status"=>1])->find();
|
|
|
+ $memberInfo = \app\common\model\GuildMember::where(["user_id"=>$user_id])->find();
|
|
|
if($memberInfo) $this->error("您已存在签约中的公会,无法开新厅!");
|
|
|
|
|
|
|
|
@@ -896,7 +896,7 @@ class Guild extends Api
|
|
|
$joinStatus = \app\common\model\GuildJoinin::where(["user_id"=>$user_id])->value("status");
|
|
|
if($joinStatus === 0) $guildInfo["status"] = 1;
|
|
|
|
|
|
- $Member = \app\common\model\GuildMember::where(["user_id"=>$user_id,"status"=>1])->value("id");
|
|
|
+ $Member = \app\common\model\GuildMember::where(["user_id"=>$user_id])->value("id");
|
|
|
if($Member > 0) $guildInfo["status"] = 2;
|
|
|
|
|
|
$this->success("获取成功!",$guildInfo);
|