1
This commit is contained in:
@@ -909,7 +909,6 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
payload["autoEnableAt"] = utils.Time2Date(utils.Str2Time(utils.Interface2String(payload["autoEnableAt"])))
|
||||
}
|
||||
valid := dao.StrictMakeMapByStructObject2(payload, store, &outStore, userName)
|
||||
globals.SugarLogger.Debugf("==================1 valid := %s", utils.Format4Output(valid, false))
|
||||
if err = checkStoreDeliveryRange(utils.Interface2String(valid["deliveryRange"])); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -1114,7 +1113,6 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
}
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("valid =======: %s", utils.Format4Output(valid, false))
|
||||
if len(valid) > 0 {
|
||||
if globals.IsAddEvent {
|
||||
mapBefore := refutil.FindMapAndStructMixed(valid, beforStore)
|
||||
@@ -1126,7 +1124,6 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
}()
|
||||
|
||||
num, err = dao.UpdateEntityLogically(db, store, valid, userName, nil)
|
||||
globals.SugarLogger.Debugf("=======num := %s err = %v", utils.Format4Output(num, false), err)
|
||||
if err == nil && num == 1 {
|
||||
if isUpdateStoreNeedSync(valid) {
|
||||
dummy := &model.StoreMap{}
|
||||
@@ -1139,12 +1136,10 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
_, err2 := dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, dummy, kv, userName, map[string]interface{}{
|
||||
model.FieldStoreID: store.ID,
|
||||
}, model.FieldSyncStatus, syncStatus)
|
||||
globals.SugarLogger.Debugf("=======UpdateEntityLogicallyAndUpdateSyncStatus := %s err = %s", utils.Format4Output(err2, false), utils.Format4Output(err, false))
|
||||
if err = err2; err == nil {
|
||||
dao.Commit(db, txDB)
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, -1, store.ID, false, userName)
|
||||
if valid["tel1"] != nil || valid["tel2"] != nil {
|
||||
globals.SugarLogger.Debugf("store_detail := %s", utils.Format4Output(store, false))
|
||||
TryAddStoreBossRole4StoreByMobile(ctx, store.ID, []string{utils.Interface2String(valid["tel1"]), utils.Interface2String(valid["tel2"])})
|
||||
}
|
||||
if syncStatus&model.SyncFlagStoreAddress != 0 || valid["tel1"] != nil || valid["payeeName"] != nil {
|
||||
|
||||
Reference in New Issue
Block a user