integrate-onpoint #54

Merged
sinhluu merged 15 commits from integrate-onpoint into master 2022-10-31 09:33:39 +00:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit ae36115495 - Show all commits

View File

@ -84,10 +84,11 @@ type WarehousePartner struct {
// SyncORStatusResponse ...
type SyncORStatusResponse struct {
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
Status string `json:"status"`
DeliveryStatus string `json:"deliveryStatus"`
ORCode string `json:"orCode"`
OrderCode string `json:"orderCode"`
Status string `json:"status"`
DeliveryStatus string `json:"deliveryStatus"`
Data OrderORData `json:"data"`
}
// ResponseWarehouseContact ...

View File

@ -40,6 +40,16 @@ func (sv Server) Subscribe(subject string, cb nats.MsgHandler) (*nats.Subscripti
return sub, nil
}
// QueueSubscribe ...
func (sv Server) QueueSubscribe(subject, queue string, cb nats.MsgHandler) (*nats.Subscription, error) {
sub, err := sv.instance.QueueSubscribe(subject, queue, cb)
if err != nil {
msg := fmt.Sprintf("[NATS SERVER] - queue subscribe subject %s, queue %s error: %s", subject, queue, err.Error())
return nil, errors.New(msg)
}
return sub, nil
}
// NewJSONEncodedConn ...
func (sv Server) NewJSONEncodedConn() (*JSONEncoder, error) {
enc, err := nats.NewEncodedConn(sv.instance, nats.JSON_ENCODER)