This commit is contained in:
邹宗楠
2024-02-18 14:08:52 +08:00
parent 0a4aa73983
commit c7ed30ee86

View File

@@ -46,6 +46,7 @@ func UpdateEntityByKV(db *DaoDB, item interface{}, kvs map[string]interface{}, c
if db == nil {
db = GetDB()
}
globals.SugarLogger.Debugf("item==============%s", utils.Format4Output(item, false))
qs := db.Db.QueryTable(item)
if conditions == nil {
qs = qs.Filter(model.FieldID, refutil.GetObjFieldByName(item, model.FieldID))
@@ -134,6 +135,7 @@ func UpdateEntityLogicallyAndUpdateSyncStatus(db *DaoDB, item interface{}, kvs m
rows := valueRows.Interface()
if err = GetEntitiesByKV(db, rows, conditions, false); err == nil {
valueRows = reflect.Indirect(valueRows)
globals.SugarLogger.Debugf("valueRows =========== := %s", utils.Format4Output(valueRows, false))
for i := 0; i < valueRows.Len(); i++ {
value := reflect.Indirect(valueRows.Index(i))
status := value.FieldByName(syncStatusFieldName).Int() | int64(valueMask)