tysk/tysk_test.go

70 lines
1.6 KiB
Go

package tysk
import (
"gitea.cdlsxd.cn/self-tools/tysk/tysk_constant"
"gitea.cdlsxd.cn/self-tools/tysk/tysk_entity"
"testing"
)
const UserName = "LSXDWL003_ZL"
var g = NewTysk(UserName, WithEnvTest())
func Test_GetAccountBalance(t *testing.T) {
req := tysk_entity.GetAccountBalanceReq{
AccountNo: []tysk_constant.AccountNo{"8110701013301269598", "8110701012401269599", "8110701013801269600"},
}
res, err := g.GetAccountBalance(req)
t.Log(res, err)
}
func Test_GetTodayTransHis(t *testing.T) {
req := tysk_entity.TodayTransHisReq{
AccountNo: []tysk_constant.AccountNo{"8110701013301269598", "8110701012401269599", "8110701013801269600"},
TranType: tysk_constant.TranType("01"),
StartRecord: 1,
PageNumber: 10,
}
res, err := g.GetTodayTransHis(req)
t.Log(res, err)
}
func Test_GetAccountInfo(t *testing.T) {
req := tysk_entity.AccountInfoReq{
StartRecord: 1,
PageNumber: 10,
}
res, err := g.GetAccountInfo(req)
t.Log(res, err)
}
func Test_ReceiptApply(t *testing.T) {
req := tysk_entity.ReceiptApplyReq{
ClientID: "test123123",
AccountNo: "8110701012401269599",
StartDate: "20250730",
EndDate: "20250801",
}
res, err := g.ReceiptApply(req)
t.Log(res, err)
}
func Test_ReceiptQuery(t *testing.T) {
req := tysk_entity.ReceiptQueryReq{
ClientID: "test123123",
StartRecord: 1,
PageNumber: 10,
}
res, err := g.ReceiptQuery(req)
t.Log(res, err)
}
func Test_ReceiptDownload(t *testing.T) {
req := tysk_entity.ReceiptDownloadReq{
FileType: tysk_constant.FileTypePDF,
RcptNums: []string{"8110701012401269599_20250730SG0D0000084253000001"},
}
res, err := g.ReceiptDownload(req)
t.Log(res, err)
}