修复(#84): 补齐促销管理API实现文件

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-05-26 22:49:46 -07:00
parent 48e507783e
commit ea586e3ba2
26 changed files with 1348 additions and 2 deletions
@@ -0,0 +1,25 @@
package promo
import (
"github.com/gin-gonic/gin"
"github.com/perfect-panel/server/internal/logic/admin/promo"
"github.com/perfect-panel/server/internal/svc"
"github.com/perfect-panel/server/internal/types"
"github.com/perfect-panel/server/pkg/result"
)
// Get promo usage list
func GetPromoUsageListHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
return func(c *gin.Context) {
var req types.GetPromoUsageListRequest
_ = c.ShouldBind(&req)
if err := svcCtx.Validate(&req); err != nil {
result.ParamErrorResult(c, err)
return
}
l := promo.NewGetPromoUsageListLogic(c.Request.Context(), svcCtx)
resp, err := l.GetPromoUsageList(&req)
result.HttpResult(c, resp, err)
}
}