- add param isAsync and isContinueWhenError for update store sku serial apis
This commit is contained in:
@@ -55,6 +55,8 @@ func (c *StoreSkuController) GetStoreSkus() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int true 门店ID"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoreSku [put]
|
||||
@@ -62,7 +64,7 @@ func (c *StoreSkuController) UpdateStoreSku() {
|
||||
c.callUpdateStoreSku(func(params *tStoreSkuUpdateStoreSkuParams) (retVal interface{}, errCode string, err error) {
|
||||
var skuBindInfo cms.StoreSkuBindInfo
|
||||
if err = jxutils.Strings2Objs(params.Payload, &skuBindInfo); err == nil {
|
||||
retVal, err = cms.UpdateStoreSku(params.Ctx, params.StoreID, &skuBindInfo)
|
||||
retVal, err = cms.UpdateStoreSku(params.Ctx, params.StoreID, &skuBindInfo, params.IsAsync, params.IsContinueWhenError)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
@@ -73,6 +75,8 @@ func (c *StoreSkuController) UpdateStoreSku() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int true "门店ID"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象数组"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoreSkus [put]
|
||||
@@ -80,7 +84,7 @@ func (c *StoreSkuController) UpdateStoreSkus() {
|
||||
c.callUpdateStoreSkus(func(params *tStoreSkuUpdateStoreSkusParams) (retVal interface{}, errCode string, err error) {
|
||||
var skuBindInfos []*cms.StoreSkuBindInfo
|
||||
if err = jxutils.Strings2Objs(params.Payload, &skuBindInfos); err == nil {
|
||||
retVal, err = cms.UpdateStoreSkus(params.Ctx, params.StoreID, skuBindInfos)
|
||||
retVal, err = cms.UpdateStoreSkus(params.Ctx, params.StoreID, skuBindInfos, params.IsAsync, params.IsContinueWhenError)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
@@ -114,6 +118,8 @@ func (c *StoreSkuController) SyncStoresSkus() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs formData string true "门店ID列表"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象数组"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoresSkus [put]
|
||||
@@ -124,7 +130,7 @@ func (c *StoreSkuController) UpdateStoresSkus() {
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.Payload, &skuBindInfos); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.UpdateStoresSkus(params.Ctx, storeIDs, skuBindInfos)
|
||||
retVal, err = cms.UpdateStoresSkus(params.Ctx, storeIDs, skuBindInfos, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
@@ -153,6 +159,8 @@ func (c *StoreSkuController) CopyStoreSkus() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeIDs formData string true "门店ID列表"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindSkuInfo对象数组"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoresSkusSale [put]
|
||||
@@ -163,7 +171,7 @@ func (c *StoreSkuController) UpdateStoresSkusSale() {
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs, params.Payload, &skuBindSkuInfos); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
retVal, err = cms.UpdateStoresSkusSale(params.Ctx, storeIDs, skuBindSkuInfos, params.Ctx.GetUserName())
|
||||
retVal, err = cms.UpdateStoresSkusSale(params.Ctx, storeIDs, skuBindSkuInfos, params.Ctx.GetUserName(), params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user