causeFlag
This commit is contained in:
@@ -142,6 +142,7 @@ func (c *StoreSkuController) GetVendorStoreSkusInfo() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int true 门店ID"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象"
|
||||
// @Param causeFlag formData int false "操作类型"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
@@ -151,7 +152,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, params.IsAsync, params.IsContinueWhenError)
|
||||
retVal, err = cms.UpdateStoreSku(params.Ctx, params.CauseFlag, params.StoreID, &skuBindInfo, params.IsAsync, params.IsContinueWhenError)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
@@ -162,6 +163,7 @@ func (c *StoreSkuController) UpdateStoreSku() {
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int true "门店ID"
|
||||
// @Param payload formData string true "json数据,StoreSkuBindInfo对象数组"
|
||||
// @Param causeFlag formData int false "操作类型"
|
||||
// @Param isContinueWhenError formData bool false "单个同步失败是否继续,缺省false"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
@@ -171,7 +173,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, params.IsAsync, params.IsContinueWhenError)
|
||||
retVal, err = cms.UpdateStoreSkus(params.Ctx, params.CauseFlag, params.StoreID, skuBindInfos, params.IsAsync, params.IsContinueWhenError)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
@@ -220,7 +222,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, params.IsScale, params.IsAsync, params.IsContinueWhenError)
|
||||
retVal, err = cms.UpdateStoresSkus(params.Ctx, params.CauseFlag, storeIDs, skuBindInfos, params.IsScale, params.IsAsync, params.IsContinueWhenError)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
@@ -245,23 +247,6 @@ func (c *StoreSkuController) UpdateStoresSkusByBind() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 修改门店SkuName价格
|
||||
// @Description 修改门店SkuName价格(支持活动中改价)
|
||||
// @Param token header string true "认证token"
|
||||
// @Param storeID formData int true "门店ID"
|
||||
// @Param nameID formData int true "SkuName ID"
|
||||
// @Param unitPrice formData int true "单价"
|
||||
// @Param isAsync formData bool false "是否异步操作"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateStoreSkuNamePrice [put]
|
||||
func (c *StoreSkuController) UpdateStoreSkuNamePrice() {
|
||||
c.callUpdateStoreSkuNamePrice(func(params *tStoreSkuUpdateStoreSkuNamePriceParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = cms.UpdateStoreSkuNamePrice(params.Ctx, params.StoreID, params.NameID, params.UnitPrice, params.IsAsync)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 拷贝门店SKU信息
|
||||
// @Description 拷贝门店SKU信息(此函数当前只是本地数据操作,要同步到远端需要调用SyncStoresSkus)
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
Reference in New Issue
Block a user