Files
hi-server/internal/handler/admin/promo/getPriceListHandler.go
T
shanshanzhong147 4366a9be8b
Build docker and publish / build (20.15.1) (push) Failing after 9m10s
Build docker and publish / build (20.15.1) (pull_request) Successful in 8m18s
修复(#79): 促销管理后台API + 审查问题修复
- 实现促销管理接口:规则CRUD、优惠价配置、使用记录查询
- 修复 UpsertPrices 新增记录时提前 return 的问题
- DeleteRule/DeletePrice 不存在记录返回 code=404
- SetPromoPriceRequest.items 空数组校验
- 分页参数限制 page>0、1<=size<=200
- 下单侧促销价格按数量档总价口径计算(含 #87 修复)

Co-authored-by: multica-agent <github@multica.ai>
2026-05-27 06:32:42 -07:00

24 lines
669 B
Go

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"
)
func GetPriceListHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
return func(c *gin.Context) {
var req types.GetPromoPriceListRequest
_ = c.ShouldBind(&req)
if err := svcCtx.Validate(&req); err != nil {
result.ParamErrorResult(c, err)
return
}
l := promo.NewGetPriceListLogic(c.Request.Context(), svcCtx)
resp, err := l.GetPriceList(&req)
result.HttpResult(c, resp, err)
}
}