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
1977d77e
Commit
1977d77e
authored
Jan 11, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/社群' into 'master'
Feature/社群 See merge request
!858
parents
a3078e35
dc5a1369
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+5
-1
GroupChatHmController.java
...ban/manage/web/controller/chat/GroupChatHmController.java
+22
-12
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
1977d77e
...
...
@@ -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 @
1977d77e
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
chat
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
...
...
@@ -25,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.api.base.commons.Page
;
...
...
@@ -34,8 +36,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
;
...
...
@@ -54,8 +58,10 @@ import com.gic.log.record.anno.GicLogRecord;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
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.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
import
com.gic.thirdparty.cloudfile.pojo.CloudFileInfo
;
import
com.gic.web.common.utils.DataPermissionExport
;
import
com.gic.web.common.utils.ExecutorPoolSingleton
;
import
com.google.common.collect.Sets
;
...
...
@@ -80,6 +86,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
=
"群活码-新建活码"
)
...
...
@@ -383,9 +391,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
);
}
});
...
...
@@ -413,6 +421,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
;
...
...
@@ -452,7 +462,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"
);
...
...
@@ -469,17 +479,17 @@ public class GroupChatHmController {
out
.
close
();
}
catch
(
IOException
e
)
{
}
/*CloudFileTypeEnum cloudFileTypeEnum = CloudFileTypeEnum.OTHER;
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
OTHER
;
logger
.
info
(
"下载={}"
,
factoryCode
);
CloudFileInfo
cloudFileInfo
=
CloudFileUtil
.
uploadFile
(
new
FileInputStream
(
tempFile
),
"zip"
,
cloudFileTypeEnum, au.getEnterpriseDTO().getFactoryCode(),
CloudFileBusinessOptEnum.HAOBAN_COMMON);*/
String
url
=
FileUploadUtil
.
simpleUploadFileFromLocal
(
tempFile
,
fileName
,
BucketNameEnum
.
COMPRESS_60000
.
getName
());
cloudFileTypeEnum
,
factoryCode
,
CloudFileBusinessOptEnum
.
HAOBAN_COMMON
);
logger
.
info
(
"下载={}"
,
JSON
.
toJSONString
(
cloudFileInfo
));
DownloadReportDTO
downloadReportDTO
=
new
DownloadReportDTO
();
downloadReportDTO
.
setDownloadUrl
(
"https://"
+
url
);
downloadReportDTO
.
setDownloadUrl
(
cloudFileInfo
.
getOrgFileUrl
()
);
downloadReportService
.
updateDownloadReport
(
reportId
,
downloadReportDTO
);
tempFile
.
deleteOnExit
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
});
...
...
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