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
d139ee36
Commit
d139ee36
authored
Mar 27, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分用户不能加入家族
parent
035c0e4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
bizCode.go
myerr/bizerr/bizCode.go
+1
-0
group_power.go
route/group_power_r/group_power.go
+12
-0
No files found.
myerr/bizerr/bizCode.go
View file @
d139ee36
...
...
@@ -93,6 +93,7 @@ var (
GroupPowerUserHaveNoJoin
=
myerr
.
NewBusinessCode
(
15020
,
"User have no joined power"
,
myerr
.
BusinessData
{})
// 还未加入国家势力
GroupPowerChangeNameplate
=
myerr
.
NewBusinessCode
(
15021
,
"Can only be modified at the silver level"
,
myerr
.
BusinessData
{})
// 修改铭牌不够等级
GroupPowerMemberMax
=
myerr
.
NewBusinessCode
(
15022
,
"The family size has reached the upper limit"
,
myerr
.
BusinessData
{})
// 家族人数达到上限
GroupPowerCannotJoin
=
myerr
.
NewBusinessCode
(
15023
,
"You cannot join"
,
myerr
.
BusinessData
{})
// 不能加入家族
TaskHasAward
=
myerr
.
NewBusinessCode
(
19001
,
"task has award"
,
myerr
.
BusinessData
{})
...
...
route/group_power_r/group_power.go
View file @
d139ee36
...
...
@@ -958,6 +958,12 @@ func GroupPowerApplyJoin(c *gin.Context) (*mycontext.MyContext, error) {
if
err
!=
nil
{
return
myContext
,
myerr
.
WrapErr
(
err
)
}
// Aoxi要求不能让这些人加入家族
banUserMap
:=
map
[
uint64
]
bool
{
251
:
true
,
1384611
:
true
,
4223511
:
true
,
4338751
:
true
,
4339471
:
true
,
4339541
:
true
,
4354581
:
true
,
6541
:
true
,
23971
:
true
}
if
_
,
ok
:=
banUserMap
[
userId
];
ok
{
return
myContext
,
bizerr
.
GroupPowerCannotJoin
}
model
:=
domain
.
CreateModelContext
(
myContext
)
// 判断家族是否存在
...
...
@@ -1037,6 +1043,12 @@ func GroupPowerApplyPass(c *gin.Context) (*mycontext.MyContext, error) {
if
err
!=
nil
{
return
myContext
,
err
}
// Aoxi要求不能让这些人加入家族
banUserMap
:=
map
[
uint64
]
bool
{
251
:
true
,
1384611
:
true
,
4223511
:
true
,
4338751
:
true
,
4339471
:
true
,
4339541
:
true
,
4354581
:
true
,
6541
:
true
,
23971
:
true
}
if
_
,
ok
:=
banUserMap
[
optUser
.
ID
];
ok
{
return
myContext
,
bizerr
.
GroupPowerHaveNoPower
}
// 判断是否加入了家族
gpU
:=
groupPower_m
.
GroupPowerUser
{
UserId
:
userId
}
...
...
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