Browse Source

跟进由于数据库变更造成的WxAdoInteface的修改。

Jeff 6 years ago
parent
commit
df569f0dad

+ 1 - 1
source/hook/WxAdoInterface/IWxAdoInterface.h

@@ -54,7 +54,7 @@ public:
 	virtual BOOL IsUserExist( IN LPCTSTR lpPhone, IN LPCTSTR lpPassword, OUT LPVOID lpOutValue,IN CONST DWORD &dwTimeOut = 3000 ) = 0;
 	virtual INT QueryUserDetail(IN LPCTSTR lpPhone, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000 ) = 0;
 	virtual INT QueryRecordOfType(IN LPCTSTR lpCustomerId, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000) = 0;
-	virtual INT QueryRecordOfReply(IN LPCTSTR lpCustomerId, IN LPCTSTR lpTypeId, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000) = 0;
+	virtual INT QueryRecordOfReply(IN LPCTSTR lpTypeId, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000) = 0;
 	
 	//////////////////////////////////////////////////////////////////////////
 	virtual BOOL AddCustomer(IN LPVOID lpCustomerInfo, IN CONST DWORD& dwTimeOut = 3000 ) = 0;

+ 9 - 36
source/hook/WxAdoInterface/WxAdoImpl.cpp

@@ -592,17 +592,16 @@ INT CWxAdoImpl::QueryRecordOfType(IN LPCTSTR lpCustomerId, IN LPVOID lpOutValue,
 	return 0;
 }
 
-INT CWxAdoImpl::QueryRecordOfReply(IN LPCTSTR lpCustomerId, IN LPCTSTR lpTypeId, IN LPVOID lpOutValue, IN const DWORD & dwTimeOut)
+INT CWxAdoImpl::QueryRecordOfReply(IN LPCTSTR lpTypeId, IN LPVOID lpOutValue, IN const DWORD & dwTimeOut)
 {
 	GETDBPTR(dwTimeOut);
 	try
 	{
-		if (lpCustomerId == NULL || lpTypeId == NULL)
+		if ( lpTypeId == NULL)
 			return FALSE;
 
-		AddSTRParameters(pObj->pCommand, _T("@csr_id"), lpCustomerId);
 		AddSTRParameters(pObj->pCommand, _T("@type_id"), lpTypeId);
-		pObj->pCommand->CommandText = _bstr_t(_T("select csr_id,type_id,reply_id,reply_name,reply_content,reply_gen_time from reply where csr_id = ? and type_id = ?"));
+		pObj->pCommand->CommandText = _bstr_t(_T("select csr_id,type_id,reply_id,reply_name,reply_content,reply_gen_time from reply where type_id = ?"));
 
 		// 执行SQL语句,返回记录集
 		_RecordsetPtr rst = pObj->pCommand->Execute(NULL, NULL, adCmdText);
@@ -610,9 +609,7 @@ INT CWxAdoImpl::QueryRecordOfReply(IN LPCTSTR lpCustomerId, IN LPCTSTR lpTypeId,
 		while (!rst->adoEOF)
 		{
 			tb_reply *pReplyObj = listReply.add_replys();
-			pReplyObj->set_customer_id(_bstr_t(rst->GetCollect(_T("csr_id")).bstrVal));
 			pReplyObj->set_type_id(_bstr_t(rst->GetCollect(_T("type_id")).bstrVal));
-			pReplyObj->set_reply_id(_bstr_t(rst->GetCollect(_T("reply_id")).bstrVal));
 			pReplyObj->set_reply_name(_bstr_t(rst->GetCollect(_T("reply_name")).bstrVal));
 			pReplyObj->set_reply_content(_bstr_t(rst->GetCollect(_T("reply_content")).bstrVal));
 
@@ -728,12 +725,7 @@ BOOL CWxAdoImpl::AddType(IN LPVOID lpTypeInfo, IN const DWORD & dwTimeOut)
 
 		pObj->pCommand->CommandText = _bstr_t(strSql);
 		// 执行SQL语句,返回记录集
-		_RecordsetPtr rst = pObj->pCommand->Execute(NULL, NULL, adCmdText);
-		if (!rst->adoEOF)
-		{
-			;
-		}
-		rst->Close();
+		pObj->pCommand->Execute(NULL, NULL, adCmdText);
 #else
 		// 出错:对象关闭时,不允许操作;
 		AddSTRParameters(pObj->pCommand, _T("@csr_id"), type.customer_id().c_str());
@@ -742,11 +734,7 @@ BOOL CWxAdoImpl::AddType(IN LPVOID lpTypeInfo, IN const DWORD & dwTimeOut)
 		AddSTRParameters(pObj->pCommand, _T("@type_gen_time"), type.type_gen_time().c_str());
 		pObj->pCommand->CommandText = _bstr_t(_T("INSERT INTO reply_type(csr_id,type_id,type_name,type_gen_time) VALUES(?,?,?,?)"));
 		// 执行SQL语句,返回记录集
-		_RecordsetPtr rst = pObj->pCommand->Execute(NULL, NULL, adCmdText);
-		if (!rst->adoEOF)
-		{
-			;
-		}
+		pObj->pCommand->Execute(NULL, NULL, adCmdText);
 		rst->Close();
 		pObj->pCommand->Parameters->Release();
 #endif
@@ -774,43 +762,28 @@ BOOL CWxAdoImpl::AddReply(IN LPVOID lpReplyInfo, IN const DWORD & dwTimeOut)
 	{
 #if 1
 		CString strSql = _T("");
-		reply.set_reply_id(GetUID().c_str());
 		if (reply.reply_gen_time().size() == 0)
 			reply.set_reply_gen_time(GetCurrentLocalTime().c_str());
 
-		strSql.Format(_T("INSERT INTO reply(csr_id,type_id,reply_id,reply_name,reply_content,reply_gen_time) "
-			"VALUES('%s','%s','%s','%s','%s','%s') "),
-			reply.customer_id().c_str(),
+		strSql.Format(_T("INSERT INTO reply(type_id,reply_name,reply_content,reply_gen_time) "
+			"VALUES('%s','%s','%s','%s') "),
 			reply.type_id().c_str(),
-			reply.reply_id().c_str(),
 			reply.reply_name().c_str(),
 			reply.reply_content().c_str(),
 			reply.reply_gen_time().c_str());
 
 		pObj->pCommand->CommandText = _bstr_t(strSql);
 		// 执行SQL语句,返回记录集
-		_RecordsetPtr rst = pObj->pCommand->Execute(NULL, NULL, adCmdText);
-		if (!rst->adoEOF)
-		{
-			;
-		}
-		rst->Close();
+		pObj->pCommand->Execute(NULL, NULL, adCmdText);
 #else
 		// 出错:对象关闭时,不允许操作;
-		AddSTRParameters(pObj->pCommand, _T("@csr_id"), reply.customer_id().c_str());
 		AddSTRParameters(pObj->pCommand, _T("@type_id"), reply.type_id().c_str());
-		AddSTRParameters(pObj->pCommand, _T("@reply_id"), GetUID().c_str());
 		AddBoolParameters(pObj->pCommand, _T("@reply_name"), reply.reply_name().c_str());
 		AddSTRParameters(pObj->pCommand, _T("@reply_content"), reply.reply_content().c_str());
 		AddSTRParameters(pObj->pCommand, _T("@reply_gen_time"), reply.reply_gen_time().c_str());
 		pObj->pCommand->CommandText = _bstr_t(_T("INSERT INTO reply(csr_id,type_id,reply_id,reply_name,reply_content,reply_gen_time) VALUES(?,?,?,?,?,?)"));
 		// 执行SQL语句,返回记录集
-		_RecordsetPtr rst = pObj->pCommand->Execute(NULL, NULL, adCmdText);
-		if (!rst->adoEOF)
-		{
-			;
-		}
-		rst->Close();
+		pObj->pCommand->Execute(NULL, NULL, adCmdText);
 		pObj->pCommand->Parameters->Release();
 #endif
 	}

+ 1 - 1
source/hook/WxAdoInterface/WxAdoImpl.h

@@ -145,7 +145,7 @@ public:
 	BOOL IsUserExist( IN LPCTSTR lpPhone, IN LPCTSTR lpPassword, OUT LPVOID lpOutValue,IN CONST DWORD &dwTimeOut = 3000 );
 	INT QueryUserDetail(IN LPCTSTR lpPhone, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000);
 	INT QueryRecordOfType(IN LPCTSTR lpCustomerId, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000);
-	INT QueryRecordOfReply(IN LPCTSTR lpCustomerId, IN LPCTSTR lpTypeId, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000);
+	INT QueryRecordOfReply(IN LPCTSTR lpTypeId, IN LPVOID lpOutValue, IN CONST DWORD& dwTimeOut = 3000);
 
 	BOOL AddCustomer(IN LPVOID lpCustomerInfo, IN CONST DWORD& dwTimeOut = 3000);
 	BOOL AddType(IN LPVOID lpTypeInfo, IN CONST DWORD& dwTimeOut = 3000);

+ 0 - 1
source/hook/WxService/WxService.cpp

@@ -59,7 +59,6 @@ void CALLBACK WorkStart()
 
 	// 添加回复详情;
 	tb_reply reply;
-	reply.set_customer_id(type.customer_id().c_str());
 	reply.set_type_id(type.type_id().c_str());
 	reply.set_reply_name(_T("电脑主板价格"));
 	reply.set_reply_content(_T("当前价格100元人民币"));

+ 211 - 165
source/hook/pb/table.pb.cc

@@ -23,6 +23,8 @@ namespace protobuf_table_2eproto {
 extern PROTOBUF_INTERNAL_EXPORT_protobuf_table_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_tb_customer;
 extern PROTOBUF_INTERNAL_EXPORT_protobuf_table_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_tb_reply;
 extern PROTOBUF_INTERNAL_EXPORT_protobuf_table_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_tb_type;
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_table_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_rec_reply;
+extern PROTOBUF_INTERNAL_EXPORT_protobuf_table_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_rec_type;
 }  // namespace protobuf_table_2eproto
 class tb_customerDefaultTypeInternal {
  public:
@@ -158,8 +160,11 @@ static void InitDefaultsview() {
   ::view::InitAsDefaultInstance();
 }
 
-::google::protobuf::internal::SCCInfo<0> scc_info_view =
-    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsview}, {}};
+::google::protobuf::internal::SCCInfo<3> scc_info_view =
+    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsview}, {
+      &protobuf_table_2eproto::scc_info_tb_customer.base,
+      &protobuf_table_2eproto::scc_info_rec_type.base,
+      &protobuf_table_2eproto::scc_info_rec_reply.base,}};
 
 void InitDefaults() {
   ::google::protobuf::internal::InitSCC(&scc_info_tb_customer.base);
@@ -203,9 +208,7 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _extensions_
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tb_reply, customer_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tb_reply, type_id_),
-  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tb_reply, reply_id_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tb_reply, reply_name_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tb_reply, reply_content_),
   GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tb_reply, reply_gen_time_),
@@ -232,15 +235,18 @@ const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUT
   ~0u,  // no _extensions_
   ~0u,  // no _oneof_case_
   ~0u,  // no _weak_field_map_
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::view, customer_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::view, types_),
+  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::view, replys_),
 };
 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
   { 0, -1, sizeof(::tb_customer)},
   { 15, -1, sizeof(::tb_type)},
   { 24, -1, sizeof(::tb_reply)},
-  { 35, -1, sizeof(::rec_customer)},
-  { 41, -1, sizeof(::rec_type)},
-  { 47, -1, sizeof(::rec_reply)},
-  { 53, -1, sizeof(::view)},
+  { 33, -1, sizeof(::rec_customer)},
+  { 39, -1, sizeof(::rec_type)},
+  { 45, -1, sizeof(::rec_reply)},
+  { 51, -1, sizeof(::view)},
 };
 
 static ::google::protobuf::Message const * const file_default_instances[] = {
@@ -283,17 +289,18 @@ void AddDescriptorsImpl() {
       "\017customer_enable\030\t \001(\010\022\031\n\021customer_gen_t"
       "ime\030\n \001(\t\"Y\n\007tb_type\022\023\n\013customer_id\030\001 \001("
       "\t\022\017\n\007type_id\030\002 \001(\t\022\021\n\ttype_name\030\003 \001(\t\022\025\n"
-      "\rtype_gen_time\030\004 \001(\t\"\205\001\n\010tb_reply\022\023\n\013cus"
-      "tomer_id\030\001 \001(\t\022\017\n\007type_id\030\002 \001(\t\022\020\n\010reply"
-      "_id\030\003 \001(\t\022\022\n\nreply_name\030\004 \001(\t\022\025\n\rreply_c"
-      "ontent\030\005 \001(\t\022\026\n\016reply_gen_time\030\006 \001(\t\"/\n\014"
+      "\rtype_gen_time\030\004 \001(\t\"^\n\010tb_reply\022\017\n\007type"
+      "_id\030\001 \001(\t\022\022\n\nreply_name\030\002 \001(\t\022\025\n\rreply_c"
+      "ontent\030\003 \001(\t\022\026\n\016reply_gen_time\030\004 \001(\t\"/\n\014"
       "rec_customer\022\037\n\tcustomers\030\001 \003(\0132\014.tb_cus"
       "tomer\"#\n\010rec_type\022\027\n\005types\030\001 \003(\0132\010.tb_ty"
       "pe\"&\n\trec_reply\022\031\n\006replys\030\001 \003(\0132\t.tb_rep"
-      "ly\"\006\n\004viewb\006proto3"
+      "ly\"\\\n\004view\022\036\n\010customer\030\001 \001(\0132\014.tb_custom"
+      "er\022\030\n\005types\030\002 \001(\0132\t.rec_type\022\032\n\006replys\030\003"
+      " \001(\0132\n.rec_replyb\006proto3"
   };
   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
-      descriptor, 658);
+      descriptor, 704);
   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     "table.proto", &protobuf_RegisterTypes);
 }
@@ -1456,9 +1463,7 @@ void tb_type::InternalSwap(tb_type* other) {
 void tb_reply::InitAsDefaultInstance() {
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int tb_reply::kCustomerIdFieldNumber;
 const int tb_reply::kTypeIdFieldNumber;
-const int tb_reply::kReplyIdFieldNumber;
 const int tb_reply::kReplyNameFieldNumber;
 const int tb_reply::kReplyContentFieldNumber;
 const int tb_reply::kReplyGenTimeFieldNumber;
@@ -1475,18 +1480,10 @@ tb_reply::tb_reply(const tb_reply& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
-  customer_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  if (from.customer_id().size() > 0) {
-    customer_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.customer_id_);
-  }
   type_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.type_id().size() > 0) {
     type_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_id_);
   }
-  reply_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  if (from.reply_id().size() > 0) {
-    reply_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reply_id_);
-  }
   reply_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   if (from.reply_name().size() > 0) {
     reply_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reply_name_);
@@ -1503,9 +1500,7 @@ tb_reply::tb_reply(const tb_reply& from)
 }
 
 void tb_reply::SharedCtor() {
-  customer_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   type_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  reply_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_content_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_gen_time_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1517,9 +1512,7 @@ tb_reply::~tb_reply() {
 }
 
 void tb_reply::SharedDtor() {
-  customer_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   type_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  reply_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_content_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_gen_time_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1545,9 +1538,7 @@ void tb_reply::Clear() {
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
-  customer_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   type_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-  reply_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   reply_gen_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
@@ -1564,26 +1555,10 @@ bool tb_reply::MergePartialFromCodedStream(
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // string customer_id = 1;
+      // string type_id = 1;
       case 1: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
             static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
-                input, this->mutable_customer_id()));
-          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
-            this->customer_id().data(), static_cast<int>(this->customer_id().length()),
-            ::google::protobuf::internal::WireFormatLite::PARSE,
-            "tb_reply.customer_id"));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // string type_id = 2;
-      case 2: {
-        if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                 input, this->mutable_type_id()));
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1596,26 +1571,10 @@ bool tb_reply::MergePartialFromCodedStream(
         break;
       }
 
-      // string reply_id = 3;
-      case 3: {
-        if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
-          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
-                input, this->mutable_reply_id()));
-          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
-            this->reply_id().data(), static_cast<int>(this->reply_id().length()),
-            ::google::protobuf::internal::WireFormatLite::PARSE,
-            "tb_reply.reply_id"));
-        } else {
-          goto handle_unusual;
-        }
-        break;
-      }
-
-      // string reply_name = 4;
-      case 4: {
+      // string reply_name = 2;
+      case 2: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                 input, this->mutable_reply_name()));
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1628,10 +1587,10 @@ bool tb_reply::MergePartialFromCodedStream(
         break;
       }
 
-      // string reply_content = 5;
-      case 5: {
+      // string reply_content = 3;
+      case 3: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                 input, this->mutable_reply_content()));
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1644,10 +1603,10 @@ bool tb_reply::MergePartialFromCodedStream(
         break;
       }
 
-      // string reply_gen_time = 6;
-      case 6: {
+      // string reply_gen_time = 4;
+      case 4: {
         if (static_cast< ::google::protobuf::uint8>(tag) ==
-            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
+            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                 input, this->mutable_reply_gen_time()));
           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
@@ -1686,64 +1645,44 @@ void tb_reply::SerializeWithCachedSizes(
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
-  // string customer_id = 1;
-  if (this->customer_id().size() > 0) {
-    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
-      this->customer_id().data(), static_cast<int>(this->customer_id().length()),
-      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
-      "tb_reply.customer_id");
-    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      1, this->customer_id(), output);
-  }
-
-  // string type_id = 2;
+  // string type_id = 1;
   if (this->type_id().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->type_id().data(), static_cast<int>(this->type_id().length()),
       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
       "tb_reply.type_id");
     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      2, this->type_id(), output);
+      1, this->type_id(), output);
   }
 
-  // string reply_id = 3;
-  if (this->reply_id().size() > 0) {
-    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
-      this->reply_id().data(), static_cast<int>(this->reply_id().length()),
-      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
-      "tb_reply.reply_id");
-    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      3, this->reply_id(), output);
-  }
-
-  // string reply_name = 4;
+  // string reply_name = 2;
   if (this->reply_name().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->reply_name().data(), static_cast<int>(this->reply_name().length()),
       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
       "tb_reply.reply_name");
     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      4, this->reply_name(), output);
+      2, this->reply_name(), output);
   }
 
-  // string reply_content = 5;
+  // string reply_content = 3;
   if (this->reply_content().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->reply_content().data(), static_cast<int>(this->reply_content().length()),
       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
       "tb_reply.reply_content");
     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      5, this->reply_content(), output);
+      3, this->reply_content(), output);
   }
 
-  // string reply_gen_time = 6;
+  // string reply_gen_time = 4;
   if (this->reply_gen_time().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->reply_gen_time().data(), static_cast<int>(this->reply_gen_time().length()),
       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
       "tb_reply.reply_gen_time");
     ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
-      6, this->reply_gen_time(), output);
+      4, this->reply_gen_time(), output);
   }
 
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1760,18 +1699,7 @@ void tb_reply::SerializeWithCachedSizes(
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
-  // string customer_id = 1;
-  if (this->customer_id().size() > 0) {
-    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
-      this->customer_id().data(), static_cast<int>(this->customer_id().length()),
-      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
-      "tb_reply.customer_id");
-    target =
-      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        1, this->customer_id(), target);
-  }
-
-  // string type_id = 2;
+  // string type_id = 1;
   if (this->type_id().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->type_id().data(), static_cast<int>(this->type_id().length()),
@@ -1779,21 +1707,10 @@ void tb_reply::SerializeWithCachedSizes(
       "tb_reply.type_id");
     target =
       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        2, this->type_id(), target);
-  }
-
-  // string reply_id = 3;
-  if (this->reply_id().size() > 0) {
-    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
-      this->reply_id().data(), static_cast<int>(this->reply_id().length()),
-      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
-      "tb_reply.reply_id");
-    target =
-      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        3, this->reply_id(), target);
+        1, this->type_id(), target);
   }
 
-  // string reply_name = 4;
+  // string reply_name = 2;
   if (this->reply_name().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->reply_name().data(), static_cast<int>(this->reply_name().length()),
@@ -1801,10 +1718,10 @@ void tb_reply::SerializeWithCachedSizes(
       "tb_reply.reply_name");
     target =
       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        4, this->reply_name(), target);
+        2, this->reply_name(), target);
   }
 
-  // string reply_content = 5;
+  // string reply_content = 3;
   if (this->reply_content().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->reply_content().data(), static_cast<int>(this->reply_content().length()),
@@ -1812,10 +1729,10 @@ void tb_reply::SerializeWithCachedSizes(
       "tb_reply.reply_content");
     target =
       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        5, this->reply_content(), target);
+        3, this->reply_content(), target);
   }
 
-  // string reply_gen_time = 6;
+  // string reply_gen_time = 4;
   if (this->reply_gen_time().size() > 0) {
     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
       this->reply_gen_time().data(), static_cast<int>(this->reply_gen_time().length()),
@@ -1823,7 +1740,7 @@ void tb_reply::SerializeWithCachedSizes(
       "tb_reply.reply_gen_time");
     target =
       ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
-        6, this->reply_gen_time(), target);
+        4, this->reply_gen_time(), target);
   }
 
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
@@ -1843,42 +1760,28 @@ size_t tb_reply::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
   }
-  // string customer_id = 1;
-  if (this->customer_id().size() > 0) {
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->customer_id());
-  }
-
-  // string type_id = 2;
+  // string type_id = 1;
   if (this->type_id().size() > 0) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
         this->type_id());
   }
 
-  // string reply_id = 3;
-  if (this->reply_id().size() > 0) {
-    total_size += 1 +
-      ::google::protobuf::internal::WireFormatLite::StringSize(
-        this->reply_id());
-  }
-
-  // string reply_name = 4;
+  // string reply_name = 2;
   if (this->reply_name().size() > 0) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
         this->reply_name());
   }
 
-  // string reply_content = 5;
+  // string reply_content = 3;
   if (this->reply_content().size() > 0) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
         this->reply_content());
   }
 
-  // string reply_gen_time = 6;
+  // string reply_gen_time = 4;
   if (this->reply_gen_time().size() > 0) {
     total_size += 1 +
       ::google::protobuf::internal::WireFormatLite::StringSize(
@@ -1912,18 +1815,10 @@ void tb_reply::MergeFrom(const tb_reply& from) {
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
-  if (from.customer_id().size() > 0) {
-
-    customer_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.customer_id_);
-  }
   if (from.type_id().size() > 0) {
 
     type_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_id_);
   }
-  if (from.reply_id().size() > 0) {
-
-    reply_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reply_id_);
-  }
   if (from.reply_name().size() > 0) {
 
     reply_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.reply_name_);
@@ -1962,12 +1857,8 @@ void tb_reply::Swap(tb_reply* other) {
 }
 void tb_reply::InternalSwap(tb_reply* other) {
   using std::swap;
-  customer_id_.Swap(&other->customer_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
   type_id_.Swap(&other->type_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
     GetArenaNoVirtual());
-  reply_id_.Swap(&other->reply_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-    GetArenaNoVirtual());
   reply_name_.Swap(&other->reply_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
     GetArenaNoVirtual());
   reply_content_.Swap(&other->reply_content_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
@@ -2673,8 +2564,17 @@ void rec_reply::InternalSwap(rec_reply* other) {
 // ===================================================================
 
 void view::InitAsDefaultInstance() {
+  ::_view_default_instance_._instance.get_mutable()->customer_ = const_cast< ::tb_customer*>(
+      ::tb_customer::internal_default_instance());
+  ::_view_default_instance_._instance.get_mutable()->types_ = const_cast< ::rec_type*>(
+      ::rec_type::internal_default_instance());
+  ::_view_default_instance_._instance.get_mutable()->replys_ = const_cast< ::rec_reply*>(
+      ::rec_reply::internal_default_instance());
 }
 #if !defined(_MSC_VER) || _MSC_VER >= 1900
+const int view::kCustomerFieldNumber;
+const int view::kTypesFieldNumber;
+const int view::kReplysFieldNumber;
 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
 
 view::view()
@@ -2688,10 +2588,28 @@ view::view(const view& from)
   : ::google::protobuf::Message(),
       _internal_metadata_(NULL) {
   _internal_metadata_.MergeFrom(from._internal_metadata_);
+  if (from.has_customer()) {
+    customer_ = new ::tb_customer(*from.customer_);
+  } else {
+    customer_ = NULL;
+  }
+  if (from.has_types()) {
+    types_ = new ::rec_type(*from.types_);
+  } else {
+    types_ = NULL;
+  }
+  if (from.has_replys()) {
+    replys_ = new ::rec_reply(*from.replys_);
+  } else {
+    replys_ = NULL;
+  }
   // @@protoc_insertion_point(copy_constructor:view)
 }
 
 void view::SharedCtor() {
+  ::memset(&customer_, 0, static_cast<size_t>(
+      reinterpret_cast<char*>(&replys_) -
+      reinterpret_cast<char*>(&customer_)) + sizeof(replys_));
 }
 
 view::~view() {
@@ -2700,6 +2618,9 @@ view::~view() {
 }
 
 void view::SharedDtor() {
+  if (this != internal_default_instance()) delete customer_;
+  if (this != internal_default_instance()) delete types_;
+  if (this != internal_default_instance()) delete replys_;
 }
 
 void view::SetCachedSize(int size) const {
@@ -2722,6 +2643,18 @@ void view::Clear() {
   // Prevent compiler warnings about cached_has_bits being unused
   (void) cached_has_bits;
 
+  if (GetArenaNoVirtual() == NULL && customer_ != NULL) {
+    delete customer_;
+  }
+  customer_ = NULL;
+  if (GetArenaNoVirtual() == NULL && types_ != NULL) {
+    delete types_;
+  }
+  types_ = NULL;
+  if (GetArenaNoVirtual() == NULL && replys_ != NULL) {
+    delete replys_;
+  }
+  replys_ = NULL;
   _internal_metadata_.Clear();
 }
 
@@ -2734,12 +2667,53 @@ bool view::MergePartialFromCodedStream(
     ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
     tag = p.first;
     if (!p.second) goto handle_unusual;
-  handle_unusual:
-    if (tag == 0) {
-      goto success;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // .tb_customer customer = 1;
+      case 1: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_customer()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // .rec_type types = 2;
+      case 2: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_types()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      // .rec_reply replys = 3;
+      case 3: {
+        if (static_cast< ::google::protobuf::uint8>(tag) ==
+            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
+               input, mutable_replys()));
+        } else {
+          goto handle_unusual;
+        }
+        break;
+      }
+
+      default: {
+      handle_unusual:
+        if (tag == 0) {
+          goto success;
+        }
+        DO_(::google::protobuf::internal::WireFormat::SkipField(
+              input, tag, _internal_metadata_.mutable_unknown_fields()));
+        break;
+      }
     }
-    DO_(::google::protobuf::internal::WireFormat::SkipField(
-          input, tag, _internal_metadata_.mutable_unknown_fields()));
   }
 success:
   // @@protoc_insertion_point(parse_success:view)
@@ -2756,6 +2730,24 @@ void view::SerializeWithCachedSizes(
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
+  // .tb_customer customer = 1;
+  if (this->has_customer()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      1, this->_internal_customer(), output);
+  }
+
+  // .rec_type types = 2;
+  if (this->has_types()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      2, this->_internal_types(), output);
+  }
+
+  // .rec_reply replys = 3;
+  if (this->has_replys()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+      3, this->_internal_replys(), output);
+  }
+
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
@@ -2770,6 +2762,27 @@ void view::SerializeWithCachedSizes(
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
+  // .tb_customer customer = 1;
+  if (this->has_customer()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        1, this->_internal_customer(), deterministic, target);
+  }
+
+  // .rec_type types = 2;
+  if (this->has_types()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        2, this->_internal_types(), deterministic, target);
+  }
+
+  // .rec_reply replys = 3;
+  if (this->has_replys()) {
+    target = ::google::protobuf::internal::WireFormatLite::
+      InternalWriteMessageToArray(
+        3, this->_internal_replys(), deterministic, target);
+  }
+
   if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
@@ -2787,6 +2800,27 @@ size_t view::ByteSizeLong() const {
       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
         (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
   }
+  // .tb_customer customer = 1;
+  if (this->has_customer()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *customer_);
+  }
+
+  // .rec_type types = 2;
+  if (this->has_types()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *types_);
+  }
+
+  // .rec_reply replys = 3;
+  if (this->has_replys()) {
+    total_size += 1 +
+      ::google::protobuf::internal::WireFormatLite::MessageSize(
+        *replys_);
+  }
+
   int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   SetCachedSize(cached_size);
   return total_size;
@@ -2814,6 +2848,15 @@ void view::MergeFrom(const view& from) {
   ::google::protobuf::uint32 cached_has_bits = 0;
   (void) cached_has_bits;
 
+  if (from.has_customer()) {
+    mutable_customer()->::tb_customer::MergeFrom(from.customer());
+  }
+  if (from.has_types()) {
+    mutable_types()->::rec_type::MergeFrom(from.types());
+  }
+  if (from.has_replys()) {
+    mutable_replys()->::rec_reply::MergeFrom(from.replys());
+  }
 }
 
 void view::CopyFrom(const ::google::protobuf::Message& from) {
@@ -2840,6 +2883,9 @@ void view::Swap(view* other) {
 }
 void view::InternalSwap(view* other) {
   using std::swap;
+  swap(customer_, other->customer_);
+  swap(types_, other->types_);
+  swap(replys_, other->replys_);
   _internal_metadata_.Swap(&other->_internal_metadata_);
 }
 

+ 213 - 148
source/hook/pb/table.pb.h

@@ -553,23 +553,9 @@ class tb_reply : public ::google::protobuf::Message /* @@protoc_insertion_point(
 
   // accessors -------------------------------------------------------
 
-  // string customer_id = 1;
-  void clear_customer_id();
-  static const int kCustomerIdFieldNumber = 1;
-  const ::std::string& customer_id() const;
-  void set_customer_id(const ::std::string& value);
-  #if LANG_CXX11
-  void set_customer_id(::std::string&& value);
-  #endif
-  void set_customer_id(const char* value);
-  void set_customer_id(const char* value, size_t size);
-  ::std::string* mutable_customer_id();
-  ::std::string* release_customer_id();
-  void set_allocated_customer_id(::std::string* customer_id);
-
-  // string type_id = 2;
+  // string type_id = 1;
   void clear_type_id();
-  static const int kTypeIdFieldNumber = 2;
+  static const int kTypeIdFieldNumber = 1;
   const ::std::string& type_id() const;
   void set_type_id(const ::std::string& value);
   #if LANG_CXX11
@@ -581,23 +567,9 @@ class tb_reply : public ::google::protobuf::Message /* @@protoc_insertion_point(
   ::std::string* release_type_id();
   void set_allocated_type_id(::std::string* type_id);
 
-  // string reply_id = 3;
-  void clear_reply_id();
-  static const int kReplyIdFieldNumber = 3;
-  const ::std::string& reply_id() const;
-  void set_reply_id(const ::std::string& value);
-  #if LANG_CXX11
-  void set_reply_id(::std::string&& value);
-  #endif
-  void set_reply_id(const char* value);
-  void set_reply_id(const char* value, size_t size);
-  ::std::string* mutable_reply_id();
-  ::std::string* release_reply_id();
-  void set_allocated_reply_id(::std::string* reply_id);
-
-  // string reply_name = 4;
+  // string reply_name = 2;
   void clear_reply_name();
-  static const int kReplyNameFieldNumber = 4;
+  static const int kReplyNameFieldNumber = 2;
   const ::std::string& reply_name() const;
   void set_reply_name(const ::std::string& value);
   #if LANG_CXX11
@@ -609,9 +581,9 @@ class tb_reply : public ::google::protobuf::Message /* @@protoc_insertion_point(
   ::std::string* release_reply_name();
   void set_allocated_reply_name(::std::string* reply_name);
 
-  // string reply_content = 5;
+  // string reply_content = 3;
   void clear_reply_content();
-  static const int kReplyContentFieldNumber = 5;
+  static const int kReplyContentFieldNumber = 3;
   const ::std::string& reply_content() const;
   void set_reply_content(const ::std::string& value);
   #if LANG_CXX11
@@ -623,9 +595,9 @@ class tb_reply : public ::google::protobuf::Message /* @@protoc_insertion_point(
   ::std::string* release_reply_content();
   void set_allocated_reply_content(::std::string* reply_content);
 
-  // string reply_gen_time = 6;
+  // string reply_gen_time = 4;
   void clear_reply_gen_time();
-  static const int kReplyGenTimeFieldNumber = 6;
+  static const int kReplyGenTimeFieldNumber = 4;
   const ::std::string& reply_gen_time() const;
   void set_reply_gen_time(const ::std::string& value);
   #if LANG_CXX11
@@ -641,9 +613,7 @@ class tb_reply : public ::google::protobuf::Message /* @@protoc_insertion_point(
  private:
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
-  ::google::protobuf::internal::ArenaStringPtr customer_id_;
   ::google::protobuf::internal::ArenaStringPtr type_id_;
-  ::google::protobuf::internal::ArenaStringPtr reply_id_;
   ::google::protobuf::internal::ArenaStringPtr reply_name_;
   ::google::protobuf::internal::ArenaStringPtr reply_content_;
   ::google::protobuf::internal::ArenaStringPtr reply_gen_time_;
@@ -1066,10 +1036,49 @@ class view : public ::google::protobuf::Message /* @@protoc_insertion_point(clas
 
   // accessors -------------------------------------------------------
 
+  // .tb_customer customer = 1;
+  bool has_customer() const;
+  void clear_customer();
+  static const int kCustomerFieldNumber = 1;
+  private:
+  const ::tb_customer& _internal_customer() const;
+  public:
+  const ::tb_customer& customer() const;
+  ::tb_customer* release_customer();
+  ::tb_customer* mutable_customer();
+  void set_allocated_customer(::tb_customer* customer);
+
+  // .rec_type types = 2;
+  bool has_types() const;
+  void clear_types();
+  static const int kTypesFieldNumber = 2;
+  private:
+  const ::rec_type& _internal_types() const;
+  public:
+  const ::rec_type& types() const;
+  ::rec_type* release_types();
+  ::rec_type* mutable_types();
+  void set_allocated_types(::rec_type* types);
+
+  // .rec_reply replys = 3;
+  bool has_replys() const;
+  void clear_replys();
+  static const int kReplysFieldNumber = 3;
+  private:
+  const ::rec_reply& _internal_replys() const;
+  public:
+  const ::rec_reply& replys() const;
+  ::rec_reply* release_replys();
+  ::rec_reply* mutable_replys();
+  void set_allocated_replys(::rec_reply* replys);
+
   // @@protoc_insertion_point(class_scope:view)
  private:
 
   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
+  ::tb_customer* customer_;
+  ::rec_type* types_;
+  ::rec_reply* replys_;
   mutable ::google::protobuf::internal::CachedSize _cached_size_;
   friend struct ::protobuf_table_2eproto::TableStruct;
 };
@@ -1756,60 +1765,7 @@ inline void tb_type::set_allocated_type_gen_time(::std::string* type_gen_time) {
 
 // tb_reply
 
-// string customer_id = 1;
-inline void tb_reply::clear_customer_id() {
-  customer_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& tb_reply::customer_id() const {
-  // @@protoc_insertion_point(field_get:tb_reply.customer_id)
-  return customer_id_.GetNoArena();
-}
-inline void tb_reply::set_customer_id(const ::std::string& value) {
-  
-  customer_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:tb_reply.customer_id)
-}
-#if LANG_CXX11
-inline void tb_reply::set_customer_id(::std::string&& value) {
-  
-  customer_id_.SetNoArena(
-    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
-  // @@protoc_insertion_point(field_set_rvalue:tb_reply.customer_id)
-}
-#endif
-inline void tb_reply::set_customer_id(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
-  
-  customer_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
-  // @@protoc_insertion_point(field_set_char:tb_reply.customer_id)
-}
-inline void tb_reply::set_customer_id(const char* value, size_t size) {
-  
-  customer_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-      ::std::string(reinterpret_cast<const char*>(value), size));
-  // @@protoc_insertion_point(field_set_pointer:tb_reply.customer_id)
-}
-inline ::std::string* tb_reply::mutable_customer_id() {
-  
-  // @@protoc_insertion_point(field_mutable:tb_reply.customer_id)
-  return customer_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* tb_reply::release_customer_id() {
-  // @@protoc_insertion_point(field_release:tb_reply.customer_id)
-  
-  return customer_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void tb_reply::set_allocated_customer_id(::std::string* customer_id) {
-  if (customer_id != NULL) {
-    
-  } else {
-    
-  }
-  customer_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), customer_id);
-  // @@protoc_insertion_point(field_set_allocated:tb_reply.customer_id)
-}
-
-// string type_id = 2;
+// string type_id = 1;
 inline void tb_reply::clear_type_id() {
   type_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
@@ -1862,60 +1818,7 @@ inline void tb_reply::set_allocated_type_id(::std::string* type_id) {
   // @@protoc_insertion_point(field_set_allocated:tb_reply.type_id)
 }
 
-// string reply_id = 3;
-inline void tb_reply::clear_reply_id() {
-  reply_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& tb_reply::reply_id() const {
-  // @@protoc_insertion_point(field_get:tb_reply.reply_id)
-  return reply_id_.GetNoArena();
-}
-inline void tb_reply::set_reply_id(const ::std::string& value) {
-  
-  reply_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
-  // @@protoc_insertion_point(field_set:tb_reply.reply_id)
-}
-#if LANG_CXX11
-inline void tb_reply::set_reply_id(::std::string&& value) {
-  
-  reply_id_.SetNoArena(
-    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
-  // @@protoc_insertion_point(field_set_rvalue:tb_reply.reply_id)
-}
-#endif
-inline void tb_reply::set_reply_id(const char* value) {
-  GOOGLE_DCHECK(value != NULL);
-  
-  reply_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
-  // @@protoc_insertion_point(field_set_char:tb_reply.reply_id)
-}
-inline void tb_reply::set_reply_id(const char* value, size_t size) {
-  
-  reply_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
-      ::std::string(reinterpret_cast<const char*>(value), size));
-  // @@protoc_insertion_point(field_set_pointer:tb_reply.reply_id)
-}
-inline ::std::string* tb_reply::mutable_reply_id() {
-  
-  // @@protoc_insertion_point(field_mutable:tb_reply.reply_id)
-  return reply_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* tb_reply::release_reply_id() {
-  // @@protoc_insertion_point(field_release:tb_reply.reply_id)
-  
-  return reply_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void tb_reply::set_allocated_reply_id(::std::string* reply_id) {
-  if (reply_id != NULL) {
-    
-  } else {
-    
-  }
-  reply_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reply_id);
-  // @@protoc_insertion_point(field_set_allocated:tb_reply.reply_id)
-}
-
-// string reply_name = 4;
+// string reply_name = 2;
 inline void tb_reply::clear_reply_name() {
   reply_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
@@ -1968,7 +1871,7 @@ inline void tb_reply::set_allocated_reply_name(::std::string* reply_name) {
   // @@protoc_insertion_point(field_set_allocated:tb_reply.reply_name)
 }
 
-// string reply_content = 5;
+// string reply_content = 3;
 inline void tb_reply::clear_reply_content() {
   reply_content_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
@@ -2021,7 +1924,7 @@ inline void tb_reply::set_allocated_reply_content(::std::string* reply_content)
   // @@protoc_insertion_point(field_set_allocated:tb_reply.reply_content)
 }
 
-// string reply_gen_time = 6;
+// string reply_gen_time = 4;
 inline void tb_reply::clear_reply_gen_time() {
   reply_gen_time_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
 }
@@ -2180,6 +2083,168 @@ rec_reply::replys() const {
 
 // view
 
+// .tb_customer customer = 1;
+inline bool view::has_customer() const {
+  return this != internal_default_instance() && customer_ != NULL;
+}
+inline void view::clear_customer() {
+  if (GetArenaNoVirtual() == NULL && customer_ != NULL) {
+    delete customer_;
+  }
+  customer_ = NULL;
+}
+inline const ::tb_customer& view::_internal_customer() const {
+  return *customer_;
+}
+inline const ::tb_customer& view::customer() const {
+  const ::tb_customer* p = customer_;
+  // @@protoc_insertion_point(field_get:view.customer)
+  return p != NULL ? *p : *reinterpret_cast<const ::tb_customer*>(
+      &::_tb_customer_default_instance_);
+}
+inline ::tb_customer* view::release_customer() {
+  // @@protoc_insertion_point(field_release:view.customer)
+  
+  ::tb_customer* temp = customer_;
+  customer_ = NULL;
+  return temp;
+}
+inline ::tb_customer* view::mutable_customer() {
+  
+  if (customer_ == NULL) {
+    auto* p = CreateMaybeMessage<::tb_customer>(GetArenaNoVirtual());
+    customer_ = p;
+  }
+  // @@protoc_insertion_point(field_mutable:view.customer)
+  return customer_;
+}
+inline void view::set_allocated_customer(::tb_customer* customer) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete customer_;
+  }
+  if (customer) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      customer = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, customer, submessage_arena);
+    }
+    
+  } else {
+    
+  }
+  customer_ = customer;
+  // @@protoc_insertion_point(field_set_allocated:view.customer)
+}
+
+// .rec_type types = 2;
+inline bool view::has_types() const {
+  return this != internal_default_instance() && types_ != NULL;
+}
+inline void view::clear_types() {
+  if (GetArenaNoVirtual() == NULL && types_ != NULL) {
+    delete types_;
+  }
+  types_ = NULL;
+}
+inline const ::rec_type& view::_internal_types() const {
+  return *types_;
+}
+inline const ::rec_type& view::types() const {
+  const ::rec_type* p = types_;
+  // @@protoc_insertion_point(field_get:view.types)
+  return p != NULL ? *p : *reinterpret_cast<const ::rec_type*>(
+      &::_rec_type_default_instance_);
+}
+inline ::rec_type* view::release_types() {
+  // @@protoc_insertion_point(field_release:view.types)
+  
+  ::rec_type* temp = types_;
+  types_ = NULL;
+  return temp;
+}
+inline ::rec_type* view::mutable_types() {
+  
+  if (types_ == NULL) {
+    auto* p = CreateMaybeMessage<::rec_type>(GetArenaNoVirtual());
+    types_ = p;
+  }
+  // @@protoc_insertion_point(field_mutable:view.types)
+  return types_;
+}
+inline void view::set_allocated_types(::rec_type* types) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete types_;
+  }
+  if (types) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      types = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, types, submessage_arena);
+    }
+    
+  } else {
+    
+  }
+  types_ = types;
+  // @@protoc_insertion_point(field_set_allocated:view.types)
+}
+
+// .rec_reply replys = 3;
+inline bool view::has_replys() const {
+  return this != internal_default_instance() && replys_ != NULL;
+}
+inline void view::clear_replys() {
+  if (GetArenaNoVirtual() == NULL && replys_ != NULL) {
+    delete replys_;
+  }
+  replys_ = NULL;
+}
+inline const ::rec_reply& view::_internal_replys() const {
+  return *replys_;
+}
+inline const ::rec_reply& view::replys() const {
+  const ::rec_reply* p = replys_;
+  // @@protoc_insertion_point(field_get:view.replys)
+  return p != NULL ? *p : *reinterpret_cast<const ::rec_reply*>(
+      &::_rec_reply_default_instance_);
+}
+inline ::rec_reply* view::release_replys() {
+  // @@protoc_insertion_point(field_release:view.replys)
+  
+  ::rec_reply* temp = replys_;
+  replys_ = NULL;
+  return temp;
+}
+inline ::rec_reply* view::mutable_replys() {
+  
+  if (replys_ == NULL) {
+    auto* p = CreateMaybeMessage<::rec_reply>(GetArenaNoVirtual());
+    replys_ = p;
+  }
+  // @@protoc_insertion_point(field_mutable:view.replys)
+  return replys_;
+}
+inline void view::set_allocated_replys(::rec_reply* replys) {
+  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
+  if (message_arena == NULL) {
+    delete replys_;
+  }
+  if (replys) {
+    ::google::protobuf::Arena* submessage_arena = NULL;
+    if (message_arena != submessage_arena) {
+      replys = ::google::protobuf::internal::GetOwnedMessage(
+          message_arena, replys, submessage_arena);
+    }
+    
+  } else {
+    
+  }
+  replys_ = replys;
+  // @@protoc_insertion_point(field_set_allocated:view.replys)
+}
+
 #ifdef __GNUC__
   #pragma GCC diagnostic pop
 #endif  // __GNUC__

+ 1 - 1
source/hook/protoc/protoc.bat

@@ -1,4 +1,4 @@
 @echo ÉúłÉ.protośÔÓŚľÄ.pb.hşÍ.pb.cc
 %~dp0protoc.exe --proto_path=%~dp0 --cpp_out=..\pb\ table.proto msg.proto
 @echo ÍęłÉ
-pause
+::pause