feat: 添加短信验证码发送记录功能
This commit is contained in:
@@ -33,8 +33,9 @@ func (ctl *orders) List(ctx fiber.Ctx, pagination *requests.Pagination, query *O
|
||||
}
|
||||
|
||||
// Refund
|
||||
// @Router /admin/orders/:id/refund [post]
|
||||
// @Bind id path
|
||||
//
|
||||
// @Router /admin/orders/:id/refund [post]
|
||||
// @Bind id path
|
||||
func (ctl *orders) Refund(ctx fiber.Ctx, id int64) error {
|
||||
order, err := model.OrdersModel().GetByID(ctx.Context(), id)
|
||||
if err != nil {
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"quyun/app/requests"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
log "github.com/sirupsen/logrus"
|
||||
_ "go.ipao.vip/atom"
|
||||
_ "go.ipao.vip/atom/contracts"
|
||||
. "go.ipao.vip/atom/fen"
|
||||
"quyun/app/requests"
|
||||
)
|
||||
|
||||
// @provider contracts.HttpRoute atom.GroupRoutes
|
||||
// @provider contracts.HttpRoute atom.GroupRoutes
|
||||
type Routes struct {
|
||||
log *log.Entry `inject:"false"`
|
||||
auth *auth
|
||||
|
||||
@@ -3,16 +3,17 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"quyun/app/model"
|
||||
"quyun/app/requests"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
log "github.com/sirupsen/logrus"
|
||||
_ "go.ipao.vip/atom"
|
||||
_ "go.ipao.vip/atom/contracts"
|
||||
. "go.ipao.vip/atom/fen"
|
||||
"quyun/app/model"
|
||||
"quyun/app/requests"
|
||||
)
|
||||
|
||||
// @provider contracts.HttpRoute atom.GroupRoutes
|
||||
// @provider contracts.HttpRoute atom.GroupRoutes
|
||||
type Routes struct {
|
||||
log *log.Entry `inject:"false"`
|
||||
auth *auth
|
||||
|
||||
@@ -16,9 +16,10 @@ type wechats struct {
|
||||
}
|
||||
|
||||
// GetJsSDK
|
||||
// @Router /wechats/js-sdk [get]
|
||||
// @Bind url query
|
||||
// @Bind user local
|
||||
//
|
||||
// @Router /wechats/js-sdk [get]
|
||||
// @Bind url query
|
||||
// @Bind user local
|
||||
func (ctl *wechats) GetJsSDK(ctx fiber.Ctx, url string, user *model.Users) (*wechat.JsSDK, error) {
|
||||
if user.AuthToken.Data.StableExpiresAt.Before(time.Now()) {
|
||||
token, err := ctl.wechat.RefreshAccessToken(user.AuthToken.Data.RefreshToken)
|
||||
|
||||
Reference in New Issue
Block a user