1
This commit is contained in:
@@ -77,7 +77,6 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
OrderId: orderComment.VendorOrderID,
|
OrderId: orderComment.VendorOrderID,
|
||||||
}
|
}
|
||||||
err = dao.GetEntity(db, comment2, "OrderId")
|
err = dao.GetEntity(db, comment2, "OrderId")
|
||||||
globals.SugarLogger.Debugf("==============comment2 := %s", utils.Format4Output(comment2, false))
|
|
||||||
if err == nil || dao.IsNoRowsError(err) {
|
if err == nil || dao.IsNoRowsError(err) {
|
||||||
isNewComment := false
|
isNewComment := false
|
||||||
if dao.IsNoRowsError(err) {
|
if dao.IsNoRowsError(err) {
|
||||||
@@ -171,23 +170,20 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if err == nil {
|
if err == nil {
|
||||||
// if isNewComment {
|
if isNewComment {
|
||||||
// err = dao.CreateEntity(db, comment2)
|
err = dao.CreateEntity(db, comment2)
|
||||||
// } else if comment2 != nil {
|
} else if comment2 != nil {
|
||||||
// _, err = dao.UpdateEntity(db, comment2)
|
_, err = dao.UpdateEntity(db, comment2)
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
}
|
} else {
|
||||||
if err == nil {
|
if orderComment.VendorOrderID2 != "" {
|
||||||
if isNewComment {
|
comment2.VendorOrderId = orderComment.VendorOrderID2
|
||||||
err = dao.CreateEntity(db, comment2)
|
|
||||||
} else if comment2 != nil {
|
|
||||||
_, err = dao.UpdateEntity(db, comment2)
|
_, err = dao.UpdateEntity(db, comment2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
globals.SugarLogger.Debugf("=comment2Update========== %s", utils.Format4Output(comment2, false))
|
|
||||||
comment2.VendorOrderId = orderComment.VendorOrderID2
|
comment2.VendorOrderId = orderComment.VendorOrderID2
|
||||||
_, err = dao.UpdateEntity(db, comment2, "VendorOrderId")
|
_, err = dao.UpdateEntity(db, comment2, "VendorOrderId")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user