feat: 积分质押功能

This commit is contained in:
2025-04-03 16:17:20 +08:00
parent 229f1d181b
commit 8119bcefdc
40 changed files with 2552 additions and 108 deletions

View File

@@ -0,0 +1,30 @@
package admin
import (
"net/http"
"nova_task/internal/pkg/errs"
"github.com/zeromicro/go-zero/rest/httpx"
"nova_task/internal/logic/admin"
"nova_task/internal/svc"
"nova_task/internal/types"
)
// GameAction
func GameActionHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.GameActionReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := admin.NewGameActionLogic(r.Context(), svcCtx)
resp, err := l.GameAction(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
errs.WriteHttpResponse(r.Context(), w, resp)
}
}
}