- create dada store when after jx store created.

This commit is contained in:
gazebo
2019-03-18 16:26:11 +08:00
parent cf2dc1be14
commit 6266315684
2 changed files with 9 additions and 8 deletions

View File

@@ -419,6 +419,7 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i
dao.WrapAddIDCULDEntity(store, userName)
store.ID = existingID
if err = dao.CreateEntity(nil, store); err == nil {
_, err = RefreshMissingDadaStores(ctx, store.ID, false, false)
return store.ID, err
}
return 0, err
@@ -475,9 +476,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
} else {
err = ErrCanNotFindVendor
}
if err == nil && vendorID == model.VendorIDJD {
_, err = RefreshMissingDadaStores(ctx, storeID, false, false)
}
return outStoreMap, err
}
@@ -748,7 +746,7 @@ func UpdateStoreCourierMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendo
func RefreshMissingDadaStores(ctx *jxcontext.Context, storeID int, isAsync, isContinueWhenError bool) (hint string, err error) {
db := dao.GetDB()
storeList, err := dao.GetMissingDadaStores(db, storeID)
storeList, err := dao.GetMissingDadaStores(db, storeID, false)
if err != nil {
return "", err
}