package ability591

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

type Ability591 struct {
	Client *topsdk.TopClient
}

func NewAbility591(client *topsdk.TopClient) *Ability591 {
	return &Ability591{client}
}

/*
   财务订单回流
*/
func (ability *Ability591) AlibabaWdkFinanceOrderBackflow(req *request2.AlibabaWdkFinanceOrderBackflowRequest, session string) (*response2.AlibabaWdkFinanceOrderBackflowResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.finance.order.backflow", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkFinanceOrderBackflowResponse{}
	if err != nil {
		log.Println("alibabaWdkFinanceOrderBackflow 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 *Ability591) AlibabaPosFundCashierShiftSummary(req *request2.AlibabaPosFundCashierShiftSummaryRequest, session string) (*response2.AlibabaPosFundCashierShiftSummaryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.pos.fund.cashier.shift.summary", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaPosFundCashierShiftSummaryResponse{}
	if err != nil {
		log.Println("alibabaPosFundCashierShiftSummary 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 *Ability591) AlibabaWdkBillList(req *request2.AlibabaWdkBillListRequest, session string) (*response2.AlibabaWdkBillListResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.bill.list", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkBillListResponse{}
	if err != nil {
		log.Println("alibabaWdkBillList error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   五道口订单退款按ID查询
*/
func (ability *Ability591) AlibabaWdkOrderRefundGet(req *request2.AlibabaWdkOrderRefundGetRequest, session string) (*response2.AlibabaWdkOrderRefundGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.order.refund.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOrderRefundGetResponse{}
	if err != nil {
		log.Println("alibabaWdkOrderRefundGet 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 *Ability591) AlibabaWdkOrderRefundList(req *request2.AlibabaWdkOrderRefundListRequest, session string) (*response2.AlibabaWdkOrderRefundListResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.order.refund.list", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOrderRefundListResponse{}
	if err != nil {
		log.Println("alibabaWdkOrderRefundList 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 *Ability591) AlibabaWdkorderSharestockFulfillGet(req *request2.AlibabaWdkorderSharestockFulfillGetRequest, session string) (*response2.AlibabaWdkorderSharestockFulfillGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkorder.sharestock.fulfill.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkorderSharestockFulfillGetResponse{}
	if err != nil {
		log.Println("alibabaWdkorderSharestockFulfillGet 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 *Ability591) AlibabaWdkorderSharestockOrderGet(req *request2.AlibabaWdkorderSharestockOrderGetRequest, session string) (*response2.AlibabaWdkorderSharestockOrderGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkorder.sharestock.order.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkorderSharestockOrderGetResponse{}
	if err != nil {
		log.Println("alibabaWdkorderSharestockOrderGet 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 *Ability591) AlibabaWdkElemeBillDetailGet(req *request2.AlibabaWdkElemeBillDetailGetRequest, session string) (*response2.AlibabaWdkElemeBillDetailGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.eleme.bill.detail.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkElemeBillDetailGetResponse{}
	if err != nil {
		log.Println("alibabaWdkElemeBillDetailGet 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 *Ability591) AlibabaWdkElemeBillGet(req *request2.AlibabaWdkElemeBillGetRequest, session string) (*response2.AlibabaWdkElemeBillGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.eleme.bill.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkElemeBillGetResponse{}
	if err != nil {
		log.Println("alibabaWdkElemeBillGet 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 *Ability591) AlibabaWdkOrderAggregate(req *request2.AlibabaWdkOrderAggregateRequest, session string) (*response2.AlibabaWdkOrderAggregateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.order.aggregate", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOrderAggregateResponse{}
	if err != nil {
		log.Println("alibabaWdkOrderAggregate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   猫超共享库存寄售sopo推送触发
*/
func (ability *Ability591) AlibabaWdkSopoPushTrigger(req *request2.AlibabaWdkSopoPushTriggerRequest, session string) (*response2.AlibabaWdkSopoPushTriggerResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.sopo.push.trigger", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSopoPushTriggerResponse{}
	if err != nil {
		log.Println("alibabaWdkSopoPushTrigger 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 *Ability591) AlibabaWdkSupplierRefundList(req *request2.AlibabaWdkSupplierRefundListRequest, session string) (*response2.AlibabaWdkSupplierRefundListResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.supplier.refund.list", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSupplierRefundListResponse{}
	if err != nil {
		log.Println("alibabaWdkSupplierRefundList 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 *Ability591) AlibabaWdkSupplierOrderList(req *request2.AlibabaWdkSupplierOrderListRequest, session string) (*response2.AlibabaWdkSupplierOrderListResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.supplier.order.list", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSupplierOrderListResponse{}
	if err != nil {
		log.Println("alibabaWdkSupplierOrderList 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 *Ability591) AlibabaWdkopenOrderGet(req *request2.AlibabaWdkopenOrderGetRequest, session string) (*response2.AlibabaWdkopenOrderGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkopen.order.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkopenOrderGetResponse{}
	if err != nil {
		log.Println("alibabaWdkopenOrderGet 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 *Ability591) AlibabaWdkopenCateorderPull(req *request2.AlibabaWdkopenCateorderPullRequest, session string) (*response2.AlibabaWdkopenCateorderPullResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkopen.cateorder.pull", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkopenCateorderPullResponse{}
	if err != nil {
		log.Println("alibabaWdkopenCateorderPull 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 *Ability591) AlibabaWdkSupplierRefundGet(req *request2.AlibabaWdkSupplierRefundGetRequest, session string) (*response2.AlibabaWdkSupplierRefundGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.supplier.refund.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSupplierRefundGetResponse{}
	if err != nil {
		log.Println("alibabaWdkSupplierRefundGet 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 *Ability591) AlibabaWdkSupplierOrderGet(req *request2.AlibabaWdkSupplierOrderGetRequest, session string) (*response2.AlibabaWdkSupplierOrderGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.supplier.order.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSupplierOrderGetResponse{}
	if err != nil {
		log.Println("alibabaWdkSupplierOrderGet 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 *Ability591) AlibabaWdkTradeOrderBalanceBillQuery(req *request2.AlibabaWdkTradeOrderBalanceBillQueryRequest, session string) (*response2.AlibabaWdkTradeOrderBalanceBillQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.trade.order.balance.bill.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkTradeOrderBalanceBillQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkTradeOrderBalanceBillQuery 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 *Ability591) AlibabaWdkOrderFinanceBillQuery(req *request2.AlibabaWdkOrderFinanceBillQueryRequest, session string) (*response2.AlibabaWdkOrderFinanceBillQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.order.finance.bill.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOrderFinanceBillQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkOrderFinanceBillQuery 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 *Ability591) AlibabaWdkChannelOrderCreate(req *request2.AlibabaWdkChannelOrderCreateRequest, session string) (*response2.AlibabaWdkChannelOrderCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.order.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelOrderCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelOrderCreate 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 *Ability591) AlibabaWdkChannelOrderUsercancel(req *request2.AlibabaWdkChannelOrderUsercancelRequest, session string) (*response2.AlibabaWdkChannelOrderUsercancelResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.order.usercancel", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelOrderUsercancelResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelOrderUsercancel 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 *Ability591) AlibabaWdkChannelOrderStatusUpdate(req *request2.AlibabaWdkChannelOrderStatusUpdateRequest, session string) (*response2.AlibabaWdkChannelOrderStatusUpdateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.order.status.update", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelOrderStatusUpdateResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelOrderStatusUpdate 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 *Ability591) AlibabaWdkChannelOrderUserrefund(req *request2.AlibabaWdkChannelOrderUserrefundRequest, session string) (*response2.AlibabaWdkChannelOrderUserrefundResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.order.userrefund", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelOrderUserrefundResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelOrderUserrefund 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 *Ability591) AlibabaWdkChannelUserSync(req *request2.AlibabaWdkChannelUserSyncRequest, session string) (*response2.AlibabaWdkChannelUserSyncResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.user.sync", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelUserSyncResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelUserSync 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 *Ability591) AlibabaWdkSyncedorderQuery(req *request2.AlibabaWdkSyncedorderQueryRequest, session string) (*response2.AlibabaWdkSyncedorderQueryResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.syncedorder.query", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkSyncedorderQueryResponse{}
	if err != nil {
		log.Println("alibabaWdkSyncedorderQuery error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   五道口外部商户老pos机产生的退款单同步进盒马
*/
func (ability *Ability591) AlibabaWdkOldposRefundCreate(req *request2.AlibabaWdkOldposRefundCreateRequest, session string) (*response2.AlibabaWdkOldposRefundCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.oldpos.refund.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOldposRefundCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkOldposRefundCreate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}

/*
   淘鲜达外部商户老pos机产生的订单同步进淘鲜达
*/
func (ability *Ability591) AlibabaWdkOldposOrderCreate(req *request2.AlibabaWdkOldposOrderCreateRequest, session string) (*response2.AlibabaWdkOldposOrderCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.oldpos.order.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOldposOrderCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkOldposOrderCreate 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 *Ability591) AlibabaAelophyOrderWorkCallback(req *request2.AlibabaAelophyOrderWorkCallbackRequest, session string) (*response2.AlibabaAelophyOrderWorkCallbackResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.aelophy.order.work.callback", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaAelophyOrderWorkCallbackResponse{}
	if err != nil {
		log.Println("alibabaAelophyOrderWorkCallback 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 *Ability591) AlibabaAelophyOrderDelivererChange(req *request2.AlibabaAelophyOrderDelivererChangeRequest, session string) (*response2.AlibabaAelophyOrderDelivererChangeResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.aelophy.order.deliverer.change", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaAelophyOrderDelivererChangeResponse{}
	if err != nil {
		log.Println("alibabaAelophyOrderDelivererChange 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 *Ability591) AlibabaAelophyOrderLogisticsTraceCallback(req *request2.AlibabaAelophyOrderLogisticsTraceCallbackRequest, session string) (*response2.AlibabaAelophyOrderLogisticsTraceCallbackResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.aelophy.order.logistics.trace.callback", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaAelophyOrderLogisticsTraceCallbackResponse{}
	if err != nil {
		log.Println("alibabaAelophyOrderLogisticsTraceCallback 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 *Ability591) AlibabaAelophyOrderGet(req *request2.AlibabaAelophyOrderGetRequest, session string) (*response2.AlibabaAelophyOrderGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.aelophy.order.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaAelophyOrderGetResponse{}
	if err != nil {
		log.Println("alibabaAelophyOrderGet 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 *Ability591) AlibabaWdkChannelOrderRefundConfirm(req *request2.AlibabaWdkChannelOrderRefundConfirmRequest, session string) (*response2.AlibabaWdkChannelOrderRefundConfirmResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.order.refund.confirm", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelOrderRefundConfirmResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelOrderRefundConfirm 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 *Ability591) AlibabaWdkChannelCommentCreate(req *request2.AlibabaWdkChannelCommentCreateRequest, session string) (*response2.AlibabaWdkChannelCommentCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.channel.comment.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkChannelCommentCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkChannelCommentCreate 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 *Ability591) AlibabaWdkRefundAggregate(req *request2.AlibabaWdkRefundAggregateRequest, session string) (*response2.AlibabaWdkRefundAggregateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.refund.aggregate", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkRefundAggregateResponse{}
	if err != nil {
		log.Println("alibabaWdkRefundAggregate 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 *Ability591) AlibabaWdkorderSharestockInsuranceGetorder(req *request2.AlibabaWdkorderSharestockInsuranceGetorderRequest, session string) (*response2.AlibabaWdkorderSharestockInsuranceGetorderResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkorder.sharestock.insurance.getorder", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkorderSharestockInsuranceGetorderResponse{}
	if err != nil {
		log.Println("alibabaWdkorderSharestockInsuranceGetorder 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 *Ability591) AlibabaWdkorderSharestockInsuranceCallback(req *request2.AlibabaWdkorderSharestockInsuranceCallbackRequest, session string) (*response2.AlibabaWdkorderSharestockInsuranceCallbackResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkorder.sharestock.insurance.callback", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkorderSharestockInsuranceCallbackResponse{}
	if err != nil {
		log.Println("alibabaWdkorderSharestockInsuranceCallback 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 *Ability591) AlibabaWdkorderSharestockInsuranceRefundget(req *request2.AlibabaWdkorderSharestockInsuranceRefundgetRequest, session string) (*response2.AlibabaWdkorderSharestockInsuranceRefundgetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkorder.sharestock.insurance.refundget", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkorderSharestockInsuranceRefundgetResponse{}
	if err != nil {
		log.Println("alibabaWdkorderSharestockInsuranceRefundget 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 *Ability591) AlibabaWdkorderSharestockInsuranceRefundcallback(req *request2.AlibabaWdkorderSharestockInsuranceRefundcallbackRequest, session string) (*response2.AlibabaWdkorderSharestockInsuranceRefundcallbackResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdkorder.sharestock.insurance.refundcallback", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkorderSharestockInsuranceRefundcallbackResponse{}
	if err != nil {
		log.Println("alibabaWdkorderSharestockInsuranceRefundcallback 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 *Ability591) AlibabaNewretailPurchasePriceSave(req *request2.AlibabaNewretailPurchasePriceSaveRequest, session string) (*response2.AlibabaNewretailPurchasePriceSaveResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.newretail.purchase.price.save", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaNewretailPurchasePriceSaveResponse{}
	if err != nil {
		log.Println("alibabaNewretailPurchasePriceSave 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 *Ability591) AlibabaWdkOrderList(req *request2.AlibabaWdkOrderListRequest, session string) (*response2.AlibabaWdkOrderListResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.order.list", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOrderListResponse{}
	if err != nil {
		log.Println("alibabaWdkOrderList 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 *Ability591) AlibabaWdkTxdCrmStatementBackflow(req *request2.AlibabaWdkTxdCrmStatementBackflowRequest, session string) (*response2.AlibabaWdkTxdCrmStatementBackflowResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.txd.crm.statement.backflow", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkTxdCrmStatementBackflowResponse{}
	if err != nil {
		log.Println("alibabaWdkTxdCrmStatementBackflow 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 *Ability591) AlibabaWdkOrderGet(req *request2.AlibabaWdkOrderGetRequest, session string) (*response2.AlibabaWdkOrderGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.order.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkOrderGetResponse{}
	if err != nil {
		log.Println("alibabaWdkOrderGet 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 *Ability591) AlibabaNewretailPurchasePriceDelete(req *request2.AlibabaNewretailPurchasePriceDeleteRequest, session string) (*response2.AlibabaNewretailPurchasePriceDeleteResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.newretail.purchase.price.delete", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaNewretailPurchasePriceDeleteResponse{}
	if err != nil {
		log.Println("alibabaNewretailPurchasePriceDelete 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 *Ability591) AlibabaWdkTradeOrderSuccessCreate(req *request2.AlibabaWdkTradeOrderSuccessCreateRequest, session string) (*response2.AlibabaWdkTradeOrderSuccessCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.trade.order.success.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkTradeOrderSuccessCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkTradeOrderSuccessCreate 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 *Ability591) AlibabaWdkTradeRefundSuccessCreate(req *request2.AlibabaWdkTradeRefundSuccessCreateRequest, session string) (*response2.AlibabaWdkTradeRefundSuccessCreateResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.wdk.trade.refund.success.create", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response2.AlibabaWdkTradeRefundSuccessCreateResponse{}
	if err != nil {
		log.Println("alibabaWdkTradeRefundSuccessCreate error", err)
		return &respStruct, err
	}
	err = util.HandleJsonResponse(jsonStr, &respStruct)
	if respStruct.Body == "" || len(respStruct.Body) == 0 {
		respStruct.Body = jsonStr
	}
	return &respStruct, err
}
