Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujiebin
hilo-group
Commits
178b1b5a
Commit
178b1b5a
authored
Jun 14, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进场特效类型 1: CP 2:神秘人 3:贵族 4:vip
parent
86bd19b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
11 deletions
+75
-11
group.go
cv/group_cv/group.go
+12
-11
group_op.go
domain/service/group_s/group_op.go
+36
-0
group_info.go
route/group_r/group_info.go
+27
-0
No files found.
cv/group_cv/group.go
View file @
178b1b5a
...
...
@@ -166,17 +166,18 @@ type RoomInfo struct {
ThemeId
uint64
`json:"themeId"`
ThemeUrl
string
`json:"themeUrl"`
// 1:官方 2:自定义
ThemeType
uint8
`json:"themeType"`
Role
group_e
.
GroupRoleType
`json:"role"`
DiceNum
uint16
`json:"diceNum"`
// 骰子游戏的数量
DiceType
uint16
`json:"diceType"`
// 骰子游戏类型
RoleMembers
[]
SimpleRoleInfo
`json:"roleMembers"`
WelcomeText
string
`json:"welcomeText"`
// 新成员入群欢迎语
Banners
[]
BannerElement
`json:"banners"`
LuckyWheel
LuckyWheelState
`json:"luckyWheel"`
TotalConsume
uint64
`json:"totalConsume"`
GameConfig
*
game_m
.
GameConfig
`json:"gameConfig"`
Owner
*
user_cv
.
CvUserDetail
`json:"owner"`
ThemeType
uint8
`json:"themeType"`
Role
group_e
.
GroupRoleType
`json:"role"`
DiceNum
uint16
`json:"diceNum"`
// 骰子游戏的数量
DiceType
uint16
`json:"diceType"`
// 骰子游戏类型
RoleMembers
[]
SimpleRoleInfo
`json:"roleMembers"`
WelcomeText
string
`json:"welcomeText"`
// 新成员入群欢迎语
Banners
[]
BannerElement
`json:"banners"`
LuckyWheel
LuckyWheelState
`json:"luckyWheel"`
TotalConsume
uint64
`json:"totalConsume"`
GameConfig
*
game_m
.
GameConfig
`json:"gameConfig"`
Owner
*
user_cv
.
CvUserDetail
`json:"owner"`
EntryEffectType
int
`json:"entryEffectType"`
// 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip
}
type
SupportPageDetail
struct
{
...
...
domain/service/group_s/group_op.go
View file @
178b1b5a
...
...
@@ -232,6 +232,9 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin
NobleLevel
uint16
`json:"nobleLevel"`
SvipLevel
int
`json:"svipLevel"`
Svip
rpc
.
CvSvip
`json:"svip"`
CpLevel
int
`json:"cpLevel"`
// cp等级
CpUserAvatar
string
`json:"cpUserAvatar"`
// cp用户头像
EntryEffectType
int
`json:"entryEffectType"`
// 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip
}
up
:=
user_m
.
UserProperty
{}
...
...
@@ -246,6 +249,20 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin
if
err
!=
nil
{
return
err
}
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
}
}
}
r
:=
UserParam
{
Nick
:
user
.
Nick
,
UserAvatar
:
user
.
Avatar
,
...
...
@@ -257,8 +274,27 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin
RidReceiverAvatar
:
properties
[
rides
[
userId
]]
.
ReceiverAvatar
,
NobleLevel
:
nobleLevel
,
Svip
:
rpc
.
CopySimpleSvip
(
svip
),
CpLevel
:
cpLevel
,
CpUserAvatar
:
cpUserAvatar
,
}
rideId
=
r
.
RideId
// 进场特效类型
var
entryEffectType
int
// 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大
if
r
.
IsVip
{
entryEffectType
=
4
}
if
r
.
NobleLevel
>
0
{
entryEffectType
=
3
}
for
_
,
v
:=
range
r
.
Svip
.
Privileges
{
if
len
(
v
.
MysteryCode
)
>
0
{
entryEffectType
=
2
}
}
if
cpEntryEffect
{
entryEffectType
=
1
}
r
.
EntryEffectType
=
entryEffectType
buf
,
err
:=
json
.
Marshal
(
r
)
if
err
==
nil
{
...
...
route/group_r/group_info.go
View file @
178b1b5a
...
...
@@ -608,6 +608,33 @@ func GetRoomInfo(c *gin.Context) (*mycontext.MyContext, error) {
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"GetRoomInfo: GetUserBase: %s"
,
err
.
Error
())
}
// 进场特效类型
var
entryEffectType
int
// 进场特效类型 1: CP 2:神秘人 3:贵族 4:vip ,顺序从小到大
if
result
.
Owner
!=
nil
{
var
cpEntryEffect
bool
if
cp
,
_
:=
rpc
.
GetUserCp
(
model
,
userId
);
cp
!=
nil
{
for
_
,
v
:=
range
cp
.
MyPrivilegeList
{
if
v
.
Type
==
5
{
cpEntryEffect
=
true
}
}
}
if
result
.
Owner
.
IsVip
{
entryEffectType
=
4
}
if
result
.
Owner
.
Noble
.
Level
>
0
{
entryEffectType
=
3
}
for
_
,
v
:=
range
result
.
Owner
.
Svip
.
Privileges
{
if
len
(
v
.
MysteryCode
)
>
0
{
entryEffectType
=
2
}
}
if
cpEntryEffect
{
entryEffectType
=
1
}
result
.
EntryEffectType
=
entryEffectType
}
resp
.
ResponseOk
(
c
,
result
)
return
myContext
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment