You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: get_sms_provider_by_id_handler.go
    path of file: ./repos/simple-admin-core/api/internal/handler/smsprovider
    
    the code of the file until where you have to start completion: package smsprovider

import (
	"net/http"

	"github.com/zeromicro/go-zero/rest/httpx"

	"github.com/suyuan32/simple-admin-core/api/internal/logic/smsprovider"
	"github.com/suyuan32/simple-admin-core/api/internal/svc"
	"github.com/suyuan32/simple-admin-core/api/internal/types"
)

// swagger:route post /sms_provider smsprovider GetSmsProviderById
//
// Get sms provider by ID | 通过ID获取短信配置
//
// Get sms provider by ID | 通过ID获取短信配置
//
// Parameters:
//  + name: body
//    require
    
func GetSmsProviderByIdHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		var req types.IDReq
		if err := httpx.Parse(r, &req, true); err != nil {
			httpx.ErrorCtx(r.Context(), w, err)
			return
		}

		l := smsprovider.NewGetSmsProviderByIdLogic(r.Context(), svcCtx)
		resp, err := l.GetSmsProviderById(&req)
		if err != nil {
			err = svcCtx.Trans.TransError(r.Context(), err)
			httpx.ErrorCtx(r.Context(), w, err)
		} else {
			httpx.OkJsonCtx(r.Context(), w, resp)
		}
	}
}