Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
839e36b7
Commit
839e36b7
authored
Sep 19, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询是否关注
parent
e29ab850
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
22 deletions
+81
-22
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+1
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/MessageRequestDto.java
...java/com/wwdz/ch/wx/entity/request/MessageRequestDto.java
+2
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/MessageVo.java
...api/src/main/java/com/wwdz/ch/wx/entity/vo/MessageVo.java
+2
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FollowFansRecordServiceImpl.java
...java/com/wwdz/ch/wx/impl/FollowFansRecordServiceImpl.java
+41
-11
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/MessageServiceImpl.java
...src/main/java/com/wwdz/ch/wx/impl/MessageServiceImpl.java
+13
-8
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/FollowFansRecordService.java
.../java/com/wwdz/ch/wx/service/FollowFansRecordService.java
+8
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/MessageController.java
...i/src/main/java/com/wwdz/ch/wx/web/MessageController.java
+14
-3
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
839e36b7
...
@@ -31,6 +31,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
...
@@ -31,6 +31,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
.
addPathPatterns
(
"/**"
)
.
addPathPatterns
(
"/**"
)
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
,
"/wx/follow/**"
,
"/wx/message/**"
);
);
}
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/request/MessageRequestDto.java
View file @
839e36b7
...
@@ -9,6 +9,8 @@ import java.util.List;
...
@@ -9,6 +9,8 @@ import java.util.List;
@Data
@Data
public
class
MessageRequestDto
implements
Entity
{
public
class
MessageRequestDto
implements
Entity
{
private
Integer
messageRecordId
;
/**
/**
* 发送者id
* 发送者id
*/
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/MessageVo.java
View file @
839e36b7
...
@@ -9,6 +9,8 @@ import java.util.Map;
...
@@ -9,6 +9,8 @@ import java.util.Map;
@Data
@Data
public
class
MessageVo
implements
Entity
{
public
class
MessageVo
implements
Entity
{
private
Integer
messageRecordId
;
/**
/**
* 发送者id
* 发送者id
*/
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FollowFansRecordServiceImpl.java
View file @
839e36b7
package
com.wwdz.ch.wx.impl
;
package
com.wwdz.ch.wx.impl
;
import
com.wwdz.ch.core.consts.MessageEnum
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.CacheUtil
;
import
com.wwdz.ch.core.util.CacheUtil
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.domain.FollowFansRecord
;
import
com.wwdz.ch.db.domain.FollowFansRecord
;
import
com.wwdz.ch.db.dto.request.FollowFansRecordRequestDto
;
import
com.wwdz.ch.db.dto.request.FollowFansRecordRequestDto
;
import
com.wwdz.ch.wx.entity.request.MessageRequestDto
;
import
com.wwdz.ch.wx.entity.vo.FollowFansRecordVo
;
import
com.wwdz.ch.wx.entity.vo.FollowFansRecordVo
;
import
com.wwdz.ch.wx.service.FollowFansRecordService
;
import
com.wwdz.ch.wx.service.FollowFansRecordService
;
import
com.wwdz.ch.wx.service.MessageService
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.EntityMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -26,10 +31,14 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -26,10 +31,14 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
@Autowired
@Autowired
FollowFansRecordDao
followFansRecordDao
;
FollowFansRecordDao
followFansRecordDao
;
@Autowired
MessageService
messageService
;
@Autowired
@Autowired
CacheUtil
cacheUtil
;
CacheUtil
cacheUtil
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
follow
(
FollowFansRecordRequestDto
dto
)
{
public
Result
follow
(
FollowFansRecordRequestDto
dto
)
{
try
{
try
{
if
(
dto
.
getFollowerId
()
==
null
||
dto
.
getFansId
()
==
null
)
{
if
(
dto
.
getFollowerId
()
==
null
||
dto
.
getFansId
()
==
null
)
{
...
@@ -44,9 +53,18 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -44,9 +53,18 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
int
id
=
followFansRecordDao
.
add
(
followFansRecord
);
int
id
=
followFansRecordDao
.
add
(
followFansRecord
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"recordId"
,
id
);
map
.
put
(
"recordId"
,
id
);
//发送关注的消息
MessageRequestDto
messageRequestDto
=
new
MessageRequestDto
();
messageRequestDto
.
setSenderId
(
dto
.
getFansId
());
messageRequestDto
.
setReceiverId
(
dto
.
getFollowerId
());
messageRequestDto
.
setType
(
MessageEnum
.
TypeEnum
.
FOLLOW
.
getCode
());
messageRequestDto
.
setContent
(
"关注了您"
);
messageService
.
add
(
messageRequestDto
);
return
Result
.
success
(
map
);
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"{} 关注 {} error {}"
,
dto
.
getFansId
(),
dto
.
getFollowerId
(),
e
);
logger
.
error
(
"{} 关注 {} error {}"
,
dto
.
getFansId
(),
dto
.
getFollowerId
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
return
Result
.
failed
();
return
Result
.
failed
();
}
}
...
@@ -101,11 +119,8 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -101,11 +119,8 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
//查询粉丝
//查询粉丝
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFollowerId
(
dto
.
getSearchTargetId
());
followFansRecordRequestDto
.
setFollowerId
(
dto
.
getSearchTargetId
());
Result
fansResult
=
findFansList
(
followFansRecordRequestDto
);
if
(!
fansResult
.
getSuccess
())
{
List
<
FollowFansRecord
>
fansRecordList
=
followFansRecordDao
.
findList
(
followFansRecordRequestDto
);
return
Result
.
failed
();
}
List
<
FollowFansRecord
>
fansRecordList
=
(
List
<
FollowFansRecord
>)
fansResult
.
getData
();
List
<
Long
>
fansIdList
=
fansRecordList
.
stream
().
map
(
FollowFansRecord:
:
getFansId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
fansIdList
=
fansRecordList
.
stream
().
map
(
FollowFansRecord:
:
getFansId
).
collect
(
Collectors
.
toList
());
followFansRecordList
.
forEach
(
f
->
{
followFansRecordList
.
forEach
(
f
->
{
...
@@ -139,13 +154,9 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -139,13 +154,9 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
//查询关注的人
//查询关注的人
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
FollowFansRecordRequestDto
followFansRecordRequestDto
=
new
FollowFansRecordRequestDto
();
followFansRecordRequestDto
.
setFansId
(
dto
.
getSearchTargetId
());
followFansRecordRequestDto
.
setFansId
(
dto
.
getSearchTargetId
());
Result
followResult
=
findFollowList
(
followFansRecordRequestDto
);
if
(!
followResult
.
getSuccess
())
{
return
Result
.
failed
();
}
List
<
FollowFansRecord
>
followRecordList
=
(
List
<
FollowFansRecord
>)
followResult
.
getData
();
List
<
Long
>
followerIdList
=
followRecordList
.
stream
().
map
(
FollowFansRecord:
:
getFansId
).
collect
(
Collectors
.
toList
());
List
<
FollowFansRecord
>
followRecordList
=
followFansRecordDao
.
findList
(
followFansRecordRequestDto
);
List
<
Long
>
followerIdList
=
followRecordList
.
stream
().
map
(
FollowFansRecord:
:
getFansId
).
collect
(
Collectors
.
toList
());
followFansRecordList
.
forEach
(
f
->
{
followFansRecordList
.
forEach
(
f
->
{
FollowFansRecordVo
followFansRecordVo
=
new
FollowFansRecordVo
();
FollowFansRecordVo
followFansRecordVo
=
new
FollowFansRecordVo
();
EntityMapper
.
copyAttribute
(
f
,
followFansRecordVo
);
EntityMapper
.
copyAttribute
(
f
,
followFansRecordVo
);
...
@@ -163,4 +174,23 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -163,4 +174,23 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
}
}
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@Override
public
Result
findFollowRelation
(
FollowFansRecordRequestDto
dto
)
{
try
{
FollowFansRecord
followFansRecord
=
followFansRecordDao
.
findOne
(
dto
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
followFansRecord
==
null
)
{
map
.
put
(
"isFollowed"
,
false
);
}
else
{
map
.
put
(
"isFollowed"
,
true
);
map
.
put
(
"id"
,
followFansRecord
.
getId
());
}
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询是否关注error {}"
,
e
);
}
return
Result
.
failed
();
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/MessageServiceImpl.java
View file @
839e36b7
...
@@ -101,6 +101,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -101,6 +101,7 @@ public class MessageServiceImpl implements MessageService {
messageRecordRequestDto
.
setType
(
messageRequestDto
.
getType
());
messageRecordRequestDto
.
setType
(
messageRequestDto
.
getType
());
List
<
MessageRecord
>
list
=
messageRecordDao
.
findList
(
messageRecordRequestDto
);
List
<
MessageRecord
>
list
=
messageRecordDao
.
findList
(
messageRecordRequestDto
);
PageInfo
<
MessageRecord
>
pageInfo
=
new
PageInfo
<>(
list
);
PageInfo
<
MessageRecord
>
pageInfo
=
new
PageInfo
<>(
list
);
//消息id
List
<
Integer
>
idList
=
list
.
stream
().
map
(
MessageRecord:
:
getMessageId
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
idList
=
list
.
stream
().
map
(
MessageRecord:
:
getMessageId
).
collect
(
Collectors
.
toList
());
//查询消息内容
//查询消息内容
List
<
MessageContent
>
messageContentList
=
messageContentDao
.
findListByIds
(
idList
);
List
<
MessageContent
>
messageContentList
=
messageContentDao
.
findListByIds
(
idList
);
...
@@ -108,6 +109,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -108,6 +109,7 @@ public class MessageServiceImpl implements MessageService {
List
<
MessageVo
>
messageVos
=
new
ArrayList
<>();
List
<
MessageVo
>
messageVos
=
new
ArrayList
<>();
list
.
forEach
(
m
->
{
list
.
forEach
(
m
->
{
MessageVo
messageVo
=
new
MessageVo
();
MessageVo
messageVo
=
new
MessageVo
();
messageVo
.
setMessageRecordId
(
m
.
getId
());
messageVo
.
setMessageId
(
m
.
getMessageId
());
messageVo
.
setMessageId
(
m
.
getMessageId
());
messageVo
.
setSenderId
(
messageContentMap
.
get
(
m
.
getMessageId
()).
getSenderId
());
messageVo
.
setSenderId
(
messageContentMap
.
get
(
m
.
getMessageId
()).
getSenderId
());
messageVo
.
setSenderName
(
cacheUtil
.
getAppletUserNameById
(
messageContentMap
.
get
(
m
.
getMessageId
()).
getSenderId
()));
messageVo
.
setSenderName
(
cacheUtil
.
getAppletUserNameById
(
messageContentMap
.
get
(
m
.
getMessageId
()).
getSenderId
()));
...
@@ -144,8 +146,8 @@ public class MessageServiceImpl implements MessageService {
...
@@ -144,8 +146,8 @@ public class MessageServiceImpl implements MessageService {
messageVos
.
add
(
messageVo
);
messageVos
.
add
(
messageVo
);
});
});
//把未读消息修改为已读
//把未读消息修改为已读
,用的是消息记录的id
List
<
Integer
>
unreadList
=
list
.
stream
().
filter
(
m
->
m
.
getState
().
intValue
()
==
MessageEnum
.
StateEnum
.
UNREAD
.
getCode
()).
map
(
MessageRecord:
:
get
Message
Id
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
unreadList
=
list
.
stream
().
filter
(
m
->
m
.
getState
().
intValue
()
==
MessageEnum
.
StateEnum
.
UNREAD
.
getCode
()).
map
(
MessageRecord:
:
getId
).
collect
(
Collectors
.
toList
());
unreadList
.
forEach
(
i
->
{
unreadList
.
forEach
(
i
->
{
MessageRecord
record
=
new
MessageRecord
();
MessageRecord
record
=
new
MessageRecord
();
record
.
setId
(
i
);
record
.
setId
(
i
);
...
@@ -170,13 +172,16 @@ public class MessageServiceImpl implements MessageService {
...
@@ -170,13 +172,16 @@ public class MessageServiceImpl implements MessageService {
messageRecordRequestDto
.
setState
(
MessageEnum
.
StateEnum
.
UNREAD
.
getCode
());
messageRecordRequestDto
.
setState
(
MessageEnum
.
StateEnum
.
UNREAD
.
getCode
());
List
<
MessageRecord
>
list
=
messageRecordDao
.
findList
(
messageRecordRequestDto
);
List
<
MessageRecord
>
list
=
messageRecordDao
.
findList
(
messageRecordRequestDto
);
Map
<
Integer
,
Long
>
typeNumMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
MessageRecord:
:
getType
,
Collectors
.
counting
()));
Map
<
Integer
,
Long
>
typeNumMap
=
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
MessageRecord:
:
getType
,
Collectors
.
counting
()));
Map
<
Object
,
Object
>
map
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
mapList
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
Integer
,
Long
>
entry
:
typeNumMap
.
entrySet
())
{
for
(
Map
.
Entry
<
Integer
,
Long
>
entry
:
typeNumMap
.
entrySet
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
int
type
=
entry
.
getKey
();
int
type
=
entry
.
getKey
();
long
num
=
entry
.
getValue
();
long
num
=
entry
.
getValue
();
map
.
put
(
type
,
num
);
map
.
put
(
"type"
,
type
);
map
.
put
(
"num"
,
num
);
mapList
.
add
(
map
);
}
}
return
Result
.
success
(
map
);
return
Result
.
success
(
map
List
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"统计未读消息 error : {}"
,
e
);
logger
.
error
(
"统计未读消息 error : {}"
,
e
);
}
}
...
@@ -207,11 +212,11 @@ public class MessageServiceImpl implements MessageService {
...
@@ -207,11 +212,11 @@ public class MessageServiceImpl implements MessageService {
@Override
@Override
public
Result
delete
(
MessageRequestDto
messageRequestDto
)
{
public
Result
delete
(
MessageRequestDto
messageRequestDto
)
{
try
{
try
{
if
(
messageRequestDto
.
getMessageId
()
==
null
)
{
if
(
messageRequestDto
.
getMessage
Record
Id
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
}
MessageRecord
record
=
new
MessageRecord
();
MessageRecord
record
=
new
MessageRecord
();
record
.
setId
(
messageRequestDto
.
getMessageId
());
record
.
setId
(
messageRequestDto
.
getMessage
Record
Id
());
record
.
setState
(
MessageEnum
.
StateEnum
.
DELETED
.
getCode
());
record
.
setState
(
MessageEnum
.
StateEnum
.
DELETED
.
getCode
());
record
.
setUpdateTime
(
new
Date
());
record
.
setUpdateTime
(
new
Date
());
messageRecordDao
.
update
(
record
);
messageRecordDao
.
update
(
record
);
...
@@ -229,7 +234,7 @@ public class MessageServiceImpl implements MessageService {
...
@@ -229,7 +234,7 @@ public class MessageServiceImpl implements MessageService {
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
}
MessageRecord
record
=
new
MessageRecord
();
MessageRecord
record
=
new
MessageRecord
();
record
.
setId
(
messageRequestDto
.
getMessageId
());
record
.
setId
(
messageRequestDto
.
getMessage
Record
Id
());
record
.
setState
(
MessageEnum
.
StateEnum
.
READED
.
getCode
());
record
.
setState
(
MessageEnum
.
StateEnum
.
READED
.
getCode
());
record
.
setUpdateTime
(
new
Date
());
record
.
setUpdateTime
(
new
Date
());
messageRecordDao
.
update
(
record
);
messageRecordDao
.
update
(
record
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/FollowFansRecordService.java
View file @
839e36b7
...
@@ -42,4 +42,12 @@ public interface FollowFansRecordService {
...
@@ -42,4 +42,12 @@ public interface FollowFansRecordService {
* @return
* @return
*/
*/
Result
findFansList
(
FollowFansRecordRequestDto
dto
);
Result
findFansList
(
FollowFansRecordRequestDto
dto
);
/**
* 查询是否关注
* @param dto
* @return
*/
Result
findFollowRelation
(
FollowFansRecordRequestDto
dto
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/MessageController.java
View file @
839e36b7
...
@@ -42,17 +42,28 @@ public class MessageController {
...
@@ -42,17 +42,28 @@ public class MessageController {
if
(
dto
.
getReceiverId
()
==
null
)
{
if
(
dto
.
getReceiverId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
}
return
messageService
.
countUnreadNum
(
dto
);
return
messageService
.
countUnreadNum
GroupByType
(
dto
);
}
}
@ApiOperation
(
value
=
"
根据消息类型统计未读消息数量
"
)
@ApiOperation
(
value
=
"
查询消息列表
"
)
@PostMapping
(
"/findList"
)
@PostMapping
(
"/findList"
)
public
Result
findList
(
@RequestBody
MessageRequestDto
dto
)
{
public
Result
findList
(
@RequestBody
MessageRequestDto
dto
)
{
logger
.
info
(
"
根据消息类型统计未读消息数量
,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
logger
.
info
(
"
查询消息列表
,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getReceiverId
()
==
null
)
{
if
(
dto
.
getReceiverId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
}
return
messageService
.
findList
(
dto
);
return
messageService
.
findList
(
dto
);
}
}
@ApiOperation
(
value
=
"删除消息"
)
@PostMapping
(
"/delete"
)
public
Result
delete
(
@RequestBody
MessageRequestDto
dto
)
{
logger
.
info
(
"删除消息,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getMessageRecordId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
messageService
.
delete
(
dto
);
}
}
}
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