feat: 添加按 biz_ref_type 和 order_id 过滤的管理员账本页面测试用例

This commit is contained in:
2025-12-23 13:25:58 +08:00
parent 39b541accd
commit 780a7b1ed1

View File

@@ -364,5 +364,23 @@ func (s *LedgerTestSuite) Test_AdminLedgerPage() {
So(err, ShouldBeNil) So(err, ShouldBeNil)
So(pager.Total, ShouldEqual, 1) So(pager.Total, ShouldEqual, 1)
}) })
Convey("按 biz_ref_type + biz_ref_id 过滤", func() {
bizRefType := "order"
pager, err := Ledger.AdminLedgerPage(ctx, tenantID, &dto.AdminLedgerListFilter{
BizRefType: &bizRefType,
BizRefID: lo.ToPtr(int64(777)),
})
So(err, ShouldBeNil)
So(pager.Total, ShouldEqual, 1)
})
Convey("按 order_id 过滤", func() {
pager, err := Ledger.AdminLedgerPage(ctx, tenantID, &dto.AdminLedgerListFilter{
OrderID: lo.ToPtr(int64(777)),
})
So(err, ShouldBeNil)
So(pager.Total, ShouldEqual, 1)
})
}) })
} }