|
@@ -31,8 +31,8 @@ func NewSynthesis() *Synthesis {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 统计用户相关信息
|
|
|
-func (s *Synthesis) UserList(req entity.UserListReq) (*entity.UserListResp, *code.Result) {
|
|
|
+// 综合统计
|
|
|
+func (s *Synthesis) Overview(req entity.OverviewReq) (*entity.OverviewResp, *code.Result) {
|
|
|
page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
|
|
|
// 构建查询条件
|
|
@@ -40,8 +40,8 @@ func (s *Synthesis) UserList(req entity.UserListReq) (*entity.UserListResp, *cod
|
|
|
if req.UserName != "" {
|
|
|
filter["userName"] = req.UserName
|
|
|
}
|
|
|
- if req.NickName != "" {
|
|
|
- filter["nickName"] = req.NickName
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
}
|
|
|
|
|
|
// 设置分页选项
|
|
@@ -55,14 +55,66 @@ func (s *Synthesis) UserList(req entity.UserListReq) (*entity.UserListResp, *cod
|
|
|
|
|
|
collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
|
|
|
- // 获取总数total
|
|
|
- count, err := collection.CountDocuments(ctx, filter)
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.OverviewDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
if err != nil {
|
|
|
- mhayaLogger.Warnf("UserList CountDocuments error:%v", err)
|
|
|
+ mhayaLogger.Warnf("Overview Find error:%v", err)
|
|
|
return nil, common.NewResult(code.InternalError)
|
|
|
}
|
|
|
|
|
|
- // TODO UserList 统计用户相关信息
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.OverviewDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("Overview Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("Overview cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO 综合统计相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.OverviewResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
+}
|
|
|
+
|
|
|
+// 统计用户相关信息
|
|
|
+func (s *Synthesis) UserList(req entity.UserListReq) (*entity.UserListResp, *code.Result) {
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
// 查询数据
|
|
|
var results []*entity.UserListDetail
|
|
|
cursor, err := collection.Find(ctx, filter, findOptions)
|
|
@@ -79,6 +131,7 @@ func (s *Synthesis) UserList(req entity.UserListReq) (*entity.UserListResp, *cod
|
|
|
mhayaLogger.Warnf("UserList Decode error:%v", err)
|
|
|
return nil, common.NewResult(code.InternalError)
|
|
|
}
|
|
|
+
|
|
|
results = append(results, &result)
|
|
|
}
|
|
|
|
|
@@ -87,6 +140,11 @@ func (s *Synthesis) UserList(req entity.UserListReq) (*entity.UserListResp, *cod
|
|
|
return nil, common.NewResult(code.InternalError)
|
|
|
}
|
|
|
|
|
|
+ // TODO UserList 统计用户相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
return &entity.UserListResp{
|
|
|
Details: results,
|
|
|
Total: count,
|
|
@@ -732,24 +790,420 @@ func (s *Synthesis) RecordList(req entity.RecordListReq) (*entity.RecordListResp
|
|
|
|
|
|
// 转盘统计
|
|
|
func (s *Synthesis) Turntable(req entity.TurntableReq) (*entity.TurntableResp, *code.Result) {
|
|
|
- // TODO Turntable 转盘统计
|
|
|
- return nil, nil
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.TurntableDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("Turntable Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.TurntableDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("Turntable Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("Turntable cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO 转盘统计相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.TurntableResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
}
|
|
|
|
|
|
// 资产统计
|
|
|
func (s *Synthesis) Assets(req entity.AssetsReq) (*entity.AssetsResp, *code.Result) {
|
|
|
- // TODO Assets 资产统计
|
|
|
- return nil, nil
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.AssetsDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("Assets Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.AssetsDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("Assets Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("Assets cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO Assets 统计相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.AssetsResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
+}
|
|
|
+
|
|
|
+// 资产变动记录
|
|
|
+func (s *Synthesis) AssetsRecord(req entity.AssetsRecordReq) (*entity.AssetsRecordResp, *code.Result) {
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.AssetsRecordDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("AssetsRecord Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.AssetsRecordDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("AssetsRecord Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("AssetsRecord cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO 资产变动记录相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.AssetsRecordResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
}
|
|
|
|
|
|
// 邀请统计
|
|
|
func (s *Synthesis) Invite(req entity.InviteReq) (*entity.InviteResp, *code.Result) {
|
|
|
- // TODO Invite 邀请统计
|
|
|
- return nil, nil
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.InviteDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("Invite Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.InviteDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("Invite Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("Invite cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO 邀请统计相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.InviteResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
}
|
|
|
|
|
|
// 活跃统计
|
|
|
func (s *Synthesis) Active(req entity.ActiveReq) (*entity.ActiveResp, *code.Result) {
|
|
|
- // TODO Active 活跃统计
|
|
|
- return nil, nil
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.ActiveDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("Active Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.ActiveDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("Active Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("Active cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO Active 活跃统计相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.ActiveResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
+}
|
|
|
+
|
|
|
+// 任务完成度统计
|
|
|
+func (s *Synthesis) TaskCompletion(req entity.TaskCompletionReq) (*entity.TaskCompletionResp, *code.Result) {
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.TaskCompletionDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("TaskCompletion Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.TaskCompletionDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("TaskCompletion Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("TaskCompletion cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO 任务完成度统计相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.TaskCompletionResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
+}
|
|
|
+
|
|
|
+// 用户行为检测
|
|
|
+func (s *Synthesis) BehaviorMonitoring(req entity.BehaviorMonitoringReq) (*entity.BehaviorMonitoringResp, *code.Result) {
|
|
|
+ page, pageSize := checkPageParam(req.Page, req.Size)
|
|
|
+
|
|
|
+ // 构建查询条件
|
|
|
+ filter := bson.M{}
|
|
|
+ if req.UserName != "" {
|
|
|
+ filter["userName"] = req.UserName
|
|
|
+ }
|
|
|
+ if req.OpenId != "" {
|
|
|
+ filter["openId"] = req.OpenId
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置分页选项
|
|
|
+ findOptions := options.Find()
|
|
|
+ findOptions.SetSkip(int64((page - 1) * pageSize))
|
|
|
+ findOptions.SetLimit(int64(pageSize))
|
|
|
+ findOptions.SetSort(bson.D{{"createTime", -1}})
|
|
|
+
|
|
|
+ ctx, cancel := context.WithTimeout(context.Background(), 100*time.Second)
|
|
|
+ defer cancel()
|
|
|
+
|
|
|
+ collection := mdb.MDB.Collection(constant.CNamePlayer)
|
|
|
+
|
|
|
+ // 查询数据
|
|
|
+ var results []*entity.BehaviorMonitoringDetail
|
|
|
+ cursor, err := collection.Find(ctx, filter, findOptions)
|
|
|
+ if err != nil {
|
|
|
+ mhayaLogger.Warnf("BehaviorMonitoring Find error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ defer cursor.Close(ctx)
|
|
|
+ // 解析结果
|
|
|
+ for cursor.Next(ctx) {
|
|
|
+ var result entity.BehaviorMonitoringDetail
|
|
|
+ if err := cursor.Decode(&result); err != nil {
|
|
|
+ mhayaLogger.Warnf("BehaviorMonitoring Decode error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ results = append(results, &result)
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := cursor.Err(); err != nil {
|
|
|
+ mhayaLogger.Warnf("BehaviorMonitoring cursor error:%v", err)
|
|
|
+ return nil, common.NewResult(code.InternalError)
|
|
|
+ }
|
|
|
+
|
|
|
+ // TODO 用户行为检测相关信息
|
|
|
+
|
|
|
+ // TODO 获取总数total
|
|
|
+ var count int64
|
|
|
+
|
|
|
+ return &entity.BehaviorMonitoringResp{
|
|
|
+ Details: results,
|
|
|
+ Total: count,
|
|
|
+ }, nil
|
|
|
}
|