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
e6b3b6b7
Commit
e6b3b6b7
authored
Mar 31, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 家族昵称和家族铭牌延长可以设置15个字符
parent
8dd1a38c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
enum.go
_const/enum/groupPower_e/enum.go
+4
-0
family.go
domain/model/groupPower_m/family.go
+2
-2
group_power.go
route/group_power_r/group_power.go
+1
-1
No files found.
_const/enum/groupPower_e/enum.go
View file @
e6b3b6b7
...
...
@@ -67,3 +67,7 @@ const (
PowerSuppportAwarded
PowerSupportAwardState
=
1
// 已经领取
PowerSuppportWaiting
PowerSupportAwardState
=
2
// 待领取
)
const
(
LongestNameplate
=
15
)
domain/model/groupPower_m/family.go
View file @
e6b3b6b7
...
...
@@ -140,8 +140,8 @@ func UpdateFamily(model *domain.Model, familyId uint64, name, nameplate, declara
if
groupPower
.
ModifyNameplate
!=
mysql
.
YES
{
// 同步修改铭牌
n
:=
len
([]
rune
(
name
))
if
n
>
6
{
n
=
6
if
n
>
groupPower_e
.
LongestNameplate
{
n
=
groupPower_e
.
LongestNameplate
}
updateMap
[
"nameplate"
]
=
string
([]
rune
(
name
[
0
:
n
]))
}
...
...
route/group_power_r/group_power.go
View file @
e6b3b6b7
...
...
@@ -1510,7 +1510,7 @@ func GroupPowerSetInfo(c *gin.Context) (*mycontext.MyContext, error) {
return
myContext
,
res_m
.
GetErrByLanguage
(
model
.
Db
,
common
.
MSG_ID_SET_FAMILY_NAMEPL
,
lang
,
bizerr
.
GroupPowerChangeNameplate
)
}
// 检查铭牌长度和唯一性
if
len
(
para
.
Nameplate
)
>
6
{
if
len
(
para
.
Nameplate
)
>
groupPower_e
.
LongestNameplate
{
return
myContext
,
bizerr
.
GroupPowerHaveTooLong
}
if
groupPower_m
.
IsExistsNameplate
(
model
,
para
.
Nameplate
)
{
...
...
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