Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
05406be3
Commit
05406be3
authored
Jan 10, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
451aa52f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+5
-1
GroupChatHmController.java
...ban/manage/web/controller/chat/GroupChatHmController.java
+11
-8
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
05406be3
...
...
@@ -88,7 +88,11 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
}
if
(
StringUtils
.
isBlank
(
qw
.
getMemberCorpid
()))
{
logger
.
info
(
"会员小程序未配置,自建应用"
);
qw
.
setMemberCorpid
(
wxEnterprise
.
getWxCorpid
());
if
(
qw
.
getWxSecurityType
()==
2
)
{
qw
.
setMemberCorpid
(
wxEnterprise
.
getOpenCorpid
());
}
else
{
qw
.
setMemberCorpid
(
wxEnterprise
.
getWxCorpid
());
}
}
logger
.
info
(
"企微所有corpid信息={}"
,
JSON
.
toJSON
(
qw
));
return
qw
;
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatHmController.java
View file @
05406be3
...
...
@@ -35,8 +35,10 @@ import com.gic.commons.util.PageHelperUtils;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.commons.web.RequestThreadLocal
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.security.DownloadReportDTO
;
import
com.gic.enterprise.api.service.DownloadReportService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.chat.GroupChatDTO
;
...
...
@@ -83,6 +85,8 @@ public class GroupChatHmController {
private
GroupChatApiService
groupChatApiService
;
@Autowired
private
DownloadReportService
downloadReportService
;
@Autowired
private
EnterpriseService
enterpriseService
;
@RequestMapping
(
"add"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
HB_QHM
,
optType
=
GicLogRecordOptTypeEnum
.
HB_1002_01
,
userFunc
=
LogRecordUserServiceImpl
.
class
,
optPage
=
"群活码-新建活码"
)
...
...
@@ -386,9 +390,9 @@ public class GroupChatHmController {
ServiceResponse
<
Page
<
GroupChatDTO
>>
pageResp
=
this
.
groupChatApiService
.
listPage
(
qdto
,
basePageInfo
);
Page
<
GroupChatDTO
>
page
=
pageResp
.
getResult
();
List
<
GroupChatDTO
>
list
=
page
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
stream
().
forEach
(
dto
->
{
if
(
dto
.
getTotalCount
()>=
200
)
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
stream
().
forEach
(
dto
->
{
if
(
dto
.
getTotalCount
()
>=
200
)
{
dto
.
setHmAddStatus
(
2
);
}
});
...
...
@@ -416,6 +420,8 @@ public class GroupChatHmController {
au
.
setEnterpriseId
(
enterpriseId
);
au
.
setUserId
(
loginUser
.
getClerkId
());
au
.
setRealName
(
loginUser
.
getClerkName
());
EnterpriseDTO
enterpriseDTO
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
);
final
String
factoryCode
=
enterpriseDTO
.
getFactoryCode
();
String
path
=
RequestThreadLocal
.
get
().
getSession
().
getServletContext
().
getRealPath
(
"/chat/qrcode/"
);
String
uuId
=
ToolUtil
.
randomUUID
();
path
=
path
+
uuId
;
...
...
@@ -455,7 +461,7 @@ public class GroupChatHmController {
ZipOutputStream
out
=
new
ZipOutputStream
(
new
FileOutputStream
(
tempFile
));
for
(
GroupChatHmDTO
dto
:
dtoList
)
{
String
qrCodeUrl
=
dto
.
getWxQrCode
();
logger
.
info
(
"下载={}"
,
qrCodeUrl
);
logger
.
info
(
"下载={}"
,
qrCodeUrl
);
if
(
StringUtils
.
isNotBlank
(
qrCodeUrl
))
{
try
{
ZipEntry
e
=
new
ZipEntry
(
dto
.
getChatHmCode
()
+
"_"
+
dto
.
getName
()
+
".png"
);
...
...
@@ -474,11 +480,8 @@ public class GroupChatHmController {
}
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
OTHER
;
CloudFileInfo
cloudFileInfo
=
CloudFileUtil
.
uploadFile
(
new
FileInputStream
(
tempFile
),
"zip"
,
cloudFileTypeEnum
,
au
.
getEnterpriseDTO
().
getFactoryCode
(),
CloudFileBusinessOptEnum
.
HAOBAN_COMMON
);
cloudFileTypeEnum
,
factoryCode
,
CloudFileBusinessOptEnum
.
HAOBAN_COMMON
);
DownloadReportDTO
downloadReportDTO
=
new
DownloadReportDTO
();
/*downloadReportDTO.setDownloadUrl("https://" + url);*/
//String url = FileUploadUtil.simpleUploadFileFromLocal(tempFile, fileName, BucketNameEnum.COMPRESS_60000.getName());
downloadReportDTO
.
setDownloadUrl
(
cloudFileInfo
.
getOrgFileUrl
());
downloadReportService
.
updateDownloadReport
(
reportId
,
downloadReportDTO
);
tempFile
.
deleteOnExit
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment