浏览代码

feat;更新

wangshan 3 年之前
父节点
当前提交
8a5292e79b

+ 2 - 2
jyBXSubscribe/api/bxsubscribe.api

@@ -27,7 +27,7 @@ type (
 	//
 	//
 	someInfoReq {
 	someInfoReq {
 		AppId    string `json:"appId"`
 		AppId    string `json:"appId"`
-		UserType string `json:"userType"`
+		UserType string `path:"userType"`
 	}
 	}
 	//
 	//
 	commonResp {
 	commonResp {
@@ -40,5 +40,5 @@ service bxsubscribe-api {
 	@handler subscribeList
 	@handler subscribeList
 	post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
 	post /jybx/subscribe/:userType/list(subscribeReq) returns (commonResp)
 	@handler someInfo
 	@handler someInfo
-	post /jybx/subscribe/someInfo(someInfoReq) returns (commonResp)
+	post /jybx/subscribe/:userType/someInfo(someInfoReq) returns (commonResp)
 }
 }

+ 1 - 1
jyBXSubscribe/api/internal/handler/routes.go

@@ -19,7 +19,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			},
 			{
 			{
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/jybx/subscribe/someInfo",
+				Path:    "/jybx/subscribe/:userType/someInfo",
 				Handler: someInfoHandler(serverCtx),
 				Handler: someInfoHandler(serverCtx),
 			},
 			},
 		},
 		},

+ 1 - 1
jyBXSubscribe/api/internal/types/types.go

@@ -19,7 +19,7 @@ type SubscribeReq struct {
 
 
 type SomeInfoReq struct {
 type SomeInfoReq struct {
 	AppId    string `json:"appId"`
 	AppId    string `json:"appId"`
-	UserType string `json:"userType"`
+	UserType string `path:"userType"`
 }
 }
 
 
 type CommonResp struct {
 type CommonResp struct {