package tao_vegetable

import (
	"fmt"
	domain2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain"
	request2 "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/request"
	"git.rosy.net.cn/baseapi/utils"
	"git.rosy.net.cn/jx-callback/globals"
	"testing"
)

func TestAgreeUserCancel(t *testing.T) {

	param := &request2.AlibabaTclsAelophyRefundAgreeRequest{
		StoreId:    utils.String2Pointer("JX668594"),
		OutOrderId: utils.String2Pointer("1927716386361804887"),
		RefundId:   utils.String2Pointer("1000010813678250044"),
		AuditMemo:  utils.String2Pointer("商户同意退款"),
		SubRefundList: &[]domain2.AlibabaTclsAelophyRefundAgreeSubrefundlist{
			{OutSubOrderId: utils.String2Pointer("1927716386361804887"), RefundFee: utils.Int64ToPointer(300)},
		},
		OrderFrom: utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)),
	}
	err := apiTao.AgreeUserCancel(param)
	globals.SugarLogger.Debugf("%v", err)
}

func TestDiseAgreeCancel(t *testing.T) {
	param := &request2.AlibabaTclsAelophyRefundDisagreeRequest{
		RefundId:     utils.String2Pointer("1000010805204700044"),
		RejectReason: utils.String2Pointer("就不给你退"),
		OrderFrom:    utils.Int64ToPointer(utils.Str2Int64(TaoVegetableChannelCode)),
	}

	err := apiTao.DisAgreeUserCancel(param)
	globals.SugarLogger.Debugf("err := %v", err)
}

func TestLen(t *testing.T) {
	fmt.Println(len("【平台推荐】\\u0026【官方认证】\\u0026【品质联盟】——请各位顾客放心下单！！！本店线下实体经营十余年，在此承诺，坏菜包赔，绝不出售隔夜菜，若出现错送或者质量问题，请相信我们不是故意的，您可第一时间与我们联系，我们一定竭诚为您服务，感谢您的信任！谢谢！"))
}
