MassageProbufAdapter.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. //----------------------------------------------------------------
  2. //Module Name: $safeprojectname$
  3. //Purpose:
  4. //CopyRight: Muchinfo
  5. //History:
  6. //----------------------------------------------------------------
  7. //DateTime 2016/1/27 20:38:55
  8. //Author
  9. //Description Create
  10. //----------------------------------------------------------------
  11. using System.Linq;
  12. using Muchinfo.MTPClient.Adapter.Abstract;
  13. using Muchinfo.MTPClient.Adapter.Utilities;
  14. using Muchinfo.MTPClient.Data;
  15. using Muchinfo.MTPClient.Data.Enums;
  16. using Muchinfo.MTPClient.Data.Model;
  17. using System;
  18. using System.Collections.Generic;
  19. using System.Text;
  20. using Muchinfo.MTPClient.Data.Model.Account;
  21. using Muchinfo.MTPClient.Data.Model.Listing;
  22. using Muchinfo.MTPClient.Data.Model.Message;
  23. using Muchinfo.MTPClient.Data.Quote;
  24. using tas;
  25. using Muchinfo.MTPClient.Data.Model.Delivery;
  26. namespace Muchinfo.MTPClient.Adapter.ProtoBuf
  27. {
  28. public class MassageProbufAdapter : MessageAdapter
  29. {
  30. public override Data.Model.OrderCompleteArg ComplateNotice(object data)
  31. {
  32. var byteArr = data as byte[];
  33. if (byteArr == null)
  34. {
  35. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  36. }
  37. var orderDealed = ProtoBufHelper.EntityDeSerialize<OrderDealedNtf>(byteArr);
  38. var result = new OrderCompleteArg()
  39. {
  40. OrderId = (long)orderDealed.OrderID,
  41. AccountId = orderDealed.AccountID,
  42. ActiveQty = orderDealed.ActiveQty,
  43. Direction = (Direction)orderDealed.BuyOrSell,
  44. EntrustQty = Convert.ToDecimal(orderDealed.OrderQty),
  45. Amount = Convert.ToDecimal(orderDealed.Amount),
  46. TradeQuantity = Convert.ToDecimal(orderDealed.TradeQty),
  47. OrderType = (eOrderType)orderDealed.OrderType,
  48. TradeTime = orderDealed.TradeTime,
  49. TradeCharge = Convert.ToDecimal(orderDealed.TradeCharge),
  50. TradePrice = Convert.ToDecimal(orderDealed.TradePrice),
  51. // OperatorCode = orderDealed.OperatorID,
  52. // GoodsCode = orderDealed.GoodsID
  53. };
  54. return result;
  55. }
  56. /// <summary>
  57. /// 头寸变化通知
  58. /// </summary>
  59. /// <param name="data"></param>
  60. /// <returns></returns>
  61. public override Data.Model.PosChangedNtfModel PosChangedReturnMessage(object data)
  62. {
  63. var byteArr = data as byte[];
  64. if (byteArr == null)
  65. {
  66. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  67. }
  68. var model = ProtoBufHelper.EntityDeSerialize<PosChangedNtf>(byteArr);
  69. var result = new PosChangedNtfModel()
  70. {
  71. AccountID = model.AccountID,
  72. //BuyOrSell = model.BuyOrSell,
  73. //FreezeQty = model.FreezeQty,
  74. GoodsID = model.GoodsID,
  75. //HolderAmount = model.HolderAmount,
  76. //HoldQty = model.HoldQty,
  77. //ReckonPL = model.ReckonPL,
  78. //RetCode = model.RetCode,
  79. //TradeAmount = model.TradeAmount,
  80. //UsedMargin = model.UsedMargin
  81. };
  82. return result;
  83. }
  84. /// <summary>
  85. /// 市场状态变更通知
  86. /// </summary>
  87. /// <param name="data"></param>
  88. /// <returns></returns>
  89. public override Data.Model.MarketStatusChangeNtfModel MarketStatusChangeNtf(object data)
  90. {
  91. var byteArr = data as byte[];
  92. if (byteArr == null)
  93. {
  94. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  95. }
  96. var model = ProtoBufHelper.EntityDeSerialize<MarketStatusChangeNtf>(byteArr);
  97. var result = new MarketStatusChangeNtfModel()
  98. {
  99. MarketId = model.MarketID,
  100. Status = model.Status,
  101. TradeDay = model.TradeDay,
  102. NotifyTime = model.NotifyTime
  103. };
  104. return result;
  105. }
  106. public override string ConvertAmountNotice(object data)
  107. {
  108. var byteArr = data as byte[];
  109. if (byteArr == null)
  110. {
  111. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  112. }
  113. var notice = ProtoBufHelper.EntityDeSerialize<MoneyChangedNtf>(byteArr);
  114. //var result = new AmountArg()
  115. //{
  116. // AvailMarginLimit=(decimal)notice.AvailMarginLimit,
  117. // Currency=notice.Currency,
  118. // CurrentNetWorth=(decimal)notice.CurrentNetWorth,
  119. // FreezeMargin=(decimal)notice.FreezeMargin,
  120. // MaxUsedMargin=(decimal)notice.MaxUsedMargin,
  121. // UsedMargin=(decimal)notice.UsedMargin,
  122. //};
  123. string result = notice.AccountID.ToString();
  124. return result;
  125. }
  126. public override RiskControl RiskCtrlBltNotice(object data)
  127. {
  128. return null;
  129. //var byteArr = data as byte[];
  130. //if (byteArr == null)
  131. //{
  132. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  133. //}
  134. //var riskCtrlBltNotice = ProtoBufHelper.EntityDeSerialize<RiskCtrlBltRsp>(byteArr);
  135. //var result = new RiskControl()
  136. //{
  137. // //SendType = false,
  138. // //Content = Encoding.UTF8.GetString(notifyBulletin.Content),
  139. // //MsgID = notifyBulletin.MsgID,
  140. // //PublishDate = ToDateTime(notifyBulletin.PublishDate),
  141. // //Title = Encoding.UTF8.GetString(notifyBulletin.Title),
  142. // //ValidDate = ToDateTime(notifyBulletin.ValidDate),
  143. // //MsgType =(Muchinfo.MTPClient.Data.Enums.MsgTypeEnum)notifyBulletin.MsgType,
  144. // //RiskLevel = notifyBulletin.RiskLevel,
  145. // //PubExchName = notifyBulletin.PubExchName,
  146. // //PubAccountCode = notifyBulletin.PubAccountCode,
  147. // //AccountStatus = (Muchinfo.MTPClient.Data.Enums.AccountStatus)riskCtrlBltNotice.AccountStatus, -- 风控不改状态,不用赋值
  148. // Date = riskCtrlBltNotice.Idate,
  149. // LoginCode = riskCtrlBltNotice.LoginCode,
  150. // MemberCode = riskCtrlBltNotice.MemberId.ToString(),
  151. // MsgRate = riskCtrlBltNotice.MsgRate,
  152. // RealRate = riskCtrlBltNotice.RealRate,
  153. // RiskLevel = riskCtrlBltNotice.RiskLevel,
  154. //};
  155. //return result;
  156. }
  157. public static DateTime ToDateTime(string dateTime)
  158. {
  159. DateTime date = DateTime.MinValue;
  160. DateTime.TryParse(dateTime, out date);
  161. return date;
  162. }
  163. public static T ToEnum<T>(int value)
  164. {
  165. object eValue = value;
  166. object defaultEnum = 0;
  167. var type = typeof(T);
  168. if (System.Enum.IsDefined(type, eValue))
  169. {
  170. return (T)eValue;
  171. }
  172. else
  173. {
  174. var v = System.Enum.GetValues(type);
  175. return (T)v.GetValue(0);
  176. }
  177. }
  178. public override NoticeMsg NotifyBulletin(object data)
  179. {
  180. var byteArr = data as byte[];
  181. if (byteArr == null)
  182. {
  183. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  184. }
  185. var bltMsgNtf = ProtoBufHelper.EntityDeSerialize<BltMsgNtf>(byteArr);
  186. var result = new NoticeMsg()
  187. {
  188. //CONTENT = Encoding.UTF8.GetString(bltMsgNtf.Content),
  189. //MSG_ID= bltMsgNtf.MsgID,
  190. //TITLE = Encoding.UTF8.GetString(bltMsgNtf.Title),
  191. //PubAccountCode = bltMsgNtf.PubAccountId.ToString(),
  192. //MsgType = (Muchinfo.MTPClient.Data.Enums.MsgTypeEnum)bltMsgNtf.MsgType,
  193. SCHEDULE_TIME = ToDateTime(bltMsgNtf.PublishDate),
  194. //todo:对比字段
  195. Sending_Time = ToDateTime(bltMsgNtf.PublishDate),
  196. //MemberIds = ToEntityIds(bltMsgNtf.MemberIds),
  197. //ExchID=ToEntityIds(bltMsgNtf.ExchID),
  198. //ValidDateBegin=bltMsgNtf.ValidDateBegin,
  199. //ValidDateEnd=bltMsgNtf.ValidDateEnd,
  200. };
  201. return result;
  202. }
  203. /// <summary>
  204. /// 开休市计划通知
  205. /// </summary>
  206. /// <param name="data"></param>
  207. /// <returns></returns>
  208. public override List<MarketTypeStatus> MarketStatusChangeNotifyAd(object data)
  209. {
  210. return null;
  211. // var byteArr = data as byte[];
  212. // if (byteArr == null)
  213. // {
  214. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  215. // }
  216. // var remoteModels = ProtoBufHelper.EntityDeSerialize<MarketStatusChangeNotify>(byteArr);
  217. //var results =remoteModels.MarketStatusChanges.ToList();
  218. // var marketypes = new List<MarketTypeStatus>();
  219. // foreach (var marketStatus in results)
  220. // {
  221. // var tem = new MarketTypeStatus()
  222. // {
  223. // Id =(int) marketStatus.MarketTypeId,
  224. // TradeDay = marketStatus.TradeDate,
  225. // Type =marketStatus.SignalType
  226. // };
  227. // marketypes.Add(tem);
  228. // }
  229. // //SignalType = (SignalTypeEnum)remoteModel.SignalType,
  230. // //ControlTime = remoteModel.ControlTime,
  231. // //MarketTypeId = remoteModel.MarketTypeId,
  232. // //GoodsId = ToEntityUintIds(remoteModel.GoodsId),
  233. // //RunStatus = (eRunStatus)remoteModel.RunStatus,
  234. // //RunStep = (eRunStep)remoteModel.RunStep,
  235. // //NextTradeDate = remoteModel.NextTradeDate,
  236. // //TradeDate = remoteModel.TradeDate,
  237. // //OpenMarketDate = remoteModel.OpenMarketDate,
  238. // //LastTradeDateOfWeek = remoteModel.LastTradeDateOfWeek,
  239. // return marketypes;
  240. }
  241. public override RiskControl RiskCtrlMemberNotice(object data)
  242. {
  243. return null;
  244. //var byteArr = data as byte[];
  245. //if (byteArr == null)
  246. //{
  247. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  248. //}
  249. //var riskCtrlBltNotice = ProtoBufHelper.EntityDeSerialize<RiskControlMsg>(byteArr);
  250. //var result = new RiskControl()
  251. //{
  252. // Date = riskCtrlBltNotice.Date,
  253. // LoginCode = riskCtrlBltNotice.LoginCode,
  254. // MemberCode = riskCtrlBltNotice.MemberId.ToString(),
  255. // MsgRate = riskCtrlBltNotice.MsgRate,
  256. // RealRate = riskCtrlBltNotice.RealRate,
  257. // RiskLevel = riskCtrlBltNotice.RiskLevel,
  258. //};
  259. //return result;
  260. }
  261. public override RiskControl RiskCtrlMemberBreak(object data)
  262. {
  263. return null;
  264. //var byteArr = data as byte[];
  265. //if (byteArr == null)
  266. //{
  267. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  268. //}
  269. //var riskCtrlBltNotice = ProtoBufHelper.EntityDeSerialize<RiskCtrlMemRsp>(byteArr);
  270. //var result = new RiskControl()
  271. //{
  272. // Date = riskCtrlBltNotice.Idate,
  273. // LoginCode = riskCtrlBltNotice.LoginCode,
  274. // MemberCode = riskCtrlBltNotice.MemberId.ToString(),
  275. // MsgRate = riskCtrlBltNotice.MsgRate,
  276. // RealRate = riskCtrlBltNotice.RealRate,
  277. // AccountStatus = (eAccountStatus)riskCtrlBltNotice.AccountStatus,
  278. //};
  279. //return result;
  280. }
  281. public override PrepostTransferOrder PrepostTransferOrderNtf(object data)
  282. {
  283. return null;
  284. //var byteArr = data as byte[];
  285. //if (byteArr == null)
  286. //{
  287. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  288. //}
  289. //var prepostOrder = ProtoBufHelper.EntityDeSerialize<PrepostTransferOrderNtf>(byteArr);
  290. //var result = new PrepostTransferOrder()
  291. //{
  292. // ClientSerialNo = prepostOrder.ClientSerialNo,
  293. // PrepostID = prepostOrder.PrepostID,
  294. // PrepostStatus = prepostOrder.PrepostStatus,
  295. // GoodsID = prepostOrder.GoodsID,
  296. //};
  297. //return result;
  298. }
  299. /// <summary>
  300. /// 交收审核通知
  301. /// </summary>
  302. /// <param name="data"></param>
  303. /// <returns></returns>
  304. public override DeliveryAuditNtfModel DeliveryReturnMessage(object data)
  305. {
  306. var byteArr = data as byte[];
  307. if (byteArr == null)
  308. {
  309. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  310. }
  311. var model = ProtoBufHelper.EntityDeSerialize<DeliveryAuditNtf>(byteArr);
  312. var result = new DeliveryAuditNtfModel()
  313. {
  314. //RetCode = model.RetCode,
  315. //OrderID = model.OrderID,
  316. //GoodsID = model.GoodsID,
  317. //AccountID = model.AccountID,
  318. //BuyOrSell = model.BuyOrSell,
  319. //OrderQty = model.OrderQty,
  320. //Result = model.Result,
  321. OperatorID = model.OperatorID,
  322. };
  323. return result;
  324. }
  325. /// <summary>
  326. /// 交割商品到期提货通知
  327. /// </summary>
  328. /// <param name="data"></param>
  329. /// <returns></returns>
  330. public override GoodsCloseDateNtfModel GoodsCloseDateReturnMessage(object data)
  331. {
  332. return null;
  333. //var byteArr = data as byte[];
  334. //if (byteArr == null)
  335. //{
  336. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  337. //}
  338. //var model = ProtoBufHelper.EntityDeSerialize<GoodsCloseDateNtf>(byteArr);
  339. //var result = new GoodsCloseDateNtfModel()
  340. //{
  341. // RetCode = model.RetCode,
  342. // LoginCode = model.LoginCode,
  343. // AccountId = model.AccountId,
  344. // RiskLevel = model.RiskLevel,
  345. // ReceiverTypes = model.ReceiverTypes,
  346. // MsgContent = model.MsgContent,
  347. // Idate = model.Idate,
  348. //};
  349. //return result;
  350. }
  351. /// <summary>
  352. /// 提货审核通知
  353. /// </summary>
  354. /// <param name="data"></param>
  355. /// <returns></returns>
  356. public override OutStoreAuditNtfModel OutStoreAuditReturnMessage(object data)
  357. {
  358. return null;
  359. //var byteArr = data as byte[];
  360. //if (byteArr == null)
  361. //{
  362. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  363. //}
  364. //var model = ProtoBufHelper.EntityDeSerialize<OutStoreAuditNtf>(byteArr);
  365. //var result = new OutStoreAuditNtfModel()
  366. //{
  367. // RetCode = model.RetCode,
  368. // auditStatus = model.auditStatus,
  369. // storeOutId = model.storeOutId,
  370. // Content = model.Content,
  371. //};
  372. //return result;
  373. }
  374. /// <summary>
  375. /// 投资者风控通知
  376. /// </summary>
  377. /// <param name="data"></param>
  378. /// <returns></returns>
  379. public override RiskControlInvestorModel RiskControlInvestorReturnMessage(object data)
  380. {
  381. //return null;
  382. var byteArr = data as byte[];
  383. if (byteArr == null)
  384. {
  385. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  386. }
  387. RiskToWebNtf model = ProtoBufHelper.EntityDeSerialize<RiskToWebNtf>(byteArr);
  388. var result = new RiskControlInvestorModel()
  389. {
  390. MsgContent = model.Content,
  391. };
  392. return result;
  393. }
  394. /// <summary>
  395. /// 会员风控通知
  396. /// </summary>
  397. /// <param name="data"></param>
  398. /// <returns></returns>
  399. public override RiskControlMemberModel RiskControlMemberReturnMessage(object data)
  400. {
  401. return null;
  402. //var byteArr = data as byte[];
  403. //if (byteArr == null)
  404. //{
  405. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  406. //}
  407. //var model = ProtoBufHelper.EntityDeSerialize<RiskControlMember>(byteArr);
  408. //var result = new RiskControlMemberModel()
  409. //{
  410. // RetCode = model.RetCode,
  411. // AccountId = model.AccountId,
  412. // Idate = model.Idate,
  413. // AccountStatus=model.AccountStatus,
  414. // AccountType=model.AccountType,
  415. // LoginCode=model.LoginCode,
  416. // MemberCode=model.MemberCode,
  417. // MemberName=model.MemberName,
  418. // ReceiverTypes=model.ReceiverTypes,
  419. // RiskLevel=model.RiskLevel,
  420. // MsgContent = model.MsgContent,
  421. //};
  422. //return result;
  423. }
  424. /// <summary>
  425. /// 通用通知
  426. /// </summary>
  427. /// <param name="data"></param>
  428. /// <returns></returns>
  429. public override CommonNotifyModel CommonNotifyReturnMessage(object data)
  430. {
  431. return null;
  432. //var byteArr = data as byte[];
  433. //if (byteArr == null)
  434. //{
  435. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  436. //}
  437. //var model = ProtoBufHelper.EntityDeSerialize<CommonNotify>(byteArr);
  438. //var result = new CommonNotifyModel()
  439. //{
  440. // RetCode = model.RetCode,
  441. // AccountId = model.AccountId,
  442. // Title = model.Title,
  443. // Content = model.Content,
  444. //};
  445. //return result;
  446. }
  447. public override ResponeEntity<Data.Model.Listing.ListingNoticeModel> ToListingNoticeModel(object responeData)
  448. {
  449. return null;
  450. //var buffer = responeData as byte[];
  451. //if (buffer == null)
  452. //{
  453. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  454. //}
  455. //var lintingNtf = ProtoBufHelper.EntityDeSerialize<ListingNtf>(buffer);
  456. //return new ResponeEntity<ListingNoticeModel>()
  457. //{
  458. // RetCode = lintingNtf.RetCode,
  459. // Entity = new ListingNoticeModel()
  460. // {
  461. // OrderID = lintingNtf.OrderID,
  462. // AccountID = lintingNtf.AccountID,
  463. // Direction = (Direction)lintingNtf.BuyOrSell,
  464. // GoodsID = lintingNtf.GoodsID,
  465. // MsgType = (ListingMsgType)lintingNtf.MsgType,
  466. // Price = Convert.ToDecimal(lintingNtf.Price),
  467. // OperatorID = lintingNtf.OperatorID,
  468. // RemainQty = (long)lintingNtf.RemainQty,
  469. // },
  470. //};
  471. }
  472. public override uint ToMessageHeadFunCode(object responeData)
  473. {
  474. var buffer = responeData as byte[];
  475. if (buffer == null)
  476. {
  477. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  478. }
  479. var messageHead = ProtoBufHelper.EntityDeSerialize<CommonPackage>(buffer);
  480. if (messageHead != null&& messageHead.Header!=null)
  481. {
  482. return messageHead.Header.FunCode;
  483. }
  484. return 0;
  485. }
  486. public override MarketStatusComplete ToMarketStatusRsp(object responeData)
  487. {
  488. return null;
  489. //var buffer = responeData as byte[];
  490. //if (buffer == null)
  491. //{
  492. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  493. //}
  494. //var marketComplete = new MarketStatusComplete(){RetCode = -1};
  495. //var mStatus = ProtoBufHelper.EntityDeSerialize<MarketStatusRsp>(buffer);
  496. //if (mStatus != null )
  497. //{
  498. // marketComplete.RetCode = mStatus.RetCode;
  499. // marketComplete.SignalType = mStatus.SignalType;
  500. // marketComplete.ObjectIds = mStatus.ObjectId;
  501. // marketComplete.ControlTime = mStatus.ControlTime;
  502. //}
  503. //return marketComplete;
  504. }
  505. public override string AccountChangeNotifyRspNotifyAd(object data)
  506. {
  507. return null;
  508. // var buffer = data as byte[];
  509. // if (buffer == null)
  510. // {
  511. // throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  512. // }
  513. // var mStatus = ProtoBufHelper.EntityDeSerialize<AccountChangeNotifyRsp>(buffer);
  514. // if (mStatus != null )
  515. // {
  516. // //marketComplete.RetCode = mStatus.RetCode;
  517. // //marketComplete.SignalType = mStatus.SignalType;
  518. // //marketComplete.ObjectIds = mStatus.ObjectId;
  519. // //marketComplete.ControlTime = mStatus.ControlTime;
  520. // }
  521. //// return marketComplete;
  522. // return mStatus.FunName;
  523. }
  524. public override ErrorEntity LogoutRspConvert(object data)
  525. {
  526. var byteArr = data as byte[];
  527. if (byteArr == null)
  528. {
  529. throw new Exception(System.Reflection.MethodBase.GetCurrentMethod().Name + "进行反序列化对象内容为空!");
  530. }
  531. var loginRsq = ProtoBufHelper.EntityDeSerialize<LoginRsp>(byteArr);
  532. var result = new ErrorEntity()
  533. {
  534. ReturnCode = loginRsq.RetCode,
  535. ReturnDesc = loginRsq.RetDesc,
  536. };
  537. return result;
  538. }
  539. }
  540. }