增加软质押手动结算测试接口
This commit is contained in:
22
internal/handler/admin/stake_settle_handler.go
Normal file
22
internal/handler/admin/stake_settle_handler.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
"nova_task/internal/logic/admin"
|
||||
"nova_task/internal/svc"
|
||||
)
|
||||
|
||||
// 软质压手动结算
|
||||
func StakeSettleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := admin.NewStakeSettleLogic(r.Context(), svcCtx)
|
||||
err := l.StakeSettle()
|
||||
if err != nil {
|
||||
httpx.ErrorCtx(r.Context(), w, err)
|
||||
} else {
|
||||
httpx.Ok(w)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user