This commit is contained in:
邹宗楠
2024-08-05 11:27:32 +08:00
parent 892d4f91e3
commit 7c2fa74d2d
2 changed files with 18 additions and 7 deletions

View File

@@ -171,12 +171,19 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
//}
}
if err == nil {
if isNewComment {
err = dao.CreateEntity(db, comment2)
} else if comment2 != nil {
_, err = dao.UpdateEntity(db, comment2)
}
//if err == nil {
// if isNewComment {
// err = dao.CreateEntity(db, comment2)
// } else if comment2 != nil {
// _, err = dao.UpdateEntity(db, comment2)
// }
//}
}
if err == nil {
if isNewComment {
err = dao.CreateEntity(db, comment2)
} else if comment2 != nil {
_, err = dao.UpdateEntity(db, comment2)
}
}
} else {

View File

@@ -38,7 +38,11 @@ func GetBadCommentOrderId(jxStoreId int, startTime, endTime time.Time, foodNameL
vendorOrderIdList = append(vendorOrderIdList, v.VendorOrderId)
}
}
globals.SugarLogger.Debugf("====vendorOrderIdList := %s", utils.Format4Output(vendorOrderIdList, false))
if len(vendorOrderIdList) == 0 {
globals.SugarLogger.Debugf("commentOrder name list := %s", utils.Format4Output(commentOrder, false))
globals.SugarLogger.Debugf("foodNameList name list := %s", utils.Format4Output(foodNameList, false))
globals.SugarLogger.Debugf("jxStoreId name list := %s", utils.Format4Output(jxStoreId, false))
}
sql2 := `SELECT * FROM order_sku_financial WHERE vendor_order_id = ? AND is_afs_order = 0 AND vendor_id = 1 `
mathProbability := make(map[string]float64, 0)