2025-01-20 01:55:44 +08:00
|
|
|
package douyin
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/rest/httpx"
|
|
|
|
"youtu_server/game_open_api/internal/logic/douyin"
|
|
|
|
"youtu_server/game_open_api/internal/svc"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetEcpmHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
|
|
l := douyin.NewGetEcpmLogic(r.Context(), svcCtx)
|
2025-01-20 10:10:08 +08:00
|
|
|
resp, err := l.GetEcpm()
|
2025-01-20 01:55:44 +08:00
|
|
|
if err != nil {
|
|
|
|
httpx.ErrorCtx(r.Context(), w, err)
|
|
|
|
} else {
|
|
|
|
httpx.OkJsonCtx(r.Context(), w, resp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|