diff --git a/business/jxcallback/orderman/order_comment.go b/business/jxcallback/orderman/order_comment.go index 4faad5772..c149307e2 100644 --- a/business/jxcallback/orderman/order_comment.go +++ b/business/jxcallback/orderman/order_comment.go @@ -34,9 +34,9 @@ const ( ) type tReplyConfig struct { - delayGapBegin int `json:"delayGapBegin"` - delayGapEnd int `json:"delayGapEnd"` - comments []string `json:"comments"` + DelayGapBegin int `json:"delayGapBegin"` + DelayGapEnd int `json:"delayGapEnd"` + Comments []string `json:"comments"` } var ( @@ -187,12 +187,13 @@ func (c *OrderManager) replyOrderComment(vendorOrgCode string, orderComment *mod if configs, err := dao.QueryConfigs(dao.GetDB(), utils.Int2Str(score), model.ConfigTypeReply, ""); err == nil { json.Unmarshal([]byte(configs[0].Value), &config) } + globals.SugarLogger.Debugf("replyOrderComment config: %v", utils.Format4Output(config, true)) if config == nil { return } //config := replyConfig[score] - delaySeconds := config.delayGapBegin + rand.Intn(config.delayGapEnd-config.delayGapBegin) - content := config.comments[rand.Intn(len(config.comments))] + delaySeconds := config.DelayGapBegin + rand.Intn(config.DelayGapEnd-config.DelayGapBegin) + content := config.Comments[rand.Intn(len(config.Comments))] globals.SugarLogger.Debugf("replyOrderComment orderID:%s, delaySeconds:%d, content:%s", orderComment.VendorOrderID, delaySeconds, content) utils.AfterFuncWithRecover(time.Duration(delaySeconds)*time.Second, func() { if handler := partner.GetPurchaseOrderHandlerFromVendorID(orderComment.VendorID); handler != nil {