feat: 添加按 biz_ref_type 和 order_id 过滤的管理员账本页面测试用例
This commit is contained in:
@@ -364,5 +364,23 @@ func (s *LedgerTestSuite) Test_AdminLedgerPage() {
|
||||
So(err, ShouldBeNil)
|
||||
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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user