/// <summary> /// bug处理 /// </summary> /// <returns></returns> public Message Bug_Update() { int action = 0; int userbyID = 0; int bugID = 0; string bugSubject = ""; string bugContext = ""; int gameID = 0;; int bugType = 0; string result = ""; TLV_Structure tlvStrut = new TLV_Structure(TagName.Status, 4, message.m_packet.m_Body.getTLVByTag(TagName.Status).m_bValueBuffer); action = (int)tlvStrut.toInteger(); tlvStrut = new TLV_Structure(TagName.UserByID, 4, message.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer); userbyID = (int)tlvStrut.toInteger(); tlvStrut = new TLV_Structure(TagName.Bug_ID, 4, message.m_packet.m_Body.getTLVByTag(TagName.Bug_ID).m_bValueBuffer); bugID = (int)tlvStrut.toInteger(); if (action == 1) { result = System.Text.Encoding.Default.GetString(message.m_packet.m_Body.getTLVByTag(TagName.Bug_Result).m_bValueBuffer); } else { bugSubject = System.Text.Encoding.Default.GetString(message.m_packet.m_Body.getTLVByTag(TagName.Bug_Subject).m_bValueBuffer); bugContext = System.Text.Encoding.Default.GetString(message.m_packet.m_Body.getTLVByTag(TagName.Bug_Context).m_bValueBuffer); tlvStrut = new TLV_Structure(TagName.GameID, 4, message.m_packet.m_Body.getTLVByTag(TagName.GameID).m_bValueBuffer); gameID = (int)tlvStrut.toInteger(); tlvStrut = new TLV_Structure(TagName.Bug_Type, 4, message.m_packet.m_Body.getTLVByTag(TagName.Bug_Type).m_bValueBuffer); bugType = (int)tlvStrut.toInteger(); } int status = CommonInfo.BugList_Update(userbyID, bugID, gameID, bugType, bugSubject, bugContext, result); if (status == 1) { SqlHelper.log.WriteLog(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bugID " + bugID + LanguageAPI.API_Handle + LanguageAPI.API_Success); Console.WriteLine(DateTime.Now + " - " + LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug ID" + bugID + LanguageAPI.API_Handle + LanguageAPI.API_Success); return(Message.COMMON_MES_RESP(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug " + LanguageAPI.API_Handle + LanguageAPI.API_Success, Msg_Category.COMMON, ServiceKey.GMTOOLS_BUGLIST_UPDATE_RESP)); } else { SqlHelper.log.WriteLog(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bugID " + bugID + LanguageAPI.API_Handle + LanguageAPI.API_Failure); Console.WriteLine(DateTime.Now + " - " + LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug ID" + bugID + LanguageAPI.API_Handle + LanguageAPI.API_Failure); return(Message.COMMON_MES_RESP(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug " + LanguageAPI.API_Handle + LanguageAPI.API_Failure, Msg_Category.COMMON, ServiceKey.GMTOOLS_BUGLIST_UPDATE_RESP)); } }