aa
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user