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
var cpLevel int
var cpUserAvatar string
var cpEntryEffect bool
if cp, _ := rpc.GetUserCp(model, userId); cp != nil {
cpLevel = cp.CpLevel.Level
if cp.CpUserInfo.Avatar != nil {
cpUserAvatar = *cp.CpUserInfo.Avatar
}
for _, v := range cp.MyPrivilegeList {
if v.Type == 5 {
cpEntryEffect = true
}
}
if cp, _ := rpc.GetUserCpEntryEffect(model, userId); cp != nil {
cpLevel = cp.CpLevel
cpUserAvatar = cp.CpUserAvatar
cpEntryEffect = cp.CpEntryEffect
}
r := UserParam{
Nick: user.Nick,
......
......@@ -612,16 +612,10 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
var entryEffectType int // 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大
var cpEntryEffect bool
if cp, _ := rpc.GetUserCp(model, userId); cp != nil {
for _, v := range cp.MyPrivilegeList {
if v.Type == 5 {
cpEntryEffect = true
}
}
result.CpLevel = cp.CpLevel.Level
if cp.CpUserInfo != nil && cp.CpUserInfo.Avatar != nil {
result.CpUserAvatar = *cp.CpUserInfo.Avatar
}
if cp, _ := rpc.GetUserCpEntryEffect(model, userId); cp != nil {
cpEntryEffect = cp.CpEntryEffect
result.CpLevel = cp.CpLevel
result.CpUserAvatar = cp.CpUserAvatar
}
if user, _ := user_cv.GetUserDetail(model, userId, userId); user != nil {
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