28 lines
690 B
Go
28 lines
690 B
Go
package handler
|
|
|
|
import (
|
|
"errors"
|
|
"net/http"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
"github.com/zeromicro/go-zero/rest/httpx"
|
|
|
|
"fusenapi/server/data-transfer/internal/logic"
|
|
"fusenapi/server/data-transfer/internal/svc"
|
|
)
|
|
|
|
// 获取二维码配置列表
|
|
func GetQrCodeSetListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
l := logic.NewGetQrCodeSetListLogic(r.Context(), svcCtx)
|
|
resp := l.GetQrCodeSetList()
|
|
if resp != nil {
|
|
httpx.OkJsonCtx(r.Context(), w, resp)
|
|
} else {
|
|
err := errors.New("server logic is error, resp must not be nil")
|
|
httpx.ErrorCtx(r.Context(), w, err)
|
|
logx.Error(err)
|
|
}
|
|
}
|
|
}
|