package ability591

import (
	"errors"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability591/request"
	"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 *request.AlibabaWdkFinanceOrderBackflowRequest, session string) (*response.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 = response.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 *request.AlibabaPosFundCashierShiftSummaryRequest, session string) (*response.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 = response.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 *request.AlibabaWdkBillListRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOrderRefundGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOrderRefundListRequest, session string) (*response.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 = response.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 *request.AlibabaWdkorderSharestockFulfillGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkorderSharestockOrderGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkElemeBillDetailGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkElemeBillGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOrderAggregateRequest, session string) (*response.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 = response.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
}

/*
   获取订单隐私号
*/
func (ability *Ability591) AlibabaAelophyOrderDesensitizephoneGet(req *request.AlibabaAelophyOrderDesensitizephoneGetRequest, session string) (*response.AlibabaAelophyOrderDesensitizephoneGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.aelophy.order.desensitizephone.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response.AlibabaAelophyOrderDesensitizephoneGetResponse{}
	if err != nil {
		log.Println("alibabaAelophyOrderDesensitizephoneGet 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 *request.AlibabaWdkSopoPushTriggerRequest, session string) (*response.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 = response.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 *request.AlibabaWdkSupplierRefundListRequest, session string) (*response.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 = response.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 *request.AlibabaWdkSupplierOrderListRequest, session string) (*response.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 = response.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 *request.AlibabaWdkopenOrderGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkopenCateorderPullRequest, session string) (*response.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 = response.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) AlibabaTclsAelophyWarehouseOrderGet(req *request.AlibabaTclsAelophyWarehouseOrderGetRequest, session string) (*response.AlibabaTclsAelophyWarehouseOrderGetResponse, error) {
	if ability.Client == nil {
		return nil, errors.New("Ability591 topClient is nil")
	}
	var jsonStr, err = ability.Client.ExecuteWithSession("alibaba.tcls.aelophy.warehouse.order.get", req.ToMap(), req.ToFileMap(), session)
	var respStruct = response.AlibabaTclsAelophyWarehouseOrderGetResponse{}
	if err != nil {
		log.Println("alibabaTclsAelophyWarehouseOrderGet 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 *request.AlibabaWdkSupplierRefundGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkSupplierOrderGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkTradeOrderBalanceBillQueryRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOrderFinanceBillQueryRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelOrderCreateRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelOrderUsercancelRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelOrderStatusUpdateRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelOrderUserrefundRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelUserSyncRequest, session string) (*response.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 = response.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 *request.AlibabaWdkSyncedorderQueryRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOldposRefundCreateRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOldposOrderCreateRequest, session string) (*response.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 = response.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 *request.AlibabaAelophyOrderWorkCallbackRequest, session string) (*response.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 = response.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 *request.AlibabaAelophyOrderDelivererChangeRequest, session string) (*response.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 = response.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 *request.AlibabaAelophyOrderLogisticsTraceCallbackRequest, session string) (*response.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 = response.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 *request.AlibabaAelophyOrderGetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelOrderRefundConfirmRequest, session string) (*response.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 = response.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 *request.AlibabaWdkChannelCommentCreateRequest, session string) (*response.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 = response.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 *request.AlibabaWdkRefundAggregateRequest, session string) (*response.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 = response.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 *request.AlibabaWdkorderSharestockInsuranceGetorderRequest, session string) (*response.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 = response.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 *request.AlibabaWdkorderSharestockInsuranceCallbackRequest, session string) (*response.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 = response.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 *request.AlibabaWdkorderSharestockInsuranceRefundgetRequest, session string) (*response.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 = response.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 *request.AlibabaWdkorderSharestockInsuranceRefundcallbackRequest, session string) (*response.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 = response.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 *request.AlibabaNewretailPurchasePriceSaveRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOrderListRequest, session string) (*response.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 = response.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 *request.AlibabaWdkTxdCrmStatementBackflowRequest, session string) (*response.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 = response.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 *request.AlibabaWdkOrderGetRequest, session string) (*response.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 = response.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 *request.AlibabaNewretailPurchasePriceDeleteRequest, session string) (*response.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 = response.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 *request.AlibabaWdkTradeOrderSuccessCreateRequest, session string) (*response.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 = response.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 *request.AlibabaWdkTradeRefundSuccessCreateRequest, session string) (*response.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 = response.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
}
