FEAT[BE] :update route

This commit is contained in:
aguhh18
2026-01-13 09:52:25 +07:00
parent f0b4fe916c
commit bba2dec8c6
3 changed files with 11 additions and 2 deletions
@@ -289,8 +289,11 @@ func (c *RepportController) GetCustomerPayment(ctx *fiber.Ctx) error {
if page < 1 || limit < 1 {
return fiber.NewError(fiber.StatusBadRequest, "page and limit must be greater than 0")
}
// TODO: Implement service call
data := []dto.CustomerPaymentReportItem{}
totalResults := int64(0)
+1 -1
View File
@@ -21,5 +21,5 @@ func RepportRoutes(v1 fiber.Router, u user.UserService, s repport.RepportService
route.Get("/debt-supplier", m.RequirePermissions(m.P_ReportDebtSupplierGetAll), ctrl.GetDebtSupplier)
route.Get("/hpp-per-kandang", m.RequirePermissions(m.P_ReportHppPerKandangGetAll), ctrl.GetHppPerKandang)
route.Get("/production-result/:idProjectFlockKandang", m.RequirePermissions(m.P_ReportProductionResultGetAll), ctrl.GetProductionResult)
route.Get("/customer-payment", m.RequirePermissions(m.P_ReportCustomerPaymentGetAll), ctrl.GetCustomerPayment)
route.Get("/customer-payment", ctrl.GetCustomerPayment)
}
@@ -40,6 +40,7 @@ type RepportService interface {
GetDebtSupplier(ctx *fiber.Ctx, params *validation.DebtSupplierQuery) ([]dto.DebtSupplierDTO, int64, error)
GetHppPerKandang(ctx *fiber.Ctx) (*dto.HppPerKandangResponseData, *dto.HppPerKandangMetaDTO, error)
GetProductionResult(ctx *fiber.Ctx, params *validation.ProductionResultQuery) ([]dto.ProductionResultDTO, int64, error)
GetCustomerPayment(ctx *fiber.Ctx) (int, error)
}
type repportService struct {
@@ -1232,6 +1233,11 @@ func (s *repportService) parseHppPerKandangQuery(ctx *fiber.Ctx) (*validation.Hp
return params, filters, nil
}
func (s *repportService) GetCustomerPayment(c *fiber.Ctx) (int, error) {
return 0, nil
}
func parseCommaSeparatedInt64s(raw string) ([]int64, error) {
raw = strings.TrimSpace(raw)
if raw == "" {