feat: add super comment governance and finance oversight
This commit is contained in:
60
backend/app/http/super/v1/finance.go
Normal file
60
backend/app/http/super/v1/finance.go
Normal file
@@ -0,0 +1,60 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
dto "quyun/v2/app/http/super/v1/dto"
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/app/services"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type finance struct{}
|
||||
|
||||
// List ledgers
|
||||
//
|
||||
// @Router /super/v1/finance/ledgers [get]
|
||||
// @Summary List ledgers
|
||||
// @Description List tenant ledgers across tenants
|
||||
// @Tags Finance
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param page query int false "Page number"
|
||||
// @Param limit query int false "Page size"
|
||||
// @Success 200 {object} requests.Pager{items=[]dto.SuperLedgerItem}
|
||||
// @Bind filter query
|
||||
func (c *finance) ListLedgers(ctx fiber.Ctx, filter *dto.SuperLedgerListFilter) (*requests.Pager, error) {
|
||||
return services.Super.ListLedgers(ctx, filter)
|
||||
}
|
||||
|
||||
// List balance anomalies
|
||||
//
|
||||
// @Router /super/v1/finance/anomalies/balances [get]
|
||||
// @Summary List balance anomalies
|
||||
// @Description List balance anomalies across users
|
||||
// @Tags Finance
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param page query int false "Page number"
|
||||
// @Param limit query int false "Page size"
|
||||
// @Success 200 {object} requests.Pager{items=[]dto.SuperBalanceAnomalyItem}
|
||||
// @Bind filter query
|
||||
func (c *finance) ListBalanceAnomalies(ctx fiber.Ctx, filter *dto.SuperBalanceAnomalyFilter) (*requests.Pager, error) {
|
||||
return services.Super.ListBalanceAnomalies(ctx, filter)
|
||||
}
|
||||
|
||||
// List order anomalies
|
||||
//
|
||||
// @Router /super/v1/finance/anomalies/orders [get]
|
||||
// @Summary List order anomalies
|
||||
// @Description List order anomalies across tenants
|
||||
// @Tags Finance
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param page query int false "Page number"
|
||||
// @Param limit query int false "Page size"
|
||||
// @Success 200 {object} requests.Pager{items=[]dto.SuperOrderAnomalyItem}
|
||||
// @Bind filter query
|
||||
func (c *finance) ListOrderAnomalies(ctx fiber.Ctx, filter *dto.SuperOrderAnomalyFilter) (*requests.Pager, error) {
|
||||
return services.Super.ListOrderAnomalies(ctx, filter)
|
||||
}
|
||||
Reference in New Issue
Block a user