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
1
Merge Requests
1
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
b62dabc1
Commit
b62dabc1
authored
Jan 05, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载
parent
3edbbc43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
GroupChatHmController.java
...ban/manage/web/controller/chat/GroupChatHmController.java
+15
-7
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatHmController.java
View file @
b62dabc1
...
@@ -55,6 +55,8 @@ import com.gic.log.record.anno.GicLogRecord;
...
@@ -55,6 +55,8 @@ import com.gic.log.record.anno.GicLogRecord;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.qcloud.BucketNameEnum
;
import
com.gic.qcloud.FileUploadUtil
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
...
@@ -410,7 +412,13 @@ public class GroupChatHmController {
...
@@ -410,7 +412,13 @@ public class GroupChatHmController {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
String
qrCodeName
=
"群活码"
;
String
qrCodeName
=
"群活码"
;
final
String
fileName
=
qrCodeName
+
"_"
+
sdf
.
format
(
new
Date
())
+
".zip"
;
final
String
fileName
=
qrCodeName
+
"_"
+
sdf
.
format
(
new
Date
())
+
".zip"
;
final
AuthorizedUser
au
=
SessionContextUtils
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
final
AuthorizedUser
au
=
new
AuthorizedUser
();
au
.
setEnterpriseId
(
enterpriseId
);
au
.
setUserId
(
loginUser
.
getClerkId
());
au
.
setRealName
(
loginUser
.
getClerkName
());
String
path
=
RequestThreadLocal
.
get
().
getSession
().
getServletContext
().
getRealPath
(
"/chat/qrcode/"
);
String
path
=
RequestThreadLocal
.
get
().
getSession
().
getServletContext
().
getRealPath
(
"/chat/qrcode/"
);
String
uuId
=
ToolUtil
.
randomUUID
();
String
uuId
=
ToolUtil
.
randomUUID
();
path
=
path
+
uuId
;
path
=
path
+
uuId
;
...
@@ -424,9 +432,6 @@ public class GroupChatHmController {
...
@@ -424,9 +432,6 @@ public class GroupChatHmController {
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
}
}
}
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setStatus
(
1
);
qdto
.
setStatus
(
1
);
...
@@ -453,6 +458,7 @@ public class GroupChatHmController {
...
@@ -453,6 +458,7 @@ public class GroupChatHmController {
ZipOutputStream
out
=
new
ZipOutputStream
(
new
FileOutputStream
(
tempFile
));
ZipOutputStream
out
=
new
ZipOutputStream
(
new
FileOutputStream
(
tempFile
));
for
(
GroupChatHmDTO
dto
:
dtoList
)
{
for
(
GroupChatHmDTO
dto
:
dtoList
)
{
String
qrCodeUrl
=
dto
.
getWxQrCode
();
String
qrCodeUrl
=
dto
.
getWxQrCode
();
logger
.
info
(
"下载={}"
,
qrCodeUrl
);
if
(
StringUtils
.
isNotBlank
(
qrCodeUrl
))
{
if
(
StringUtils
.
isNotBlank
(
qrCodeUrl
))
{
try
{
try
{
ZipEntry
e
=
new
ZipEntry
(
dto
.
getChatHmCode
()
+
"_"
+
dto
.
getName
()
+
".png"
);
ZipEntry
e
=
new
ZipEntry
(
dto
.
getChatHmCode
()
+
"_"
+
dto
.
getName
()
+
".png"
);
...
@@ -469,12 +475,14 @@ public class GroupChatHmController {
...
@@ -469,12 +475,14 @@ public class GroupChatHmController {
out
.
close
();
out
.
close
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
}
}
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
OTHER
;
/*
CloudFileTypeEnum cloudFileTypeEnum = CloudFileTypeEnum.OTHER;
CloudFileInfo cloudFileInfo = CloudFileUtil.uploadFile(new FileInputStream(tempFile), "zip",
CloudFileInfo cloudFileInfo = CloudFileUtil.uploadFile(new FileInputStream(tempFile), "zip",
cloudFileTypeEnum, au.getEnterpriseDTO().getFactoryCode(),
cloudFileTypeEnum, au.getEnterpriseDTO().getFactoryCode(),
CloudFileBusinessOptEnum
.
HAOBAN_COMMON
);
CloudFileBusinessOptEnum.HAOBAN_COMMON);*/
String
url
=
FileUploadUtil
.
simpleUploadFileFromLocal
(
tempFile
,
fileName
,
BucketNameEnum
.
COMPRESS_60000
.
getName
());
DownloadReportDTO
downloadReportDTO
=
new
DownloadReportDTO
();
DownloadReportDTO
downloadReportDTO
=
new
DownloadReportDTO
();
downloadReportDTO
.
setDownloadUrl
(
cloudFileInfo
.
getOrgFileUrl
()
);
downloadReportDTO
.
setDownloadUrl
(
"https://"
+
url
);
downloadReportService
.
updateDownloadReport
(
reportId
,
downloadReportDTO
);
downloadReportService
.
updateDownloadReport
(
reportId
,
downloadReportDTO
);
tempFile
.
deleteOnExit
();
tempFile
.
deleteOnExit
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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