删除日志

This commit is contained in:
邹宗楠
2022-10-24 11:22:38 +08:00
parent 5a47102894
commit 5d6a5a3226
139 changed files with 17 additions and 787 deletions

View File

@@ -71,10 +71,8 @@ var (
)
func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (err error) {
globals.SugarLogger.Debug("OnOrderComments")
db := dao.GetDB()
for _, orderComment := range orderCommentList {
globals.SugarLogger.Debugf("OnOrderComments, orderID:%s", orderComment.VendorOrderID)
comment2 := &legacymodel.JxBadComments{
OrderId: orderComment.VendorOrderID,
}
@@ -169,7 +167,6 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
}
}
if err != nil {
globals.SugarLogger.Warnf("OnOrderComments orderID:%s failed with error:%v", orderComment.VendorOrderID, err)
break
}
}
@@ -187,14 +184,12 @@ 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))]
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 {
if err = handler.ReplyOrderComment(jxcontext.AdminCtx, vendorOrgCode, orderComment, content); err != nil {