1
This commit is contained in:
@@ -1838,6 +1838,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
|
||||
// 增加门店地址修改同步
|
||||
storeDetail, err := dao.GetStoreBaseByVendorStoreID(storeMap.VendorStoreID, storeMap.VendorID)
|
||||
address := ""
|
||||
if err != nil || storeDetail == nil {
|
||||
return 0, fmt.Errorf("基础门店信息异常,请联系管理员")
|
||||
}
|
||||
@@ -1848,6 +1849,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
// 添加同步
|
||||
valid["address"] = payload["address"].(string)
|
||||
syncStatus |= model.SyncFlagStoreName
|
||||
address = payload["address"].(string)
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
@@ -1860,6 +1862,9 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
}
|
||||
}()
|
||||
|
||||
if address != "" {
|
||||
delete(valid, "address")
|
||||
}
|
||||
// storeMap 不包含address参数
|
||||
if isStoreMapNeedSync(vendorID, valid) { // 对于store vendor map,只有Status改变才需要同步到厂商
|
||||
num, err = dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, storeMap, valid, userName, map[string]interface{}{
|
||||
@@ -1904,7 +1909,7 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor
|
||||
}
|
||||
dao.Commit(db, txDB)
|
||||
|
||||
if isStoreMapNeedSync(vendorID, valid) || valid["address"] != nil {
|
||||
if isStoreMapNeedSync(vendorID, valid) || address != "" {
|
||||
_, err = CurVendorSync.SyncStore(ctx, db, vendorID, storeID, false, userName)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user