Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-message
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
cloud-message
Commits
153e55c7
Commit
153e55c7
authored
Mar 06, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息优化
parent
9df7c716
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
30 deletions
+15
-30
cloud-newMessage-service/src/main/java/com/yizhi/message/application/controller/remote/RemoteMessageAccountComtroller.java
+15
-0
cloud-newMessage-service/src/main/java/com/yizhi/message/application/event/MessageEventListener.java
+0
-30
No files found.
cloud-newMessage-service/src/main/java/com/yizhi/message/application/controller/remote/RemoteMessageAccountComtroller.java
View file @
153e55c7
...
...
@@ -2,11 +2,15 @@ package com.yizhi.message.application.controller.remote;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.yizhi.core.application.event.EventWrapper
;
import
com.yizhi.message.application.constans.Constans
;
import
com.yizhi.message.application.domain.MessageAccount
;
import
com.yizhi.message.application.event.MessageEventHandler
;
import
com.yizhi.message.application.service.MessageAccountService
;
import
com.yizhi.message.application.vo.MessageRemindVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -27,6 +31,8 @@ import java.util.List;
public
class
RemoteMessageAccountComtroller
{
@Autowired
private
MessageAccountService
messageAccountService
;
@Autowired
private
MessageEventHandler
messageEventHandler
;
/**
* 用于触发事件,直接发送消息
...
...
@@ -43,6 +49,15 @@ public class RemoteMessageAccountComtroller {
return
false
;
}
@PostMapping
(
"/processBizEvent"
)
public
void
processBizEvent
(
@RequestBody
EventWrapper
<
com
.
yizhi
.
core
.
application
.
vo
.
MessageRemindVo
>
ew
)
{
MessageRemindVo
mrv
=
new
MessageRemindVo
();
BeanUtils
.
copyProperties
(
ew
.
getData
(),
mrv
);
EventWrapper
<
MessageRemindVo
>
ewNew
=
new
EventWrapper
<
MessageRemindVo
>(
ew
.
getId
(),
mrv
);
messageEventHandler
.
handle
(
ewNew
);
}
@GetMapping
(
"/getList"
)
@ApiOperation
(
value
=
"获取列表"
,
response
=
Integer
.
class
)
public
List
<
MessageAccount
>
getList
(
@RequestParam
(
"taskType"
)
Integer
taskType
,
@RequestParam
(
"taskId"
)
Long
taskId
)
{
...
...
cloud-newMessage-service/src/main/java/com/yizhi/message/application/event/MessageEventListener.java
deleted
100644 → 0
View file @
9df7c716
package
com
.
yizhi
.
message
.
application
.
event
;
import
com.yizhi.core.application.event.EventWrapper
;
import
com.yizhi.message.application.constans.Constans
;
import
com.yizhi.message.application.vo.MessageRemindVo
;
import
org.springframework.amqp.rabbit.annotation.RabbitHandler
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @Author: shengchenglong
* @Date: 2018/4/18 11:14
*/
@RestController
public
class
MessageEventListener
{
@Autowired
private
MessageEventHandler
messageEventHandler
;
@PostMapping
(
"/remote/manage/messageAccount/processBizEvent"
)
public
void
processBizEvent
(
@RequestBody
EventWrapper
<
MessageRemindVo
>
ew
)
{
messageEventHandler
.
handle
(
ew
);
}
}
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