package ability587

import (
	"errors"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk"
	request2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/request"
	response2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/response"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
	"log"
)

type Ability587 struct {
	Client *topsdk.TopClient
}

func NewAbility587(client *topsdk.TopClient) *Ability587 {
	return &Ability587{client}
}

/*
   查询盒马帮档期活动详情
*/
func (ability *Ability587) AlibabaPricePromotionActivityQuery(req *request2.AlibabaPricePromotionActivityQueryRequest) (*response2.AlibabaPricePromotionActivityQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.price.promotion.activity.query", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaPricePromotionActivityQueryResponse{}
	if err != nil {
		log.Println("alibabaPricePromotionActivityQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店查询接口
*/
func (ability *Ability587) AlibabaWdkShopQuery(req *request2.AlibabaWdkShopQueryRequest, session string) (*response2.AlibabaWdkShopQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.shop.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkShopQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkShopQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   查询商品当前价格
*/
func (ability *Ability587) AlibabaWdkItemCurrentpriceQuery(req *request2.AlibabaWdkItemCurrentpriceQueryRequest, session string) (*response2.AlibabaWdkItemCurrentpriceQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.currentprice.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemCurrentpriceQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemCurrentpriceQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   单个商品未来价查询接口
*/
func (ability *Ability587) AlibabaWdkItemFuturepriceQuery(req *request2.AlibabaWdkItemFuturepriceQueryRequest, session string) (*response2.AlibabaWdkItemFuturepriceQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.futureprice.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemFuturepriceQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemFuturepriceQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家类目删除接口
*/
func (ability *Ability587) AlibabaWdkSkuCategoryDelete(req *request2.AlibabaWdkSkuCategoryDeleteRequest, session string) (*response2.AlibabaWdkSkuCategoryDeleteResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.category.delete", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuCategoryDeleteResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuCategoryDelete error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   按照价格变更时间段，查询会变更价格的单据的商品
*/
func (ability *Ability587) AlibabaWdkItemChangepriceQuery(req *request2.AlibabaWdkItemChangepriceQueryRequest, session string) (*response2.AlibabaWdkItemChangepriceQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.changeprice.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemChangepriceQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemChangepriceQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家类目修改接口
*/
func (ability *Ability587) AlibabaWdkSkuCategoryUpdate(req *request2.AlibabaWdkSkuCategoryUpdateRequest, session string) (*response2.AlibabaWdkSkuCategoryUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.category.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuCategoryUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuCategoryUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家类目新增接口
*/
func (ability *Ability587) AlibabaWdkSkuCategoryAdd(req *request2.AlibabaWdkSkuCategoryAddRequest, session string) (*response2.AlibabaWdkSkuCategoryAddResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.category.add", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuCategoryAddResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuCategoryAdd error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   修改类目
*/
func (ability *Ability587) AlibabaWdkItemCategoryUpdate(req *request2.AlibabaWdkItemCategoryUpdateRequest, session string) (*response2.AlibabaWdkItemCategoryUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.category.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemCategoryUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemCategoryUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家商品批量查询接口
*/
func (ability *Ability587) AlibabaWdkSkuMerchantskuScrollQuery(req *request2.AlibabaWdkSkuMerchantskuScrollQueryRequest, session string) (*response2.AlibabaWdkSkuMerchantskuScrollQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.merchantsku.scroll.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuMerchantskuScrollQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuMerchantskuScrollQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店商品批量查询接口
*/
func (ability *Ability587) AlibabaWdkSkuStoreskuScrollQuery(req *request2.AlibabaWdkSkuStoreskuScrollQueryRequest, session string) (*response2.AlibabaWdkSkuStoreskuScrollQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.storesku.scroll.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuStoreskuScrollQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuStoreskuScrollQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商品条码查询接口
*/
func (ability *Ability587) AlibabaWdkSkuBarcodeQuery(req *request2.AlibabaWdkSkuBarcodeQueryRequest, session string) (*response2.AlibabaWdkSkuBarcodeQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.barcode.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuBarcodeQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuBarcodeQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   修改门店商品状态
*/
func (ability *Ability587) AlibabaWdkItemStoreskustatusUpdate(req *request2.AlibabaWdkItemStoreskustatusUpdateRequest, session string) (*response2.AlibabaWdkItemStoreskustatusUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.storeskustatus.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemStoreskustatusUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemStoreskustatusUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商品标记接口
*/
func (ability *Ability587) AlibabaWdkSkuFeature(req *request2.AlibabaWdkSkuFeatureRequest, session string) (*response2.AlibabaWdkSkuFeatureResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.feature", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuFeatureResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuFeature error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   五道口商品中心门店商品修改
*/
func (ability *Ability587) AlibabaWdkItemStoreskuUpdate(req *request2.AlibabaWdkItemStoreskuUpdateRequest) (*response2.AlibabaWdkItemStoreskuUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.item.storesku.update", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkItemStoreskuUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemStoreskuUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   五道口商品中心价格修改
*/
func (ability *Ability587) AlibabaWdkItemPriceUpdate(req *request2.AlibabaWdkItemPriceUpdateRequest) (*response2.AlibabaWdkItemPriceUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.item.price.update", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkItemPriceUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemPriceUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商品一品多码维护操作
*/
func (ability *Ability587) AlibabaWdkItemMorebarcodeOps(req *request2.AlibabaWdkItemMorebarcodeOpsRequest, session string) (*response2.AlibabaWdkItemMorebarcodeOpsResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.morebarcode.ops", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMorebarcodeOpsResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMorebarcodeOps error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   查询商品的商家叶子类目
*/
func (ability *Ability587) AlibabaWdkItemMerchantCategoryQuery(req *request2.AlibabaWdkItemMerchantCategoryQueryRequest, session string) (*response2.AlibabaWdkItemMerchantCategoryQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.merchant.category.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMerchantCategoryQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMerchantCategoryQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   品牌查询接口
*/
func (ability *Ability587) AlibabaWdkMerchantBrandQuery(req *request2.AlibabaWdkMerchantBrandQueryRequest) (*response2.AlibabaWdkMerchantBrandQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.brand.query", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantBrandQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantBrandQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   翱象渠道商品上下架接口
*/
func (ability *Ability587) AlibabaAxChannelSkuStatusUpdate(req *request2.AlibabaAxChannelSkuStatusUpdateRequest, session string) (*response2.AlibabaAxChannelSkuStatusUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.ax.channel.sku.status.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaAxChannelSkuStatusUpdateResponse{}
	if err != nil {
		log.Println("alibabaAxChannelSkuStatusUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   新建门店商品
*/
func (ability *Ability587) AlibabaWdkMerchantStoreitemCreate(req *request2.AlibabaWdkMerchantStoreitemCreateRequest) (*response2.AlibabaWdkMerchantStoreitemCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.storeitem.create", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantStoreitemCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantStoreitemCreate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   三江erp对接类目查询接口
*/
func (ability *Ability587) AlibabaWdkMerchantCategoryQuery(req *request2.AlibabaWdkMerchantCategoryQueryRequest) (*response2.AlibabaWdkMerchantCategoryQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.category.query", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantCategoryQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantCategoryQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店商品批量游标方式查询接口
*/
func (ability *Ability587) AlibabaWdkSkuScrollQuery(req *request2.AlibabaWdkSkuScrollQueryRequest, session string) (*response2.AlibabaWdkSkuScrollQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.scroll.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuScrollQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuScrollQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家类目获取接口
*/
func (ability *Ability587) AlibabaWdkSkuCategoryQuery(req *request2.AlibabaWdkSkuCategoryQueryRequest, session string) (*response2.AlibabaWdkSkuCategoryQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.category.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuCategoryQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuCategoryQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   新建商品草稿
*/
func (ability *Ability587) AlibabaWdkMerchantItemCreatedraft(req *request2.AlibabaWdkMerchantItemCreatedraftRequest) (*response2.AlibabaWdkMerchantItemCreatedraftResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.item.createdraft", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantItemCreatedraftResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantItemCreatedraft error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   修改商家商品
*/
func (ability *Ability587) AlibabaWdkMerchantItemUpdate(req *request2.AlibabaWdkMerchantItemUpdateRequest) (*response2.AlibabaWdkMerchantItemUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.item.update", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantItemUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantItemUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家商品查询
*/
func (ability *Ability587) AlibabaWdkMerchantItemQuery(req *request2.AlibabaWdkMerchantItemQueryRequest) (*response2.AlibabaWdkMerchantItemQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.item.query", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantItemQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantItemQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家商品修改
*/
func (ability *Ability587) AlibabaWdkItemMerchantskuUpdate(req *request2.AlibabaWdkItemMerchantskuUpdateRequest, session string) (*response2.AlibabaWdkItemMerchantskuUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.merchantsku.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMerchantskuUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMerchantskuUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   修改门店商品
*/
func (ability *Ability587) AlibabaWdkMerchantStoreitemUpdate(req *request2.AlibabaWdkMerchantStoreitemUpdateRequest) (*response2.AlibabaWdkMerchantStoreitemUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.storeitem.update", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantStoreitemUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantStoreitemUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店商品信心查询
*/
func (ability *Ability587) AlibabaWdkMerchantStoreitemQuery(req *request2.AlibabaWdkMerchantStoreitemQueryRequest) (*response2.AlibabaWdkMerchantStoreitemQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.wdk.merchant.storeitem.query", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaWdkMerchantStoreitemQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkMerchantStoreitemQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家商品信息查询
*/
func (ability *Ability587) AlibabaWdkItemMerchantskuQuery(req *request2.AlibabaWdkItemMerchantskuQueryRequest, session string) (*response2.AlibabaWdkItemMerchantskuQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.merchantsku.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMerchantskuQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMerchantskuQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店商品信息新建
*/
func (ability *Ability587) AlibabaWdkItemMerchantstoreskuCreate(req *request2.AlibabaWdkItemMerchantstoreskuCreateRequest, session string) (*response2.AlibabaWdkItemMerchantstoreskuCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.merchantstoresku.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMerchantstoreskuCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMerchantstoreskuCreate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店商品信息修改
*/
func (ability *Ability587) AlibabaWdkItemMerchantstoreskuUpdate(req *request2.AlibabaWdkItemMerchantstoreskuUpdateRequest, session string) (*response2.AlibabaWdkItemMerchantstoreskuUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.merchantstoresku.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMerchantstoreskuUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMerchantstoreskuUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商家商品信息新建
*/
func (ability *Ability587) AlibabaWdkItemMerchantskuCreate(req *request2.AlibabaWdkItemMerchantskuCreateRequest, session string) (*response2.AlibabaWdkItemMerchantskuCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.merchantsku.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMerchantskuCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMerchantskuCreate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   品牌信息查询
*/
func (ability *Ability587) AlibabaWdkItemBrandQuery(req *request2.AlibabaWdkItemBrandQueryRequest, session string) (*response2.AlibabaWdkItemBrandQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.brand.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemBrandQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemBrandQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   类目查询接口
*/
func (ability *Ability587) AlibabaWdkItemCategoryQuery(req *request2.AlibabaWdkItemCategoryQueryRequest, session string) (*response2.AlibabaWdkItemCategoryQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.category.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemCategoryQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemCategoryQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   门店商品信息查询
*/
func (ability *Ability587) AlibabaWdkItemStoreskuQuery(req *request2.AlibabaWdkItemStoreskuQueryRequest, session string) (*response2.AlibabaWdkItemStoreskuQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.storesku.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemStoreskuQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkItemStoreskuQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   商品售价会员价修改
*/
func (ability *Ability587) AlibabaWdkItemMemberpriceUpdate(req *request2.AlibabaWdkItemMemberpriceUpdateRequest, session string) (*response2.AlibabaWdkItemMemberpriceUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.item.memberprice.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkItemMemberpriceUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkItemMemberpriceUpdate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   仓商品查询接口(指定商品编码)
*/
func (ability *Ability587) AlibabaWdkSkuWarehouseskuQuery(req *request2.AlibabaWdkSkuWarehouseskuQueryRequest, session string) (*response2.AlibabaWdkSkuWarehouseskuQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.warehousesku.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuWarehouseskuQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuWarehouseskuQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   仓商品遍历接口(游标)
*/
func (ability *Ability587) AlibabaWdkSkuWarehouseskuScrollQuery(req *request2.AlibabaWdkSkuWarehouseskuScrollQueryRequest, session string) (*response2.AlibabaWdkSkuWarehouseskuScrollQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sku.warehousesku.scroll.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSkuWarehouseskuScrollQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSkuWarehouseskuScrollQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   批量删除档期
*/
func (ability *Ability587) AlibabaPricePromotionItemDelete(req *request2.AlibabaPricePromotionItemDeleteRequest) (*response2.AlibabaPricePromotionItemDeleteResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.price.promotion.item.delete", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaPricePromotionItemDeleteResponse{}
	if err != nil {
		log.Println("alibabaPricePromotionItemDelete error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   新增档期商品
*/
func (ability *Ability587) AlibabaPricePromotionItemAdd(req *request2.AlibabaPricePromotionItemAddRequest) (*response2.AlibabaPricePromotionItemAddResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.price.promotion.item.add", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaPricePromotionItemAddResponse{}
	if err != nil {
		log.Println("alibabaPricePromotionItemAdd error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   营销档期活动创建
*/
func (ability *Ability587) AlibabaPricePromotionCreate(req *request2.AlibabaPricePromotionCreateRequest) (*response2.AlibabaPricePromotionCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability587 topClient is nil")
	}
	var jsonStr, err = ability.Client.Execute("alibaba.price.promotion.create", req.ToMap(), req.ToFileMap())
	var respStruct = response2.AlibabaPricePromotionCreateResponse{}
	if err != nil {
		log.Println("alibabaPricePromotionCreate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}
