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
2ca8a8de
Commit
2ca8a8de
authored
Jul 13, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cp解除
parent
4b98c331
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
cp_relation.go
domain/service/cp_s/cp_relation.go
+9
-9
No files found.
domain/service/cp_s/cp_relation.go
View file @
2ca8a8de
...
@@ -130,6 +130,15 @@ func CancelCpRelation(myCtx *mycontext.MyContext, myUserId uint64, externalId, l
...
@@ -130,6 +130,15 @@ func CancelCpRelation(myCtx *mycontext.MyContext, myUserId uint64, externalId, l
return
err
return
err
}
}
// 我和对方是否是cp,且cp关系存在
cpRelation
,
err
:=
cp_m
.
GetCpByIds
(
model
,
myUserId
,
userRec
.
ID
)
if
err
!=
nil
{
return
err
}
if
cpRelation
.
Id
==
0
{
model
.
Log
.
Errorf
(
"CancelCpRelation cp关系不存在 id1:%v, id2:%v"
,
myUserId
,
userRec
.
ID
)
return
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
// 自己没有cp了
// 自己没有cp了
myCp
,
err
:=
cp_m
.
GetCp
(
model
,
myUserId
)
myCp
,
err
:=
cp_m
.
GetCp
(
model
,
myUserId
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -146,15 +155,6 @@ func CancelCpRelation(myCtx *mycontext.MyContext, myUserId uint64, externalId, l
...
@@ -146,15 +155,6 @@ func CancelCpRelation(myCtx *mycontext.MyContext, myUserId uint64, externalId, l
if
inviCp
.
Id
==
0
{
if
inviCp
.
Id
==
0
{
return
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
return
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
}
// 我和对方是否是cp,且cp关系存在
cpRelation
,
err
:=
cp_m
.
GetCpByIds
(
model
,
myUserId
,
userRec
.
ID
)
if
err
!=
nil
{
return
err
}
if
cpRelation
.
Id
==
0
{
model
.
Log
.
Errorf
(
"CancelCpRelation cp关系不存在 id1:%v, id2:%v"
,
myUserId
,
userRec
.
ID
)
return
myerr
.
WrapErr
(
bizerr
.
InvalidParameter
)
}
// 是否有关于我的cp解除申请,且还未被处理
// 是否有关于我的cp解除申请,且还未被处理
myCancel
,
err
:=
cp_m
.
GetCpCancelWithMe
(
model
,
user
.
ID
,
cp_e
.
CpCancel
)
myCancel
,
err
:=
cp_m
.
GetCpCancelWithMe
(
model
,
user
.
ID
,
cp_e
.
CpCancel
)
...
...
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