zhangzengfei
2023-09-11 1873461012c99801f364bd07fae2c218d245048e
config/config.go
@@ -15,9 +15,16 @@
   SqlUsername    string `json:"sql_username"`    // 数据库用户
   SqlPassword    string `json:"sql_password"`    // 数据库密码
   NsqServer      string `json:"nsq_server"`      // nsq TCP服务端地址
   NsqWebApi      string `json:"nsq_server"`      // nsq HTTP接口地址
   NsqWebApi      string `json:"nsq_webapi"`      // nsq HTTP接口地址
   OrderTopic     string `json:"order_topic"`     // 订单上报的topic
   BomTopic       string `json:"bom_topic"`       // bom上报的topic
   BomQueryTopic  string `json:"bom_query_topic"` // bom上报的topic
   InventoryTopic string `json:"inventory_topic"` // 库存上报的topic
   SqlQueryTopic  string `json:"query_topic"`     // 金蝶查询接口的topic
   SqlReplyTopic  string `json:"reply_topic"`     // 金蝶响应查询接口的topic
   CSTWebApi      string `json:"cst_webapi"`      // 生产任务单提交地址
   CSTQueryTopic  string `json:"cst_query_topic"` // 提交生产任务单主题
   CSTReplyTopic  string `json:"cst_reply_topic"` // 响应生产任务单主题
   SyncInterval   int    `json:"interval"`        // 同步的时间间隔, 单位/秒
}
@@ -33,8 +40,15 @@
   Options.SqlPassword = "123456"
   Options.NsqServer = "fai365.com:4150"
   Options.NsqWebApi = "http://121.31.232.83:9080/api/nsq/pub?topic=your_topic"
   Options.OrderTopic = "/province/city/factoryNo/kingdee_seOrder"
   Options.InventoryTopic = "/province/city/factoryNo/kingdee_inventory"
   Options.OrderTopic = "aps.factory.erp.seorder"
   Options.BomTopic = "aps.factory.erp.icBom"
   Options.BomQueryTopic = "aps.factory.erp.icBomQuery"
   Options.InventoryTopic = "aps.factory.erp.inventory"
   Options.SqlQueryTopic = "aps.factory.erp.k3resource"
   Options.SqlReplyTopic = "aps.factory.erp.k3reply"
   Options.CSTWebApi = "http://localhost/cst/local_post.ashx"
   Options.CSTQueryTopic = "aps.factory.erp.cstApply"
   Options.CSTReplyTopic = "aps.factory.erp.cstReply"
   Options.SyncInterval = 60
}
@@ -49,8 +63,6 @@
      fd := json.NewDecoder(file)
      fd.Decode(&Options)
      fmt.Printf("%v\n", Options)
   }
}