Skip to content

Commit

Permalink
feat: 任务
Browse files Browse the repository at this point in the history
  • Loading branch information
Cbgogogog committed Dec 17, 2023
1 parent f6e0a28 commit a6d175d
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
9 changes: 9 additions & 0 deletions meowchat/content/content.proto
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,14 @@ message CountDonateByPlanResp {
int64 total = 1;
}

message GetContentMissionReq {
string userId = 1;
}

message GetContentMissionResp {
int64 ContentTime = 1;
}

service ContentService {
rpc SearchCat(SearchCatReq) returns (SearchCatResp);
rpc ListCat(ListCatReq) returns (ListCatResp);
Expand Down Expand Up @@ -368,4 +376,5 @@ service ContentService {
rpc RetrieveUserFish(RetrieveUserFishReq) returns (RetrieveUserFishResp);
rpc CountDonateByUser(CountDonateByUserReq) returns (CountDonateByUserResp);
rpc CountDonateByPlan(CountDonateByPlanReq) returns (CountDonateByPlanResp);
rpc GetContentMission(GetContentMissionReq) returns (GetContentMissionResp);
}
5 changes: 4 additions & 1 deletion meowchat/core_api/core_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ service user {
rpc SearchUser(SearchUserReq) returns (SearchUserResp){
option(http.get) = "/user/search_user";
}
rpc CheckIn (CheckInReq) returns (CheckInResp){
rpc CheckIn(CheckInReq) returns (CheckInResp){
option(http.get) = "/user/check_in";
}
rpc GetMission(GetMissionReq) returns (GetMissionResp){
option(http.get) = "/user/get_mission";
}
}

service auth {
Expand Down
14 changes: 14 additions & 0 deletions meowchat/core_api/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,17 @@ message CheckInResp {
int64 getFishTimes = 2;
int64 getFishNum = 3;
}

message GetMissionReq {
}

message GetMissionResp {
int64 SignInTime = 1;
int64 LikeTime = 2;
int64 CommentTime = 3;
int64 ContentTime = 4;
repeated int64 SignInFishes = 5;
repeated int64 LikeFishes = 6;
repeated int64 CommentFishes = 7;
repeated int64 ContentFishes = 8;
}
10 changes: 10 additions & 0 deletions meowchat/user/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ message CheckInResp {
int64 getFishTimes = 2;
}

message GetUserMissionReq {
string userId= 1;
}

message GetUserMissionResp {
int64 signInTime = 1;
int64 likeTime = 2;
}

service UserService {
rpc GetUser(GetUserReq) returns (GetUserResp);
rpc GetUserDetail(GetUserDetailReq) returns (GetUserDetailResp);
Expand All @@ -137,4 +146,5 @@ service UserService {
rpc GetUserLikes(GetUserLikesReq) returns (GetUserLikesResp);
// 查看喜欢某个东西的用户
rpc GetLikedUsers(GetLikedUsersReq) returns (GetLikedUsersResp);
rpc GetUserMission(GetUserMissionReq) returns (GetUserMissionResp);
}
10 changes: 9 additions & 1 deletion platform/comment/comment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ message ListCommentByReplyToAndTypeResp {
int64 total = 2;
}

message GetCommentMissionReq {
string userId = 1;
}

message GetCommentMissionResp {
int64 CommentTime = 1;
}

service CommentService {
// 创建
rpc createComment(CreateCommentReq) returns(CreateCommentResp);
Expand All @@ -129,5 +137,5 @@ service CommentService {
rpc listCommentByAuthorIdAndType(ListCommentByAuthorIdAndTypeReq) returns(ListCommentByAuthorIdAndTypeResp);
// 根据 replyTo & type 查找
rpc listCommentByReplyToAndType(ListCommentByReplyToAndTypeReq) returns(ListCommentByReplyToAndTypeResp);

rpc GetCommentMission(GetCommentMissionReq) returns(GetCommentMissionResp);
}

0 comments on commit a6d175d

Please sign in to comment.