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 31a7ee7a
authored
Mar 01, 2021
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新客自动拉群列表查询参数修改
1 parent
7336d89c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
30 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCommunityNewGroupController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCommunityNewGroupMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCommunityNewGroupService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCommunityNewGroupServiceImpl.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCommunityNewGroupController.java
View file @
31a7ee7
...
...
@@ -46,25 +46,28 @@ import java.util.zip.ZipOutputStream;
@RequestMapping
(
value
=
"communityNewGroup"
)
public
class
WeCommunityNewGroupController
extends
BaseController
{
@Autowired
private
IWeCommunityNewGroupService
weCommunityNewGroupService
;
@Autowired
private
IWeCommunityNewGroupService
weCommunityNewGroupService
;
/**
* 查询新客自动拉群列表
*/
@ApiOperation
(
value
=
"查询新客自动拉群列表"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"查询新客自动拉群列表"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
WeCommunityNewGroup
communityNewGroup
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"empleCodeName"
,
required
=
false
)
String
empleCodeName
,
@RequestParam
(
value
=
"createBy"
,
required
=
false
)
String
createBy
,
@RequestParam
(
value
=
"beginTime"
,
required
=
false
)
String
beginTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
)
{
startPage
();
List
<
WeCommunityNewGroupVo
>
communityNewGroupVos
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupList
(
communityNewGroup
);
List
<
WeCommunityNewGroupVo
>
communityNewGroupVos
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupList
(
empleCodeName
,
createBy
,
beginTime
,
endTime
);
return
getDataTable
(
communityNewGroupVos
);
}
/**
* 获取新客自动拉群详细信息
*/
@ApiOperation
(
value
=
"获取新客自动拉群详细信息"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"获取新客自动拉群详细信息"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
<
WeCommunityNewGroupVo
>
getInfo
(
@PathVariable
(
"newGroupId"
)
@ApiParam
(
"主键ID"
)
Long
newGroupId
)
{
...
...
@@ -74,7 +77,7 @@ public class WeCommunityNewGroupController extends BaseController {
/**
* 修改新客自动拉群
*/
@ApiOperation
(
value
=
"修改新客自动拉群"
,
httpMethod
=
"PUT"
)
@ApiOperation
(
value
=
"修改新客自动拉群"
,
httpMethod
=
"PUT"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:edit')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/update"
)
...
...
@@ -87,7 +90,7 @@ public class WeCommunityNewGroupController extends BaseController {
/**
* 删除新客自动拉群
*/
@ApiOperation
(
value
=
"删除新客自动拉群"
,
httpMethod
=
"DELETE"
)
@ApiOperation
(
value
=
"删除新客自动拉群"
,
httpMethod
=
"DELETE"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:remove')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/delete/{ids}"
)
...
...
@@ -100,7 +103,7 @@ public class WeCommunityNewGroupController extends BaseController {
/**
* 新增新客自动拉群
*/
@ApiOperation
(
value
=
"新增新客自动拉群"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"新增新客自动拉群"
,
httpMethod
=
"POST"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:add')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/add"
)
...
...
@@ -110,9 +113,9 @@ public class WeCommunityNewGroupController extends BaseController {
return
AjaxResult
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
if
(
e
instanceof
WeComException
){
if
(
e
instanceof
WeComException
)
{
return
AjaxResult
.
error
(
e
.
getMessage
());
}
else
{
}
else
{
return
AjaxResult
.
error
(
"请求接口异常!"
);
}
}
...
...
@@ -123,16 +126,16 @@ public class WeCommunityNewGroupController extends BaseController {
/**
* 员工活码批量下载
*
* @param ids 新客自动拉群ids
* @param request 请求
* @param ids
新客自动拉群ids
* @param request
请求
* @param response 输出
* @throws Exception
*/
@ApiOperation
(
value
=
"员工活码批量下载"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"员工活码批量下载"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:code:downloadBatch')"
)
@Log
(
title
=
"员工活码批量下载"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/downloadBatch"
)
public
void
downloadBatch
(
String
ids
,
HttpServletRequest
request
,
HttpServletResponse
response
){
public
void
downloadBatch
(
String
ids
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
String
>
idList
=
Arrays
.
stream
(
Optional
.
ofNullable
(
ids
).
orElse
(
""
).
split
(
","
))
.
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
());
try
{
...
...
@@ -141,15 +144,15 @@ public class WeCommunityNewGroupController extends BaseController {
//zip输出流
ZipOutputStream
zos
=
new
ZipOutputStream
(
response
.
getOutputStream
());
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
)){
for
(
WeCommunityNewGroupVo
communityNewGroupVo
:
weCommunityNewGroupVos
){
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
))
{
for
(
WeCommunityNewGroupVo
communityNewGroupVo
:
weCommunityNewGroupVos
)
{
String
qrCode
=
communityNewGroupVo
.
getQrCode
();
if
(
StringUtils
.
isEmpty
(
qrCode
)){
if
(
StringUtils
.
isEmpty
(
qrCode
))
{
continue
;
}
URL
url
=
new
URL
(
qrCode
);
//每个二维码名称
String
fileName
=
communityNewGroupVo
.
getEmpleCodeName
()+
communityNewGroupVo
.
getActivityScene
()+
".jpg"
;
String
fileName
=
communityNewGroupVo
.
getEmpleCodeName
()
+
communityNewGroupVo
.
getActivityScene
()
+
".jpg"
;
zos
.
putNextEntry
(
new
ZipEntry
(
fileName
));
InputStream
fis
=
url
.
openConnection
().
getInputStream
();
byte
[]
buffer
=
new
byte
[
1024
];
...
...
@@ -165,20 +168,20 @@ public class WeCommunityNewGroupController extends BaseController {
zos
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
@ApiOperation
(
value
=
"员工活码下载"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"员工活码下载"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:code:download')"
)
@Log
(
title
=
"员工活码下载"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/download"
)
public
void
download
(
String
id
,
HttpServletRequest
request
,
HttpServletResponse
response
){
WeCommunityNewGroupVo
communityNewGroupVo
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupById
(
Long
.
valueOf
(
id
));
if
(
StringUtils
.
isEmpty
(
communityNewGroupVo
.
getQrCode
())){
public
void
download
(
String
id
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
WeCommunityNewGroupVo
communityNewGroupVo
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupById
(
Long
.
valueOf
(
id
));
if
(
StringUtils
.
isEmpty
(
communityNewGroupVo
.
getQrCode
()))
{
return
;
}
else
{
}
else
{
try
{
FileUtils
.
downloadFile
(
communityNewGroupVo
.
getQrCode
(),
response
.
getOutputStream
());
}
catch
(
IOException
e
)
{
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeCommunityNewGroupMapper.java
View file @
31a7ee7
...
...
@@ -21,7 +21,8 @@ public interface WeCommunityNewGroupMapper extends BaseMapper<WeCommunityNewGrou
* @param communityNewGroup 搜索信息
* @return {@link WeCommunityNewGroup}s
*/
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
WeCommunityNewGroup
communityNewGroup
);
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
@Param
(
"empleCodeName"
)
String
empleCodeName
,
@Param
(
"createBy"
)
String
createBy
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
/**
* 获取新客自动拉群详细信息
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCommunityNewGroupService.java
View file @
31a7ee7
...
...
@@ -26,10 +26,9 @@ public interface IWeCommunityNewGroupService extends IService<WeCommunityNewGrou
/**
* 查询新客自动拉群列表
*
* @param communityNewGroup 搜索信息
* @return {@link WeCommunityNewGroup}s
*/
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
WeCommunityNewGroup
communityNewGroup
);
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
String
empleCodeName
,
String
createBy
,
String
beginTime
,
String
endTime
);
/**
* 获取新客自动拉群详细信息
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCommunityNewGroupServiceImpl.java
View file @
31a7ee7
...
...
@@ -115,8 +115,8 @@ public class WeCommunityNewGroupServiceImpl extends ServiceImpl<WeCommunityNewGr
}
@Override
public
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
WeCommunityNewGroup
communityNewGroup
)
{
List
<
WeCommunityNewGroupVo
>
weCommunityNewGroupVos
=
weCommunityNewGroupMapper
.
selectWeCommunityNewGroupList
(
communityNewGroup
);
public
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
String
empleCodeName
,
String
createBy
,
String
beginTime
,
String
endTime
)
{
List
<
WeCommunityNewGroupVo
>
weCommunityNewGroupVos
=
weCommunityNewGroupMapper
.
selectWeCommunityNewGroupList
(
empleCodeName
,
createBy
,
beginTime
,
endTime
);
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
))
{
List
<
Long
>
newGroupIdList
=
weCommunityNewGroupVos
.
stream
().
map
(
WeCommunityNewGroupVo:
:
getNewGroupId
).
collect
(
Collectors
.
toList
());
List
<
WeEmpleCodeUseScop
>
useScopList
=
iWeEmpleCodeUseScopService
.
selectWeEmpleCodeUseScopListByIds
(
newGroupIdList
);
...
...
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