Skip to content

Commit e2895da

Browse files
authored
Update README.md
1 parent cf39df7 commit e2895da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ APIJSON是一种JSON传输结构协议。<br />
170170
客户端对应不同需求的请求 | 传统方式 | APIJSON
171171
-------- | ------------ | ------------
172172
User | http://localhost:8080/get/user?id=1 | [http://localhost:8080/get/{"User":{"id":1}}](http://139.196.140.118:8080/get/{"User":{"id":38710}})
173-
Moment和对应的User | 分两次请求<br />Moment: http://localhost:8080/get/moment?userId=1<br />User: http://localhost:8080/get/user?id=1 | [http://localhost:8080/get/{"Moment":{"id":1}, "User":{"id@":"Moment/userId"}}](http://139.196.140.118:8080/get/%7B%22Moment%22%3A%7B%22id%22%3A15%7D%2C%22User%22%3A%7B%22id%40%22%3A%22Moment%252FuserId%22%7D%7D)
173+
Moment和对应的User | 分两次请求<br />Moment: http://localhost:8080/get/moment?userId=1<br />User: http://localhost:8080/get/user?id=1 | [http://localhost:8080/get/{"Moment":{"userId":1}, "User":{"id":1}}](http://139.196.140.118:8080/get/{"Moment":{"userId":38710},"User":{"id":38710}})
174174
User列表 | http://localhost:8080/get/user/list?page=0&count=3&sex=0 | [http://localhost:8080/get/{"[]":{"page":0, "count":3, "User":{"sex":0}}}](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":3,"User":{"sex":0}}})
175175
Moment列表,每个Moment包括发布者User和前3条Comment | Moment里必须有User的Object和Comment的Array<br /> http://localhost:8080/get/moment/list?page=0&count=3&commentCount=3 | [http://localhost:8080/get/{"[]":{"page":0, "count":3, "Moment":{}, "User":{"momentId@":"/Moment/id"}, "[]":{"count":3, "Comment":{"momentId@":"[]/Moment/id"}}}}](http://139.196.140.118:8080/get/%7B%22%5B%5D%22%3A%7B%22Moment%22%3A%7B%7D%2C%22User%22%3A%7B%22id%40%22%3A%22%252FMoment%252FuserId%22%7D%2C%22Comment%5B%5D%22%3A%7B%22Comment%22%3A%7B%22momentId%40%22%3A%22%255B%255D%252FMoment%252Fid%22%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%7D)
176176
User发布的Moment列表,每个Moment包括发布者User和前3条Comment | http://localhost:8080/get/moment/list?page=0&count=3&commentCount=3&userId=1 | 有以下几种方法:<br />①把以上请求里的"Moment":{}, "User":{"momentId@":"/Moment/id"}改为["Moment":{"userId":1}, "User":{"id":1}](http://139.196.140.118:8080/get/%7B%22%5B%5D%22%3A%7B%22Moment%22%3A%7B%22userId%22%3A38710%7D%2C%22User%22%3A%7B%22id%22%3A38710%7D%2C%22%5B%5D%22%3A%7B%22Comment%22%3A%7B%22momentId%40%22%3A%22%255B%255D%252FMoment%252Fid%22%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%7D) <br /><br />②或这样省去4条重复User<br />[http://localhost:8080/get/{"User":{"id":1}, "[]":{"page":0, "count":3, "Moment":{"userId":1}, "[]":{"count":3, "Comment":{"momentId@":"[]/Moment/id"}}}}](http://139.196.140.118:8080/get/%7B%22User%22%3A%7B%22id%22%3A38710%7D%2C%22%5B%5D%22%3A%7B%22Moment%22%3A%7B%22userId%22%3A38710%7D%2C%22%5B%5D%22%3A%7B%22Comment%22%3A%7B%22momentId%40%22%3A%22%255B%255D%252FMoment%252Fid%22%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%7D)<br /><br />③如果User之前已经获取到了,还可以这样省去所有重复User<br />[http://localhost:8080/get/{"[]":{"page":0, "count":3, "Moment":{"userId":1}, "[]":{"count":3, "Comment":{"momentId@":"[]/Moment/id"}}}}](http://139.196.140.118:8080/get/%7B%22%5B%5D%22%3A%7B%22Moment%22%3A%7B%22userId%22%3A38710%7D%2C%22%5B%5D%22%3A%7B%22Comment%22%3A%7B%22momentId%40%22%3A%22%255B%255D%252FMoment%252Fid%22%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%7D)

0 commit comments

Comments
 (0)