完成社会服务业务层代码
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.9.2
|
||||
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
socialService2 "github.com/JACKYMYPERSON/hldrCenter/internal/social_service/handler/socialService"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
Path: "/",
|
||||
Handler: socialService2.CreateSocialServiceHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/:id",
|
||||
Handler: socialService2.GetSocialServiceHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodPut,
|
||||
Path: "/:id",
|
||||
Handler: socialService2.UpdateSocialServiceHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodDelete,
|
||||
Path: "/:id",
|
||||
Handler: socialService2.DeleteSocialServiceHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/list",
|
||||
Handler: socialService2.ListSocialServiceHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/api/social-service"),
|
||||
)
|
||||
}
|
||||
@@ -6,13 +6,13 @@ package socialService
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/logic/socialService"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func CreateSocialServiceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func CreateSocialServiceHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.CreateSocialServiceReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package socialService
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/logic/socialService"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func DeleteSocialServiceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func DeleteSocialServiceHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.DeleteSocialServiceReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package socialService
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/logic/socialService"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func GetSocialServiceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func GetSocialServiceHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.GetSocialServiceReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package socialService
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/logic/socialService"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func ListSocialServiceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func ListSocialServiceHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.ListSocialServiceReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package socialService
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/logic/socialService"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/social_service/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func UpdateSocialServiceHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func UpdateSocialServiceHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.UpdateSocialServiceReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user