Browse Source

Z991239-3624 #comment 解决坐席信息存在乱码问题

80274480 3 năm trước cách đây
mục cha
commit
fc843d4207
1 tập tin đã thay đổi với 28 bổ sung1 xóa
  1. 28 1
      Module/mod_countercontext/mod_countercontext.cpp

+ 28 - 1
Module/mod_countercontext/mod_countercontext.cpp

@@ -126,8 +126,35 @@ public:
 			CounterBasicInfo evt;
 			SpBuffer buf;
 			buf.OpenRead(buffer, size);
-			evt.Serialize(buf);
+
+			CSimpleString16Bit name16;
+			buf& name16;
+			evt.name = CSimpleString16Bit2A(name16);
+
+			CSimpleString16Bit workNumber16;
+			buf& workNumber16;
+			evt.workNumber = CSimpleString16Bit2A(workNumber16);
+
+			CSimpleString16Bit callid16;
+			buf& callid16;
+			evt.callid = CSimpleString16Bit2A(callid16);
+
+			CSimpleString16Bit skillCode16;
+			buf& skillCode16;
+			evt.skillCode = CSimpleString16Bit2A(skillCode16);
+
+			CSimpleString16Bit skillDesc16;
+			buf& skillDesc16;
+			evt.skillDesc = CSimpleString16Bit2A(skillDesc16);
+
+			CSimpleString16Bit level16;
+			buf& level16;
+			evt.level = CSimpleString16Bit2A(level16);
+
+			//evt.Serialize(buf);
 			SpSendBroadcast(GetFunction(), SP_MSG_OF(CounterBasicInfo), SP_MSG_SIG_OF(CounterBasicInfo), evt);
+			Dbg("SpSendBroadcast CounterBasicInfo and callid = %s, name = %s, workNumber = %s, level = %s, skillCode = %s, skillDesc = %s.", evt.callid.GetData(), evt.name.GetData(), evt.workNumber.GetData(), evt.level.GetData(), evt.skillCode.GetData(), evt.skillDesc.GetData());
+
 		} else {
 			LOG_TRACE("unknown sub_type %d from agent!", sub_type);
 		}