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
c2880d32
You need to sign in or sign up before continuing.
Commit
c2880d32
authored
Mar 10, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
申请加入家族
parent
982b8d0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
3.5.0.sql
mysql/3.5.0.sql
+1
-2
group_power.go
route/group_power_r/group_power.go
+10
-1
No files found.
mysql/3.5.0.sql
View file @
c2880d32
...
...
@@ -27,7 +27,6 @@ CREATE TABLE `group_power_apply_join` (
`updated_time`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`is_accept`
tinyint
NOT
NULL
DEFAULT
'0'
COMMENT
'是否已经接受'
,
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`user_group`
(
`user_id`
,
`group_power_id`
),
UNIQUE
KEY
`u_apply`
(
`user_id`
,
`group_power_id`
,
`is_accept`
)
USING
BTREE
,
UNIQUE
KEY
`u_apply`
(
`user_id`
,
`group_power_id`
)
USING
BTREE
,
KEY
`group_power_id`
(
`group_power_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
COMMENT
=
'申请加入家族'
;
\ No newline at end of file
route/group_power_r/group_power.go
View file @
c2880d32
...
...
@@ -872,7 +872,16 @@ func GroupPowerApplyJoin(c *gin.Context) (*mycontext.MyContext, error) {
return
myContext
,
err
}
if
gpInfo
==
nil
||
gpInfo
.
ID
<=
0
{
return
myContext
,
bizerr
.
InvalidParameter
return
myContext
,
bizerr
.
GroupPowerNotExist
}
// 判断是否加入了家族
gpU
:=
groupPower_m
.
GroupPowerUser
{
UserId
:
userId
}
uList
,
err
:=
gpU
.
Get
(
model
.
Db
)
if
err
!=
nil
{
return
myContext
,
err
}
if
len
(
uList
)
>
0
{
return
myContext
,
bizerr
.
GroupPowerHasJoinOther
}
// 插入申请表
...
...
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