1
This commit is contained in:
@@ -34,18 +34,27 @@ const (
|
|||||||
// CopyOnStoreSkuToOther 将一个美团门店分类和商品复制到另一个门店
|
// CopyOnStoreSkuToOther 将一个美团门店分类和商品复制到另一个门店
|
||||||
func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromStoreId, toStoreId string, vendorId int, isAsync bool, offSet int, syncType int) ([]string, error) {
|
func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromStoreId, toStoreId string, vendorId int, isAsync bool, offSet int, syncType int) ([]string, error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
copySkuErr = make([]string, 0, 0)
|
copySkuErr = make([]string, 0, 0)
|
||||||
err error
|
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加载
|
// 门店api加载
|
||||||
toStore, err := dao.GetStoreDetailByVendorStoreID(db, toStoreId, vendorId, "")
|
toStore, err := dao.GetStoreDetailByVendorStoreID(db, toStoreId, toVendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
fromStore, err := dao.GetStoreDetailByVendorStoreID(db, fromStoreId, vendorId, "")
|
fromStore, err := dao.GetStoreDetailByVendorStoreID(db, fromStoreId, fromVendorID, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user