Files
ycc-proxy-server/app/main/api/internal/handler/agent/getcommissionlisthandler.go

29 lines
702 B
Go
Raw Normal View History

2025-11-27 13:09:54 +08:00
package agent
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"ycc-server/app/main/api/internal/logic/agent"
"ycc-server/app/main/api/internal/svc"
"ycc-server/app/main/api/internal/types"
)
func GetCommissionListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.GetCommissionListReq
if err := httpx.Parse(r, &req); err != nil {
httpx.ErrorCtx(r.Context(), w, err)
return
}
l := agent.NewGetCommissionListLogic(r.Context(), svcCtx)
resp, err := l.GetCommissionList(&req)
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}