package lakala

import (
	"fmt"
	"git.rosy.net.cn/baseapi/utils"
	"testing"
)

// TestQueryBillBalance 查询账户余额
func TestQueryBillBalance(t *testing.T) {
	api.QueryBillBalance(&QueryBillBalanceReq{
		OrgNo:      "1",
		MerchantNo: "8221000581200BS",
		PayNo:      "",
		PayType:    "",
		MgtFlag:    "",
	})
}

// TestEwalletWithdrawD1 账户D1体现
func TestEwalletWithdrawD1(t *testing.T) {
	r1, r2, err := api.EwalletWithdrawD1(&EwalletWithdrawD1Req{
		OrgNo:      "983931",
		MerchantNo: "822651059990E2S",
		DrawAmt:    "0.01",
		NotifyUrl:  "http://callback.jxc4.com/lakalaCallback/ewalletWithdrawD1",
		MerOrderNo: "20250808170859324127661",
		PayNo:      "",
		PayType:    "01",
		Remark:     "",
		Summary:    "",
		BankId:     "",
	})
	fmt.Println(r1, r2, err)
}

// TestEwalletWithdrawQuery 提现结果查询
func TestEwalletWithdrawQuery(t *testing.T) {
	api.EwalletWithdrawQuery(&EwalletWithdrawQueryReq{
		OrgNo:      "1",
		MerchantNo: "8221000581200BS",
		DrawJnl:    "220816141533426266212404",
		MerOrderNo: "",
	})
}

// TestEwalletSettleQuery 提款模式查询
func TestEwalletSettleQuery(t *testing.T) {
	api.EwalletSettleQuery("1", "82229005943096B")
}

func TestTime2TimeStrByFormat(t *testing.T) {
	fmt.Println(utils.Str2Time("2022-04-06 17:01:05"))
}
