This commit is contained in:
suyl
2021-05-26 14:56:31 +08:00
parent 166a8ca76b
commit 99d0f32a7e
2 changed files with 10 additions and 6 deletions

View File

@@ -362,6 +362,10 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
_, err = dao.UpdateEntity(db, storeMap, "VendorStoreID")
}
}
if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 {
mergedStoreStatus := jxutils.MergeStoreStatus(storeDetail.Status, storeDetail.VendorStatus)
p.UpdateStoreStatus(jxcontext.AdminCtx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, mergedStoreStatus)
}
return vendorStoreID, err
}
@@ -387,6 +391,7 @@ func (p *PurchaseHandler) EnableAutoAcceptOrder(ctx *jxcontext.Context, vendorOr
}
func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, status int) (err error) {
err = api.JdShopAPI.UpdateStatus(utils.Str2Int(vendorStoreID), jxStatus2JdsStatus(status))
return err
}