完善套餐与账单接口 & 完善支付数据保存,记录实付价格并关联优惠券

This commit is contained in:
2026-03-26 14:39:19 +08:00
parent 5ffa151f58
commit 75ad12efb3
23 changed files with 706 additions and 613 deletions

View File

@@ -91,6 +91,29 @@ func DeleteProduct(c *fiber.Ctx) error {
return nil
}
func AllProductSkuByAdmin(c *fiber.Ctx) error {
_, err := auth.GetAuthCtx(c).PermitAdmin(core.ScopeProductSkuRead)
if err != nil {
return err
}
var req AllProductSkuByAdminReq
if err := g.Validator.ParseBody(c, &req); err != nil {
return err
}
list, err := s.ProductSku.All(req.Code)
if err != nil {
return err
}
return c.JSON(list)
}
type AllProductSkuByAdminReq struct {
Code string `json:"product_code"`
}
func PageProductSkuByAdmin(c *fiber.Ctx) error {
_, err := auth.GetAuthCtx(c).PermitAdmin(core.ScopeProductSkuRead)
if err != nil {