Bläddra i källkod

fix:更改请求方法

xmy 3 år sedan
förälder
incheckning
eec315af85
3 ändrade filer med 9 tillägg och 14 borttagningar
  1. 0 5
      api/internal/handler/routes.go
  2. 4 4
      api/internal/types/types.go
  3. 5 5
      api/jyinfo.api

+ 0 - 5
api/internal/handler/routes.go

@@ -82,11 +82,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/jyinfo/manage/infoList",
 				Handler: infoListHandler(serverCtx),
 			},
-			{
-				Method:  http.MethodGet,
-				Path:    "/jyinfo/manage/infoDetail",
-				Handler: infoDetailHandler(serverCtx),
-			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/jyinfo/manage/infoDetail",

+ 4 - 4
api/internal/types/types.go

@@ -17,7 +17,7 @@ type PubInfoReq struct {
 	Attach       map[string]interface{} `json:"attach,optional"`
 	Contact      Contact                `json:"contact"`
 	AppId        string                 `json:"appId"`
-	EntId        string                 `json:"entId"`
+	EntId        int64                  `json:"entId"`
 	UserId       string                 `json:"userId"`
 	ValidityTime string                 `json:"validityTime,optional"`
 	Phone        string                 `json:"phone"`
@@ -105,14 +105,14 @@ type UploadReq struct {
 
 type CommonReq struct {
 	UserId  string `json:"userId,optional"`
-	EntId   string `json:"entId,optional"`
+	EntId   int64  `json:"entId,optional"`
 	AppId   string `json:"appId"`
 	Match   string `json:"match,optional"`
 	MsgType int64  `json:"msgType,optional"`
 }
 
 type CommonRes struct {
-	Err_code int         `json:"err_code"`
-	Err_msg  string      `json:"err_msg"`
+	Err_code int         `json:"error_code"`
+	Err_msg  string      `json:"error_msg"`
 	Data     interface{} `json:"data"`
 }

+ 5 - 5
api/jyinfo.api

@@ -16,7 +16,7 @@ type (
 		Attach       map[string]interface{} `json:"attach,optional"`
 		Contact      Contact                `json:"contact"`
 		AppId        string                 `json:"appId"`
-		EntId        string                 `json:"entId"`
+		EntId        int64                  `json:"entId"`
 		UserId       string                 `json:"userId"`
 		ValidityTime string                 `json:"validityTime,optional"`
 		Phone        string                 `json:"phone"`
@@ -93,14 +93,14 @@ type (
 	}
 	commonReq {
 		UserId  string `json:"userId,optional"`
-		EntId   string `json:"entId,optional"`
+		EntId   int64  `json:"entId,optional"`
 		AppId   string `json:"appId"`
 		Match   string `json:"match,optional"`
 		MsgType int64  `json:"msgType,optional"`
 	}
 	commonRes {
-		Err_code int         `json:"err_code"`
-		Err_msg  string      `json:"err_msg"`
+		Err_code int         `json:"error_code"`
+		Err_msg  string      `json:"error_msg"`
 		Data     interface{} `json:"data"`
 	}
 )
@@ -149,7 +149,7 @@ service Info-api {
 	post /jyinfo/manage/infoList (infoListReq) returns (commonRes)
 	//管理后台信息详情
 	@handler infoDetail
-	get /jyinfo/manage/infoDetail (reviewCommonReq) returns (commonRes)
+	post /jyinfo/manage/infoDetail (reviewCommonReq) returns (commonRes)
 	//管理后台审核
 	@handler infoExamine
 	post /jyinfo/manage/infoExamine (infoExamineReq) returns (commonRes)