bugfix: 字符串替换错误

feature-flyModify
陈伟 2025-06-20 15:58:52 +08:00
parent 74e34e7918
commit f66278375a
1 changed files with 4 additions and 3 deletions

View File

@ -41,6 +41,7 @@ public class ConfigSubscribe : IJob
await Subscribe(); await Subscribe();
} }
// todo 暂时不使用
public static readonly string[] TopicList = public static readonly string[] TopicList =
{ {
"thing/product/**/osd", "thing/product/**/osd",
@ -68,7 +69,7 @@ public class ConfigSubscribe : IJob
sys/product/{gateway_sn}/status 线 sys/product/{gateway_sn}/status 线
thing/product/{gateway_sn}/property/set_reply thing/product/{gateway_sn}/property/set_reply
thing/product/{gateway_sn}/drc/up DRC */ thing/product/{gateway_sn}/drc/up DRC */
var tempStr = sn.Replace("sn", "*"); var tempStr = topic.Replace(sn, "*");
Console.WriteLine($"成功调用主题 [{topic}] 的消息: {message}"); Console.WriteLine($"成功调用主题 [{topic}] 的消息: {message}");
// 主题方法 // 主题方法
var result = JsonConvert.DeserializeObject<TopicServicesRequest<dynamic>>(message); var result = JsonConvert.DeserializeObject<TopicServicesRequest<dynamic>>(message);
@ -80,8 +81,8 @@ public class ConfigSubscribe : IJob
// todo // todo
// 任务资源处理 // 任务资源处理
// 航线进度处理 // 航线进度处理
// 任务取消 // 任务取消 thing/product/*/services_reply
case "thing/product/**/services_reply": case "thing/product/*/services_reply":
switch (method) switch (method)
{ {