1
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
// CopyOnStoreSkuToOther 将一个美团门店分类和商品复制到另一个门店
|
||||
func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId int, isAsync bool) (hint string, err error) {
|
||||
func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId int, isAsync bool, offSet int) (hint string, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
@@ -76,7 +76,7 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
|
||||
//}
|
||||
|
||||
case 3:
|
||||
i := 3
|
||||
i := offSet
|
||||
for {
|
||||
// 同步商品
|
||||
fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i)
|
||||
|
||||
@@ -1051,12 +1051,13 @@ func (c *StoreSkuController) CopyMtToJd() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param fromStoreID formData string true "被复制门店id"
|
||||
// @Param toStoreID formData string true "复制到门店id"
|
||||
// @Param offSet formData int true "跳过页码"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CopyMtToMt [post]
|
||||
func (c *StoreSkuController) CopyMtToMt() {
|
||||
c.callCopyMtToMt(func(params *tStoreSkuCopyMtToMtParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.CopyOnStoreSkuToOther(params.Ctx, utils.Str2Int(params.FromStoreID), utils.Str2Int(params.ToStoreID), false)
|
||||
retVal, err = cms.CopyOnStoreSkuToOther(params.Ctx, utils.Str2Int(params.FromStoreID), utils.Str2Int(params.ToStoreID), false, params.OffSet)
|
||||
return retVal, errCode, err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user