using SuperSocket.SocketBase.Command; using SuperSocket.SocketBase.Protocol; using System; using WX.CRM.Common; using WX.CRM.DataSynServer.Application; using WX.CRM.DataSynServer.Domain; namespace WX.CRM.DataSynServer.Socket.Command { public class ClientSend : CommandBase { public override void ExecuteCommand(ZxSession session, StringRequestInfo requestInfo) { try { var body = requestInfo.Body; if (string.IsNullOrEmpty(body)) return; var info = body.ToObject(); var model = new SYNC_RECEIVE(info.jsontext, info.bidatatype, info.deptcode); new SyncReceiveService().Insert(model); //服务端数据接收成功,发送确认消息 session.SendMessage("ClientSendInfo", info); LogHelper.Info("服务端接收到数据:" + info.ToJson()); } catch (Exception ex) { LogHelper.Error("服务端接收数据错误:" + ex.ToString()); } } } }