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
44670695
Commit
44670695
authored
Jun 13, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
err
parent
9a2dbaa0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
cp_relation.go
domain/service/cp_s/cp_relation.go
+2
-2
cp_relation.go
route/cp_r/cp_relation.go
+3
-3
No files found.
domain/service/cp_s/cp_relation.go
View file @
44670695
...
...
@@ -39,7 +39,7 @@ func InviteCpRelation(myCtx *mycontext.MyContext, myUserId uint64, externalId, l
return
err
}
if
myCp
.
Id
>
0
{
return
m
sg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
return
m
yerr
.
ToLocal
(
msg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
)
}
// 对方是否已经有cp了
inviCp
,
err
:=
cp_m
.
GetCp
(
model
,
userInvite
.
ID
)
...
...
@@ -47,7 +47,7 @@ func InviteCpRelation(myCtx *mycontext.MyContext, myUserId uint64, externalId, l
return
err
}
if
inviCp
.
Id
>
0
{
return
m
sg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
return
m
yerr
.
ToLocal
(
msg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
)
}
// 我是否发起过cp邀请,且还未被处理
...
...
route/cp_r/cp_relation.go
View file @
44670695
...
...
@@ -62,7 +62,7 @@ func CheckUserCpRelation(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
err
}
if
cp
.
Id
>
0
{
return
myCtx
,
m
sg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
return
myCtx
,
m
yerr
.
ToLocal
(
msg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
)
}
msg
,
err
:=
msg
.
GetResMultiTextBy
(
model
,
common
.
MSG_ID_INVITE_CP
,
lang
)
if
err
!=
nil
{
...
...
@@ -166,7 +166,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
err
}
if
myCp
.
Id
>
0
{
return
myCtx
,
m
sg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
return
myCtx
,
m
yerr
.
ToLocal
(
msg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
)
}
// 对方是否已经有cp了
senderCp
,
err
:=
cp_m
.
GetCp
(
model
,
userSender
.
ID
)
...
...
@@ -174,7 +174,7 @@ func ReplyCpInvite(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
err
}
if
senderCp
.
Id
>
0
{
return
myCtx
,
m
sg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
return
myCtx
,
m
yerr
.
ToLocal
(
msg
.
GetErrByLanguage
(
model
,
common
.
MSG_ID_ALREADY_HAS_CP
,
lang
,
comerr
.
AlreadyHasCp
)
)
}
}
err
=
model
.
Transaction
(
func
(
model
*
domain
.
Model
)
error
{
...
...
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