This commit is contained in:
邹宗楠
2024-09-13 10:13:15 +08:00
parent fb355b892b
commit 6532479b1a
7 changed files with 253 additions and 11 deletions

View File

@@ -171,6 +171,9 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
}
if err == nil {
if comment2.OrderFlag == "1" {
globals.SugarLogger.Debugf("---------------comment2-isNewComment :%s", utils.Format4Output(comment2, false))
}
if isNewComment {
err = dao.CreateEntity(db, comment2)
} else if comment2 != nil {
@@ -178,12 +181,18 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
}
}
} else {
if comment2.OrderFlag == "1" {
globals.SugarLogger.Debugf("---------------comment2-UpdateEntity :%s", utils.Format4Output(comment2, false))
}
if orderComment.VendorOrderID2 != "" {
comment2.VendorOrderId = orderComment.VendorOrderID2
_, err = dao.UpdateEntity(db, comment2)
}
}
} else {
if comment2.OrderFlag == "1" {
globals.SugarLogger.Debugf("---------------comment2-UpdateEntity2 :%s", utils.Format4Output(comment2, false))
}
comment2.VendorOrderId = orderComment.VendorOrderID2
_, err = dao.UpdateEntity(db, comment2, "VendorOrderId")
}