Commit 6e2e4198 authored by hujiebin's avatar hujiebin

Merge branch 'feature/cp-entry-effect' into 'master'

feature/cp-entry-effect

See merge request !47
parents 4ae03e94 d8f05959
...@@ -253,16 +253,10 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin ...@@ -253,16 +253,10 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin
var cpLevel int var cpLevel int
var cpUserAvatar string var cpUserAvatar string
var cpEntryEffect bool var cpEntryEffect bool
if cp, _ := rpc.GetUserCp(model, userId); cp != nil { if cp, _ := rpc.GetUserCpEntryEffect(model, userId); cp != nil {
cpLevel = cp.CpLevel.Level cpLevel = cp.CpLevel
if cp.CpUserInfo.Avatar != nil { cpUserAvatar = cp.CpUserAvatar
cpUserAvatar = *cp.CpUserInfo.Avatar cpEntryEffect = cp.CpEntryEffect
}
for _, v := range cp.MyPrivilegeList {
if v.Type == 5 {
cpEntryEffect = true
}
}
} }
r := UserParam{ r := UserParam{
Nick: user.Nick, Nick: user.Nick,
......
...@@ -612,16 +612,10 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) { ...@@ -612,16 +612,10 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大 var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大
var cpEntryEffect bool var cpEntryEffect bool
if cp, _ := rpc.GetUserCp(model, userId); cp != nil { if cp, _ := rpc.GetUserCpEntryEffect(model, userId); cp != nil {
for _, v := range cp.MyPrivilegeList { cpEntryEffect = cp.CpEntryEffect
if v.Type == 5 { result.CpLevel = cp.CpLevel
cpEntryEffect = true result.CpUserAvatar = cp.CpUserAvatar
}
}
result.CpLevel = cp.CpLevel.Level
if cp.CpUserInfo != nil && cp.CpUserInfo.Avatar != nil {
result.CpUserAvatar = *cp.CpUserInfo.Avatar
}
} }
if user, _ := user_cv.GetUserDetail(model, userId, userId); user != nil { if user, _ := user_cv.GetUserDetail(model, userId, userId); user != nil {
if user.IsVip { if user.IsVip {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment