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 0a2f2dff
authored
Feb 20, 2021
by
浪涛飞
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新客自动拉群
1 parent
5e55cf1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
5 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCommunityNewGroupController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCommunityNewGroupController.java
View file @
0a2f2df
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
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.exception.wecom.WeComException
;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.wecom.domain.WeCommunityNewGroup
;
import
com.linkwechat.wecom.domain.WeEmpleCode
;
import
com.linkwechat.wecom.domain.dto.WeCommunityNewGroupDto
;
import
com.linkwechat.wecom.domain.vo.WeCommunityNewGroupVo
;
import
com.linkwechat.wecom.service.IWeCommunityNewGroupService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 社群运营 新客自动拉群 Controller
...
...
@@ -22,13 +30,57 @@ import org.springframework.web.bind.annotation.RequestMapping;
*/
@Controller
@RequestMapping
(
value
=
"communityNewGroup"
)
public
class
WeCommunityNewGroupController
{
public
class
WeCommunityNewGroupController
extends
BaseController
{
@Autowired
private
IWeCommunityNewGroupService
weCommunityNewGroupService
;
/**
* 新增员工活码
* 查询新客自动拉群列表
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
WeCommunityNewGroup
communityNewGroup
)
{
startPage
();
List
<
WeCommunityNewGroupVo
>
communityNewGroupVos
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupList
(
communityNewGroup
);
return
getDataTable
(
communityNewGroupVos
);
}
/**
* 获取新客自动拉群详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"newGroupId"
)
Long
newGroupId
)
{
return
AjaxResult
.
success
(
weCommunityNewGroupService
.
selectWeCommunityNewGroupById
(
newGroupId
));
}
/**
* 修改新客自动拉群
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:edit')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/update"
)
public
AjaxResult
edit
(
@RequestBody
@Validated
WeCommunityNewGroupDto
communityNewGroupDto
)
{
weCommunityNewGroupService
.
updateWeCommunityNewGroup
(
communityNewGroupDto
);
return
AjaxResult
.
success
();
}
/**
* 删除新客自动拉群
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:remove')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/delete/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
String
ids
)
{
List
<
String
>
idList
=
Arrays
.
stream
(
StringUtils
.
split
(
ids
,
","
)).
collect
(
Collectors
.
toList
());
return
toAjax
(
weCommunityNewGroupService
.
batchRemoveWeCommunityNewGroupIds
(
idList
));
}
/**
* 新增新客自动拉群
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:add')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
INSERT
)
...
...
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