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
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
26 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
...
@@ -52,19 +52,22 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -52,19 +52,22 @@ public class WeCommunityNewGroupController extends BaseController {
/**
/**
* 查询新客自动拉群列表
* 查询新客自动拉群列表
*/
*/
@ApiOperation
(
value
=
"查询新客自动拉群列表"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"查询新客自动拉群列表"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:list')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:list')"
)
@GetMapping
(
"/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
();
startPage
();
List
<
WeCommunityNewGroupVo
>
communityNewGroupVos
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupList
(
communityNewGroup
);
List
<
WeCommunityNewGroupVo
>
communityNewGroupVos
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupList
(
empleCodeName
,
createBy
,
beginTime
,
endTime
);
return
getDataTable
(
communityNewGroupVos
);
return
getDataTable
(
communityNewGroupVos
);
}
}
/**
/**
* 获取新客自动拉群详细信息
* 获取新客自动拉群详细信息
*/
*/
@ApiOperation
(
value
=
"获取新客自动拉群详细信息"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"获取新客自动拉群详细信息"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:query')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:query')"
)
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
<
WeCommunityNewGroupVo
>
getInfo
(
@PathVariable
(
"newGroupId"
)
@ApiParam
(
"主键ID"
)
Long
newGroupId
)
{
public
AjaxResult
<
WeCommunityNewGroupVo
>
getInfo
(
@PathVariable
(
"newGroupId"
)
@ApiParam
(
"主键ID"
)
Long
newGroupId
)
{
...
@@ -74,7 +77,7 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -74,7 +77,7 @@ public class WeCommunityNewGroupController extends BaseController {
/**
/**
* 修改新客自动拉群
* 修改新客自动拉群
*/
*/
@ApiOperation
(
value
=
"修改新客自动拉群"
,
httpMethod
=
"PUT"
)
@ApiOperation
(
value
=
"修改新客自动拉群"
,
httpMethod
=
"PUT"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:edit')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/update"
)
@PutMapping
(
"/update"
)
...
@@ -87,7 +90,7 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -87,7 +90,7 @@ public class WeCommunityNewGroupController extends BaseController {
/**
/**
* 删除新客自动拉群
* 删除新客自动拉群
*/
*/
@ApiOperation
(
value
=
"删除新客自动拉群"
,
httpMethod
=
"DELETE"
)
@ApiOperation
(
value
=
"删除新客自动拉群"
,
httpMethod
=
"DELETE"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:remove')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/delete/{ids}"
)
@DeleteMapping
(
"/delete/{ids}"
)
...
@@ -100,7 +103,7 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -100,7 +103,7 @@ public class WeCommunityNewGroupController extends BaseController {
/**
/**
* 新增新客自动拉群
* 新增新客自动拉群
*/
*/
@ApiOperation
(
value
=
"新增新客自动拉群"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"新增新客自动拉群"
,
httpMethod
=
"POST"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:add')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:communityNewGroup:add')"
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"新客自动拉群"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/add"
)
@PostMapping
(
"/add"
)
...
@@ -110,9 +113,9 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -110,9 +113,9 @@ public class WeCommunityNewGroupController extends BaseController {
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
if
(
e
instanceof
WeComException
){
if
(
e
instanceof
WeComException
)
{
return
AjaxResult
.
error
(
e
.
getMessage
());
return
AjaxResult
.
error
(
e
.
getMessage
());
}
else
{
}
else
{
return
AjaxResult
.
error
(
"请求接口异常!"
);
return
AjaxResult
.
error
(
"请求接口异常!"
);
}
}
}
}
...
@@ -128,11 +131,11 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -128,11 +131,11 @@ public class WeCommunityNewGroupController extends BaseController {
* @param response 输出
* @param response 输出
* @throws Exception
* @throws Exception
*/
*/
@ApiOperation
(
value
=
"员工活码批量下载"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"员工活码批量下载"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:code:downloadBatch')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:code:downloadBatch')"
)
@Log
(
title
=
"员工活码批量下载"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"员工活码批量下载"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/downloadBatch"
)
@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
(
","
))
List
<
String
>
idList
=
Arrays
.
stream
(
Optional
.
ofNullable
(
ids
).
orElse
(
""
).
split
(
","
))
.
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
());
.
filter
(
StringUtils:
:
isNotEmpty
).
collect
(
Collectors
.
toList
());
try
{
try
{
...
@@ -141,15 +144,15 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -141,15 +144,15 @@ public class WeCommunityNewGroupController extends BaseController {
//zip输出流
//zip输出流
ZipOutputStream
zos
=
new
ZipOutputStream
(
response
.
getOutputStream
());
ZipOutputStream
zos
=
new
ZipOutputStream
(
response
.
getOutputStream
());
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
)){
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
))
{
for
(
WeCommunityNewGroupVo
communityNewGroupVo
:
weCommunityNewGroupVos
){
for
(
WeCommunityNewGroupVo
communityNewGroupVo
:
weCommunityNewGroupVos
)
{
String
qrCode
=
communityNewGroupVo
.
getQrCode
();
String
qrCode
=
communityNewGroupVo
.
getQrCode
();
if
(
StringUtils
.
isEmpty
(
qrCode
)){
if
(
StringUtils
.
isEmpty
(
qrCode
))
{
continue
;
continue
;
}
}
URL
url
=
new
URL
(
qrCode
);
URL
url
=
new
URL
(
qrCode
);
//每个二维码名称
//每个二维码名称
String
fileName
=
communityNewGroupVo
.
getEmpleCodeName
()+
communityNewGroupVo
.
getActivityScene
()+
".jpg"
;
String
fileName
=
communityNewGroupVo
.
getEmpleCodeName
()
+
communityNewGroupVo
.
getActivityScene
()
+
".jpg"
;
zos
.
putNextEntry
(
new
ZipEntry
(
fileName
));
zos
.
putNextEntry
(
new
ZipEntry
(
fileName
));
InputStream
fis
=
url
.
openConnection
().
getInputStream
();
InputStream
fis
=
url
.
openConnection
().
getInputStream
();
byte
[]
buffer
=
new
byte
[
1024
];
byte
[]
buffer
=
new
byte
[
1024
];
...
@@ -165,20 +168,20 @@ public class WeCommunityNewGroupController extends BaseController {
...
@@ -165,20 +168,20 @@ public class WeCommunityNewGroupController extends BaseController {
zos
.
close
();
zos
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
catch
(
Exception
e
){
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
@ApiOperation
(
value
=
"员工活码下载"
,
httpMethod
=
"GET"
)
@ApiOperation
(
value
=
"员工活码下载"
,
httpMethod
=
"GET"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:code:download')"
)
@PreAuthorize
(
"@ss.hasPermi('wecom:code:download')"
)
@Log
(
title
=
"员工活码下载"
,
businessType
=
BusinessType
.
OTHER
)
@Log
(
title
=
"员工活码下载"
,
businessType
=
BusinessType
.
OTHER
)
@GetMapping
(
"/download"
)
@GetMapping
(
"/download"
)
public
void
download
(
String
id
,
HttpServletRequest
request
,
HttpServletResponse
response
){
public
void
download
(
String
id
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
WeCommunityNewGroupVo
communityNewGroupVo
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupById
(
Long
.
valueOf
(
id
));
WeCommunityNewGroupVo
communityNewGroupVo
=
weCommunityNewGroupService
.
selectWeCommunityNewGroupById
(
Long
.
valueOf
(
id
));
if
(
StringUtils
.
isEmpty
(
communityNewGroupVo
.
getQrCode
())){
if
(
StringUtils
.
isEmpty
(
communityNewGroupVo
.
getQrCode
()))
{
return
;
return
;
}
else
{
}
else
{
try
{
try
{
FileUtils
.
downloadFile
(
communityNewGroupVo
.
getQrCode
(),
response
.
getOutputStream
());
FileUtils
.
downloadFile
(
communityNewGroupVo
.
getQrCode
(),
response
.
getOutputStream
());
}
catch
(
IOException
e
)
{
}
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
...
@@ -21,7 +21,8 @@ public interface WeCommunityNewGroupMapper extends BaseMapper<WeCommunityNewGrou
* @param communityNewGroup 搜索信息
* @param communityNewGroup 搜索信息
* @return {@link WeCommunityNewGroup}s
* @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
...
@@ -26,10 +26,9 @@ public interface IWeCommunityNewGroupService extends IService<WeCommunityNewGrou
/**
/**
* 查询新客自动拉群列表
* 查询新客自动拉群列表
*
*
* @param communityNewGroup 搜索信息
* @return {@link WeCommunityNewGroup}s
* @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
...
@@ -115,8 +115,8 @@ public class WeCommunityNewGroupServiceImpl extends ServiceImpl<WeCommunityNewGr
}
}
@Override
@Override
public
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
WeCommunityNewGroup
communityNewGroup
)
{
public
List
<
WeCommunityNewGroupVo
>
selectWeCommunityNewGroupList
(
String
empleCodeName
,
String
createBy
,
String
beginTime
,
String
endTime
)
{
List
<
WeCommunityNewGroupVo
>
weCommunityNewGroupVos
=
weCommunityNewGroupMapper
.
selectWeCommunityNewGroupList
(
communityNewGroup
);
List
<
WeCommunityNewGroupVo
>
weCommunityNewGroupVos
=
weCommunityNewGroupMapper
.
selectWeCommunityNewGroupList
(
empleCodeName
,
createBy
,
beginTime
,
endTime
);
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
))
{
if
(
CollectionUtil
.
isNotEmpty
(
weCommunityNewGroupVos
))
{
List
<
Long
>
newGroupIdList
=
weCommunityNewGroupVos
.
stream
().
map
(
WeCommunityNewGroupVo:
:
getNewGroupId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
newGroupIdList
=
weCommunityNewGroupVos
.
stream
().
map
(
WeCommunityNewGroupVo:
:
getNewGroupId
).
collect
(
Collectors
.
toList
());
List
<
WeEmpleCodeUseScop
>
useScopList
=
iWeEmpleCodeUseScopService
.
selectWeEmpleCodeUseScopListByIds
(
newGroupIdList
);
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