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
197caeb4
Commit
197caeb4
authored
Jun 12, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cp
parent
21363ce6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
cp_relation.go
route/cp_r/cp_relation.go
+5
-4
No files found.
route/cp_r/cp_relation.go
View file @
197caeb4
...
@@ -21,6 +21,7 @@ import (
...
@@ -21,6 +21,7 @@ import (
"hilo-user/domain/model/diamond_m"
"hilo-user/domain/model/diamond_m"
"hilo-user/domain/model/user_m"
"hilo-user/domain/model/user_m"
"hilo-user/domain/service/cp_s"
"hilo-user/domain/service/cp_s"
"hilo-user/myerr"
"hilo-user/myerr/bizerr"
"hilo-user/myerr/bizerr"
"hilo-user/req"
"hilo-user/req"
"hilo-user/resp"
"hilo-user/resp"
...
@@ -119,11 +120,11 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -119,11 +120,11 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
myCtx
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
myCtx
:=
mycontext
.
CreateMyContext
(
c
.
Keys
)
externalId
:=
c
.
PostForm
(
"externalId"
)
externalId
:=
c
.
PostForm
(
"externalId"
)
if
externalId
==
""
{
if
externalId
==
""
{
return
myCtx
,
bizerr
.
InvalidParameter
return
myCtx
,
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
}
optType
,
err
:=
strconv
.
Atoi
(
c
.
PostForm
(
"type"
))
optType
,
err
:=
strconv
.
Atoi
(
c
.
PostForm
(
"type"
))
if
err
!=
nil
||
optType
>
2
||
optType
<
1
{
if
err
!=
nil
||
optType
>
2
||
optType
<
1
{
return
myCtx
,
bizerr
.
InvalidParameter
return
myCtx
,
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
}
myUserId
,
lang
,
err
:=
req
.
GetUserIdLang
(
c
,
myCtx
)
myUserId
,
lang
,
err
:=
req
.
GetUserIdLang
(
c
,
myCtx
)
...
@@ -141,7 +142,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -141,7 +142,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
err
return
myCtx
,
err
}
}
if
userSender
.
ID
==
myUserId
{
if
userSender
.
ID
==
myUserId
{
return
myCtx
,
bizerr
.
InvalidParameter
return
myCtx
,
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
}
cpRecord
,
err
:=
cp_m
.
GetCpInvite
(
model
,
userSender
.
ID
,
user
.
ID
,
cp_e
.
CpInvite
)
cpRecord
,
err
:=
cp_m
.
GetCpInvite
(
model
,
userSender
.
ID
,
user
.
ID
,
cp_e
.
CpInvite
)
...
@@ -150,7 +151,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -150,7 +151,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
err
return
myCtx
,
err
}
}
if
cpRecord
==
nil
||
cpRecord
.
Id
==
0
{
if
cpRecord
==
nil
||
cpRecord
.
Id
==
0
{
return
myCtx
,
bizerr
.
InvalidParameter
return
myCtx
,
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
}
if
optType
==
1
{
// 接受的时候
if
optType
==
1
{
// 接受的时候
...
...
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