Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a7904e85
authored
Dec 30, 2020
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群发消息任务代码重构
1 parent
3bfb7480
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
View file @
a7904e8
...
...
@@ -6,9 +6,9 @@ import com.linkwechat.common.core.controller.BaseController;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.dto.message.CustomerMessagePushDto
;
import
com.linkwechat.wecom.domain.vo.CustomerMessagePushVo
;
import
com.linkwechat.wecom.service.IWeCustomerMessageOriginalService
;
import
com.linkwechat.wecom.service.IWeCustomerMessagePushService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -31,13 +31,15 @@ public class WeCustomerMessagePushController extends BaseController {
@Autowired
private
IWeCustomerMessagePushService
weCustomerMessagePushService
;
@Autowired
private
IWeCustomerMessageOriginalService
weCustomerMessageOriginalService
;
/**
* 新增群发消息发送
*/
@PreAuthorize
(
"@ss.hasPermi('
system
:push:add')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerMessagePush
:push:add')"
)
@Log
(
title
=
"新增群发消息发送"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
value
=
"add"
)
public
AjaxResult
add
(
@RequestBody
CustomerMessagePushDto
customerMessagePushDto
)
{
public
AjaxResult
add
(
@RequestBody
CustomerMessagePushDto
customerMessagePushDto
)
{
try
{
weCustomerMessagePushService
.
addWeCustomerMessagePush
(
customerMessagePushDto
);
}
catch
(
JsonProcessingException
e
)
{
...
...
@@ -51,16 +53,26 @@ public class WeCustomerMessagePushController extends BaseController {
/**
* 群发消息列表
*/
@PreAuthorize
(
"@ss.hasPermi('
system
:push:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerMessagePush
:push:list')"
)
@GetMapping
(
value
=
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sender"
,
required
=
false
)
String
sender
,
@RequestParam
(
value
=
"content"
,
required
=
false
)
String
content
,
@RequestParam
(
value
=
"pushType"
,
required
=
false
)
String
pushType
,
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sender"
,
required
=
false
)
String
sender
,
@RequestParam
(
value
=
"content"
,
required
=
false
)
String
content
,
@RequestParam
(
value
=
"pushType"
,
required
=
false
)
String
pushType
,
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
)
{
startPage
();
List
<
CustomerMessagePushVo
>
list
=
weCustomerMessagePushService
.
customerMessagePushs
(
sender
,
content
,
pushType
,
beginTime
,
endTime
);
List
<
CustomerMessagePushVo
>
list
=
weCustomerMessagePushService
.
customerMessagePushs
(
sender
,
content
,
pushType
,
beginTime
,
endTime
);
return
getDataTable
(
list
);
}
/**
* 群发消息详情
*/
@PreAuthorize
(
"@ss.hasPermi('customerMessagePush:push:view')"
)
@GetMapping
(
value
=
"/getInfo"
)
public
AjaxResult
getInfo
(
@RequestParam
(
value
=
"messageId"
)
Long
messageId
)
{
CustomerMessagePushVo
customerMessagePushVo
=
weCustomerMessageOriginalService
.
CustomerMessagePushDetail
(
messageId
);
return
AjaxResult
.
success
(
customerMessagePushVo
);
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment