完善套餐与账单接口 & 完善支付数据保存,记录实付价格并关联优惠券
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user