完善套餐与账单接口 & 完善支付数据保存,记录实付价格并关联优惠券
This commit is contained in:
@@ -4,6 +4,9 @@ import (
|
||||
"platform/pkg/env"
|
||||
auth2 "platform/web/auth"
|
||||
"platform/web/handlers"
|
||||
"time"
|
||||
|
||||
q "platform/web/queries"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
@@ -23,6 +26,13 @@ func ApplyRouters(app *fiber.App) {
|
||||
debug.Get("/sms/:phone", handlers.DebugGetSmsCode)
|
||||
debug.Get("/proxy/register", handlers.DebugRegisterProxyBaiYin)
|
||||
debug.Get("/iden/clear/:phone", handlers.DebugIdentifyClear)
|
||||
debug.Get("/session/now", func(ctx *fiber.Ctx) error {
|
||||
rs, err := q.Session.Where(q.Session.AccessTokenExpires.Gt(time.Now())).Find()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ctx.JSON(rs)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +146,7 @@ func adminRouter(api fiber.Router) {
|
||||
var resource = api.Group("/resource")
|
||||
resource.Post("/short/page", handlers.PageResourceShortByAdmin)
|
||||
resource.Post("/long/page", handlers.PageResourceLongByAdmin)
|
||||
resource.Post("/update", handlers.UpdateResourceByAdmin)
|
||||
|
||||
// batch 批次
|
||||
var usage = api.Group("batch")
|
||||
@@ -159,6 +170,7 @@ func adminRouter(api fiber.Router) {
|
||||
product.Post("/create", handlers.CreateProduct)
|
||||
product.Post("/update", handlers.UpdateProduct)
|
||||
product.Post("/remove", handlers.DeleteProduct)
|
||||
product.Post("/sku/all", handlers.AllProductSkuByAdmin)
|
||||
product.Post("/sku/page", handlers.PageProductSkuByAdmin)
|
||||
product.Post("/sku/create", handlers.CreateProductSku)
|
||||
product.Post("/sku/update", handlers.UpdateProductSku)
|
||||
|
||||
Reference in New Issue
Block a user