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 ffdc4a3f
authored
Oct 29, 2021
by
孙喜旺
Committed by
linkwechat8856@163.com
Nov 03, 2021
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
企业群发记录功能重构
1 parent
ea93606a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
97 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeGroupMessageListController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/query/WeAddMsgTemplateQuery.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeGroupMessageListController.java
deleted
100644 → 0
View file @
ea93606
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
import
com.github.pagehelper.PageInfo
;
import
com.linkwechat.common.annotation.Log
;
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.common.utils.poi.ExcelUtil
;
import
com.linkwechat.wecom.domain.WeGroupMessageList
;
import
com.linkwechat.wecom.domain.vo.WeGroupMessageDetailVo
;
import
com.linkwechat.wecom.domain.vo.WeGroupMessageListVo
;
import
com.linkwechat.wecom.service.IWeGroupMessageListService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* 群发消息列Controller
*
* @author ruoyi
* @date 2021-10-19
*/
@Api
(
tags
=
"群发消息管理"
)
@RestController
@RequestMapping
(
"/wecom/group/message"
)
public
class
WeGroupMessageListController
extends
BaseController
{
@Autowired
private
IWeGroupMessageListService
iWeGroupMessageListService
;
/**
* 查询群发消息列列表
*/
//@PreAuthorize("@ss.hasPermi('linkwechat:group:message:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
<
WeGroupMessageListVo
>
list
(
WeGroupMessageList
weGroupMessageList
)
{
startPage
();
PageInfo
<
WeGroupMessageListVo
>
listPageInfo
=
iWeGroupMessageListService
.
queryList
(
weGroupMessageList
);
return
getDataTable
(
listPageInfo
);
}
/**
* 导出群发消息列列表
*/
@PreAuthorize
(
"@ss.hasPermi('linkwechat:group:message:list:export')"
)
@Log
(
title
=
"群发消息列"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
WeGroupMessageList
weGroupMessageList
)
{
PageInfo
<
WeGroupMessageListVo
>
listPageInfo
=
iWeGroupMessageListService
.
queryList
(
weGroupMessageList
);
ExcelUtil
<
WeGroupMessageListVo
>
util
=
new
ExcelUtil
<>(
WeGroupMessageListVo
.
class
);
return
util
.
exportExcel
(
listPageInfo
.
getList
(),
"list"
);
}
/**
* 获取群发消息列详细信息
*/
//@PreAuthorize("@ss.hasPermi('linkwechat:group:message:list:query')")
@GetMapping
(
value
=
"/{msgId}"
)
public
AjaxResult
<
WeGroupMessageDetailVo
>
getInfo
(
@PathVariable
(
"msgId"
)
String
msgId
)
{
return
AjaxResult
.
success
(
iWeGroupMessageListService
.
getGroupMsgDetail
(
msgId
));
}
/**
* 新增群发消息列
*/
@PreAuthorize
(
"@ss.hasPermi('linkwechat:group:message:list:add')"
)
@Log
(
title
=
"群发消息列"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
WeGroupMessageList
weGroupMessageList
)
{
return
toAjax
(
iWeGroupMessageListService
.
save
(
weGroupMessageList
)
?
1
:
0
);
}
/**
* 修改群发消息列
*/
@PreAuthorize
(
"@ss.hasPermi('linkwechat:group:message:list:edit')"
)
@Log
(
title
=
"群发消息列"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
WeGroupMessageList
weGroupMessageList
)
{
return
toAjax
(
iWeGroupMessageListService
.
updateById
(
weGroupMessageList
)
?
1
:
0
);
}
/**
* 删除群发消息列
*/
@PreAuthorize
(
"@ss.hasPermi('linkwechat:group:message:list:remove')"
)
@Log
(
title
=
"群发消息列"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
iWeGroupMessageListService
.
removeByIds
(
Arrays
.
asList
(
ids
))
?
1
:
0
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/query/WeAddMsgTemplateQuery.java
View file @
ffdc4a3
...
@@ -36,6 +36,17 @@ public class WeAddMsgTemplateQuery {
...
@@ -36,6 +36,17 @@ public class WeAddMsgTemplateQuery {
@ApiModelProperty
(
"附件,最多支持添加9个附件 ru"
)
@ApiModelProperty
(
"附件,最多支持添加9个附件 ru"
)
private
List
<
Attachments
>
attachments
;
private
List
<
Attachments
>
attachments
;
public
void
setChat_type
(
String
chat_type
)
{
this
.
chat_type
=
chat_type
;
}
public
void
setChat_type
(
Integer
chatType
)
{
if
(
ObjectUtil
.
equal
(
2
,
chatType
)){
this
.
chat_type
=
"group"
;
}
else
{
this
.
chat_type
=
"single"
;
}
}
public
void
setAttachments
(
List
<
WeMessageTemplate
>
messageTemplates
)
{
public
void
setAttachments
(
List
<
WeMessageTemplate
>
messageTemplates
)
{
final
int
size
=
9
;
final
int
size
=
9
;
...
...
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