新增产品信息用户查询接口

This commit is contained in:
2026-04-14 15:06:08 +08:00
parent 58b8849d8d
commit b8c8c7d7b1
15 changed files with 330 additions and 1 deletions

View File

@@ -34,6 +34,20 @@ func AllProductByAdmin(c *fiber.Ctx) error {
type AllProductsByAdminReq struct {
}
func AllProduct(c *fiber.Ctx) error {
_, err := auth.GetAuthCtx(c).PermitUser()
if err != nil {
return err
}
infos, err := s.Product.AllProductSaleInfos()
if err != nil {
return err
}
return c.JSON(infos)
}
func CreateProduct(c *fiber.Ctx) error {
_, err := auth.GetAuthCtx(c).PermitAdmin(core.ScopeProductWrite)
if err != nil {