modify: 手动结算软质押奖励支持指定日期

This commit is contained in:
lianghuanjie
2025-01-13 11:04:27 +08:00
parent 70848daafc
commit 76d7cbf575
7 changed files with 79 additions and 23 deletions

View File

@@ -6,13 +6,20 @@ import (
"github.com/zeromicro/go-zero/rest/httpx"
"nova_task/internal/logic/admin"
"nova_task/internal/svc"
"nova_task/internal/types"
)
// 软质压手动结算
func StakeSettleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.StakeSettleReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := admin.NewStakeSettleLogic(r.Context(), svcCtx)
err := l.StakeSettle()
err := l.StakeSettle(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {