pull/131/head
wangchuxiao 3 years ago
parent fb396d9cf0
commit a7f9faf868

@ -0,0 +1,13 @@
package main
import (
"Open_IM/internal/rpc/statistics"
"flag"
)
func main() {
rpcPort := flag.Int("port", 10800, "rpc listening port")
flag.Parse()
rpcServer := statistics.NewStatisticsServer(*rpcPort)
rpcServer.Run()
}

@ -1,14 +0,0 @@
package main
import (
"Open_IM/internal/rpc/user"
"flag"
)
func main() {
rpcPort := flag.Int("port", 10100, "rpc listening port")
flag.Parse()
rpcServer := user.NewUserServer(*rpcPort)
rpcServer.Run()
}

@ -92,6 +92,7 @@ rpcport:
openImGroupPort: [ 10500 ]
openImAuthPort: [ 10600 ]
openImPushPort: [ 10700 ]
openImOpenImStatisticPort: [ 10800 ]
c2c:
callbackBeforeSendMsg:
switch: false
@ -110,6 +111,7 @@ rpcregistername:
openImOnlineMessageRelayName: OnlineMessageRelay
openImGroupName: Group
openImAuthName: Auth
OpenImStatisticsName: Statistics
log:
storageLocation: ../logs/

@ -20,8 +20,8 @@ import (
func GetGroupById(c *gin.Context) {
var (
req cms_api_struct.GetGroupByIdRequest
resp cms_api_struct.GetGroupByIdResponse
req cms_api_struct.GetGroupByIdRequest
resp cms_api_struct.GetGroupByIdResponse
reqPb pbGroup.GetGroupByIdReq
)
if err := c.ShouldBindQuery(&req); err != nil {
@ -33,7 +33,7 @@ func GetGroupById(c *gin.Context) {
client := pbGroup.NewGroupClient(etcdConn)
respPb, err := client.GetGroupById(context.Background(), &reqPb)
if err != nil {
log.NewError(utils.GetSelfFuncName(), "GetUserInfo failed ", err.Error())
log.NewError(utils.GetSelfFuncName(), "GetGroupById failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
@ -43,7 +43,7 @@ func GetGroupById(c *gin.Context) {
resp.CreateTime = (utils.UnixSecondToTime(int64(respPb.GroupInfo.CreateTime))).String()
resp.ProfilePhoto = respPb.GroupInfo.FaceURL
resp.GroupMasterName = respPb.GroupInfo.OwnerUserID
openIMHttp.RespHttp200(c, constant.OK, nil)
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetGroups(c *gin.Context) {
@ -141,7 +141,7 @@ func CreateGroup(c *gin.Context) {
reqPb.GroupInfo.CreatorUserID = req.GroupMasterId
for _, v := range req.GroupMembers {
reqPb.InitMemberList = append(reqPb.InitMemberList, &pbGroup.GroupAddMemberInfo{
UserID: v,
UserID: v,
RoleLevel: 1,
})
}
@ -249,7 +249,6 @@ func OpenPrivateChat(c *gin.Context) {
openIMHttp.RespHttp200(c, constant.OK, nil)
}
func GetGroupsMember(c *gin.Context) {
var (
req cms_api_struct.GetGroupMembersRequest

@ -1,25 +1,21 @@
package message
import (
"github.com/gin-gonic/gin"
)
func Broadcast(c *gin.Context) {
openIMHttp "Open_IM/pkg/common/http"
}
func SearchMessageByUser(c *gin.Context) {
"Open_IM/pkg/common/constant"
}
func SearchMessageByGroup(c *gin.Context) {
"github.com/gin-gonic/gin"
)
func BroadcastMessage(c *gin.Context) {
openIMHttp.RespHttp200(c, constant.OK, nil)
}
func MassSendMassage(c *gin.Context) {
openIMHttp.RespHttp200(c, constant.OK, nil)
}
func Withdraw(c *gin.Context) {
func WithdrawMessage(c *gin.Context) {
openIMHttp.RespHttp200(c, constant.OK, nil)
}

@ -21,15 +21,14 @@ func NewGinRouter() *gin.Engine {
adminRouterGroup := router.Group("/admin")
{
adminRouterGroup.POST("/register", admin.AdminRegister)
adminRouterGroup.POST("/login", admin.AdminLogin)
adminRouterGroup.GET("/get_user_settings", admin.GetAdminSettings)
adminRouterGroup.POST("/alter_user_settings", admin.AlterAdminSettings)
}
statisticsRouterGroup := router.Group("/statistics")
{
statisticsRouterGroup.GET("/get_messages_statistics", statistics.GetMessagesStatistics)
statisticsRouterGroup.GET("/get_users_statistics", statistics.GetUsersStatistics)
statisticsRouterGroup.GET("/get_groups_statistics", statistics.GetGroupsStatistics)
statisticsRouterGroup.GET("/get_user_statistics", statistics.GetUserStatistics)
statisticsRouterGroup.GET("/get_group_statistics", statistics.GetGroupStatistics)
statisticsRouterGroup.GET("/get_active_user", statistics.GetActiveUser)
statisticsRouterGroup.GET("/get_active_group", statistics.GetActiveGroup)
}
@ -49,11 +48,9 @@ func NewGinRouter() *gin.Engine {
}
messageRouterGroup := router.Group("/message")
{
messageRouterGroup.POST("/broadcast", message.Broadcast)
messageRouterGroup.GET("/search_message_by_user", message.SearchMessageByUser)
messageRouterGroup.POST("/message_mass_send", message.MassSendMassage)
messageRouterGroup.GET("/search_message_by_group", message.SearchMessageByGroup)
messageRouterGroup.POST("/withdraw_message", message.Withdraw)
messageRouterGroup.POST("/broadcast_message", message.BroadcastMessage)
messageRouterGroup.POST("/mass_send_message", message.MassSendMassage)
messageRouterGroup.POST("/withdraw_message", message.WithdrawMessage)
}
groupRouterGroup := router.Group("/group")
{
@ -75,14 +72,15 @@ func NewGinRouter() *gin.Engine {
userRouterGroup := router.Group("/user")
{
userRouterGroup.POST("/resign", user.ResignUser)
userRouterGroup.GET("/get_user", user.GetUser)
userRouterGroup.GET("/get_user_by_id", user.GetUserById)
userRouterGroup.POST("/alter_user", user.AlterUser)
userRouterGroup.GET("/get_users", user.GetUsers)
userRouterGroup.POST("/add_user", user.AddUser)
userRouterGroup.POST("/unblock_user", user.UnblockUser)
userRouterGroup.POST("/block_user", user.BlockUser)
userRouterGroup.GET("/get_block_users", user.GetBlockUsers)
userRouterGroup.GET("/get_block_user", user.GetBlockUser)
userRouterGroup.GET("/get_block_user_by_id", user.GetBlockUserById)
userRouterGroup.POST("/delete_user", user.DeleteUser)
}
return baseRouter
}

@ -2,30 +2,221 @@ package statistics
import (
"Open_IM/pkg/cms_api_struct"
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant"
openIMHttp "Open_IM/pkg/common/http"
"Open_IM/pkg/common/log"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pb "Open_IM/pkg/proto/statistics"
"Open_IM/pkg/utils"
"context"
"strings"
"github.com/gin-gonic/gin"
statisticsPb "Open_IM/pkg/proto/statistics"
)
func GetMessagesStatistics(c *gin.Context) {
var (
req cms_api_struct.GetGroupMembersRequest
resp cms_api_struct.GetGroupMembersResponse
reqPb statisticsPb.GetMessageStatisticsReq
req cms_api_struct.GetMessageStatisticsRequest
resp cms_api_struct.GetMessageStatisticsResponse
reqPb pb.GetMessageStatisticsReq
)
reqPb.StatisticsReq = &pb.StatisticsReq{}
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetMessageStatistics(context.Background(), &reqPb)
if err != nil {
openIMHttp.RespHttp200(c, constant.ErrServer, resp)
log.NewError("0", utils.GetSelfFuncName(), err.Error())
return
}
// utils.CopyStructFields(&resp, respPb)
resp.GroupMessageNum = int(respPb.GroupMessageNum)
resp.PrivateMessageNum = int(respPb.PrivateMessageNum)
for _, v := range respPb.PrivateMessageNumList {
resp.PrivateMessageNumList = append(resp.PrivateMessageNumList, struct {
Date string "json:\"date\""
MessageNum int "json:\"message_num\""
}{
Date: v.Date,
MessageNum: int(v.Num),
})
}
for _, v := range respPb.GroupMessageNumList {
resp.GroupMessageNumList = append(resp.GroupMessageNumList, struct {
Date string "json:\"date\""
MessageNum int "json:\"message_num\""
}{
Date: v.Date,
MessageNum: int(v.Num),
})
}
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetUsersStatistics(c *gin.Context) {
func GetUserStatistics(c *gin.Context) {
var (
req cms_api_struct.GetUserStatisticsRequest
resp cms_api_struct.GetUserStatisticsResponse
reqPb pb.GetUserStatisticsReq
)
reqPb.StatisticsReq = &pb.StatisticsReq{}
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", utils.GetSelfFuncName(), "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetUserStatistics(context.Background(), &reqPb)
if err != nil {
log.NewError("0", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
// utils.CopyStructFields(&resp, respPb)
resp.ActiveUserNum = int(respPb.ActiveUserNum)
resp.IncreaseUserNum = int(respPb.IncreaseUserNum)
resp.TotalUserNum = int(respPb.TotalUserNum)
for _, v := range respPb.ActiveUserNumList {
resp.ActiveUserNumList = append(resp.ActiveUserNumList, struct {
Date string "json:\"date\""
ActiveUserNum int "json:\"active_user_num\""
}{
Date: v.Date,
ActiveUserNum: int(v.Num),
})
}
for _, v := range respPb.IncreaseUserNumList {
resp.IncreaseUserNumList = append(resp.IncreaseUserNumList, struct {
Date string "json:\"date\""
IncreaseUserNum int "json:\"increase_user_num\""
}{
Date: v.Date,
IncreaseUserNum: int(v.Num),
})
}
for _, v := range respPb.TotalUserNumList {
resp.TotalUserNumList = append(resp.TotalUserNumList, struct {
Date string "json:\"date\""
TotalUserNum int "json:\"total_user_num\""
}{
Date: v.Date,
TotalUserNum: int(v.Num),
})
}
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetGroupsStatistics(c *gin.Context) {
func GetGroupStatistics(c *gin.Context) {
var (
req cms_api_struct.GetGroupStatisticsRequest
resp cms_api_struct.GetGroupStatisticsResponse
reqPb pb.GetGroupStatisticsReq
)
reqPb.StatisticsReq = &pb.StatisticsReq{}
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
utils.CopyStructFields(&reqPb.StatisticsReq, &req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetGroupStatistics(context.Background(), &reqPb)
if err != nil {
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
// utils.CopyStructFields(&resp, respPb)
resp.IncreaseGroupNum = int(respPb.GetIncreaseGroupNum())
resp.TotalGroupNum = int(respPb.GetTotalGroupNum())
for _, v := range respPb.IncreaseGroupNumList {
resp.IncreaseGroupNumList = append(resp.IncreaseGroupNumList,
struct {
Date string "json:\"date\""
IncreaseGroupNum int "json:\"increase_group_num\""
}{
Date: v.Date,
IncreaseGroupNum: int(v.Num),
})
}
for _, v := range respPb.TotalGroupNumList {
resp.TotalGroupNumList = append(resp.TotalGroupNumList,
struct {
Date string "json:\"date\""
TotalGroupNum int "json:\"total_group_num\""
}{
Date: v.Date,
TotalGroupNum: int(v.Num),
})
}
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetActiveUser(c *gin.Context) {
var (
req cms_api_struct.GetActiveUserRequest
resp cms_api_struct.GetActiveUserResponse
reqPb pb.GetActiveUserReq
)
reqPb.StatisticsReq = &pb.StatisticsReq{}
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
utils.CopyStructFields(&reqPb.StatisticsReq, req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetActiveUser(context.Background(), &reqPb)
if err != nil {
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
utils.CopyStructFields(&resp.ActiveUserList, respPb.Users)
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetActiveGroup(c *gin.Context) {
var (
req cms_api_struct.GetActiveGroupRequest
resp cms_api_struct.GetActiveGroupResponse
reqPb pb.GetActiveGroupReq
)
reqPb.StatisticsReq = &pb.StatisticsReq{}
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
utils.CopyStructFields(&reqPb.StatisticsReq, req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImStatisticsName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetActiveGroup(context.Background(), &reqPb)
if err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
for _, group := range respPb.Groups {
resp.ActiveGroupList = append(resp.ActiveGroupList, struct {
GroupName string "json:\"group_name\""
GroupId string "json:\"group_id\""
MessageNum int "json:\"message_num\""
}{
GroupName: group.GroupName,
GroupId: group.GroupId,
MessageNum: int(group.MessageNum),
})
}
openIMHttp.RespHttp200(c, constant.OK, resp)
}

@ -18,23 +18,23 @@ import (
"github.com/gin-gonic/gin"
)
func GetUser(c *gin.Context) {
func GetUserById(c *gin.Context) {
var (
req cms_api_struct.GetUserRequest
resp cms_api_struct.GetUserResponse
reqPb pb.GetUserReq
reqPb pb.GetUserByIdReq
)
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", "ShouldBindQuery failed ", err.Error())
log.NewError("GetUser", utils.GetSelfFuncName(), "ShouldBindQuery failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
utils.CopyStructFields(&reqPb, &req)
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetUser(context.Background(), &reqPb)
respPb, err := client.GetUserById(context.Background(), &reqPb)
if err != nil {
log.NewError("s", "GetUserInfo failed ", err.Error())
log.NewError("GetUserFailed", utils.GetSelfFuncName(), err.Error())
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
@ -67,7 +67,6 @@ func GetUsers(c *gin.Context) {
return
}
utils.CopyStructFields(&resp.Users, respPb.User)
resp.UserNum = int(respPb.UserNum)
resp.ShowNumber = int(respPb.Pagination.ShowNumber)
resp.CurrentPage = int(respPb.Pagination.CurrentPage)
openIMHttp.RespHttp200(c, constant.OK, resp)
@ -101,7 +100,6 @@ func AlterUser(c *gin.Context) {
req cms_api_struct.AlterUserRequest
resp cms_api_struct.AlterUserResponse
reqPb pb.AlterUserReq
_ *pb.AlterUserResp
)
if err := c.BindJSON(&req); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
@ -222,28 +220,29 @@ func GetBlockUsers(c *gin.Context) {
EndDisableTime: v.EndDisableTime,
})
}
resp.BlockUserNum = int(respPb.BlockUserNum)
resp.ShowNumber = int(respPb.Pagination.ShowNumber)
resp.CurrentPage = int(respPb.Pagination.CurrentPage)
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func GetBlockUser(c *gin.Context) {
func GetBlockUserById(c *gin.Context) {
var (
req cms_api_struct.GetBlockUserRequest
resp cms_api_struct.GetBlockUserResponse
reqPb pb.GetBlockUserReq
reqPb pb.GetBlockUserByIdReq
)
if err := c.ShouldBindQuery(&req); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
reqPb.UserId = req.UserId
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
client := pb.NewUserClient(etcdConn)
respPb, err := client.GetBlockUser(context.Background(), &reqPb)
respPb, err := client.GetBlockUserById(context.Background(), &reqPb)
if err != nil {
openIMHttp.RespHttp200(c, constant.ErrServer, resp)
log.NewError("0", "GetBlockUserById rpc failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
resp.EndDisableTime = respPb.BlockUser.EndDisableTime
@ -251,3 +250,25 @@ func GetBlockUser(c *gin.Context) {
utils.CopyStructFields(&resp, respPb.BlockUser.User)
openIMHttp.RespHttp200(c, constant.OK, resp)
}
func DeleteUser(c *gin.Context) {
var (
req cms_api_struct.DeleteUserRequest
reqPb pb.DeleteUserReq
)
if err := c.BindJSON(&req); err != nil {
log.NewError("0", "BindJSON failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrArgs, nil)
return
}
reqPb.UserId = req.UserId
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName)
client := pb.NewUserClient(etcdConn)
_, err := client.DeleteUser(context.Background(), &reqPb)
if err != nil {
log.NewError("0", "DeleteUser rpc failed ", err.Error())
openIMHttp.RespHttp200(c, constant.ErrServer, nil)
return
}
openIMHttp.RespHttp200(c, constant.OK, nil)
}

@ -648,16 +648,15 @@ func (s *groupServer) GetGroupById(_ context.Context, req *pbGroup.GetGroupByIdR
return resp, err
}
resp.GroupInfo = &open_im_sdk.GroupInfo{
GroupID: group.GroupID,
GroupName: group.GroupName,
FaceURL: group.FaceUrl,
OwnerUserID: group.CreatorUserID,
GroupID: group.GroupID,
GroupName: group.GroupName,
FaceURL: group.FaceUrl,
OwnerUserID: group.CreatorUserID,
MemberCount: 0,
Status: group.Status,
CreatorUserID: group.CreatorUserID,
GroupType: group.GroupType,
GroupType: group.GroupType,
}
resp.GroupInfo.CreatorUserID = group.CreatorUserID
return resp, nil
}
@ -721,7 +720,7 @@ func (s *groupServer) GetGroups(_ context.Context, req *pbGroup.GetGroupsReq) (*
}
func (s *groupServer) OperateGroupStatus(_ context.Context, req *pbGroup.OperateGroupStatusReq) (*pbGroup.OperateGroupStatusResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
resp := &pbGroup.OperateGroupStatusResp{}
if err := imdb.OperateGroupStatus(req.GroupId, req.Status); err != nil {
return resp, err

@ -2,13 +2,19 @@ package statistics
import (
"Open_IM/pkg/common/config"
"context"
"fmt"
"time"
//"Open_IM/pkg/common/constant"
//"Open_IM/pkg/common/db"
//imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log"
//cp "Open_IM/pkg/common/utils"
"Open_IM/pkg/grpc-etcdv3/getcdv3"
pbStatistics "Open_IM/pkg/proto/statistics"
//open_im_sdk "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils"
//"context"
@ -26,18 +32,18 @@ type statisticsServer struct {
etcdAddr []string
}
func NewStatisticsGroupServer(port int) *statisticsServer {
log.NewPrivateLog("group")
func NewStatisticsServer(port int) *statisticsServer {
log.NewPrivateLog("Statistics")
return &statisticsServer{
rpcPort: port,
rpcRegisterName: config.Config.RpcRegisterName.OpenImGroupName,
rpcRegisterName: config.Config.RpcRegisterName.OpenImStatisticsName,
etcdSchema: config.Config.Etcd.EtcdSchema,
etcdAddr: config.Config.Etcd.EtcdAddr,
}
}
func (s *statisticsServer) Run() {
log.NewInfo("0", "group rpc start ")
log.NewInfo("0", "Statistics rpc start ")
ip := utils.ServerIP
registerAddress := ip + ":" + strconv.Itoa(s.rpcPort)
//listener network
@ -63,5 +69,270 @@ func (s *statisticsServer) Run() {
log.NewError("0", "Serve failed ", err.Error())
return
}
log.NewInfo("0", "group rpc success")
}
log.NewInfo("0", "statistics rpc success")
}
func (s *statisticsServer) GetActiveGroup(_ context.Context, req *pbStatistics.GetActiveGroupReq) (*pbStatistics.GetActiveGroupResp, error) {
log.NewInfo("GetActiveGroup", utils.GetSelfFuncName(), req.String())
resp := &pbStatistics.GetActiveGroupResp{}
fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
if err != nil {
log.NewError("GetActiveGroup", utils.GetSelfFuncName(), err.Error())
return resp, err
}
activeGroups, err := imdb.GetActiveGroups(fromTime, toTime, 12)
if err != nil {
log.NewError("GetActiveGroup", utils.GetSelfFuncName(), err.Error())
return resp, err
}
for _, activeGroup := range activeGroups {
resp.Groups = append(resp.Groups,
&pbStatistics.GroupResp{
GroupName: activeGroup.Name,
GroupId: activeGroup.Id,
MessageNum: int32(activeGroup.MessageNum),
})
}
return resp, nil
}
func (s *statisticsServer) GetActiveUser(_ context.Context, req *pbStatistics.GetActiveUserReq) (*pbStatistics.GetActiveUserResp, error) {
log.NewInfo("GetActiveUser", utils.GetSelfFuncName(), req.String())
resp := &pbStatistics.GetActiveUserResp{}
fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
if err != nil {
log.NewError("GetActiveUser", utils.GetSelfFuncName(), err.Error())
return resp, err
}
activeUsers, err := imdb.GetActiveUsers(fromTime, toTime, 12)
if err != nil {
log.NewError("GetActiveUser", utils.GetSelfFuncName(), err.Error())
return resp, err
}
for _, activeUser := range activeUsers {
resp.Users = append(resp.Users,
&pbStatistics.UserResp{
UserId: activeUser.Id,
NickName: activeUser.Name,
MessageNum: int32(activeUser.MessageNum),
},
)
}
return resp, nil
}
func ParseTimeFromTo(from, to string) (time.Time, time.Time, error) {
var fromTime time.Time
var toTime time.Time
fromTime, err := utils.TimeStringToTime(from)
if err != nil {
return fromTime, toTime, err
}
toTime, err = utils.TimeStringToTime(to)
if err != nil {
return fromTime, toTime, err
}
return fromTime, toTime, nil
}
func isInOneMonth(from, to time.Time) bool {
return from.Month() == to.Month()
}
func GetRangeDate(from, to time.Time) [][2]time.Time {
interval := to.Sub(from)
var times [][2]time.Time
switch {
// today
case interval == 0:
times = append(times, [2]time.Time{
from, from.Add(time.Hour * 24),
})
// days
case isInOneMonth(from, to):
for i := 0; ; i++ {
fromTime := from.Add(time.Hour * 24 * time.Duration(i))
toTime := from.Add(time.Hour * 24 * time.Duration(i+1))
if toTime.After(to.Add(time.Hour * 24)) {
break
}
times = append(times, [2]time.Time{
fromTime, toTime,
})
}
// month
case !isInOneMonth(from, to):
for i := 0; ; i++ {
if i == 0 {
fromTime := from
toTime := getFirstDateOfNextNMonth(fromTime, 1)
times = append(times, [2]time.Time{
fromTime, toTime,
})
} else {
fromTime := getFirstDateOfNextNMonth(from, i)
toTime := getFirstDateOfNextNMonth(fromTime, 1)
if toTime.After(to) {
toTime = to
times = append(times, [2]time.Time{
fromTime, toTime,
})
break
}
times = append(times, [2]time.Time{
fromTime, toTime,
})
}
}
}
return times
}
func getFirstDateOfNextNMonth(currentTime time.Time, n int) time.Time {
lastOfMonth := time.Date(currentTime.Year(), currentTime.Month(), 1, 0, 0, 0, 0, currentTime.Location()).AddDate(0, n, 0)
return lastOfMonth
}
func (s *statisticsServer) GetGroupStatistics(_ context.Context, req *pbStatistics.GetGroupStatisticsReq) (*pbStatistics.GetGroupStatisticsResp, error) {
log.NewInfo("GetGroupStatistics", utils.GetSelfFuncName(), req.String())
resp := &pbStatistics.GetGroupStatisticsResp{}
fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
if err != nil {
log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
increaseGroupNum, err := imdb.GetIncreaseGroupNum(fromTime, toTime.Add(time.Hour*24))
if err != nil {
log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
totalGroupNum, err := imdb.GetTotalGroupNum()
if err != nil {
log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
resp.IncreaseGroupNum = increaseGroupNum
resp.TotalGroupNum = totalGroupNum
times := GetRangeDate(fromTime, toTime)
log.NewInfo("", "times:", times)
for _, v := range times {
num, err := imdb.GetIncreaseGroupNum(v[0], v[1])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
}
resp.IncreaseGroupNumList = append(resp.IncreaseGroupNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
num, err = imdb.GetGroupNum(v[0])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
}
resp.TotalGroupNumList = append(resp.TotalGroupNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
}
return resp, nil
}
func (s *statisticsServer) GetMessageStatistics(_ context.Context, req *pbStatistics.GetMessageStatisticsReq) (*pbStatistics.GetMessageStatisticsResp, error) {
log.NewInfo("GetMessageStatistics", utils.GetSelfFuncName(), req.String())
resp := &pbStatistics.GetMessageStatisticsResp{}
fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
if err != nil {
log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
privateMessageNum, err := imdb.GetPrivateMessageNum(fromTime, toTime.Add(time.Hour*24))
if err != nil {
log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
groupMessageNum, err := imdb.GetGroupMessageNum(fromTime, toTime.Add(time.Hour*24))
if err != nil {
log.NewError("GetMessageStatistics", utils.GetSelfFuncName(), err.Error())
}
resp.PrivateMessageNum = privateMessageNum
resp.GroupMessageNum = groupMessageNum
times := GetRangeDate(fromTime, toTime)
fmt.Println(times)
for _, v := range times {
num, err := imdb.GetPrivateMessageNum(v[0], v[1])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
}
resp.PrivateMessageNumList = append(resp.PrivateMessageNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
num, err = imdb.GetGroupMessageNum(v[0], v[1])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
}
resp.GroupMessageNumList = append(resp.GroupMessageNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
}
fmt.Println(resp)
return resp, nil
}
func (s *statisticsServer) GetUserStatistics(_ context.Context, req *pbStatistics.GetUserStatisticsReq) (*pbStatistics.GetUserStatisticsResp, error) {
log.NewInfo("GetUserStatistics", utils.GetSelfFuncName(), req.String())
resp := &pbStatistics.GetUserStatisticsResp{}
fromTime, toTime, err := ParseTimeFromTo(req.StatisticsReq.From, req.StatisticsReq.To)
if err != nil {
return resp, err
}
activeUserNum, err := imdb.GetActiveUserNum(fromTime, toTime.Add(time.Hour*24))
if err != nil {
log.NewError("GetUserStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
increaseUserNum, err := imdb.GetIncreaseUserNum(fromTime, toTime.Add(time.Hour*24))
if err != nil {
log.NewError("GetUserStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
totalUserNum, err := imdb.GetTotalUserNum()
if err != nil {
log.NewError("GetUserStatistics", utils.GetSelfFuncName(), err.Error())
return resp, err
}
resp.ActiveUserNum = activeUserNum
resp.TotalUserNum = totalUserNum
resp.IncreaseUserNum = increaseUserNum
times := GetRangeDate(fromTime, toTime)
for _, v := range times {
num, err := imdb.GetActiveUserNum(v[0], v[1])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetIncreaseGroupNum", v, err.Error())
}
resp.ActiveUserNumList = append(resp.ActiveUserNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
num, err = imdb.GetTotalUserNumByDate(v[0])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetTotalUserNumByDate", v, err.Error())
}
resp.TotalUserNumList = append(resp.TotalUserNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
num, err = imdb.GetIncreaseUserNum(v[0], v[1])
if err != nil {
log.NewError("", utils.GetSelfFuncName(), "GetIncreaseUserNum", v, err.Error())
}
resp.IncreaseUserNumList = append(resp.IncreaseUserNumList, &pbStatistics.DateNumList{
Date: v[0].String(),
Num: num,
})
}
return resp, nil
}

@ -243,9 +243,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil
}
func (s *userServer) GetUser(ctx context.Context, req *pbUser.GetUserReq) (*pbUser.GetUserResp, error) {
func (s *userServer) GetUserById(ctx context.Context, req *pbUser.GetUserByIdReq) (*pbUser.GetUserByIdResp, error) {
log.NewInfo(req.OperationID, "GetUser args ", req.String())
resp := &pbUser.GetUserResp{User: &pbUser.User{}}
resp := &pbUser.GetUserByIdResp{User: &pbUser.User{}}
user, err := imdb.GetUserByUserID(req.UserId)
if err != nil {
return resp, nil
@ -259,7 +259,7 @@ func (s *userServer) GetUser(ctx context.Context, req *pbUser.GetUserReq) (*pbUs
Nickname: user.Nickname,
UserId: user.UserID,
CreateTime: user.CreateTime.String(),
IsBlock: isBlock,
IsBlock: isBlock,
}
return resp, nil
}
@ -271,11 +271,6 @@ func (s *userServer) GetUsers(ctx context.Context, req *pbUser.GetUsersReq) (*pb
if err != nil {
return resp, nil
}
usersNum, err := imdb.GetUsersNumCount()
if err != nil {
return resp, nil
}
resp.UserNum = int32(usersNum)
for _, v := range users {
isBlock, err := imdb.UserIsBlock(v.UserID)
if err == nil {
@ -356,11 +351,9 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser
if err != nil {
return resp, constant.ErrDB
}
usersNum, err := imdb.GetBlockUsersNumCount()
if err != nil {
return resp, constant.ErrDB
}
resp.BlockUserNum = int32(usersNum)
for _, v := range blockUsers {
resp.BlockUsers = append(resp.BlockUsers, &pbUser.BlockUser{
User: &pbUser.User{
@ -380,16 +373,33 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser
return resp, nil
}
func (s *userServer) GetBlockUser(_ context.Context, req *pbUser.GetBlockUserReq) (*pbUser.GetBlockUserResp, error) {
func (s *userServer) GetBlockUserById(_ context.Context, req *pbUser.GetBlockUserByIdReq) (*pbUser.GetBlockUserByIdResp, error) {
log.NewInfo(req.OperationID, "GetBlockUser args ", req.String())
resp := &pbUser.GetBlockUserResp{}
resp := &pbUser.GetBlockUserByIdResp{}
user, err := imdb.GetBlockUserById(req.UserId)
if err != nil {
log.NewError(req.OperationID, utils.GetSelfFuncName(), err)
return resp, err
}
resp.BlockUser = &pbUser.BlockUser{}
resp.BlockUser.BeginDisableTime = (user.BeginDisableTime).String()
resp.BlockUser.EndDisableTime = (user.EndDisableTime).String()
resp.BlockUser = &pbUser.BlockUser{
User: &pbUser.User{
ProfilePhoto: user.User.FaceURL,
Nickname: user.User.Nickname,
UserId: user.User.UserID,
IsBlock: true,
},
BeginDisableTime: (user.BeginDisableTime).String(),
EndDisableTime: (user.EndDisableTime).String(),
}
return resp, nil
}
func (s *userServer) DeleteUser(_ context.Context, req *pbUser.DeleteUserReq) (*pbUser.DeleteUserResp, error) {
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), req.String())
resp := &pbUser.DeleteUserResp{}
if row := imdb.DeleteUser(req.UserId); row == 0 {
log.NewError(req.OperationID, utils.GetSelfFuncName(), "delete error", row)
return resp, constant.ErrDB
}
return resp, nil
}

@ -1,8 +1,15 @@
package cms_api_struct
type BroadcastRequest struct {
Message string `json:"message"`
}
type BroadcastResponse struct {
}
type CommonMessage struct {
ChatType int `json:"chat_type"`
MessageType int `json:"message_type"`
SessionType int `json:"session_type"`
ContentType int `json:"content_type"`
SenderNickName string `json:"sender_nick_name"`
SenderId int `json:"sender_id"`
SearchContent string `json:"search_content"`
@ -21,6 +28,6 @@ type SearchMessageByUserResponse struct {
type SearchMessageByGroupResponse struct {
MessageList []struct {
CommonMessage
Date string `json:"date"`
Date string `json:"date"`
} `json:"massage_list"`
}

@ -1,11 +1,14 @@
package cms_api_struct
type GetStatisticsRequest struct {
FromTime string `json:"from"`
ToTime string `json:"to"`
From string `form:"from" binding:"required"`
To string `form:"to" binding:"required"`
}
type GetMessageStatisticsRequest struct {
GetStatisticsRequest
}
// 单聊
type GetMessageStatisticsResponse struct {
PrivateMessageNum int `json:"private_message_num"`
GroupMessageNum int `json:"group_message_num"`
@ -19,7 +22,10 @@ type GetMessageStatisticsResponse struct {
} `json:"group_message_num_list"`
}
// 用户统计
type GetUserStatisticsRequest struct {
GetStatisticsRequest
}
type GetUserStatisticsResponse struct {
IncreaseUserNum int `json:"increase_user_num"`
ActiveUserNum int `json:"active_user_num"`
@ -34,12 +40,16 @@ type GetUserStatisticsResponse struct {
} `json:"active_user_num_list"`
TotalUserNumList []struct {
Date string `json:"date"`
TotalUserNum string `json:"total_user_num"`
TotalUserNum int `json:"total_user_num"`
} `json:"total_user_num_list"`
}
type GetGroupStatisticsRequest struct {
GetStatisticsRequest
}
// 群聊统计
type GetGroupMessageStatisticsResponse struct {
type GetGroupStatisticsResponse struct {
IncreaseGroupNum int `json:"increase_group_num"`
TotalGroupNum int `json:"total_group_num"`
IncreaseGroupNumList []struct {
@ -48,22 +58,32 @@ type GetGroupMessageStatisticsResponse struct {
} `json:"increase_group_num_list"`
TotalGroupNumList []struct {
Date string `json:"date"`
TotalGroupNum string `json:"total_group_num"`
TotalGroupNum int `json:"total_group_num"`
} `json:"total_group_num_list"`
}
type GetActiveUserStatisticsResponse struct {
type GetActiveUserRequest struct {
GetStatisticsRequest
// RequestPagination
}
type GetActiveUserResponse struct {
ActiveUserList []struct {
NickName string `json:"nick_name"`
Id int `json:"id"`
UserId string `json:"user_id"`
MessageNum int `json:"message_num"`
} `json:"active_user_list"`
}
type GetActiveGroupStatisticsResponse struct {
type GetActiveGroupRequest struct {
GetStatisticsRequest
// RequestPagination
}
type GetActiveGroupResponse struct {
ActiveGroupList []struct {
GroupNickName string `json:"group_nick_name"`
GroupId int `json:"group_id"`
MessageNum int `json:"message_num"`
GroupName string `json:"group_name"`
GroupId string `json:"group_id"`
MessageNum int `json:"message_num"`
} `json:"active_group_list"`
}

@ -21,8 +21,7 @@ type GetUsersRequest struct {
}
type GetUsersResponse struct {
Users []*UserResponse `json:"users"`
UserNum int `json:"user_num"`
Users []*UserResponse `json:"users"`
ResponsePagination
}
@ -78,8 +77,7 @@ type GetBlockUsersRequest struct {
}
type GetBlockUsersResponse struct {
BlockUsers []BlockUser `json:"block_users"`
BlockUserNum int `json:"block_user_num"`
BlockUsers []BlockUser `json:"block_users"`
ResponsePagination
}
@ -90,3 +88,10 @@ type GetBlockUserRequest struct {
type GetBlockUserResponse struct {
BlockUser
}
type DeleteUserRequest struct {
UserId string `json:"user_id" binding:"required"`
}
type DeleteUserResponse struct {
}

@ -77,6 +77,7 @@ type config struct {
RpcGetTokenPort []int `yaml:"rpcGetTokenPort"`
}
RpcRegisterName struct {
OpenImStatisticsName string `yaml:"OpenImStatisticsName"`
OpenImUserName string `yaml:"openImUserName"`
OpenImFriendName string `yaml:"openImFriendName"`
OpenImOfflineMessageName string `yaml:"openImOfflineMessageName"`

@ -109,11 +109,16 @@ const (
IsSenderSync = "senderSync"
//GroupStatus
GroupOk = 0
GroupBanChat = 1
GroupDisband = 2
GroupBaned = 3
GroupOk = 0
GroupBanChat = 1
GroupDisband = 2
GroupBaned = 3
GroupBanPrivateChat = 4
//timeInterval
Day = 1
Week = 7
Month = 31
)
var ContentType2PushContent = map[int64]string{
@ -159,4 +164,4 @@ func GroupIsBanPrivateChat(status int32) bool {
return false
}
return true
}
}

@ -0,0 +1,153 @@
package im_mysql_model
import (
"Open_IM/pkg/common/db"
"time"
)
func GetActiveUserNum(from, to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("chat_logs").Select("count(distinct(send_id))").Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error
return num, err
}
func GetIncreaseUserNum(from, to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("users").Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error
return num, err
}
func GetTotalUserNum() (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("users").Count(&num).Error
return num, err
}
func GetTotalUserNumByDate(to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("users").Where("create_time <= ?", to).Count(&num).Error
return num, err
}
func GetPrivateMessageNum(from, to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("chat_logs").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 1).Count(&num).Error
return num, err
}
func GetGroupMessageNum(from, to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("chat_logs").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 2).Count(&num).Error
return num, err
}
func GetIncreaseGroupNum(from, to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("groups").Where("create_time >= ? and create_time <= ?", from, to).Count(&num).Error
return num, err
}
func GetTotalGroupNum() (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("groups").Count(&num).Error
return num, err
}
func GetGroupNum(to time.Time) (int32, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var num int32
err = dbConn.Table("groups").Where("create_time <= ?", to).Count(&num).Error
return num, err
}
type activeGroup struct {
Name string
Id string `gorm:"column:recv_id"`
MessageNum int `gorm:"column:message_num"`
}
func GetActiveGroups(from, to time.Time, limit int) ([]*activeGroup, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
var activeGroups []*activeGroup
if err != nil {
return activeGroups, err
}
dbConn.LogMode(true)
err = dbConn.Table("chat_logs").Select("recv_id, count(*) as message_num").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 2).Group("recv_id").Limit(limit).Order("message_num DESC").Find(&activeGroups).Error
for _, activeGroup := range activeGroups {
group := db.Group{
GroupID: activeGroup.Id,
}
dbConn.Model(&group).Select("group_id", "name").Find(&group)
activeGroup.Name = group.GroupName
}
return activeGroups, err
}
type activeUser struct {
Name string
Id string `gorm:"column:send_id"`
MessageNum int `gorm:"column:message_num"`
}
func GetActiveUsers(from, to time.Time, limit int) ([]*activeUser, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
var activeUsers []*activeUser
if err != nil {
return activeUsers, err
}
dbConn.LogMode(true)
err = dbConn.Table("chat_logs").Select("send_id, count(*) as message_num").Where("create_time >= ? and create_time <= ? and session_type = ?", from, to, 1).Group("send_id").Limit(limit).Order("message_num DESC").Find(&activeUsers).Error
for _, activeUser := range activeUsers {
user := db.Users{
UserID: activeUser.Id,
}
dbConn.Model(&user).Select("user_id, name").Find(&user)
activeUser.Name = user.Nickname
}
return activeUsers, err
}

@ -137,19 +137,6 @@ func GetUsers(showNumber, pageNumber int32) ([]db.Users, error) {
return users, err
}
func GetUsersNumCount() (int, error) {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
return 0, err
}
dbConn.LogMode(true)
var count int
if err := dbConn.Model(&db.Users{}).Count(&count).Error; err != nil {
return 0, err
}
return count, nil
}
func AddUser(userId, phoneNumber, name string) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {
@ -235,7 +222,7 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) {
if err != nil {
return blockUserInfo, err
}
if err = dbConn.Find(&blockUser).Error; err != nil {
if err = dbConn.Find(&blockUser).First(&blockUser).Error; err != nil {
return blockUserInfo, err
}
user := db.Users{
@ -247,6 +234,8 @@ func GetBlockUserById(userId string) (BlockUserInfo, error) {
blockUserInfo.User.UserID = user.UserID
blockUserInfo.User.FaceURL = user.UserID
blockUserInfo.User.Nickname = user.Nickname
blockUserInfo.BeginDisableTime = blockUser.BeginDisableTime
blockUserInfo.EndDisableTime = blockUser.EndDisableTime
return blockUserInfo, nil
}
@ -258,7 +247,9 @@ func GetBlockUsers(showNumber, pageNumber int32) ([]BlockUserInfo, error) {
return blockUserInfos, err
}
dbConn.LogMode(true)
err = dbConn.Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&blockUsers).Error
if err = dbConn.Limit(showNumber).Offset(showNumber * (pageNumber - 1)).Find(&blockUsers).Error; err != nil {
return blockUserInfos, err
}
for _, blockUser := range blockUsers {
var user db.Users
if err := dbConn.Table("users").Where("user_id=?", blockUser.UserId).First(&user).Error; err == nil {

@ -0,0 +1,923 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.3
// source: message/message.proto
package message
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type BoradcastMessageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
func (x *BoradcastMessageReq) Reset() {
*x = BoradcastMessageReq{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BoradcastMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BoradcastMessageReq) ProtoMessage() {}
func (x *BoradcastMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BoradcastMessageReq.ProtoReflect.Descriptor instead.
func (*BoradcastMessageReq) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{0}
}
func (x *BoradcastMessageReq) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *BoradcastMessageReq) GetOperationID() string {
if x != nil {
return x.OperationID
}
return ""
}
type BoradcastMessageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *BoradcastMessageResp) Reset() {
*x = BoradcastMessageResp{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BoradcastMessageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BoradcastMessageResp) ProtoMessage() {}
func (x *BoradcastMessageResp) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BoradcastMessageResp.ProtoReflect.Descriptor instead.
func (*BoradcastMessageResp) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{1}
}
type MassSendMessageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
UserIds []string `protobuf:"bytes,2,rep,name=UserIds,proto3" json:"UserIds,omitempty"`
OperationID string `protobuf:"bytes,3,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
func (x *MassSendMessageReq) Reset() {
*x = MassSendMessageReq{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MassSendMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MassSendMessageReq) ProtoMessage() {}
func (x *MassSendMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MassSendMessageReq.ProtoReflect.Descriptor instead.
func (*MassSendMessageReq) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{2}
}
func (x *MassSendMessageReq) GetMessage() string {
if x != nil {
return x.Message
}
return ""
}
func (x *MassSendMessageReq) GetUserIds() []string {
if x != nil {
return x.UserIds
}
return nil
}
func (x *MassSendMessageReq) GetOperationID() string {
if x != nil {
return x.OperationID
}
return ""
}
type MassSendMessageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *MassSendMessageResp) Reset() {
*x = MassSendMessageResp{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MassSendMessageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MassSendMessageResp) ProtoMessage() {}
func (x *MassSendMessageResp) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MassSendMessageResp.ProtoReflect.Descriptor instead.
func (*MassSendMessageResp) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{3}
}
type GetChatLogsReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=UserId,proto3" json:"UserId,omitempty"`
Date string `protobuf:"bytes,3,opt,name=Date,proto3" json:"Date,omitempty"`
SessionType int32 `protobuf:"varint,4,opt,name=SessionType,proto3" json:"SessionType,omitempty"`
ContentType int32 `protobuf:"varint,5,opt,name=ContentType,proto3" json:"ContentType,omitempty"`
OperationID string `protobuf:"bytes,6,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
func (x *GetChatLogsReq) Reset() {
*x = GetChatLogsReq{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetChatLogsReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetChatLogsReq) ProtoMessage() {}
func (x *GetChatLogsReq) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetChatLogsReq.ProtoReflect.Descriptor instead.
func (*GetChatLogsReq) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{4}
}
func (x *GetChatLogsReq) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *GetChatLogsReq) GetUserId() string {
if x != nil {
return x.UserId
}
return ""
}
func (x *GetChatLogsReq) GetDate() string {
if x != nil {
return x.Date
}
return ""
}
func (x *GetChatLogsReq) GetSessionType() int32 {
if x != nil {
return x.SessionType
}
return 0
}
func (x *GetChatLogsReq) GetContentType() int32 {
if x != nil {
return x.ContentType
}
return 0
}
func (x *GetChatLogsReq) GetOperationID() string {
if x != nil {
return x.OperationID
}
return ""
}
type GetChatLogsResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SessionType int32 `protobuf:"varint,1,opt,name=SessionType,proto3" json:"SessionType,omitempty"`
ContentType int32 `protobuf:"varint,2,opt,name=ContentType,proto3" json:"ContentType,omitempty"`
SenderNickName string `protobuf:"bytes,3,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"`
ReciverNickName string `protobuf:"bytes,4,opt,name=ReciverNickName,proto3" json:"ReciverNickName,omitempty"`
SearchContent string `protobuf:"bytes,5,opt,name=SearchContent,proto3" json:"SearchContent,omitempty"`
Content string `protobuf:"bytes,6,opt,name=Content,proto3" json:"Content,omitempty"`
Date string `protobuf:"bytes,7,opt,name=Date,proto3" json:"Date,omitempty"`
}
func (x *GetChatLogsResp) Reset() {
*x = GetChatLogsResp{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetChatLogsResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetChatLogsResp) ProtoMessage() {}
func (x *GetChatLogsResp) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetChatLogsResp.ProtoReflect.Descriptor instead.
func (*GetChatLogsResp) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{5}
}
func (x *GetChatLogsResp) GetSessionType() int32 {
if x != nil {
return x.SessionType
}
return 0
}
func (x *GetChatLogsResp) GetContentType() int32 {
if x != nil {
return x.ContentType
}
return 0
}
func (x *GetChatLogsResp) GetSenderNickName() string {
if x != nil {
return x.SenderNickName
}
return ""
}
func (x *GetChatLogsResp) GetReciverNickName() string {
if x != nil {
return x.ReciverNickName
}
return ""
}
func (x *GetChatLogsResp) GetSearchContent() string {
if x != nil {
return x.SearchContent
}
return ""
}
func (x *GetChatLogsResp) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
func (x *GetChatLogsResp) GetDate() string {
if x != nil {
return x.Date
}
return ""
}
type WithdrawMessageReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerMsgId string `protobuf:"bytes,1,opt,name=ServerMsgId,proto3" json:"ServerMsgId,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
func (x *WithdrawMessageReq) Reset() {
*x = WithdrawMessageReq{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WithdrawMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WithdrawMessageReq) ProtoMessage() {}
func (x *WithdrawMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WithdrawMessageReq.ProtoReflect.Descriptor instead.
func (*WithdrawMessageReq) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{6}
}
func (x *WithdrawMessageReq) GetServerMsgId() string {
if x != nil {
return x.ServerMsgId
}
return ""
}
func (x *WithdrawMessageReq) GetOperationID() string {
if x != nil {
return x.OperationID
}
return ""
}
type WithdrawMessageResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *WithdrawMessageResp) Reset() {
*x = WithdrawMessageResp{}
if protoimpl.UnsafeEnabled {
mi := &file_message_message_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WithdrawMessageResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WithdrawMessageResp) ProtoMessage() {}
func (x *WithdrawMessageResp) ProtoReflect() protoreflect.Message {
mi := &file_message_message_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WithdrawMessageResp.ProtoReflect.Descriptor instead.
func (*WithdrawMessageResp) Descriptor() ([]byte, []int) {
return file_message_message_proto_rawDescGZIP(), []int{7}
}
var File_message_message_proto protoreflect.FileDescriptor
var file_message_message_proto_rawDesc = []byte{
0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x22, 0x51, 0x0a, 0x13, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x44, 0x22, 0x16, 0x0a, 0x14, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x6a, 0x0a, 0x12, 0x4d,
0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
0x71, 0x12, 0x18, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x55,
0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x55, 0x73,
0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x61, 0x73, 0x73, 0x53,
0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0xbc,
0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65,
0x71, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x55,
0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65,
0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69,
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x53, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e,
0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfb, 0x01,
0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73,
0x70, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54,
0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79,
0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e,
0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x53,
0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a,
0x0f, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x72, 0x4e,
0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63,
0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x22, 0x58, 0x0a, 0x12, 0x57,
0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
0x71, 0x12, 0x20, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73,
0x67, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61,
0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xb8, 0x02, 0x0a,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x4f, 0x0a, 0x10, 0x42, 0x6f, 0x72, 0x61,
0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x6f, 0x72, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x4d, 0x61, 0x73,
0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x73, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x43, 0x68,
0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x1a,
0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61,
0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x0f, 0x57, 0x69, 0x74,
0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x13, 0x5a, 0x11, 0x2e, 0x2f, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x3b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_message_message_proto_rawDescOnce sync.Once
file_message_message_proto_rawDescData = file_message_message_proto_rawDesc
)
func file_message_message_proto_rawDescGZIP() []byte {
file_message_message_proto_rawDescOnce.Do(func() {
file_message_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_message_proto_rawDescData)
})
return file_message_message_proto_rawDescData
}
var file_message_message_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_message_message_proto_goTypes = []interface{}{
(*BoradcastMessageReq)(nil), // 0: message.BoradcastMessageReq
(*BoradcastMessageResp)(nil), // 1: message.BoradcastMessageResp
(*MassSendMessageReq)(nil), // 2: message.MassSendMessageReq
(*MassSendMessageResp)(nil), // 3: message.MassSendMessageResp
(*GetChatLogsReq)(nil), // 4: message.GetChatLogsReq
(*GetChatLogsResp)(nil), // 5: message.GetChatLogsResp
(*WithdrawMessageReq)(nil), // 6: message.WithdrawMessageReq
(*WithdrawMessageResp)(nil), // 7: message.WithdrawMessageResp
}
var file_message_message_proto_depIdxs = []int32{
0, // 0: message.message.BoradcastMessage:input_type -> message.BoradcastMessageReq
2, // 1: message.message.MassSendMessage:input_type -> message.MassSendMessageReq
4, // 2: message.message.GetChatLogs:input_type -> message.GetChatLogsReq
6, // 3: message.message.WithdrawMessage:input_type -> message.WithdrawMessageReq
1, // 4: message.message.BoradcastMessage:output_type -> message.BoradcastMessageResp
3, // 5: message.message.MassSendMessage:output_type -> message.MassSendMessageResp
5, // 6: message.message.GetChatLogs:output_type -> message.GetChatLogsResp
7, // 7: message.message.WithdrawMessage:output_type -> message.WithdrawMessageResp
4, // [4:8] is the sub-list for method output_type
0, // [0:4] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_message_message_proto_init() }
func file_message_message_proto_init() {
if File_message_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_message_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BoradcastMessageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BoradcastMessageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MassSendMessageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MassSendMessageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetChatLogsReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetChatLogsResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WithdrawMessageReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_message_message_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WithdrawMessageResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_message_message_proto_rawDesc,
NumEnums: 0,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_message_message_proto_goTypes,
DependencyIndexes: file_message_message_proto_depIdxs,
MessageInfos: file_message_message_proto_msgTypes,
}.Build()
File_message_message_proto = out.File
file_message_message_proto_rawDesc = nil
file_message_message_proto_goTypes = nil
file_message_message_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// MessageClient is the client API for Message service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MessageClient interface {
BoradcastMessage(ctx context.Context, in *BoradcastMessageReq, opts ...grpc.CallOption) (*BoradcastMessageResp, error)
MassSendMessage(ctx context.Context, in *MassSendMessageReq, opts ...grpc.CallOption) (*MassSendMessageResp, error)
GetChatLogs(ctx context.Context, in *GetChatLogsReq, opts ...grpc.CallOption) (*GetChatLogsResp, error)
WithdrawMessage(ctx context.Context, in *WithdrawMessageReq, opts ...grpc.CallOption) (*WithdrawMessageResp, error)
}
type messageClient struct {
cc grpc.ClientConnInterface
}
func NewMessageClient(cc grpc.ClientConnInterface) MessageClient {
return &messageClient{cc}
}
func (c *messageClient) BoradcastMessage(ctx context.Context, in *BoradcastMessageReq, opts ...grpc.CallOption) (*BoradcastMessageResp, error) {
out := new(BoradcastMessageResp)
err := c.cc.Invoke(ctx, "/message.message/BoradcastMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageClient) MassSendMessage(ctx context.Context, in *MassSendMessageReq, opts ...grpc.CallOption) (*MassSendMessageResp, error) {
out := new(MassSendMessageResp)
err := c.cc.Invoke(ctx, "/message.message/MassSendMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageClient) GetChatLogs(ctx context.Context, in *GetChatLogsReq, opts ...grpc.CallOption) (*GetChatLogsResp, error) {
out := new(GetChatLogsResp)
err := c.cc.Invoke(ctx, "/message.message/GetChatLogs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *messageClient) WithdrawMessage(ctx context.Context, in *WithdrawMessageReq, opts ...grpc.CallOption) (*WithdrawMessageResp, error) {
out := new(WithdrawMessageResp)
err := c.cc.Invoke(ctx, "/message.message/WithdrawMessage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MessageServer is the server API for Message service.
type MessageServer interface {
BoradcastMessage(context.Context, *BoradcastMessageReq) (*BoradcastMessageResp, error)
MassSendMessage(context.Context, *MassSendMessageReq) (*MassSendMessageResp, error)
GetChatLogs(context.Context, *GetChatLogsReq) (*GetChatLogsResp, error)
WithdrawMessage(context.Context, *WithdrawMessageReq) (*WithdrawMessageResp, error)
}
// UnimplementedMessageServer can be embedded to have forward compatible implementations.
type UnimplementedMessageServer struct {
}
func (*UnimplementedMessageServer) BoradcastMessage(context.Context, *BoradcastMessageReq) (*BoradcastMessageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method BoradcastMessage not implemented")
}
func (*UnimplementedMessageServer) MassSendMessage(context.Context, *MassSendMessageReq) (*MassSendMessageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method MassSendMessage not implemented")
}
func (*UnimplementedMessageServer) GetChatLogs(context.Context, *GetChatLogsReq) (*GetChatLogsResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetChatLogs not implemented")
}
func (*UnimplementedMessageServer) WithdrawMessage(context.Context, *WithdrawMessageReq) (*WithdrawMessageResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method WithdrawMessage not implemented")
}
func RegisterMessageServer(s *grpc.Server, srv MessageServer) {
s.RegisterService(&_Message_serviceDesc, srv)
}
func _Message_BoradcastMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BoradcastMessageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageServer).BoradcastMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/message.message/BoradcastMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageServer).BoradcastMessage(ctx, req.(*BoradcastMessageReq))
}
return interceptor(ctx, in, info, handler)
}
func _Message_MassSendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MassSendMessageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageServer).MassSendMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/message.message/MassSendMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageServer).MassSendMessage(ctx, req.(*MassSendMessageReq))
}
return interceptor(ctx, in, info, handler)
}
func _Message_GetChatLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetChatLogsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageServer).GetChatLogs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/message.message/GetChatLogs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageServer).GetChatLogs(ctx, req.(*GetChatLogsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Message_WithdrawMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WithdrawMessageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MessageServer).WithdrawMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/message.message/WithdrawMessage",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MessageServer).WithdrawMessage(ctx, req.(*WithdrawMessageReq))
}
return interceptor(ctx, in, info, handler)
}
var _Message_serviceDesc = grpc.ServiceDesc{
ServiceName: "message.message",
HandlerType: (*MessageServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "BoradcastMessage",
Handler: _Message_BoradcastMessage_Handler,
},
{
MethodName: "MassSendMessage",
Handler: _Message_MassSendMessage_Handler,
},
{
MethodName: "GetChatLogs",
Handler: _Message_GetChatLogs_Handler,
},
{
MethodName: "WithdrawMessage",
Handler: _Message_WithdrawMessage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "message/message.proto",
}

@ -0,0 +1,57 @@
syntax = "proto3";
option go_package = "./message;message";
package message;
message BoradcastMessageReq {
string Message = 1;
string OperationID = 2;
}
message BoradcastMessageResp {
}
message MassSendMessageReq {
string Message = 1;
repeated string UserIds = 2;
string OperationID = 3;
}
message MassSendMessageResp {
}
message GetChatLogsReq {
string content = 1;
string UserId = 2;
string Date = 3;
int32 SessionType = 4;
int32 ContentType = 5;
string OperationID = 6;
}
message GetChatLogsResp {
int32 SessionType = 1;
int32 ContentType = 2;
string SenderNickName = 3;
string ReciverNickName = 4;
string SearchContent = 5;
string Content = 6;
string Date = 7;
}
message WithdrawMessageReq {
string ServerMsgId = 1;
string OperationID = 2;
}
message WithdrawMessageResp {
}
service message {
rpc BoradcastMessage(BoradcastMessageReq) returns(BoradcastMessageResp);
rpc MassSendMessage(MassSendMessageReq) returns(MassSendMessageResp);
rpc GetChatLogs(GetChatLogsReq) returns(GetChatLogsResp);
rpc WithdrawMessage(WithdrawMessageReq) returns(WithdrawMessageResp);
}

@ -1,6 +1,7 @@
all_proto=(
statistics/statistics.proto
message/message.proto
# statistics/statistics.proto
# auth/auth.proto
# friend/friend.proto
# group/group.proto
@ -8,5 +9,6 @@ all_proto=(
# chat/chat.proto
# push/push.proto
# relay/relay.proto
sdk_ws/ws.proto
# sdk_ws/ws.proto
)

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.15.5
// protoc-gen-go v1.26.0
// protoc v3.19.3
// source: sdk_ws/ws.proto
package server_api_params

@ -1,13 +1,12 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.15.5
// protoc-gen-go v1.26.0
// protoc v3.19.3
// source: statistics/statistics.proto
package statistics
import (
sdk_ws "Open_IM/pkg/proto/sdk_ws"
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@ -85,8 +84,8 @@ type GetActiveUserReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,1,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq,proto3" json:"StatisticsReq,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
func (x *GetActiveUserReq) Reset() {
@ -121,9 +120,9 @@ func (*GetActiveUserReq) Descriptor() ([]byte, []int) {
return file_statistics_statistics_proto_rawDescGZIP(), []int{1}
}
func (x *GetActiveUserReq) GetPagination() *sdk_ws.ResponsePagination {
func (x *GetActiveUserReq) GetStatisticsReq() *StatisticsReq {
if x != nil {
return x.Pagination
return x.StatisticsReq
}
return nil
}
@ -142,7 +141,7 @@ type UserResp struct {
NickName string `protobuf:"bytes,1,opt,name=NickName,proto3" json:"NickName,omitempty"`
UserId string `protobuf:"bytes,2,opt,name=UserId,proto3" json:"UserId,omitempty"`
MessageNum string `protobuf:"bytes,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"`
MessageNum int32 `protobuf:"varint,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"`
}
func (x *UserResp) Reset() {
@ -191,11 +190,11 @@ func (x *UserResp) GetUserId() string {
return ""
}
func (x *UserResp) GetMessageNum() string {
func (x *UserResp) GetMessageNum() int32 {
if x != nil {
return x.MessageNum
}
return ""
return 0
}
type GetActiveUserResp struct {
@ -203,8 +202,7 @@ type GetActiveUserResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Users []*UserResp `protobuf:"bytes,1,rep,name=Users,proto3" json:"Users,omitempty"`
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
Users []*UserResp `protobuf:"bytes,1,rep,name=Users,proto3" json:"Users,omitempty"`
}
func (x *GetActiveUserResp) Reset() {
@ -246,20 +244,13 @@ func (x *GetActiveUserResp) GetUsers() []*UserResp {
return nil
}
func (x *GetActiveUserResp) GetPagination() *sdk_ws.ResponsePagination {
if x != nil {
return x.Pagination
}
return nil
}
type GetActiveGroupReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,1,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
StatisticsReq *StatisticsReq `protobuf:"bytes,1,opt,name=StatisticsReq,proto3" json:"StatisticsReq,omitempty"`
OperationID string `protobuf:"bytes,2,opt,name=OperationID,proto3" json:"OperationID,omitempty"`
}
func (x *GetActiveGroupReq) Reset() {
@ -294,9 +285,9 @@ func (*GetActiveGroupReq) Descriptor() ([]byte, []int) {
return file_statistics_statistics_proto_rawDescGZIP(), []int{4}
}
func (x *GetActiveGroupReq) GetPagination() *sdk_ws.ResponsePagination {
func (x *GetActiveGroupReq) GetStatisticsReq() *StatisticsReq {
if x != nil {
return x.Pagination
return x.StatisticsReq
}
return nil
}
@ -315,7 +306,7 @@ type GroupResp struct {
GroupName string `protobuf:"bytes,1,opt,name=GroupName,proto3" json:"GroupName,omitempty"`
GroupId string `protobuf:"bytes,2,opt,name=GroupId,proto3" json:"GroupId,omitempty"`
MessageNum string `protobuf:"bytes,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"`
MessageNum int32 `protobuf:"varint,3,opt,name=MessageNum,proto3" json:"MessageNum,omitempty"`
}
func (x *GroupResp) Reset() {
@ -364,11 +355,11 @@ func (x *GroupResp) GetGroupId() string {
return ""
}
func (x *GroupResp) GetMessageNum() string {
func (x *GroupResp) GetMessageNum() int32 {
if x != nil {
return x.MessageNum
}
return ""
return 0
}
type GetActiveGroupResp struct {
@ -376,8 +367,7 @@ type GetActiveGroupResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Groups []*GroupResp `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty"`
Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,2,opt,name=Pagination,proto3" json:"Pagination,omitempty"`
Groups []*GroupResp `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty"`
}
func (x *GetActiveGroupResp) Reset() {
@ -419,13 +409,6 @@ func (x *GetActiveGroupResp) GetGroups() []*GroupResp {
return nil
}
func (x *GetActiveGroupResp) GetPagination() *sdk_ws.ResponsePagination {
if x != nil {
return x.Pagination
}
return nil
}
type DateNumList struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -880,170 +863,158 @@ var File_statistics_statistics_proto protoreflect.FileDescriptor
var file_statistics_statistics_proto_rawDesc = []byte{
0x0a, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x73, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x1a, 0x21, 0x4f, 0x70, 0x65, 0x6e, 0x5f,
0x49, 0x4d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x64, 0x6b,
0x5f, 0x77, 0x73, 0x2f, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x0d,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a,
0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f,
0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74,
0x6f, 0x22, 0x7b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73,
0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x5e,
0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69,
0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69,
0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e,
0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x86,
0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72,
0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x52, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73,
0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70,
0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67,
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63,
0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a,
0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x61,
0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x67,
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x63, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65,
0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x47,
0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73,
0x70, 0x12, 0x2d, 0x0a, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73,
0x12, 0x45, 0x0a, 0x0a, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x70,
0x69, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x50, 0x61, 0x67,
0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x65, 0x4e,
0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x7c, 0x0a, 0x17,
0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f,
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x8c, 0x02, 0x0a, 0x18, 0x47,
0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61,
0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12,
0x4d, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65,
0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x49,
0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75,
0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x15, 0x47, 0x65, 0x74,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x33, 0x0a, 0x0d, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72,
0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e,
0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x22, 0x75,
0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfe, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70,
0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x49, 0x6e, 0x63, 0x72,
0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d,
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e,
0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61,
0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x14, 0x49, 0x6e, 0x63, 0x72, 0x65,
0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x45, 0x0a, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d,
0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c,
0x69, 0x73, 0x74, 0x52, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e,
0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x3f,
0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12,
0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
0x44, 0x22, 0xe2, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x0f, 0x49,
0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73,
0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55,
0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x41, 0x63,
0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x54,
0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28,
0x05, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12,
0x49, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e,
0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x5e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73,
0x70, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x55,
0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x3f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69,
0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x55, 0x73,
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x52,
0x05, 0x55, 0x73, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74,
0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x63,
0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75,
0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x4e, 0x75, 0x6d, 0x22, 0x43, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65,
0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x06, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70,
0x52, 0x06, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x33, 0x0a, 0x0b, 0x44, 0x61, 0x74, 0x65,
0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x44, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x4e,
0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x7c, 0x0a,
0x17, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x8c, 0x02, 0x0a, 0x18,
0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76,
0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d,
0x12, 0x4d, 0x0a, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74,
0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x15, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74,
0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12,
0x49, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e,
0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75,
0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55,
0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x41, 0x63,
0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18,
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x11,
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73,
0x74, 0x12, 0x43, 0x0a, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75,
0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74,
0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x15, 0x47, 0x65,
0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x52, 0x65, 0x71, 0x12, 0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
0x73, 0x52, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x52, 0x65, 0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0xfe, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x72,
0x6f, 0x75, 0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
0x70, 0x12, 0x2a, 0x0a, 0x10, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f,
0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x49, 0x6e, 0x63,
0x72, 0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a,
0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x4e, 0x75, 0x6d, 0x12, 0x4b, 0x0a, 0x14, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x47,
0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44,
0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x14, 0x49, 0x6e, 0x63, 0x72,
0x65, 0x61, 0x73, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74,
0x12, 0x45, 0x0a, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x75,
0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e,
0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xbf, 0x03, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72,
0x12, 0x1c, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65,
0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d,
0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41,
0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a,
0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12,
0x4c, 0x69, 0x73, 0x74, 0x52, 0x11, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x73,
0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12,
0x3f, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65,
0x71, 0x52, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x49, 0x44, 0x22, 0xe2, 0x02, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x0f,
0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55,
0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65,
0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x41,
0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c,
0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0c, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d,
0x12, 0x49, 0x0a, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72,
0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e,
0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x13, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x61, 0x73, 0x65,
0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x11, 0x41,
0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74,
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52,
0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x4c, 0x69,
0x73, 0x74, 0x12, 0x43, 0x0a, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4e,
0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x4e, 0x75,
0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x10, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72,
0x4e, 0x75, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x32, 0xbf, 0x03, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65,
0x72, 0x12, 0x1c, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47,
0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a,
0x1d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74,
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x1e,
0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41,
0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61,
0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74,
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
0x70, 0x12, 0x5b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x58,
0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x73, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f,
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70,
0x12, 0x1d, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65,
0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a,
0x1e, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74,
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12,
0x61, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61,
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x23, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x73,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65,
0x73, 0x70, 0x12, 0x5b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x73, 0x74,
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12,
0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x12, 0x20, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69,
0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x19, 0x5a, 0x17, 0x2e, 0x2f, 0x73,
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73,
0x74, 0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1060,54 +1031,51 @@ func file_statistics_statistics_proto_rawDescGZIP() []byte {
var file_statistics_statistics_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_statistics_statistics_proto_goTypes = []interface{}{
(*StatisticsReq)(nil), // 0: statistics.StatisticsReq
(*GetActiveUserReq)(nil), // 1: statistics.GetActiveUserReq
(*UserResp)(nil), // 2: statistics.UserResp
(*GetActiveUserResp)(nil), // 3: statistics.GetActiveUserResp
(*GetActiveGroupReq)(nil), // 4: statistics.GetActiveGroupReq
(*GroupResp)(nil), // 5: statistics.GroupResp
(*GetActiveGroupResp)(nil), // 6: statistics.GetActiveGroupResp
(*DateNumList)(nil), // 7: statistics.DateNumList
(*GetMessageStatisticsReq)(nil), // 8: statistics.GetMessageStatisticsReq
(*GetMessageStatisticsResp)(nil), // 9: statistics.GetMessageStatisticsResp
(*GetGroupStatisticsReq)(nil), // 10: statistics.GetGroupStatisticsReq
(*GetGroupStatisticsResp)(nil), // 11: statistics.GetGroupStatisticsResp
(*GetUserStatisticsReq)(nil), // 12: statistics.GetUserStatisticsReq
(*GetUserStatisticsResp)(nil), // 13: statistics.GetUserStatisticsResp
(*sdk_ws.ResponsePagination)(nil), // 14: server_api_params.ResponsePagination
(*StatisticsReq)(nil), // 0: statistics.StatisticsReq
(*GetActiveUserReq)(nil), // 1: statistics.GetActiveUserReq
(*UserResp)(nil), // 2: statistics.UserResp
(*GetActiveUserResp)(nil), // 3: statistics.GetActiveUserResp
(*GetActiveGroupReq)(nil), // 4: statistics.GetActiveGroupReq
(*GroupResp)(nil), // 5: statistics.GroupResp
(*GetActiveGroupResp)(nil), // 6: statistics.GetActiveGroupResp
(*DateNumList)(nil), // 7: statistics.DateNumList
(*GetMessageStatisticsReq)(nil), // 8: statistics.GetMessageStatisticsReq
(*GetMessageStatisticsResp)(nil), // 9: statistics.GetMessageStatisticsResp
(*GetGroupStatisticsReq)(nil), // 10: statistics.GetGroupStatisticsReq
(*GetGroupStatisticsResp)(nil), // 11: statistics.GetGroupStatisticsResp
(*GetUserStatisticsReq)(nil), // 12: statistics.GetUserStatisticsReq
(*GetUserStatisticsResp)(nil), // 13: statistics.GetUserStatisticsResp
}
var file_statistics_statistics_proto_depIdxs = []int32{
14, // 0: statistics.GetActiveUserReq.Pagination:type_name -> server_api_params.ResponsePagination
0, // 0: statistics.GetActiveUserReq.StatisticsReq:type_name -> statistics.StatisticsReq
2, // 1: statistics.GetActiveUserResp.Users:type_name -> statistics.UserResp
14, // 2: statistics.GetActiveUserResp.Pagination:type_name -> server_api_params.ResponsePagination
14, // 3: statistics.GetActiveGroupReq.Pagination:type_name -> server_api_params.ResponsePagination
5, // 4: statistics.GetActiveGroupResp.Groups:type_name -> statistics.GroupResp
14, // 5: statistics.GetActiveGroupResp.Pagination:type_name -> server_api_params.ResponsePagination
0, // 6: statistics.GetMessageStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq
7, // 7: statistics.GetMessageStatisticsResp.PrivateMessageNumList:type_name -> statistics.DateNumList
7, // 8: statistics.GetMessageStatisticsResp.GroupMessageNumList:type_name -> statistics.DateNumList
0, // 9: statistics.GetGroupStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq
7, // 10: statistics.GetGroupStatisticsResp.IncreaseGroupNumList:type_name -> statistics.DateNumList
7, // 11: statistics.GetGroupStatisticsResp.TotalGroupNumList:type_name -> statistics.DateNumList
0, // 12: statistics.GetUserStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq
7, // 13: statistics.GetUserStatisticsResp.IncreaseUserNumList:type_name -> statistics.DateNumList
7, // 14: statistics.GetUserStatisticsResp.ActiveUserNumList:type_name -> statistics.DateNumList
7, // 15: statistics.GetUserStatisticsResp.TotalUserNumList:type_name -> statistics.DateNumList
1, // 16: statistics.user.GetActiveUser:input_type -> statistics.GetActiveUserReq
4, // 17: statistics.user.GetActiveGroup:input_type -> statistics.GetActiveGroupReq
8, // 18: statistics.user.GetMessageStatistics:input_type -> statistics.GetMessageStatisticsReq
10, // 19: statistics.user.GetGroupStatistics:input_type -> statistics.GetGroupStatisticsReq
12, // 20: statistics.user.GetUserStatistics:input_type -> statistics.GetUserStatisticsReq
3, // 21: statistics.user.GetActiveUser:output_type -> statistics.GetActiveUserResp
6, // 22: statistics.user.GetActiveGroup:output_type -> statistics.GetActiveGroupResp
9, // 23: statistics.user.GetMessageStatistics:output_type -> statistics.GetMessageStatisticsResp
11, // 24: statistics.user.GetGroupStatistics:output_type -> statistics.GetGroupStatisticsResp
13, // 25: statistics.user.GetUserStatistics:output_type -> statistics.GetUserStatisticsResp
21, // [21:26] is the sub-list for method output_type
16, // [16:21] is the sub-list for method input_type
16, // [16:16] is the sub-list for extension type_name
16, // [16:16] is the sub-list for extension extendee
0, // [0:16] is the sub-list for field type_name
0, // 2: statistics.GetActiveGroupReq.StatisticsReq:type_name -> statistics.StatisticsReq
5, // 3: statistics.GetActiveGroupResp.Groups:type_name -> statistics.GroupResp
0, // 4: statistics.GetMessageStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq
7, // 5: statistics.GetMessageStatisticsResp.PrivateMessageNumList:type_name -> statistics.DateNumList
7, // 6: statistics.GetMessageStatisticsResp.GroupMessageNumList:type_name -> statistics.DateNumList
0, // 7: statistics.GetGroupStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq
7, // 8: statistics.GetGroupStatisticsResp.IncreaseGroupNumList:type_name -> statistics.DateNumList
7, // 9: statistics.GetGroupStatisticsResp.TotalGroupNumList:type_name -> statistics.DateNumList
0, // 10: statistics.GetUserStatisticsReq.StatisticsReq:type_name -> statistics.StatisticsReq
7, // 11: statistics.GetUserStatisticsResp.IncreaseUserNumList:type_name -> statistics.DateNumList
7, // 12: statistics.GetUserStatisticsResp.ActiveUserNumList:type_name -> statistics.DateNumList
7, // 13: statistics.GetUserStatisticsResp.TotalUserNumList:type_name -> statistics.DateNumList
1, // 14: statistics.user.GetActiveUser:input_type -> statistics.GetActiveUserReq
4, // 15: statistics.user.GetActiveGroup:input_type -> statistics.GetActiveGroupReq
8, // 16: statistics.user.GetMessageStatistics:input_type -> statistics.GetMessageStatisticsReq
10, // 17: statistics.user.GetGroupStatistics:input_type -> statistics.GetGroupStatisticsReq
12, // 18: statistics.user.GetUserStatistics:input_type -> statistics.GetUserStatisticsReq
3, // 19: statistics.user.GetActiveUser:output_type -> statistics.GetActiveUserResp
6, // 20: statistics.user.GetActiveGroup:output_type -> statistics.GetActiveGroupResp
9, // 21: statistics.user.GetMessageStatistics:output_type -> statistics.GetMessageStatisticsResp
11, // 22: statistics.user.GetGroupStatistics:output_type -> statistics.GetGroupStatisticsResp
13, // 23: statistics.user.GetUserStatistics:output_type -> statistics.GetUserStatisticsResp
19, // [19:24] is the sub-list for method output_type
14, // [14:19] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_statistics_statistics_proto_init() }

@ -1,5 +1,5 @@
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
// import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./statistics;statistics";
package statistics;
@ -9,35 +9,33 @@ message StatisticsReq {
}
message GetActiveUserReq{
server_api_params.ResponsePagination Pagination = 1;
StatisticsReq StatisticsReq = 1;
string OperationID = 2;
}
message UserResp{
string NickName = 1;
string UserId = 2;
string MessageNum = 3;
int32 MessageNum = 3;
}
message GetActiveUserResp {
repeated UserResp Users = 1;
server_api_params.ResponsePagination Pagination = 2;
}
message GetActiveGroupReq{
server_api_params.ResponsePagination Pagination = 1;
StatisticsReq StatisticsReq = 1;
string OperationID = 2;
}
message GroupResp {
string GroupName = 1;
string GroupId = 2;
string MessageNum = 3;
int32 MessageNum = 3;
}
message GetActiveGroupResp {
repeated GroupResp Groups = 1;
server_api_params.ResponsePagination Pagination = 2;
}
message DateNumList {

File diff suppressed because it is too large Load Diff

@ -116,7 +116,7 @@ message ResignUserResp{
CommonResp commonResp = 1;
}
message GetUserReq{
message GetUserByIdReq{
string UserId = 1;
string OperationID = 2;
}
@ -129,7 +129,7 @@ message User{
bool IsBlock = 5;
}
message GetUserResp{
message GetUserByIdResp{
CommonResp CommonResp = 1;
User user = 2;
}
@ -149,14 +149,14 @@ message AlterUserResp{
message GetUsersReq {
string OperationID = 1;
server_api_params.RequestPagination Pagination = 2;
string UserName = 3;
}
message GetUsersResp{
CommonResp CommonResp = 1;
string OperationID = 2;
repeated User user = 3;
int32 UserNum = 4;
server_api_params.ResponsePagination Pagination = 5;
repeated User user = 2;
server_api_params.ResponsePagination Pagination = 3;
string OperationID = 4;
}
message AddUserReq{
@ -206,18 +206,26 @@ message GetBlockUsersResp{
CommonResp CommonResp = 1;
repeated BlockUser BlockUsers = 2;
server_api_params.ResponsePagination Pagination = 3;
int32 BlockUserNum = 4;
}
message GetBlockUserReq {
message GetBlockUserByIdReq {
string User_id = 1;
string OperationID = 2;
}
message GetBlockUserResp {
message GetBlockUserByIdResp {
BlockUser BlockUser = 2;
}
message DeleteUserReq {
string User_id = 1;
string OperationID = 2;
}
message DeleteUserResp {
}
service user {
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
@ -228,7 +236,7 @@ service user {
rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp);
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
rpc GetUser(GetUserReq) returns (GetUserResp);
rpc GetUserById(GetUserByIdReq) returns (GetUserByIdResp);
rpc ResignUser(ResignUserReq) returns (ResignUserResp);
rpc AlterUser(AlterUserReq) returns (AlterUserResp);
rpc GetUsers(GetUsersReq) returns (GetUsersResp);
@ -236,5 +244,6 @@ service user {
rpc BlockUser(BlockUserReq) returns (BlockUserResp);
rpc UnBlockUser(UnBlockUserReq) returns (UnBlockUserResp);
rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp);
rpc GetBlockUser(GetBlockUserReq) returns (GetBlockUserResp);
rpc GetBlockUserById(GetBlockUserByIdReq) returns (GetBlockUserByIdResp);
rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp);
}

@ -78,3 +78,8 @@ func TimeStringFormatTimeUnix(timeFormat string, timeSrc string) int64 {
tm, _ := time.Parse(timeFormat, timeSrc)
return tm.Unix()
}
func TimeStringToTime(timeString string) (time.Time, error) {
t, err := time.Parse("2006-01-02", timeString)
return t, err
}

Loading…
Cancel
Save