This commit is contained in:
邹宗楠
2026-03-25 09:45:02 +08:00
parent 6f938bf0dc
commit 653c903408

View File

@@ -34,18 +34,27 @@ const (
// CopyOnStoreSkuToOther 将一个美团门店分类和商品复制到另一个门店
func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromStoreId, toStoreId string, vendorId int, isAsync bool, offSet int, syncType int) ([]string, error) {
var (
db = dao.GetDB()
copySkuErr = make([]string, 0, 0)
err error
db = dao.GetDB()
copySkuErr = make([]string, 0, 0)
err error
fromVendorID = 0
toVendorID = 0
)
if vendorId > 10 {
fromVendorID = utils.Str2Int(string(utils.Int2Str(vendorId)[0]))
toVendorID = utils.Str2Int(string(utils.Int2Str(vendorId)[1:]))
} else {
fromVendorID = vendorId
toVendorID = vendorId
}
// 门店api加载
toStore, err := dao.GetStoreDetailByVendorStoreID(db, toStoreId, vendorId, "")
toStore, err := dao.GetStoreDetailByVendorStoreID(db, toStoreId, toVendorID, "")
if err != nil {
return nil, err
}
fromStore, err := dao.GetStoreDetailByVendorStoreID(db, fromStoreId, vendorId, "")
fromStore, err := dao.GetStoreDetailByVendorStoreID(db, fromStoreId, fromVendorID, "")
if err != nil {
return nil, err
}