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
7888f2b4
Commit
7888f2b4
authored
Mar 14, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/family' into feature/3.5
parents
7d4a2878
deb8fec0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
28 deletions
+28
-28
group_rank.go
cv/group_power_cv/group_rank.go
+6
-6
group_rank.go
route/group_power_r/group_rank.go
+12
-12
inner.go
route/group_power_r/inner.go
+10
-10
No files found.
cv/group_power_cv/group_rank.go
View file @
7888f2b4
...
...
@@ -13,16 +13,16 @@ type CvGroupPowerInfo struct {
// 家族基本信息
type
CvGroupPowerBase
struct
{
GroupPowerId
uint64
`json:"groupPowerId"`
// 家族id
Icon
string
`json:"icon"`
// 家族图片
Name
string
`json:"name"`
// 家族名
Nameplate
string
`json:"nameplate"`
// 铭牌
Id
uint64
`json:"id"`
// 家族id
Icon
string
`json:"icon"`
// 家族图片
Name
string
`json:"name"`
// 家族名
Nameplate
string
`json:"nameplate"`
// 铭牌
}
// 家族成员
type
CvGroupPowerMember
struct
{
MemberNum
uint32
`json:"memberNum"`
// 当前成员数
Member
Limit
uint32
`json:"memberLimit" swaggertype:"integer
"`
// 成员上限
MemberNum
uint32
`json:"memberNum"`
// 当前成员数
Member
Max
uint32
`json:"memberMax
"`
// 成员上限
}
// 家族等级
...
...
route/group_power_r/group_rank.go
View file @
7888f2b4
...
...
@@ -74,10 +74,10 @@ func GroupPowerRank(c *gin.Context) (*mycontext.MyContext, error) {
if
myGroupPower
!=
nil
&&
v
.
GroupPowerId
==
myGroupPower
.
GroupPowerId
&&
myGroupPower
.
Role
==
groupPower_e
.
GroupPowerUserRoleMgr
{
response
.
MyGroupPower
=
&
group_power_cv
.
CvGroupPowerRankData
{
CvGroupPowerBase
:
group_power_cv
.
CvGroupPowerBase
{
GroupPowerId
:
myGroupPower
.
GroupPowerId
,
Icon
:
groupPowers
[
myGroupPower
.
GroupPowerId
]
.
Icon
,
Name
:
groupPowers
[
myGroupPower
.
GroupPowerId
]
.
Name
,
Nameplate
:
groupPowers
[
myGroupPower
.
GroupPowerId
]
.
Nameplate
,
Id
:
myGroupPower
.
GroupPowerId
,
Icon
:
groupPowers
[
myGroupPower
.
GroupPowerId
]
.
Icon
,
Name
:
groupPowers
[
myGroupPower
.
GroupPowerId
]
.
Name
,
Nameplate
:
groupPowers
[
myGroupPower
.
GroupPowerId
]
.
Nameplate
,
},
CvGroupPowerGrade
:
group_power_cv
.
CvGroupPowerGrade
{
Grade
:
grades
[
myGroupPower
.
GroupPowerId
]
.
Grade
,
...
...
@@ -88,10 +88,10 @@ func GroupPowerRank(c *gin.Context) (*mycontext.MyContext, error) {
}
response
.
Items
=
append
(
response
.
Items
,
group_power_cv
.
CvGroupPowerRankData
{
CvGroupPowerBase
:
group_power_cv
.
CvGroupPowerBase
{
GroupPowerId
:
v
.
GroupPowerId
,
Icon
:
groupPowers
[
v
.
GroupPowerId
]
.
Icon
,
Name
:
groupPowers
[
v
.
GroupPowerId
]
.
Name
,
Nameplate
:
groupPowers
[
v
.
GroupPowerId
]
.
Nameplate
,
Id
:
v
.
GroupPowerId
,
Icon
:
groupPowers
[
v
.
GroupPowerId
]
.
Icon
,
Name
:
groupPowers
[
v
.
GroupPowerId
]
.
Name
,
Nameplate
:
groupPowers
[
v
.
GroupPowerId
]
.
Nameplate
,
},
CvGroupPowerGrade
:
group_power_cv
.
CvGroupPowerGrade
{
Grade
:
grades
[
v
.
GroupPowerId
]
.
Grade
,
...
...
@@ -212,10 +212,10 @@ func GroupPowerGradeDetail(c *gin.Context) (*mycontext.MyContext, error) {
}
response
:=
group_power_cv
.
CvGroupPowerGradeDetail
{
GroupPowerBase
:
group_power_cv
.
CvGroupPowerBase
{
GroupPowerId
:
groupPower
.
ID
,
Icon
:
groupPower
.
Icon
,
Name
:
groupPower
.
Name
,
Nameplate
:
groupPower
.
Nameplate
,
Id
:
groupPower
.
ID
,
Icon
:
groupPower
.
Icon
,
Name
:
groupPower
.
Name
,
Nameplate
:
groupPower
.
Nameplate
,
},
GroupPowerGrade
:
group_power_cv
.
CvGroupPowerGrade
{
Grade
:
grade
.
Grade
,
...
...
route/group_power_r/inner.go
View file @
7888f2b4
...
...
@@ -45,25 +45,25 @@ func MGetGroupPowers(c *gin.Context) (*mycontext.MyContext, error) {
response
:=
make
(
map
[
mysql
.
ID
]
group_power_cv
.
CvGroupPowerInfo
)
for
groupPowerId
,
info
:=
range
groupPowers
{
// 成员上限
var
member
Limit
mysql
.
Num
var
member
Max
mysql
.
Num
grade
:=
groupPowerGrade
[
groupPowerId
]
.
Grade
if
grade
>=
groupPower_e
.
GroupPowerGrade0
&&
grade
<=
groupPower_e
.
GroupPowerGradeMax
{
member
Limit
=
mysql
.
Num
(
group_power_cv
.
GroupPowerGradePrivilegeNum
[
groupPowerGrade
[
groupPowerId
]
.
Grade
][
0
]
.
Num
)
member
Max
=
mysql
.
Num
(
group_power_cv
.
GroupPowerGradePrivilegeNum
[
groupPowerGrade
[
groupPowerId
]
.
Grade
][
0
]
.
Num
)
}
memberNum
:=
mysql
.
Num
(
len
(
groupPowerUsers
[
groupPowerId
]))
if
memberNum
>
member
Limit
{
member
Limit
=
memberNum
if
memberNum
>
member
Max
{
member
Max
=
memberNum
}
response
[
groupPowerId
]
=
group_power_cv
.
CvGroupPowerInfo
{
CvGroupPowerBase
:
group_power_cv
.
CvGroupPowerBase
{
GroupPowerId
:
groupPowerId
,
Icon
:
info
.
Icon
,
Name
:
info
.
Name
,
Nameplate
:
info
.
Nameplate
,
Id
:
groupPowerId
,
Icon
:
info
.
Icon
,
Name
:
info
.
Name
,
Nameplate
:
info
.
Nameplate
,
},
CvGroupPowerMember
:
group_power_cv
.
CvGroupPowerMember
{
MemberNum
:
memberNum
,
Member
Limit
:
memberLimit
,
MemberNum
:
memberNum
,
Member
Max
:
memberMax
,
},
}
}
...
...
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