添加owner_sex creator_sex
This commit is contained in:
parent
7fc4f4bb57
commit
5740f02834
@ -190,6 +190,7 @@ void Guild::SendUpdate()
|
||||
params->SetVal("owner_avatar_url", owner_avatar_url_);
|
||||
params->SetVal("owner_vip_lv", owner_vip_lv_);
|
||||
params->SetVal("owner_head", owner_head_);
|
||||
params->SetVal("owner_sex", owner_sex_);
|
||||
params->SetVal("join_unlimited", join_unlimited_);
|
||||
params->SetVal("join_cond1", join_cond1_);
|
||||
params->SetVal("join_cond2", join_cond2_);
|
||||
@ -1073,6 +1074,7 @@ void Guild::UpdateMemberInfo(const cs::MFUserInfo& user_info)
|
||||
owner_avatar_url_ = member->avatar_url;
|
||||
owner_vip_lv_ = member->vip_lv;
|
||||
owner_head_ = member->head;
|
||||
owner_sex_ = member->sex;
|
||||
}
|
||||
} else {
|
||||
SyncHelper::Instance()->SyncGuildMemberQuitOnlyOnline
|
||||
@ -1174,6 +1176,7 @@ void Guild::FillGuildBasic(cs::MFGuildBasic* guild_basic)
|
||||
guild_basic->set_owner_avatar_url(owner_avatar_url_);
|
||||
guild_basic->set_owner_vip_lv(owner_vip_lv_);
|
||||
guild_basic->set_owner_head(owner_head_);
|
||||
guild_basic->set_owner_sex(owner_sex_);
|
||||
guild_basic->set_join_unlimited(join_unlimited_);
|
||||
guild_basic->set_join_cond1(join_cond1_);
|
||||
guild_basic->set_join_cond2(join_cond2_);
|
||||
@ -1243,7 +1246,8 @@ void Guild::SaveToDB()
|
||||
" creator_id='%s', creator_name='%s', creator_avatar_url='%s', guild_data='%s', "
|
||||
" guild_status='%d', join_unlimited=%d, join_cond1=%d, join_cond2=%d, guild_member_num=%d, "
|
||||
" modifytime=%d, name_ext2=%d, "
|
||||
" owner_vip_lv=%d, owner_head=%d "
|
||||
" owner_vip_lv=%d, owner_head=%d, "
|
||||
" owner_sex=%d, creator_sex=%d "
|
||||
"WHERE guild_id=%d;",
|
||||
{
|
||||
guild_lv_,
|
||||
@ -1270,6 +1274,8 @@ void Guild::SaveToDB()
|
||||
owner_vip_lv_,
|
||||
owner_head_,
|
||||
guild_status_ == kGuildDismissed ? GuildId() : 0,
|
||||
owner_sex_,
|
||||
creator_sex_,
|
||||
guild_id_
|
||||
},
|
||||
a8::XParams()
|
||||
@ -1374,7 +1380,9 @@ Guild* Guild::CreateGuild(int gameid,
|
||||
int owner_vip_lv,
|
||||
int owner_head,
|
||||
int creator_vip_lv,
|
||||
int creator_head
|
||||
int creator_head,
|
||||
int owner_sex,
|
||||
int creator_sex
|
||||
)
|
||||
{
|
||||
if (GuildMgr::Instance()->GetGuild(guild_id)) {
|
||||
@ -1397,11 +1405,13 @@ Guild* Guild::CreateGuild(int gameid,
|
||||
guild->owner_avatar_url_ = owner_avatar_url;
|
||||
guild->owner_vip_lv_ = owner_vip_lv;
|
||||
guild->owner_head_ = owner_head;
|
||||
guild->owner_sex_ = owner_sex;
|
||||
guild->creator_id_ = creator_id;
|
||||
guild->creator_name_ = creator_name;
|
||||
guild->creator_avatar_url_ = creator_avatar_url;
|
||||
guild->creator_vip_lv_ = creator_vip_lv;
|
||||
guild->creator_head_ = creator_head;
|
||||
guild->creator_sex_ = creator_sex;
|
||||
guild->guild_status_ = guild_status;
|
||||
guild->join_unlimited_ = join_unlimited;
|
||||
guild->join_cond1_ = join_cond1;
|
||||
|
@ -112,11 +112,13 @@ private:
|
||||
std::string owner_avatar_url_;
|
||||
int owner_vip_lv_ = 0;
|
||||
int owner_head_ = 0;
|
||||
int owner_sex_ = 0;
|
||||
std::string creator_id_;
|
||||
std::string creator_name_;
|
||||
std::string creator_avatar_url_;
|
||||
int creator_vip_lv_ = 0;
|
||||
int creator_head_ = 0;
|
||||
int creator_sex_ = 0;
|
||||
int guild_status_ = 0;
|
||||
int join_unlimited_ = 0;
|
||||
int join_cond1_ = 0;
|
||||
@ -157,7 +159,9 @@ public:
|
||||
int owner_vip_lv,
|
||||
int owner_head,
|
||||
int creator_vip_lv,
|
||||
int creator_head
|
||||
int creator_head,
|
||||
int owner_sex,
|
||||
int creator_sex
|
||||
);
|
||||
static void GenGuildData(Player* hum, long long guild_id, std::string& guild_data);
|
||||
};
|
||||
|
@ -239,7 +239,9 @@ void GuildMgr::LoadGuild(long long guild_id)
|
||||
a8::XValue(row[24]), //owner_vip_lv
|
||||
a8::XValue(row[25]), //owner_head
|
||||
a8::XValue(row[26]), //creator_vip_lv
|
||||
a8::XValue(row[27]) //creator_head
|
||||
a8::XValue(row[27]), //creator_head
|
||||
a8::XValue(row[27]), //owner_sex
|
||||
a8::XValue(row[28]) //creator_sex
|
||||
);
|
||||
GuildMgr::Instance()->id_hash_[guild->GuildId()] = guild;
|
||||
break;
|
||||
@ -282,7 +284,8 @@ void GuildMgr::LoadGuild(long long guild_id)
|
||||
" owner_id, owner_name, owner_avatar_url, "
|
||||
" creator_id, creator_name, creator_avatar_url, guild_data, guild_status, "
|
||||
" join_unlimited, join_cond1, join_cond2, createtime, channel, "
|
||||
" owner_vip_lv, owner_head, creator_vip_lv, creator_head "
|
||||
" owner_vip_lv, owner_head, creator_vip_lv, creator_head, "
|
||||
" owner_sex, creator_sex "
|
||||
"FROM `guild` WHERE guild_id=%d;",
|
||||
{
|
||||
guild_id
|
||||
|
@ -105,8 +105,8 @@ void DbToGuildBasic(const std::vector<std::string>& row, cs::MFGuildBasic* guild
|
||||
guild->set__name_ext2(a8::XValue(row[24]));
|
||||
guild->set_owner_vip_lv(a8::XValue(row[25]));
|
||||
guild->set_owner_head(a8::XValue(row[26]));
|
||||
//guild->set_creator_vip_lv(a8::XValue(row[27]));
|
||||
//guild->set_creator_head(a8::XValue(row[28]));
|
||||
guild->set_owner_sex(a8::XValue(row[27]));
|
||||
//guild->set_creator_sex(a8::XValue(row[28]));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -121,7 +121,8 @@ static std::string GenSelectGuildSql(const std::string& where)
|
||||
" guild_declaration, owner_id, owner_name, owner_avatar_url, "
|
||||
" creator_id, creator_name, creator_avatar_url, guild_status, "
|
||||
" join_unlimited, join_cond1, join_cond2, createtime, modifytime, channel, guild_member_num, "
|
||||
" name_ext1, name_ext2, owner_vip_lv, owner_head, creator_vip_lv, creator_head "
|
||||
" name_ext1, name_ext2, owner_vip_lv, owner_head, creator_vip_lv, creator_head, "
|
||||
" owner_sex, creator_sex "
|
||||
"FROM `guild` ";
|
||||
sql += where;
|
||||
return sql;
|
||||
@ -226,11 +227,11 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
" owner_name, owner_avatar_url, creator_id, creator_name, creator_avatar_url, guild_member_num, "
|
||||
" guild_data, guild_status, join_unlimited, join_cond1, join_cond2, createtime, modifytime, "
|
||||
" name_ext1, name_ext2, guild_name_base64, "
|
||||
" owner_vip_lv, owner_head, creator_vip_lv, creator_head)"
|
||||
" owner_vip_lv, owner_head, creator_vip_lv, creator_head, owner_sex, creator_sex)"
|
||||
"VALUES(%d, %d, %d, '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', "
|
||||
" '%s', '%s', '%s', '%s', '%s', %d, "
|
||||
" '%s', %d, %d, %d, %d, %d, %d, %d, %d, '%s', "
|
||||
" %d, %d, %d, %d);",
|
||||
" %d, %d, %d, %d, %d, %d);",
|
||||
{
|
||||
guild->_gameid(),
|
||||
guild->_channel(),
|
||||
@ -264,6 +265,8 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
guild->owner_head(),
|
||||
guild->owner_vip_lv(),
|
||||
guild->owner_head(),
|
||||
guild->owner_sex(),
|
||||
guild->owner_sex()
|
||||
},
|
||||
a8::XParams()
|
||||
.SetSender(request)
|
||||
@ -376,6 +379,7 @@ void GuildMgr::__GuildUpdate(f8::JsonHttpRequest* request)
|
||||
guild->set_owner_avatar_url(request->request.At("owner_avatar_url")->AsXValue().GetString());
|
||||
guild->set_owner_vip_lv(request->request.At("owner_vip_lv")->AsXValue());
|
||||
guild->set_owner_head(request->request.At("owner_head")->AsXValue());
|
||||
guild->set_owner_sex(request->request.At("owner_sex")->AsXValue());
|
||||
guild->set_join_unlimited(request->request.At("join_unlimited")->AsXValue());
|
||||
guild->set_join_cond1(request->request.At("join_cond1")->AsXValue());
|
||||
guild->set_join_cond2(request->request.At("join_cond2")->AsXValue());
|
||||
|
@ -18,6 +18,7 @@ void TypeConvert::Convert(const cs::MFGuildBasic* guild_basic, a8::MutableXObjec
|
||||
xobj->SetVal("owner_avatar_url", guild_basic->owner_avatar_url());
|
||||
xobj->SetVal("owner_vip_lv", guild_basic->owner_vip_lv());
|
||||
xobj->SetVal("owner_head", guild_basic->owner_head());
|
||||
xobj->SetVal("owner_sex", guild_basic->owner_sex());
|
||||
xobj->SetVal("join_unlimited", guild_basic->join_unlimited());
|
||||
xobj->SetVal("join_cond1", guild_basic->join_cond1());
|
||||
xobj->SetVal("join_cond2", guild_basic->join_cond2());
|
||||
@ -46,4 +47,5 @@ void TypeConvert::Convert(f8::JsonHttpRequest* request, cs::MFGuildBasic* guild_
|
||||
guild_basic->set_join_unlimited(request->request.At("join_unlimited")->AsXValue());
|
||||
guild_basic->set_join_cond1(request->request.At("join_cond1")->AsXValue());
|
||||
guild_basic->set_join_cond2(request->request.At("join_cond2")->AsXValue());
|
||||
guild_basic->set_owner_sex(request->request.At("owner_sex")->AsXValue());
|
||||
}
|
||||
|
@ -115,11 +115,14 @@ CREATE TABLE `guild` (
|
||||
`owner_avatar_url` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会主头像',
|
||||
`owner_vip_lv` int(11) NOT NULL DEFAULT '0' COMMENT 'owner vip等级',
|
||||
`owner_head` int(11) NOT NULL DEFAULT '0' COMMENT 'owner 头像框',
|
||||
`owner_head` int(11) NOT NULL DEFAULT '0' COMMENT 'owner 头像框',
|
||||
`owner_sex` int(11) NOT NULL DEFAULT '0' COMMENT 'owner 性别',
|
||||
`creator_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会创建者id',
|
||||
`creator_name` tinyblob COMMENT '公会创建者名字',
|
||||
`creator_avatar_url` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会创建者头像',
|
||||
`creator_vip_lv` int(11) NOT NULL DEFAULT '0' COMMENT 'creator vip等级',
|
||||
`creator_head` int(11) NOT NULL DEFAULT '0' COMMENT 'creator 头像框',
|
||||
`creator_sex` int(11) NOT NULL DEFAULT '0' COMMENT 'creator 性别',
|
||||
`guild_data` mediumblob COMMENT '公会数据',
|
||||
`guild_status` int(11) NOT NULL DEFAULT '0' COMMENT '公会状态 0:新建(未确认) 1:已确认 2:已解散',
|
||||
`join_unlimited` int(11) NOT NULL DEFAULT '0' COMMENT '不限制加入',
|
||||
|
Loading…
x
Reference in New Issue
Block a user