|
@@ -2,6 +2,7 @@ package service
|
|
|
|
|
|
import (
|
|
import (
|
|
"context"
|
|
"context"
|
|
|
|
+ "fmt"
|
|
"math"
|
|
"math"
|
|
"sort"
|
|
"sort"
|
|
"time"
|
|
"time"
|
|
@@ -1422,6 +1423,15 @@ func (s *Synthesis) getTaskCompletionDetail(userName string) (*entity.TaskComple
|
|
return nil, nil
|
|
return nil, nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // TODO 需要定义或者传入taskid
|
|
|
|
+ record, codeResult := playerMgr.GetLastestTaskInfo(userName, "taskId")
|
|
|
|
+ if codeResult != nil {
|
|
|
|
+ mhayaLogger.Warnf("getTaskCompletionDetail GetLastestTaskInfo error:%v", codeResult)
|
|
|
|
+ return nil, codeResult
|
|
|
|
+ }
|
|
|
|
+ fmt.Println(record)
|
|
|
|
+
|
|
|
|
+ // TODO 需要设置taskid
|
|
// 获取用户加入频道的记录
|
|
// 获取用户加入频道的记录
|
|
joinTgRecord, codeResult := playerMgr.GetJoinRecord(userName, string(constant.TGJoinName))
|
|
joinTgRecord, codeResult := playerMgr.GetJoinRecord(userName, string(constant.TGJoinName))
|
|
if codeResult != nil {
|
|
if codeResult != nil {
|
|
@@ -1429,12 +1439,14 @@ func (s *Synthesis) getTaskCompletionDetail(userName string) (*entity.TaskComple
|
|
return nil, codeResult
|
|
return nil, codeResult
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // TODO 需要设置taskid
|
|
joinDcRecord, codeResult := playerMgr.GetJoinRecord(userName, string(constant.DCJoinName))
|
|
joinDcRecord, codeResult := playerMgr.GetJoinRecord(userName, string(constant.DCJoinName))
|
|
if codeResult != nil {
|
|
if codeResult != nil {
|
|
mhayaLogger.Warnf("getTaskCompletionDetail GetJoinRecord error:%v", codeResult)
|
|
mhayaLogger.Warnf("getTaskCompletionDetail GetJoinRecord error:%v", codeResult)
|
|
return nil, codeResult
|
|
return nil, codeResult
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // TODO 需要设置taskid
|
|
// 获取用户关注的记录
|
|
// 获取用户关注的记录
|
|
followTwitterRecord, codeResult := playerMgr.GetFollowRecord(userName, string(constant.TwitterFollowName))
|
|
followTwitterRecord, codeResult := playerMgr.GetFollowRecord(userName, string(constant.TwitterFollowName))
|
|
if codeResult != nil {
|
|
if codeResult != nil {
|
|
@@ -1442,12 +1454,14 @@ func (s *Synthesis) getTaskCompletionDetail(userName string) (*entity.TaskComple
|
|
return nil, codeResult
|
|
return nil, codeResult
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // TODO 需要设置taskid
|
|
followYoutubeRecord, codeResult := playerMgr.GetFollowRecord(userName, string(constant.YoutubeFollowName))
|
|
followYoutubeRecord, codeResult := playerMgr.GetFollowRecord(userName, string(constant.YoutubeFollowName))
|
|
if codeResult != nil {
|
|
if codeResult != nil {
|
|
mhayaLogger.Warnf("getTaskCompletionDetail GetFollowRecord error:%v", codeResult)
|
|
mhayaLogger.Warnf("getTaskCompletionDetail GetFollowRecord error:%v", codeResult)
|
|
return nil, codeResult
|
|
return nil, codeResult
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // TODO 需要设置taskid
|
|
// 获取最新的用户信息更新记录
|
|
// 获取最新的用户信息更新记录
|
|
updateRecord, codeResult := playerMgr.GetPlayerLastestUpdateRecord(userName)
|
|
updateRecord, codeResult := playerMgr.GetPlayerLastestUpdateRecord(userName)
|
|
if codeResult != nil {
|
|
if codeResult != nil {
|
|
@@ -1455,6 +1469,7 @@ func (s *Synthesis) getTaskCompletionDetail(userName string) (*entity.TaskComple
|
|
return nil, codeResult
|
|
return nil, codeResult
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // TODO 需要设置taskid
|
|
// 邀请成功人数
|
|
// 邀请成功人数
|
|
inviteCount, codeResult := playerMgr.GetSuccessfulInvitations(userName, 0)
|
|
inviteCount, codeResult := playerMgr.GetSuccessfulInvitations(userName, 0)
|
|
if codeResult != nil {
|
|
if codeResult != nil {
|