- create dada store when after jx store created.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user