1
This commit is contained in:
@@ -249,6 +249,7 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
|
||||
db2 = dao.GetDB()
|
||||
}
|
||||
if model.IsSyncStatusNew(storeMap.SyncStatus) {
|
||||
globals.SugarLogger.Debugf("1.IsSyncStatusNew(storeMap.SyncStatus)")
|
||||
storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, storeMap.VendorID, storeMap.VendorOrgCode)
|
||||
if vendorStoreID, err = handler.CreateStore2(db2, storeMap.StoreID, userName, nil, storeDetail); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
@@ -256,12 +257,14 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
|
||||
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "创建门店")
|
||||
}
|
||||
} else if model.IsSyncStatusDelete(storeMap.SyncStatus) {
|
||||
globals.SugarLogger.Debugf("2.IsSyncStatusDelete(storeMap.SyncStatus)")
|
||||
if err = handler.DeleteStore(db2, storeMap.StoreID, userName); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
} else {
|
||||
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "删除门店")
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("3.UpdateStore")
|
||||
if err = handler.UpdateStore(db2, storeMap.StoreID, userName); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user