first commit

This commit is contained in:
2024-10-02 00:57:17 +08:00
commit 6773f86bc5
312 changed files with 19169 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package review
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"tianyuan-api/apps/admin/internal/logic/review"
"tianyuan-api/apps/admin/internal/svc"
"tianyuan-api/apps/admin/internal/types"
xhttp "github.com/zeromicro/x/http"
)
func GetPendingEnterpriseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.GetPendingEnterpriseReq
if err := httpx.Parse(r, &req); err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := review.NewGetPendingEnterpriseLogic(r.Context(), svcCtx)
resp, err := l.GetPendingEnterprise(&req)
if err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
} else {
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
}
}
}

View File

@@ -0,0 +1,30 @@
package review
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"tianyuan-api/apps/admin/internal/logic/review"
"tianyuan-api/apps/admin/internal/svc"
"tianyuan-api/apps/admin/internal/types"
xhttp "github.com/zeromicro/x/http"
)
func ReviewEnterpriseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req types.ReviewEnterpriseReq
if err := httpx.Parse(r, &req); err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
return
}
l := review.NewReviewEnterpriseLogic(r.Context(), svcCtx)
resp, err := l.ReviewEnterprise(&req)
if err != nil {
xhttp.JsonBaseResponseCtx(r.Context(), w, err)
} else {
xhttp.JsonBaseResponseCtx(r.Context(), w, resp)
}
}
}