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
b1c86307
Commit
b1c86307
authored
Jun 14, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
im check
parent
da1bfa2e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
cp_relation.go
domain/model/cp_m/cp_relation.go
+2
-2
cp_relation.go
route/cp_r/cp_relation.go
+1
-1
No files found.
domain/model/cp_m/cp_relation.go
View file @
b1c86307
...
@@ -209,9 +209,9 @@ func GetCpCancel(model *domain.Model, userIds []uint64, status cp_e.CpCancelStat
...
@@ -209,9 +209,9 @@ func GetCpCancel(model *domain.Model, userIds []uint64, status cp_e.CpCancelStat
return
res
,
nil
return
res
,
nil
}
}
func
GetCpCancelById
(
model
*
domain
.
Model
,
id
uint64
,
status
cp_e
.
CpCancelStatus
)
(
*
CpCancel
,
error
)
{
func
GetCpCancelById
(
model
*
domain
.
Model
,
id
,
userId
uint64
)
(
*
CpCancel
,
error
)
{
res
:=
new
(
CpCancel
)
res
:=
new
(
CpCancel
)
err
:=
model
.
DB
()
.
Model
(
CpCancel
{})
.
Where
(
"
status = ? and id = ?"
,
status
,
i
d
)
.
First
(
&
res
)
.
Error
err
:=
model
.
DB
()
.
Model
(
CpCancel
{})
.
Where
(
"
id = ? and (user_id = ? or rec_user_id = ?)"
,
id
,
userId
,
userI
d
)
.
First
(
&
res
)
.
Error
if
err
!=
nil
{
if
err
!=
nil
{
if
err
==
gorm
.
ErrRecordNotFound
{
if
err
==
gorm
.
ErrRecordNotFound
{
return
nil
,
nil
return
nil
,
nil
...
...
route/cp_r/cp_relation.go
View file @
b1c86307
...
@@ -502,7 +502,7 @@ func CheckCpImExpire(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -502,7 +502,7 @@ func CheckCpImExpire(c *gin.Context) (*mycontext.MyContext, error) {
resId
=
common
.
MSG_ID_ALREADY_EXPIRED
resId
=
common
.
MSG_ID_ALREADY_EXPIRED
}
}
case
2
:
// 解除的消息im检查是否过期
case
2
:
// 解除的消息im检查是否过期
cpCancel
,
err
:=
cp_m
.
GetCpCancelById
(
model
,
msgId
,
cp_e
.
CpCancel
)
cpCancel
,
err
:=
cp_m
.
GetCpCancelById
(
model
,
msgId
,
userId
)
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CheckCpImExpire userId:%d, msgType:%d, msgId:%d, err:%v"
,
userId
,
msgType
,
msgId
,
err
)
model
.
Log
.
Errorf
(
"CheckCpImExpire userId:%d, msgType:%d, msgId:%d, err:%v"
,
userId
,
msgType
,
msgId
,
err
)
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