// DealerReceive数据处理 private void HandleKeyData_DealerReceive(string cmdText, string actionJsonResult) { //if (PublicData.ServerParameter == null || PublicData.ServerParameter.IsEmpty()) //{ // MessageBoxEx.Alert($"服务器参数获取失败,无法处理{cmdText}方法"); // return; //} if (cmdText == "PushCollectCompleted") //扫水结果 { //解析扫水结果 CollectResult collectResult = JsonUtil.Deserialize <CollectResult>(actionJsonResult); CollectResultEvent?.Invoke(collectResult); } else if (cmdText == "PushAddBetCompleted") //下注结果 { //解析下注结果 BetContentResult betContentResult = JsonUtil.Deserialize <BetContentResult>(actionJsonResult); BetContentEvent?.Invoke(betContentResult); } else if (cmdText == "PushDeleteBetResult") //退码结果 { //解析下注结果 DeleteBetContentResult betContentResult = JsonUtil.Deserialize <DeleteBetContentResult>(actionJsonResult); DeletedBetContentEvent?.Invoke(betContentResult); } else { LogUtil.Error($"未处理的DealerReceive消息:cmd:{cmdText}; json:{actionJsonResult}"); } }
/// <summary> /// 转发下注命令到出货客户端 /// </summary> /// <param name="sessionId">下注端ID</param> /// <param name="betContent">下注结果信息</param> /// <returns></returns> public static MQActionVoidResult DeleteBetResult(string sessionId, DeleteBetContentResult betContent) { var session = SessionPool.GetClientsGroup(ClientTypeEnum.Strategy); if (session != null) { foreach (var item in session) { MQRouterSendQueue.PushDeleteBetResult(item.Key, betContent); } return(new MQActionVoidResult() { IsOK = true }); } else { return(new MQActionVoidResult() { IsOK = false, ErrorMsg = "未找到下注客户端" }); } }
/// <summary> /// 退单结果事件处理 /// </summary> /// <param name="content"></param> private void DeletedBetContentEvent(DeleteBetContentResult content) { //处理退单结果 }