Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
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
chenweijian
hilo-user
Commits
7ac87c4f
Commit
7ac87c4f
authored
Jul 11, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派对申请
parent
5eac84d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
invite_apply.go
domain/model/invite_m/invite_apply.go
+4
-3
新人派对申请.sql
mysql/新人派对申请.sql
+1
-0
party_invite.go
route/invite_r/party_invite.go
+5
-5
No files found.
domain/model/invite_m/invite_apply.go
View file @
7ac87c4f
...
@@ -18,13 +18,14 @@ type InviteApply struct {
...
@@ -18,13 +18,14 @@ type InviteApply struct {
VideoUrl
string
`json:"video_url"`
VideoUrl
string
`json:"video_url"`
Level
string
`json:"level"`
Level
string
`json:"level"`
CreatedTime
time
.
Time
`json:"created_time"`
CreatedTime
time
.
Time
`json:"created_time"`
Reason
int
`json:"reason"`
// 1.已申请2.待审核3.已通过4.已拒绝"
Reason
int
`json:"reason"`
// 1.已申请2.待审核3.已通过4.已拒绝"
SubUserId
uint64
`json:"sub_user_id"`
// 提交人
}
}
func
CreateInviteApply
(
model
*
domain
.
Model
,
userId
,
newUserId
uint64
,
platform
,
platformId
,
recharge
,
videoUrl
string
)
error
{
func
CreateInviteApply
(
model
*
domain
.
Model
,
userId
,
newUserId
,
subUserId
uint64
,
platform
,
platformId
,
recharge
,
videoUrl
string
)
error
{
err
:=
model
.
DB
()
.
Create
(
&
InviteApply
{
err
:=
model
.
DB
()
.
Create
(
&
InviteApply
{
UserId
:
userId
,
NewUserId
:
newUserId
,
Platform
:
platform
,
PlatformId
:
platformId
,
RechargeInfo
:
recharge
,
VideoUrl
:
videoUrl
,
UserId
:
userId
,
NewUserId
:
newUserId
,
Platform
:
platform
,
PlatformId
:
platformId
,
RechargeInfo
:
recharge
,
VideoUrl
:
videoUrl
,
CreatedTime
:
time
.
Now
()})
.
Error
CreatedTime
:
time
.
Now
()
,
SubUserId
:
subUserId
})
.
Error
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CreateInviteApply err:%v"
,
err
)
model
.
Log
.
Errorf
(
"CreateInviteApply err:%v"
,
err
)
return
err
return
err
...
...
mysql/新人派对申请.sql
View file @
7ac87c4f
...
@@ -9,6 +9,7 @@ CREATE TABLE `invite_apply` (
...
@@ -9,6 +9,7 @@ CREATE TABLE `invite_apply` (
`level`
varchar
(
5
)
NOT
NULL
DEFAULT
''
COMMENT
'申请等级(S,A,B,C)'
,
`level`
varchar
(
5
)
NOT
NULL
DEFAULT
''
COMMENT
'申请等级(S,A,B,C)'
,
`video_url`
varchar
(
400
)
NOT
NULL
COMMENT
'上传的视频url'
,
`video_url`
varchar
(
400
)
NOT
NULL
COMMENT
'上传的视频url'
,
`reason`
tinyint
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'拒绝原因'
,
`reason`
tinyint
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'拒绝原因'
,
`sub_user_id`
bigint
NOT
NULL
COMMENT
'提交人'
,
`created_time`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`created_time`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`updated_time`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`updated_time`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
...
...
route/invite_r/party_invite.go
View file @
7ac87c4f
...
@@ -39,10 +39,10 @@ func InviteApply(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -39,10 +39,10 @@ func InviteApply(c *gin.Context) (*mycontext.MyContext, error) {
VideoUrl
string
`form:"videoUrl" binding:"required"`
VideoUrl
string
`form:"videoUrl" binding:"required"`
}
}
//
myUserId, err := req.GetUserId(c)
myUserId
,
err
:=
req
.
GetUserId
(
c
)
//
if err != nil {
if
err
!=
nil
{
//
return myCtx, err
return
myCtx
,
err
//
}
}
var
param
paramStr
var
param
paramStr
if
err
:=
c
.
ShouldBind
(
&
param
);
err
!=
nil
{
if
err
:=
c
.
ShouldBind
(
&
param
);
err
!=
nil
{
...
@@ -106,7 +106,7 @@ func InviteApply(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -106,7 +106,7 @@ func InviteApply(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
bizerr
.
InviteApplyAlreadyInvited
return
myCtx
,
bizerr
.
InviteApplyAlreadyInvited
}
}
// 插入邀请表
// 插入邀请表
err
=
invite_m
.
CreateInviteApply
(
model
,
user
.
ID
,
newUser
.
ID
,
param
.
Platform
,
param
.
PlatformId
,
param
.
Recharge
,
param
.
VideoUrl
)
err
=
invite_m
.
CreateInviteApply
(
model
,
user
.
ID
,
newUser
.
ID
,
myUserId
,
param
.
Platform
,
param
.
PlatformId
,
param
.
Recharge
,
param
.
VideoUrl
)
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"InviteApply param:%v"
,
param
)
model
.
Log
.
Errorf
(
"InviteApply param:%v"
,
param
)
return
myCtx
,
err
return
myCtx
,
err
...
...
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