tysk/tysk_test.go

139 lines
3.4 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)
}
func Test_TransHisQueryApply(t *testing.T) {
req := tysk_entity.TransHisQueryApplyReq{
ClientID: "123456",
AccountNo: "8110701013301269598",
StartDate: "20250729",
EndDate: "20250803",
}
res, err := g.TransHisQueryApply(req)
t.Log(res, err)
}
func Test_TransHisQuery(t *testing.T) {
req := tysk_entity.TransHisQueryReq{
ClientID: "123456",
TranType: tysk_constant.TranTypeAll,
StartRecord: 1,
PageNumber: 10,
}
res, err := g.TransHisQuery(req)
t.Log(res, err)
}
func Test_BalanceHisQueryApply(t *testing.T) {
req := tysk_entity.BalanceHisQueryApplyReq{
ClientID: "123456",
AccountNo: []tysk_constant.AccountNo{"8110701013301269598", "8110701012401269599", "8110701013801269600"},
StartDate: "20250728",
EndDate: "20250803",
}
res, err := g.BalanceHisQueryApply(req)
t.Log(res, err)
}
func Test_BalanceHisQuery(t *testing.T) {
req := tysk_entity.BalanceHisQueryReq{
ClientID: "123456",
StartRecord: 1,
PageNumber: 10,
}
res, err := g.BalanceHisQuery(req)
t.Log(res, err)
}
func Test_AccountsTransHisQuery(t *testing.T) {
req := tysk_entity.AccountsTransHisQueryReq{
TranType: tysk_constant.TranTypeAll,
StartDate: "20250728",
EndDate: "20250803",
StartRecord: 1,
PageNumber: 10,
AccountNo: []tysk_constant.AccountNo{"8110701013301269598", "8110701012401269599", "8110701013801269600"},
}
res, err := g.AccountsTransHisQuery(req)
t.Log(res, err)
}
func Test_SinglePay(t *testing.T) {
req := tysk_entity.AccountsTransHisQueryReq{
TranType: tysk_constant.TranTypeAll,
StartDate: "20250728",
EndDate: "20250803",
StartRecord: 1,
PageNumber: 10,
AccountNo: []tysk_constant.AccountNo{"8110701013301269598", "8110701012401269599", "8110701013801269600"},
}
res, err := g.SinglePay(req)
t.Log(res, err)
}