1
This commit is contained in:
@@ -46,7 +46,6 @@ 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))
|
||||
@@ -55,8 +54,6 @@ func UpdateEntityByKV(db *DaoDB, item interface{}, kvs map[string]interface{}, c
|
||||
qs = qs.Filter(k, v)
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("==========kvs := %s", utils.Format4Output(kvs, false))
|
||||
globals.SugarLogger.Debugf("==========kvsv := %v", utils.Format4Output(refutil.GetObjFieldByName(item, model.FieldID), false))
|
||||
num, err = qs.Update(kvs)
|
||||
if err != nil && !IsDuplicateError(err) {
|
||||
globals.SugarLogger.Errorf("UpdateEntityByKV %s failed with error:%v", reflect.TypeOf(item).Name(), err)
|
||||
@@ -135,7 +132,6 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user