保留isSync,不允许改为0

This commit is contained in:
gazebo
2020-02-04 10:19:06 +08:00
committed by 苏尹岚
parent 71638faaab
commit 37d6458cb8

View File

@@ -698,10 +698,6 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
if payload["autoEnableAt"] != nil {
payload["autoEnableAt"] = utils.Time2Date(utils.Str2Time(utils.Interface2String(payload["autoEnableAt"])))
}
// 暂时不开放isSync
if payload["isSync"] != nil {
delete(payload, "isSync")
}
valid := dao.StrictMakeMapByStructObject2(payload, store, &outStore, userName)
if err = checkStoreDeliveryRange(utils.Interface2String(valid["deliveryRange"])); err != nil {
return 0, err
@@ -1077,7 +1073,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
storeMap.Status = model.StoreStatusOpened
storeMap.DeliveryType = model.StoreDeliveryTypeByStore
storeMap.SyncStatus = 0
storeMap.IsSync = 1 // 暂时禁用isSync
if vendorID != model.VendorIDJX {
if storeMap.VendorOrgCode == "" {
return nil, fmt.Errorf("必须指定平台分账号信息")
@@ -1171,6 +1166,10 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
return 0, ErrCanNotFindVendor
}
}
// 暂时不开放isSync
if payload["isSync"] != nil {
payload["isSync"] = 1
}
if db == nil {
db = dao.GetDB()
}