mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-02 16:15:59 +08:00
api
This commit is contained in:
@@ -103,6 +103,16 @@ type GetGroupApplicationListResp struct {
|
||||
Data []map[string]interface{} `json:"data"`
|
||||
}
|
||||
|
||||
type GetUserReqGroupApplicationListReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
}
|
||||
|
||||
type GetUserRespGroupApplicationResp struct {
|
||||
CommResp
|
||||
GroupRequestList []*open_im_sdk.GroupRequest `json:"-"`
|
||||
}
|
||||
|
||||
type GetGroupInfoReq struct {
|
||||
GroupIDList []string `json:"groupIDList" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
|
||||
@@ -225,6 +225,7 @@ func IsGroupOwnerAdmin(groupID, UserID string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//func SelectGroupList(groupID string) ([]string, error) {
|
||||
// var groupUserID string
|
||||
|
||||
@@ -117,6 +117,18 @@ func GetGroupApplicationList(userID string) ([]db.GroupRequest, error) {
|
||||
return groupRequestList, nil
|
||||
}
|
||||
|
||||
func GetUserReqGroupByUserID(userID string) ([]db.GroupRequest, error) {
|
||||
var groupRequestList []db.GroupRequest
|
||||
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dbConn.LogMode(true)
|
||||
err = dbConn.Table("group_requests").Where("user_id=?", userID).Find(&groupRequestList).Error
|
||||
return groupRequestList, err
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//func GroupApplicationResponse(pb *group.GroupApplicationResponseReq) (*group.CommonResp, error) {
|
||||
//
|
||||
|
||||
+2533
-1283
File diff suppressed because it is too large
Load Diff
@@ -61,6 +61,17 @@ message GetGroupApplicationListResp {
|
||||
repeated server_api_params.GroupRequest GroupRequestList = 3;
|
||||
}
|
||||
|
||||
message GetUserReqApplicationListReq{
|
||||
string UserID = 1;
|
||||
string OpUserID = 2;
|
||||
string OperationID = 3;
|
||||
}
|
||||
|
||||
message GetUserReqApplicationListResp{
|
||||
CommonResp CommonResp = 1;
|
||||
repeated server_api_params.GroupRequest GroupRequestList = 2;
|
||||
}
|
||||
|
||||
|
||||
message TransferGroupOwnerReq {
|
||||
string GroupID = 1;
|
||||
@@ -204,6 +215,7 @@ service group{
|
||||
rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp);
|
||||
rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp);
|
||||
rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp);
|
||||
rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp);
|
||||
rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp);
|
||||
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp);
|
||||
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
|
||||
|
||||
Reference in New Issue
Block a user