1
This commit is contained in:
@@ -1145,7 +1145,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
}, model.FieldSyncStatus, syncStatus)
|
||||
if err = err2; err == nil {
|
||||
dao.Commit(db, txDB)
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, -1, store.ID, false, userName)
|
||||
//_, err = CurVendorSync.SyncStore(ctx, db, -1, store.ID, false, userName)
|
||||
if valid["tel1"] != nil || valid["tel2"] != nil {
|
||||
TryAddStoreBossRole4StoreByMobile(ctx, store.ID, []string{utils.Interface2String(valid["tel1"]), utils.Interface2String(valid["tel2"])})
|
||||
}
|
||||
@@ -1170,9 +1170,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("UpdateStore track:%s, store:%s", ctx.GetTrackInfo(), utils.Format4Output(store, true))
|
||||
}
|
||||
if status == -2 {
|
||||
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
|
||||
@@ -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