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
973b0041
Commit
973b0041
authored
Apr 24, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自建
parent
0e4ffc0b
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
80 additions
and
103 deletions
+80
-103
GroupChatDataServiceImpl.java
...e/service/service/chat/impl/GroupChatDataServiceImpl.java
+1
-2
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+3
-4
MaterialReportBuilder.java
...ervice/service/content/adaptor/MaterialReportBuilder.java
+1
-2
PotentialCustomerNotifyBuilder.java
...rvice/content/adaptor/PotentialCustomerNotifyBuilder.java
+2
-3
GroupMessageServiceImpl.java
...service/service/content/impl/GroupMessageServiceImpl.java
+4
-5
MaterialReportServiceImpl.java
...rvice/service/content/impl/MaterialReportServiceImpl.java
+1
-2
HmQrcodeTempServiceImpl.java
...nage/service/service/hm/impl/HmQrcodeTempServiceImpl.java
+1
-2
MaterialServiceImpl.java
...oban/manage/service/service/impl/MaterialServiceImpl.java
+2
-4
QywxSendServiceImpl.java
...oban/manage/service/service/impl/QywxSendServiceImpl.java
+1
-2
WelcomeSendServiceImpl.java
...n/manage/service/service/impl/WelcomeSendServiceImpl.java
+4
-5
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+21
-1
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+4
-5
HandoverOperationApiServiceImpl.java
...ice/service/out/impl/HandoverOperationApiServiceImpl.java
+3
-3
MaterialApiServiceImpl.java
...nage/service/service/out/impl/MaterialApiServiceImpl.java
+6
-7
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+2
-3
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+2
-3
MiniprogramSettingServiceImpl.java
...rvice/service/out/impl/MiniprogramSettingServiceImpl.java
+2
-3
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+9
-10
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+1
-2
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+6
-7
HmLinkApiServiceImpl.java
...age/service/service/out/impl/hm/HmLinkApiServiceImpl.java
+1
-2
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+3
-4
QwUtils.java
...main/java/com/gic/haoban/manage/service/util/QwUtils.java
+0
-22
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatDataServiceImpl.java
View file @
973b0041
...
@@ -32,7 +32,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
...
@@ -32,7 +32,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import
com.gic.haoban.manage.service.entity.chat.TabGroupChatData
;
import
com.gic.haoban.manage.service.entity.chat.TabGroupChatData
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatDataService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatDataService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.chat.GroupChatQwDataDTO
;
import
com.gic.wechat.api.dto.qywx.chat.GroupChatQwDataDTO
;
import
com.gic.wechat.api.dto.qywx.chat.GroupChatQwDataItemDTO
;
import
com.gic.wechat.api.dto.qywx.chat.GroupChatQwDataItemDTO
;
import
com.gic.wechat.api.service.qywx.QywxChatApiService
;
import
com.gic.wechat.api.service.qywx.QywxChatApiService
;
...
@@ -129,7 +128,7 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
...
@@ -129,7 +128,7 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
Date
date
=
DateUtil
.
addDay
(
DateUtil
.
getStartTimeOfDay
(),
-
1
);
Date
date
=
DateUtil
.
addDay
(
DateUtil
.
getStartTimeOfDay
(),
-
1
);
Long
time
=
date
.
getTime
()
/
1000
;
Long
time
=
date
.
getTime
()
/
1000
;
ServiceResponse
<
List
<
GroupChatQwDataDTO
>>
resp
=
this
.
qywxChatApiService
.
statistic
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
userIdList
,
time
,
time
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
ServiceResponse
<
List
<
GroupChatQwDataDTO
>>
resp
=
this
.
qywxChatApiService
.
statistic
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
userIdList
,
time
,
time
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
List
<
GroupChatQwDataDTO
>
dataList
=
resp
.
getResult
();
List
<
GroupChatQwDataDTO
>
dataList
=
resp
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
dataList
))
{
if
(
CollectionUtils
.
isEmpty
(
dataList
))
{
if
(
list
.
size
()
<
pageSize
)
{
if
(
list
.
size
()
<
pageSize
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
973b0041
...
@@ -68,7 +68,6 @@ import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService;
...
@@ -68,7 +68,6 @@ import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatHmService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatHmService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.member.api.dto.MemberDTO
;
import
com.gic.member.api.dto.MemberDTO
;
import
com.gic.member.api.service.MemberService
;
import
com.gic.member.api.service.MemberService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
...
@@ -532,7 +531,7 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -532,7 +531,7 @@ public class GroupChatServiceImpl implements GroupChatService {
boolean
syncDetailFlag
)
{
boolean
syncDetailFlag
)
{
logger
.
info
(
"同步群列表={},idlist={},cursor={}"
,
JSON
.
toJSONString
(
qwDTO
),
JSON
.
toJSONString
(
userIdList
),
cursor
);
logger
.
info
(
"同步群列表={},idlist={},cursor={}"
,
JSON
.
toJSONString
(
qwDTO
),
JSON
.
toJSONString
(
userIdList
),
cursor
);
ServiceResponse
<
GroupChatListDTO
>
resp
=
this
.
qywxChatApiService
.
groupchatList
(
qwDTO
.
getThirdCorpid
(),
ServiceResponse
<
GroupChatListDTO
>
resp
=
this
.
qywxChatApiService
.
groupchatList
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
)
,
userIdList
,
limit
,
cursor
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qwDTO
.
getSelf3thSecret
(
)
,
userIdList
,
limit
,
cursor
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
logger
.
info
(
"拉取群列表异常={}"
,
JSON
.
toJSON
(
resp
));
logger
.
info
(
"拉取群列表异常={}"
,
JSON
.
toJSON
(
resp
));
return
;
return
;
...
@@ -616,7 +615,7 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -616,7 +615,7 @@ public class GroupChatServiceImpl implements GroupChatService {
String
wxEnterpriseId
=
chat
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
chat
.
getWxEnterpriseId
();
String
enterpriseId
=
chat
.
getEnterpriseId
();
String
enterpriseId
=
chat
.
getEnterpriseId
();
ServiceResponse
<
GroupChatDetailDTO
>
detailResp
=
this
.
qywxChatApiService
ServiceResponse
<
GroupChatDetailDTO
>
detailResp
=
this
.
qywxChatApiService
.
groupchatDetail
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
chat
.
getWxChatId
(),
1
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
.
groupchatDetail
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
chat
.
getWxChatId
(),
1
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
logger
.
info
(
"从企微获取群详情{}={}"
,
chat
.
getWxChatId
(),
JSON
.
toJSON
(
detailResp
));
logger
.
info
(
"从企微获取群详情{}={}"
,
chat
.
getWxChatId
(),
JSON
.
toJSON
(
detailResp
));
if
(!
detailResp
.
isSuccess
())
{
if
(!
detailResp
.
isSuccess
())
{
...
@@ -1095,7 +1094,7 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -1095,7 +1094,7 @@ public class GroupChatServiceImpl implements GroupChatService {
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByIdSet
(
new
HashSet
<>(
groupChatIdList
));
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByIdSet
(
new
HashSet
<>(
groupChatIdList
));
List
<
String
>
wxChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getWxChatId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
wxChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getWxChatId
()).
collect
(
Collectors
.
toList
());
ServiceResponse
<
List
<
FailChatListDTO
>>
resp
=
this
.
qywxChatApiService
.
transfer
(
qwDTO
.
getThirdCorpid
(),
ServiceResponse
<
List
<
FailChatListDTO
>>
resp
=
this
.
qywxChatApiService
.
transfer
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
wxChatIdList
,
userid
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qwDTO
.
getSelf3thSecret
(
),
wxChatIdList
,
userid
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"群继承,继承人={}"
,
JSON
.
toJSONString
(
resp
),
userid
);
logger
.
info
(
"群继承,继承人={}"
,
JSON
.
toJSONString
(
resp
),
userid
);
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
"9999"
,
resp
.
getMessage
());
return
ServiceResponse
.
failure
(
"9999"
,
resp
.
getMessage
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialReportBuilder.java
View file @
973b0041
...
@@ -14,7 +14,6 @@ import com.gic.haoban.manage.service.pojo.bo.content.context.MaterialReportConte
...
@@ -14,7 +14,6 @@ import com.gic.haoban.manage.service.pojo.bo.content.context.MaterialReportConte
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.util.DrawImageUtils
;
import
com.gic.haoban.manage.service.util.DrawImageUtils
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.QywxNewsArticleMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsArticleMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -186,7 +185,7 @@ public class MaterialReportBuilder {
...
@@ -186,7 +185,7 @@ public class MaterialReportBuilder {
newsSendMessage
.
setAgentId
(
Integer
.
parseInt
(
wxEnterpriseQwDTO
.
getAgentId
()));
newsSendMessage
.
setAgentId
(
Integer
.
parseInt
(
wxEnterpriseQwDTO
.
getAgentId
()));
newsSendMessage
.
setUserIds
(
Collections
.
singletonList
(
wxUserId
));
newsSendMessage
.
setUserIds
(
Collections
.
singletonList
(
wxUserId
));
QywxNewsArticleMessageDTO
articleInfo
=
new
QywxNewsArticleMessageDTO
();
QywxNewsArticleMessageDTO
articleInfo
=
new
QywxNewsArticleMessageDTO
();
articleInfo
.
setAppid
(
QwUtils
.
getHbAppid
(
wxEnterpriseQwDTO
,
config
.
getAppid
()
));
articleInfo
.
setAppid
(
wxEnterpriseQwDTO
.
getHbWxaAppid
(
));
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setTitle
(
context
.
getMessageTitle
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
articleInfo
.
setDescription
(
context
.
getMessageDesc
());
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
context
.
getMainStoreId
())));
articleInfo
.
setPagepath
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
MATERIAL_REPORT_NOTIFY
,
context
.
extendParams
(
context
.
getMainStoreId
())));
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/PotentialCustomerNotifyBuilder.java
View file @
973b0041
...
@@ -16,7 +16,6 @@ import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService;
...
@@ -16,7 +16,6 @@ import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
...
@@ -192,7 +191,7 @@ public class PotentialCustomerNotifyBuilder {
...
@@ -192,7 +191,7 @@ public class PotentialCustomerNotifyBuilder {
}
}
QywxXcxSendMessageDTO
messageDTO
=
this
.
buildApplicationMessage
(
staffClerkRelation
,
wxEnterpriseQwDTO
,
QywxXcxSendMessageDTO
messageDTO
=
this
.
buildApplicationMessage
(
staffClerkRelation
,
wxEnterpriseQwDTO
,
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
(),
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
()));
customerStaticsBOMap
.
get
(
staffClerkRelation
.
getClerkId
()).
getNum
(),
context
.
buildExtendParams
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getClerkId
()));
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
wxEnterpriseQwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
wxEnterpriseQwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
wxEnterpriseQwDTO
.
isSelf
(),
wxEnterpriseQwDTO
.
getUrlHost
());
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
wxEnterpriseQwDTO
.
getThirdCorpid
(),
wxEnterpriseQwDTO
.
getSelf3thSecret
(
),
messageDTO
,
wxEnterpriseQwDTO
.
isSelf
(),
wxEnterpriseQwDTO
.
getUrlHost
());
log
.
info
(
"发送销售线索应用消息结果 {}"
,
sendMessage
);
log
.
info
(
"发送销售线索应用消息结果 {}"
,
sendMessage
);
}
}
}
}
...
@@ -210,7 +209,7 @@ public class PotentialCustomerNotifyBuilder {
...
@@ -210,7 +209,7 @@ public class PotentialCustomerNotifyBuilder {
itemDTO
.
setValue
(
String
.
format
(
"新增%s个客户的销售线索,请及时跟进"
,
count
));
itemDTO
.
setValue
(
String
.
format
(
"新增%s个客户的销售线索,请及时跟进"
,
count
));
ArrayList
<
String
>
list
=
new
ArrayList
<>();
ArrayList
<
String
>
list
=
new
ArrayList
<>();
list
.
add
(
wxUserId
);
list
.
add
(
wxUserId
);
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
wxEnterpriseQwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
wxEnterpriseQwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setUserIds
(
list
);
messageDTO
.
setUserIds
(
list
);
messageDTO
.
setPage
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
,
extendParams
));
messageDTO
.
setPage
(
NoticeMessageUtil
.
buildMiniAppUrl
(
NoticeMessageTypeEnum
.
POTENTIAL_CUSTOMER_NOTIFY
,
extendParams
));
messageDTO
.
setTitle
(
"销售线索通知"
);
messageDTO
.
setTitle
(
"销售线索通知"
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/GroupMessageServiceImpl.java
View file @
973b0041
...
@@ -40,7 +40,6 @@ import com.gic.haoban.manage.service.service.content.ClerkShareLogService;
...
@@ -40,7 +40,6 @@ import com.gic.haoban.manage.service.service.content.ClerkShareLogService;
import
com.gic.haoban.manage.service.service.content.GroupMessageService
;
import
com.gic.haoban.manage.service.service.content.GroupMessageService
;
import
com.gic.haoban.manage.service.service.content.TriggerCustomerDetailService
;
import
com.gic.haoban.manage.service.service.content.TriggerCustomerDetailService
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialEnterpriseAdaptor
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialEnterpriseAdaptor
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMsgSendResultQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxGroupMsgSendResultQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxMomentInfoQDTO
;
import
com.gic.wechat.api.dto.qdto.group.QywxMomentInfoQDTO
;
...
@@ -410,7 +409,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
...
@@ -410,7 +409,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
groupMessageQDTO
.
setCorpid
(
corpid
);
groupMessageQDTO
.
setCorpid
(
corpid
);
groupMessageQDTO
.
setStartTime
(
startTime
.
getTime
()
/
1000
);
groupMessageQDTO
.
setStartTime
(
startTime
.
getTime
()
/
1000
);
groupMessageQDTO
.
setEndTime
(
endTime
.
getTime
()
/
1000
);
groupMessageQDTO
.
setEndTime
(
endTime
.
getTime
()
/
1000
);
groupMessageQDTO
.
setSuiteid
(
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
));
groupMessageQDTO
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
(
));
groupMessageQDTO
.
setChatType
(
groupMsgChatType
.
getCode
());
groupMessageQDTO
.
setChatType
(
groupMsgChatType
.
getCode
());
groupMessageQDTO
.
setPageSize
(
100
);
groupMessageQDTO
.
setPageSize
(
100
);
ServiceResponse
<
QywxGroupMsgResp
>
serviceResponse
=
ServiceResponse
<
QywxGroupMsgResp
>
serviceResponse
=
...
@@ -451,7 +450,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
...
@@ -451,7 +450,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
private
List
<
QywxGroupMsgSendResultDTO
.
GroupMsgSendResultInfo
>
queryGroupMsgSendResult
(
String
corpid
,
String
msgId
,
String
userId
,
String
cursor
,
WxEnterpriseQwDTO
qwDTO
)
{
private
List
<
QywxGroupMsgSendResultDTO
.
GroupMsgSendResultInfo
>
queryGroupMsgSendResult
(
String
corpid
,
String
msgId
,
String
userId
,
String
cursor
,
WxEnterpriseQwDTO
qwDTO
)
{
QywxGroupMsgSendResultQDTO
searchQDTO
=
new
QywxGroupMsgSendResultQDTO
();
QywxGroupMsgSendResultQDTO
searchQDTO
=
new
QywxGroupMsgSendResultQDTO
();
searchQDTO
.
setCorpid
(
corpid
);
searchQDTO
.
setCorpid
(
corpid
);
searchQDTO
.
setSuiteid
(
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
));
searchQDTO
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
(
));
searchQDTO
.
setPageSize
(
1000
);
searchQDTO
.
setPageSize
(
1000
);
searchQDTO
.
setMsgId
(
msgId
);
searchQDTO
.
setMsgId
(
msgId
);
searchQDTO
.
setUserId
(
userId
);
searchQDTO
.
setUserId
(
userId
);
...
@@ -481,7 +480,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
...
@@ -481,7 +480,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
QywxMomentInfoQDTO
qywxMomentInfoQDTO
=
new
QywxMomentInfoQDTO
();
QywxMomentInfoQDTO
qywxMomentInfoQDTO
=
new
QywxMomentInfoQDTO
();
qywxMomentInfoQDTO
.
setCorpid
(
corpid
);
qywxMomentInfoQDTO
.
setCorpid
(
corpid
);
qywxMomentInfoQDTO
.
setSuiteid
(
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
));
qywxMomentInfoQDTO
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
(
));
qywxMomentInfoQDTO
.
setStartTime
(
DateUtil
.
addNumForSecond
(
createTime
,
-
60
).
getTime
()
/
1000
);
qywxMomentInfoQDTO
.
setStartTime
(
DateUtil
.
addNumForSecond
(
createTime
,
-
60
).
getTime
()
/
1000
);
qywxMomentInfoQDTO
.
setEndTime
((
createTime
.
getTime
()
/
1000
)
+
10
);
qywxMomentInfoQDTO
.
setEndTime
((
createTime
.
getTime
()
/
1000
)
+
10
);
qywxMomentInfoQDTO
.
setCreatorId
(
userId
);
qywxMomentInfoQDTO
.
setCreatorId
(
userId
);
...
@@ -505,7 +504,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
...
@@ -505,7 +504,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
public
List
<
String
>
queryMomentSendResultList
(
String
corpid
,
String
userId
,
String
momentId
,
WxEnterpriseQwDTO
qwDTO
)
{
public
List
<
String
>
queryMomentSendResultList
(
String
corpid
,
String
userId
,
String
momentId
,
WxEnterpriseQwDTO
qwDTO
)
{
QywxMomentSendResultQDTO
qywxMomentSendResultQDTO
=
new
QywxMomentSendResultQDTO
();
QywxMomentSendResultQDTO
qywxMomentSendResultQDTO
=
new
QywxMomentSendResultQDTO
();
qywxMomentSendResultQDTO
.
setCorpid
(
corpid
);
qywxMomentSendResultQDTO
.
setCorpid
(
corpid
);
qywxMomentSendResultQDTO
.
setSuiteid
(
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
));
qywxMomentSendResultQDTO
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
(
));
qywxMomentSendResultQDTO
.
setMomentId
(
momentId
);
qywxMomentSendResultQDTO
.
setMomentId
(
momentId
);
qywxMomentSendResultQDTO
.
setUserId
(
userId
);
qywxMomentSendResultQDTO
.
setUserId
(
userId
);
qywxMomentSendResultQDTO
.
setPageSize
(
1000
);
qywxMomentSendResultQDTO
.
setPageSize
(
1000
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/MaterialReportServiceImpl.java
View file @
973b0041
...
@@ -13,7 +13,6 @@ import com.gic.haoban.manage.service.service.WxEnterpriseService;
...
@@ -13,7 +13,6 @@ import com.gic.haoban.manage.service.service.WxEnterpriseService;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.content.MaterialReportService
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialReportBuilder
;
import
com.gic.haoban.manage.service.service.content.adaptor.MaterialReportBuilder
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxNewsSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -98,7 +97,7 @@ public class MaterialReportServiceImpl implements MaterialReportService {
...
@@ -98,7 +97,7 @@ public class MaterialReportServiceImpl implements MaterialReportService {
return
;
return
;
}
}
log
.
info
(
"发送企业图文消息参数{}"
,
JSON
.
toJSONString
(
newsSendMessageDTO
));
log
.
info
(
"发送企业图文消息参数{}"
,
JSON
.
toJSONString
(
newsSendMessageDTO
));
boolean
result
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
newsSendMessageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
boolean
result
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
newsSendMessageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"成员{}发送素材企微使用报告结果 {}"
,
staffId
,
result
);
log
.
info
(
"成员{}发送素材企微使用报告结果 {}"
,
staffId
,
result
);
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeTempServiceImpl.java
View file @
973b0041
...
@@ -18,7 +18,6 @@ import com.gic.haoban.manage.service.entity.hm.TabHmQrcodeTemp;
...
@@ -18,7 +18,6 @@ import com.gic.haoban.manage.service.entity.hm.TabHmQrcodeTemp;
import
com.gic.haoban.manage.service.pojo.qo.HmQrcodeTempQO
;
import
com.gic.haoban.manage.service.pojo.qo.HmQrcodeTempQO
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.response.QywxResponseDTO
;
import
com.gic.wechat.api.dto.qywx.response.QywxResponseDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
...
@@ -62,7 +61,7 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
...
@@ -62,7 +61,7 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
String
corpid
=
item
.
getCorpid
();
String
corpid
=
item
.
getCorpid
();
String
configId
=
item
.
getWxConfigId
();
String
configId
=
item
.
getWxConfigId
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
item
.
getWxEnterpriseId
());
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
item
.
getWxEnterpriseId
());
QywxResponseDTO
resp
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
configId
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxResponseDTO
resp
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
configId
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"删除临时活码={}{},返回={}"
,
configId
,
corpid
,
JSON
.
toJSONString
(
resp
));
log
.
info
(
"删除临时活码={}{},返回={}"
,
configId
,
corpid
,
JSON
.
toJSONString
(
resp
));
this
.
hmQrcodeTempMapper
.
deleteByPrimaryKey
(
item
.
getId
());
this
.
hmQrcodeTempMapper
.
deleteByPrimaryKey
(
item
.
getId
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/MaterialServiceImpl.java
View file @
973b0041
...
@@ -27,8 +27,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanMaterial;
...
@@ -27,8 +27,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanMaterial;
import
com.gic.haoban.manage.service.entity.TabMaterialContent
;
import
com.gic.haoban.manage.service.entity.TabMaterialContent
;
import
com.gic.haoban.manage.service.service.MaterialService
;
import
com.gic.haoban.manage.service.service.MaterialService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.weimob.common.Md5Util
;
import
com.gic.weimob.common.Md5Util
;
...
@@ -228,10 +226,10 @@ public class MaterialServiceImpl implements MaterialService {
...
@@ -228,10 +226,10 @@ public class MaterialServiceImpl implements MaterialService {
url
+=
"?imageView2/2/w/1440/h/1080"
;
url
+=
"?imageView2/2/w/1440/h/1080"
;
logger
.
info
(
"url={}"
,
url
);
logger
.
info
(
"url={}"
,
url
);
}
}
jp
=
qywxSuiteApiService
.
uploadAttachment
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
()
,
selfFlag
,
qwDTO
.
getUrlHost
());
jp
=
qywxSuiteApiService
.
uploadAttachment
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
()
,
selfFlag
,
qwDTO
.
getUrlHost
());
}
else
{
}
else
{
// 群发上传
// 群发上传
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
()
,
selfFlag
,
qwDTO
.
getUrlHost
());
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
()
,
selfFlag
,
qwDTO
.
getUrlHost
());
}
}
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
from
==
1
)
{
if
(
from
==
1
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/QywxSendServiceImpl.java
View file @
973b0041
...
@@ -26,7 +26,6 @@ import com.gic.haoban.manage.service.service.MaterialService;
...
@@ -26,7 +26,6 @@ import com.gic.haoban.manage.service.service.MaterialService;
import
com.gic.haoban.manage.service.service.QywxSendService
;
import
com.gic.haoban.manage.service.service.QywxSendService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.QywxExternalMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxExternalMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxImageMaterialDTO
;
import
com.gic.wechat.api.dto.qywx.QywxImageMaterialDTO
;
import
com.gic.wechat.api.dto.qywx.QywxLinkMaterialDTO
;
import
com.gic.wechat.api.dto.qywx.QywxLinkMaterialDTO
;
...
@@ -161,7 +160,7 @@ public class QywxSendServiceImpl implements QywxSendService {
...
@@ -161,7 +160,7 @@ public class QywxSendServiceImpl implements QywxSendService {
range
.
setSender_list
(
senderList
);
range
.
setSender_list
(
senderList
);
moment
.
setVisible_range
(
range
);
moment
.
setVisible_range
(
range
);
ServiceResponse
<
String
>
resp
=
this
.
qywxExternalUserService
.
addMomentTask
(
qwDTO
.
getThirdCorpid
(),
ServiceResponse
<
String
>
resp
=
this
.
qywxExternalUserService
.
addMomentTask
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
moment
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qwDTO
.
getSelf3thSecret
(
),
moment
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"朋友圈消息={},返回={}"
,
JSON
.
toJSONString
(
moment
),
JSON
.
toJSONString
(
resp
));
log
.
info
(
"朋友圈消息={},返回={}"
,
JSON
.
toJSONString
(
moment
),
JSON
.
toJSONString
(
resp
));
return
resp
;
return
resp
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WelcomeSendServiceImpl.java
View file @
973b0041
...
@@ -49,7 +49,6 @@ import com.gic.haoban.manage.service.service.WelcomeSendService;
...
@@ -49,7 +49,6 @@ import com.gic.haoban.manage.service.service.WelcomeSendService;
import
com.gic.haoban.manage.service.service.WelcomeService
;
import
com.gic.haoban.manage.service.service.WelcomeService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalMessageBaseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalMessageBaseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxFileExternalBaseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxFileExternalBaseDTO
;
...
@@ -260,7 +259,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
...
@@ -260,7 +259,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
String
mediaUrl
=
media
.
getMediaUrl
();
String
mediaUrl
=
media
.
getMediaUrl
();
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
qwDTO
.
getSelf3thSecret
(
),
mediaUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
mediaUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
log
.
info
(
"欢迎语发送图片返回:{}"
,
JSON
.
toJSONString
(
jp
));
log
.
info
(
"欢迎语发送图片返回:{}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
...
@@ -274,7 +273,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
...
@@ -274,7 +273,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
String
mediaUrl
=
media
.
getMediaUrl
();
String
mediaUrl
=
media
.
getMediaUrl
();
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
qwDTO
.
getSelf3thSecret
(
),
mediaUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
VIDEO
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
mediaUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
VIDEO
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
log
.
info
(
"欢迎语发送视频返回:{}"
,
JSON
.
toJSONString
(
jp
));
log
.
info
(
"欢迎语发送视频返回:{}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
...
@@ -288,7 +287,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
...
@@ -288,7 +287,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
String
mediaUrl
=
media
.
getMediaUrl
();
String
mediaUrl
=
media
.
getMediaUrl
();
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
String
[]
arr
=
mediaUrl
.
split
(
"/"
);
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
qwDTO
.
getSelf3thSecret
(
),
mediaUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
FILE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
mediaUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
FILE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
log
.
info
(
"欢迎语发送文件返回:{}"
,
JSON
.
toJSONString
(
jp
));
log
.
info
(
"欢迎语发送文件返回:{}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
...
@@ -361,7 +360,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
...
@@ -361,7 +360,7 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
String
downloadUrl
=
qRcodePic
.
getPicUploadResDTO
().
downloadUrl
;
String
downloadUrl
=
qRcodePic
.
getPicUploadResDTO
().
downloadUrl
;
String
[]
arr
=
downloadUrl
.
split
(
"/"
);
String
[]
arr
=
downloadUrl
.
split
(
"/"
);
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corpid
,
qwDTO
.
getSelf3thSecret
(
),
downloadUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
downloadUrl
,
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
log
.
info
(
"欢迎语发送带参数的公众号企微二维码返回:{}"
,
JSON
.
toJSONString
(
jp
));
log
.
info
(
"欢迎语发送带参数的公众号企微二维码返回:{}"
,
JSON
.
toJSONString
(
jp
));
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
973b0041
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -21,6 +20,7 @@ import com.gic.haoban.common.utils.StringUtil;
...
@@ -21,6 +20,7 @@ import com.gic.haoban.common.utils.StringUtil;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.SecretSettingMapper
;
import
com.gic.haoban.manage.service.dao.mapper.SecretSettingMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxApplicationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxApplicationMapper
;
...
@@ -46,6 +46,8 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
...
@@ -46,6 +46,8 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
private
TabHaobanStaffClerkRelationMapper
tabHaobanStaffClerkRelationMapper
;
private
TabHaobanStaffClerkRelationMapper
tabHaobanStaffClerkRelationMapper
;
@Autowired
@Autowired
private
SecretSettingMapper
secretSettingMapper
;
private
SecretSettingMapper
secretSettingMapper
;
@Autowired
private
Config
config
;
@Override
@Override
public
String
add
(
WxEnterpriseDTO
wxDTO
)
{
public
String
add
(
WxEnterpriseDTO
wxDTO
)
{
...
@@ -114,10 +116,28 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
...
@@ -114,10 +116,28 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
qw
.
setAgentName
(
secret
.
getAgentName
());
qw
.
setAgentName
(
secret
.
getAgentName
());
qw
.
setSelfAppid
(
wxEnterprise
.
getWxaAppid
());
qw
.
setSelfAppid
(
wxEnterprise
.
getWxaAppid
());
}
}
qw
.
setHbWxaAppid
(
this
.
getHbAppid
(
qw
,
config
.
getAppid
()));
qw
.
setSelf3thSecret
(
this
.
getSecret
(
qw
,
config
.
getWxSuiteid
()));
logger
.
info
(
"企微所有corpid信息={}"
,
JSON
.
toJSON
(
qw
));
logger
.
info
(
"企微所有corpid信息={}"
,
JSON
.
toJSON
(
qw
));
return
qw
;
return
qw
;
}
}
public
String
getSecret
(
WxEnterpriseQwDTO
qwDTO
,
String
suiteId
)
{
String
secret
=
suiteId
;
if
(
qwDTO
.
isSelf
())
{
secret
=
qwDTO
.
getSelfSecret
();
}
return
secret
;
}
public
String
getHbAppid
(
WxEnterpriseQwDTO
qwDTO
,
String
thirdAppid
)
{
String
appid
=
thirdAppid
;
if
(
qwDTO
.
isSelf
())
{
appid
=
qwDTO
.
getSelfAppid
();
}
return
appid
;
}
@Override
@Override
public
TabHaobanWxEnterprise
getEnterpriseBycorpId
(
String
corpId
)
{
public
TabHaobanWxEnterprise
getEnterpriseBycorpId
(
String
corpId
)
{
if
(
StringUtils
.
isBlank
(
corpId
))
{
if
(
StringUtils
.
isBlank
(
corpId
))
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
973b0041
...
@@ -51,7 +51,6 @@ import com.gic.haoban.manage.service.service.StaffService;
...
@@ -51,7 +51,6 @@ import com.gic.haoban.manage.service.service.StaffService;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageTemplateService
;
import
com.gic.haoban.manage.service.service.notify.NoticeMessageTemplateService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
...
@@ -266,14 +265,14 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -266,14 +265,14 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
appUrl
+=
messageTypeEnum
.
getPageType
();
appUrl
+=
messageTypeEnum
.
getPageType
();
}
}
appUrl
+=
"&data="
+
data
;
appUrl
+=
"&data="
+
data
;
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
qwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
qwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setAgentId
(
Integer
.
parseInt
(
qwDTO
.
getAgentId
()));
messageDTO
.
setAgentId
(
Integer
.
parseInt
(
qwDTO
.
getAgentId
()));
messageDTO
.
setAgentName
(
qwDTO
.
getAgentName
());
messageDTO
.
setAgentName
(
qwDTO
.
getAgentName
());
messageDTO
.
setUserIds
(
wxUserIdList
);
messageDTO
.
setUserIds
(
wxUserIdList
);
messageDTO
.
setPage
(
appUrl
);
messageDTO
.
setPage
(
appUrl
);
messageDTO
.
setTitle
(
StringUtils
.
isNotBlank
(
title
)?
title:
messageTypeEnum
.
getName
());
messageDTO
.
setTitle
(
StringUtils
.
isNotBlank
(
title
)?
title:
messageTypeEnum
.
getName
());
messageDTO
.
setContent
(
contentList
.
get
(
0
).
getVal
());
messageDTO
.
setContent
(
contentList
.
get
(
0
).
getVal
());
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
NotifyMessageMQDTO
mqdto
=
new
NotifyMessageMQDTO
();
NotifyMessageMQDTO
mqdto
=
new
NotifyMessageMQDTO
();
List
<
String
>
clerkIdList
=
list
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
List
<
String
>
clerkIdList
=
list
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
mqdto
.
setClerkIdList
(
clerkIdList
);
mqdto
.
setClerkIdList
(
clerkIdList
);
...
@@ -419,11 +418,11 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -419,11 +418,11 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
List
<
String
>
userList
=
new
ArrayList
<>();
List
<
String
>
userList
=
new
ArrayList
<>();
userList
.
add
(
wxUserId
);
userList
.
add
(
wxUserId
);
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
qwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
qwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setUserIds
(
userList
);
messageDTO
.
setUserIds
(
userList
);
messageDTO
.
setPage
(
appUrl
);
messageDTO
.
setPage
(
appUrl
);
messageDTO
.
setTitle
(
StringUtils
.
isNotBlank
(
title
)?
title:
messageTypeEnum
.
getName
());
messageDTO
.
setTitle
(
StringUtils
.
isNotBlank
(
title
)?
title:
messageTypeEnum
.
getName
());
messageDTO
.
setItems
(
items
);
messageDTO
.
setItems
(
items
);
qywxSuiteApiService
.
sendMessage
(
corpid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qywxSuiteApiService
.
sendMessage
(
corpid
,
qwDTO
.
getSelf3thSecret
(
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HandoverOperationApiServiceImpl.java
View file @
973b0041
...
@@ -105,7 +105,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
...
@@ -105,7 +105,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
String
cursor
=
null
;
String
cursor
=
null
;
do
{
do
{
//离职成员客户列表
//离职成员客户列表
unassignedListDTO
=
qywxUserApiService
.
getUnassignedList
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
cursor
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
unassignedListDTO
=
qywxUserApiService
.
getUnassignedList
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
cursor
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
cursor
=
unassignedListDTO
.
getNextCursor
();
cursor
=
unassignedListDTO
.
getNextCursor
();
if
(
CollectionUtils
.
isNotEmpty
(
unassignedListDTO
.
getInfo
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
unassignedListDTO
.
getInfo
()))
{
ret
.
addAll
(
unassignedListDTO
.
getInfo
());
ret
.
addAll
(
unassignedListDTO
.
getInfo
());
...
@@ -146,7 +146,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
...
@@ -146,7 +146,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
logger
.
info
(
"takeover is null={}"
,
dto
.
getTakeoverStaffId
());
logger
.
info
(
"takeover is null={}"
,
dto
.
getTakeoverStaffId
());
return
;
return
;
}
}
QywxTransferCustomerDTO
customerDTO
=
qywxUserApiService
.
transferResult
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
handover
.
getWxUserId
(),
takeover
.
getWxUserId
(),
true
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
QywxTransferCustomerDTO
customerDTO
=
qywxUserApiService
.
transferResult
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
handover
.
getWxUserId
(),
takeover
.
getWxUserId
(),
true
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
if
(
customerDTO
.
getErrcode
()
!=
0
)
{
if
(
customerDTO
.
getErrcode
()
!=
0
)
{
return
;
return
;
}
}
...
@@ -256,7 +256,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
...
@@ -256,7 +256,7 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry
:
handoverStaffExternalMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
String
>>
entry
:
handoverStaffExternalMap
.
entrySet
())
{
String
wxUserId
=
entry
.
getKey
();
String
wxUserId
=
entry
.
getKey
();
List
<
String
>
list
=
entry
.
getValue
();
List
<
String
>
list
=
entry
.
getValue
();
QywxTransferCustomerDTO
transferCustomerResp
=
qywxUserApiService
.
transferCustomer
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
wxUserId
,
takeoverUserId
,
list
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxTransferCustomerDTO
transferCustomerResp
=
qywxUserApiService
.
transferCustomer
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
wxUserId
,
takeoverUserId
,
list
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
transferCustomerResp
.
getErrcode
()
!=
0
)
{
if
(
transferCustomerResp
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"转移异常"
);
logger
.
info
(
"转移异常"
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MaterialApiServiceImpl.java
View file @
973b0041
...
@@ -42,7 +42,6 @@ import com.gic.haoban.manage.service.service.MaterialService;
...
@@ -42,7 +42,6 @@ import com.gic.haoban.manage.service.service.MaterialService;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
...
@@ -148,7 +147,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -148,7 +147,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if
(
type
==
3
)
{
if
(
type
==
3
)
{
String
imgUrl
=
materialDTO
.
getImgUrl
();
String
imgUrl
=
materialDTO
.
getImgUrl
();
logger
.
info
(
"【上传图片】imgUrl={}"
,
imgUrl
);
logger
.
info
(
"【上传图片】imgUrl={}"
,
imgUrl
);
JSONResponse
response
=
qywxSuiteApiService
.
uploadImage
(
qwDTO
.
getThirdCorpid
()
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
imgUrl
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
JSONResponse
response
=
qywxSuiteApiService
.
uploadImage
(
qwDTO
.
getThirdCorpid
()
,
qwDTO
.
getSelf3thSecret
(
),
imgUrl
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"【上传图片返回】response={}"
,
JSON
.
toJSONString
(
response
));
logger
.
info
(
"【上传图片返回】response={}"
,
JSON
.
toJSONString
(
response
));
String
wxImgUrl
=
response
.
getResult
()
==
null
?
""
:
response
.
getResult
().
toString
();
String
wxImgUrl
=
response
.
getResult
()
==
null
?
""
:
response
.
getResult
().
toString
();
materialDTO
.
setWxImgUrl
(
wxImgUrl
);
materialDTO
.
setWxImgUrl
(
wxImgUrl
);
...
@@ -157,7 +156,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -157,7 +156,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
String
[]
arr
=
url
.
split
(
"/"
);
String
[]
arr
=
url
.
split
(
"/"
);
int
count
=
arr
.
length
;
int
count
=
arr
.
length
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
()
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
()
,
qwDTO
.
getSelf3thSecret
(
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
materialDTO
.
setWxLastUploadTime
(
new
Date
());
materialDTO
.
setWxLastUploadTime
(
new
Date
());
materialDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
materialDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
...
@@ -234,7 +233,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -234,7 +233,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
String
imgUrl
=
materialDTO
.
getImgUrl
();
String
imgUrl
=
materialDTO
.
getImgUrl
();
String
oldImgUrl
=
materialDTO
.
getImgUrl
();
String
oldImgUrl
=
materialDTO
.
getImgUrl
();
if
(!
imgUrl
.
equals
(
oldImgUrl
))
{
if
(!
imgUrl
.
equals
(
oldImgUrl
))
{
JSONResponse
response
=
qywxSuiteApiService
.
uploadImage
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
imgUrl
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
JSONResponse
response
=
qywxSuiteApiService
.
uploadImage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
imgUrl
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
String
wxImgUrl
=
response
.
getResult
()
==
null
?
""
:
response
.
getResult
().
toString
();
String
wxImgUrl
=
response
.
getResult
()
==
null
?
""
:
response
.
getResult
().
toString
();
materialDTO
.
setWxImgUrl
(
wxImgUrl
);
materialDTO
.
setWxImgUrl
(
wxImgUrl
);
}
}
...
@@ -243,7 +242,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -243,7 +242,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
String
[]
arr
=
url
.
split
(
"/"
);
String
[]
arr
=
url
.
split
(
"/"
);
int
count
=
arr
.
length
;
int
count
=
arr
.
length
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
materialDTO
.
setWxLastUploadTime
(
new
Date
());
materialDTO
.
setWxLastUploadTime
(
new
Date
());
materialDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
materialDTO
.
setMediaId
(
jp
.
getResult
().
toString
());
...
@@ -292,7 +291,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -292,7 +291,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
}
}
String
[]
arr
=
url
.
split
(
"/"
);
String
[]
arr
=
url
.
split
(
"/"
);
int
count
=
arr
.
length
;
int
count
=
arr
.
length
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
old
.
setWxLastUploadTime
(
new
Date
());
old
.
setWxLastUploadTime
(
new
Date
());
old
.
setMediaId
(
jp
.
getResult
().
toString
());
old
.
setMediaId
(
jp
.
getResult
().
toString
());
...
@@ -469,7 +468,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
...
@@ -469,7 +468,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
QywxMediaTypeEnum
fileType
=
QywxMediaTypeEnum
.
IMAGE
;
QywxMediaTypeEnum
fileType
=
QywxMediaTypeEnum
.
IMAGE
;
int
count
=
arr
.
length
;
int
count
=
arr
.
length
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corPid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
corPid
,
qwDTO
.
getSelf3thSecret
(
),
url
,
arr
[
count
-
1
],
fileType
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
return
jp
.
getResult
().
toString
();
return
jp
.
getResult
().
toString
();
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
973b0041
...
@@ -95,7 +95,6 @@ import com.gic.haoban.manage.service.service.chat.GroupChatService;
...
@@ -95,7 +95,6 @@ import com.gic.haoban.manage.service.service.chat.GroupChatService;
import
com.gic.haoban.manage.service.service.hm.HmLinkService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkService
;
import
com.gic.haoban.manage.service.service.hm.WxUserAddLogService
;
import
com.gic.haoban.manage.service.service.hm.WxUserAddLogService
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.member.api.dto.MemberDTO
;
import
com.gic.member.api.dto.MemberDTO
;
import
com.gic.member.api.dto.MemberSimpleDetailDTO
;
import
com.gic.member.api.dto.MemberSimpleDetailDTO
;
import
com.gic.member.api.dto.MemberSourceDetailDTO
;
import
com.gic.member.api.dto.MemberSourceDetailDTO
;
...
@@ -1112,7 +1111,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -1112,7 +1111,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if
(
qwDTO
==
null
)
{
if
(
qwDTO
==
null
)
{
return
null
;
return
null
;
}
}
return
qywxSuiteApiService
.
taskExternalMessage
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
wxMessageId
,
cursor
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
return
qywxSuiteApiService
.
taskExternalMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
wxMessageId
,
cursor
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
}
/**
/**
...
@@ -1145,7 +1144,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -1145,7 +1144,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if
(
qwDTO
==
null
)
{
if
(
qwDTO
==
null
)
{
return
null
;
return
null
;
}
}
return
qywxSuiteApiService
.
resultExternalMessage
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
wxMessageId
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
return
qywxSuiteApiService
.
resultExternalMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
wxMessageId
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
973b0041
...
@@ -63,7 +63,6 @@ import com.gic.haoban.manage.service.service.WxApplicationService;
...
@@ -63,7 +63,6 @@ import com.gic.haoban.manage.service.service.WxApplicationService;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
...
@@ -596,7 +595,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -596,7 +595,7 @@ public class MessageApiServiceImpl implements MessageApiService {
if
(
qwDTO
.
needOpenUserId3th
())
{
if
(
qwDTO
.
needOpenUserId3th
())
{
wxUserId
=
staff
.
getWxOpenUseId
();
wxUserId
=
staff
.
getWxOpenUseId
();
}
}
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
qwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
qwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setUserIds
(
Arrays
.
asList
(
wxUserId
));
messageDTO
.
setUserIds
(
Arrays
.
asList
(
wxUserId
));
messageDTO
.
setPage
(
messageDTO
.
setPage
(
NoticeMessageTypeEnum
.
OFFLINE_PRE
.
getPageUrl
()
+
NoticeMessageTypeEnum
.
OFFLINE_PRE
.
getPageType
());
NoticeMessageTypeEnum
.
OFFLINE_PRE
.
getPageUrl
()
+
NoticeMessageTypeEnum
.
OFFLINE_PRE
.
getPageType
());
...
@@ -605,7 +604,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -605,7 +604,7 @@ public class MessageApiServiceImpl implements MessageApiService {
map
.
put
(
"事件"
,
message
);
map
.
put
(
"事件"
,
message
);
List
<
ItemDTO
>
items
=
getItemsList
(
map
);
List
<
ItemDTO
>
items
=
getItemsList
(
map
);
messageDTO
.
setItems
(
items
);
messageDTO
.
setItems
(
items
);
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
();
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
();
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MiniprogramSettingServiceImpl.java
View file @
973b0041
...
@@ -20,7 +20,6 @@ import com.gic.haoban.manage.service.entity.TabMiniprogramSetting;
...
@@ -20,7 +20,6 @@ import com.gic.haoban.manage.service.entity.TabMiniprogramSetting;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
...
@@ -64,7 +63,7 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
...
@@ -64,7 +63,7 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
String
[]
arr
=
miniprogramSetting
.
getImageUrl
().
split
(
"/"
);
String
[]
arr
=
miniprogramSetting
.
getImageUrl
().
split
(
"/"
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
miniprogramSetting
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
miniprogramSetting
.
getWxEnterpriseId
())
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
miniprogramSetting
.
getImageUrl
(),
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
miniprogramSetting
.
getImageUrl
(),
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
miniprogramSetting
.
setMediaTime
(
date
);
miniprogramSetting
.
setMediaTime
(
date
);
miniprogramSetting
.
setMediaId
(
jp
.
getResult
().
toString
());
miniprogramSetting
.
setMediaId
(
jp
.
getResult
().
toString
());
...
@@ -119,7 +118,7 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
...
@@ -119,7 +118,7 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
String
[]
arr
=
miniprogramSetting
.
getImageUrl
().
split
(
"/"
);
String
[]
arr
=
miniprogramSetting
.
getImageUrl
().
split
(
"/"
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
boolean
selfFlag
=
qwDTO
.
isSelf
()
;
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
miniprogramSetting
.
getImageUrl
(),
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
miniprogramSetting
.
getImageUrl
(),
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
(),
selfFlag
,
qwDTO
.
getUrlHost
());
if
(
jp
.
getErrorCode
()
==
0
)
{
if
(
jp
.
getErrorCode
()
==
0
)
{
miniprogramSetting
.
setMediaTime
(
date
);
miniprogramSetting
.
setMediaTime
(
date
);
miniprogramSetting
.
setMediaId
(
jp
.
getResult
().
toString
());
miniprogramSetting
.
setMediaId
(
jp
.
getResult
().
toString
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
973b0041
...
@@ -20,7 +20,6 @@ import com.gic.haoban.manage.service.pojo.QywxSyncTagFormatPojo;
...
@@ -20,7 +20,6 @@ import com.gic.haoban.manage.service.pojo.QywxSyncTagFormatPojo;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
import
com.gic.haoban.manage.service.service.QywxTagService
;
import
com.gic.haoban.manage.service.service.QywxTagService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.member.api.dto.MemberTagDTO
;
import
com.gic.member.api.dto.MemberTagDTO
;
import
com.gic.member.api.service.MemberTagService
;
import
com.gic.member.api.service.MemberTagService
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
...
@@ -94,7 +93,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -94,7 +93,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger
.
info
(
"企业标签所在企业不存在"
);
logger
.
info
(
"企业标签所在企业不存在"
);
return
;
return
;
}
}
QywxGetCorpTagListDTO
corpTagListResp
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
null
,
-
1
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxGetCorpTagListDTO
corpTagListResp
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
null
,
-
1
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
corpTagListResp
.
getErrcode
()
!=
0
)
{
if
(
corpTagListResp
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"企业微信标签有问题:{}"
,
wxEnterpriseId
);
logger
.
info
(
"企业微信标签有问题:{}"
,
wxEnterpriseId
);
return
;
return
;
...
@@ -221,7 +220,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -221,7 +220,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagService
.
closeSync
(
wxEnterpriseId
,
memberTagId
);
qywxTagService
.
closeSync
(
wxEnterpriseId
,
memberTagId
);
List
<
String
>
delIds
=
new
ArrayList
<>();
List
<
String
>
delIds
=
new
ArrayList
<>();
delIds
.
add
(
tabQywxTag
.
getQywxGroupKey
());
delIds
.
add
(
tabQywxTag
.
getQywxGroupKey
());
QywxResponseDTO
responseDTO
=
qywxSuiteApiService
.
delCorpTag
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
delIds
,
0
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxResponseDTO
responseDTO
=
qywxSuiteApiService
.
delCorpTag
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
delIds
,
0
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"关闭同步:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
logger
.
info
(
"关闭同步:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
resp
.
setMessage
(
responseDTO
.
getErrmsg
());
resp
.
setMessage
(
responseDTO
.
getErrmsg
());
...
@@ -293,7 +292,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -293,7 +292,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
logger
.
info
(
"新增标签组无需操作:{}"
,
callbackDTO
.
getTagId
());
logger
.
info
(
"新增标签组无需操作:{}"
,
callbackDTO
.
getTagId
());
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
String
>
ids
=
new
ArrayList
<>();
ids
.
add
(
callbackDTO
.
getTagId
());
ids
.
add
(
callbackDTO
.
getTagId
());
QywxGetCorpTagListDTO
tagDetail
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
ids
,
QywxTagRelationTypeEnum
.
TAG_GROUP
.
getType
()
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxGetCorpTagListDTO
tagDetail
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
ids
,
QywxTagRelationTypeEnum
.
TAG_GROUP
.
getType
()
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
tagDetail
.
getErrcode
()
!=
0
)
{
if
(
tagDetail
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"没有关联,无需操作:{}"
,
JSONObject
.
toJSONString
(
tagDetail
));
logger
.
info
(
"没有关联,无需操作:{}"
,
JSONObject
.
toJSONString
(
tagDetail
));
return
;
return
;
...
@@ -306,7 +305,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -306,7 +305,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
//查找对应的标签组 如果标签组关联了
//查找对应的标签组 如果标签组关联了
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
String
>
ids
=
new
ArrayList
<>();
ids
.
add
(
callbackDTO
.
getTagId
());
ids
.
add
(
callbackDTO
.
getTagId
());
QywxGetCorpTagListDTO
tagDetail
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
ids
,
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getType
()
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxGetCorpTagListDTO
tagDetail
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
ids
,
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getType
()
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
tagDetail
.
getErrcode
()
!=
0
)
{
if
(
tagDetail
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"查询失败,无需操作:{}"
,
JSONObject
.
toJSONString
(
tagDetail
));
logger
.
info
(
"查询失败,无需操作:{}"
,
JSONObject
.
toJSONString
(
tagDetail
));
return
;
return
;
...
@@ -413,7 +412,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -413,7 +412,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagDTO
.
setId
(
callbackDTO
.
getTagId
());
qywxTagDTO
.
setId
(
callbackDTO
.
getTagId
());
qywxTagDTO
.
setName
(
qywxGroupKey
.
getQywxGroupName
());
qywxTagDTO
.
setName
(
qywxGroupKey
.
getQywxGroupName
());
qywxTagDTO
.
setOrder
(
qywxGroupKey
.
getOrder
());
qywxTagDTO
.
setOrder
(
qywxGroupKey
.
getOrder
());
qywxSuiteApiService
.
editCorpTagNameOrOrder
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
qywxTagDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qywxSuiteApiService
.
editCorpTagNameOrOrder
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
qywxTagDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
//标签项
//标签项
}
else
if
(
Objects
.
equals
(
relationTypeEnum
.
getTagType
(),
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getTagType
()))
{
}
else
if
(
Objects
.
equals
(
relationTypeEnum
.
getTagType
(),
QywxTagRelationTypeEnum
.
TAG_ITEM
.
getTagType
()))
{
...
@@ -433,7 +432,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -433,7 +432,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagDTO
.
setId
(
callbackDTO
.
getTagId
());
qywxTagDTO
.
setId
(
callbackDTO
.
getTagId
());
qywxTagDTO
.
setName
(
qywxTagItem
.
getQywxTagName
());
qywxTagDTO
.
setName
(
qywxTagItem
.
getQywxTagName
());
qywxTagDTO
.
setOrder
(
qywxTagItem
.
getOrder
());
qywxTagDTO
.
setOrder
(
qywxTagItem
.
getOrder
());
qywxSuiteApiService
.
editCorpTagNameOrOrder
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
qywxTagDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qywxSuiteApiService
.
editCorpTagNameOrOrder
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
qywxTagDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
}
}
}
}
...
@@ -772,7 +771,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -772,7 +771,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
qywxTagDTO
.
setId
(
renameQywxKey
);
qywxTagDTO
.
setId
(
renameQywxKey
);
qywxTagDTO
.
setName
(
name
);
qywxTagDTO
.
setName
(
name
);
qywxTagDTO
.
setOrder
(
order
);
qywxTagDTO
.
setOrder
(
order
);
QywxResponseDTO
responseDTO
=
qywxSuiteApiService
.
editCorpTagNameOrOrder
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
qywxTagDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxResponseDTO
responseDTO
=
qywxSuiteApiService
.
editCorpTagNameOrOrder
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
qywxTagDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"同步名称:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
logger
.
info
(
"同步名称:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
resp
.
setMessage
(
responseDTO
.
getErrmsg
());
resp
.
setMessage
(
responseDTO
.
getErrmsg
());
...
@@ -855,7 +854,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -855,7 +854,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
relation
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
relation
.
getWxEnterpriseId
())
;
List
<
String
>
ids
=
new
ArrayList
<>();
List
<
String
>
ids
=
new
ArrayList
<>();
ids
.
add
(
tabQywxTag
.
getQywxGroupKey
());
ids
.
add
(
tabQywxTag
.
getQywxGroupKey
());
QywxGetCorpTagListDTO
tagDetail
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
ids
,
QywxTagRelationTypeEnum
.
TAG_GROUP
.
getType
()
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxGetCorpTagListDTO
tagDetail
=
qywxSuiteApiService
.
getCorpTagList
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
ids
,
QywxTagRelationTypeEnum
.
TAG_GROUP
.
getType
()
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
tagDetail
.
getErrcode
()
!=
0
)
{
if
(
tagDetail
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"查询失败,无需操作:{}"
,
JSONObject
.
toJSONString
(
tagDetail
));
logger
.
info
(
"查询失败,无需操作:{}"
,
JSONObject
.
toJSONString
(
tagDetail
));
ret
.
put
(
"描述"
,
"查询失败:"
+
tagDetail
.
getErrmsg
());
ret
.
put
(
"描述"
,
"查询失败:"
+
tagDetail
.
getErrmsg
());
...
@@ -958,7 +957,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -958,7 +957,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
}
}
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpid
)
;
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpid
)
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
QywxResponseDTO
responseDTO
=
qywxUserApiService
.
markTag
(
corpid
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
wxUserId
,
externalUserId
,
needSetTagList
,
needDelTagList
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
QywxResponseDTO
responseDTO
=
qywxUserApiService
.
markTag
(
corpid
,
qwDTO
.
getSelf3thSecret
(
),
wxUserId
,
externalUserId
,
needSetTagList
,
needDelTagList
,
qwDTO
.
isSelf
()
,
qwDTO
.
getUrlHost
());
logger
.
info
(
"操作返回:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
logger
.
info
(
"操作返回:{}"
,
JSONObject
.
toJSONString
(
responseDTO
));
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
if
(
responseDTO
.
getErrcode
()
!=
0
)
{
logger
.
info
(
"权限不对,重试三次:{},{}"
,
wxUserId
,
externalUserId
);
logger
.
info
(
"权限不对,重试三次:{},{}"
,
wxUserId
,
externalUserId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
973b0041
...
@@ -30,7 +30,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
...
@@ -30,7 +30,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.task.RouterConstant
;
import
com.gic.haoban.manage.service.task.RouterConstant
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.haoban.task.api.dto.MqMessageQo
;
import
com.gic.haoban.task.api.dto.MqMessageQo
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
...
@@ -438,7 +437,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -438,7 +437,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
else
{
}
else
{
userIds
.
add
(
relationDTO
.
getQwUserId
());
userIds
.
add
(
relationDTO
.
getQwUserId
());
}
}
QywxExternalcontactResultDTO
configResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
send
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxExternalcontactResultDTO
configResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
send
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"configId:{}"
,
JSON
.
toJSONString
(
configResp
));
logger
.
info
(
"configId:{}"
,
JSON
.
toJSONString
(
configResp
));
String
configId
=
configResp
.
getConfig_id
();
String
configId
=
configResp
.
getConfig_id
();
if
(
StringUtils
.
isBlank
(
configId
))
{
if
(
StringUtils
.
isBlank
(
configId
))
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
973b0041
...
@@ -37,7 +37,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated;
...
@@ -37,7 +37,6 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
...
@@ -252,14 +251,14 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -252,14 +251,14 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
list
.
add
(
wxUserId
);
list
.
add
(
wxUserId
);
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpId
);
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
qwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
qwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setUserIds
(
list
);
messageDTO
.
setUserIds
(
list
);
messageDTO
.
setPage
(
pageUrl
);
messageDTO
.
setPage
(
pageUrl
);
messageDTO
.
setTitle
(
title
);
messageDTO
.
setTitle
(
title
);
messageDTO
.
setItems
(
items
);
messageDTO
.
setItems
(
items
);
logger
.
info
(
"发送参数为corpId============:{},suitId============:{},messageDTO============:{},"
,
corpId
,
config
.
getWxSuiteid
(),
JSONObject
.
toJSONString
(
messageDTO
));
logger
.
info
(
"发送参数为corpId============:{},suitId============:{},messageDTO============:{},"
,
corpId
,
config
.
getWxSuiteid
(),
JSONObject
.
toJSONString
(
messageDTO
));
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpId
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpId
,
qwDTO
.
getSelf3thSecret
(
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"发送===============》{}"
,
b
);
logger
.
info
(
"发送===============》{}"
,
b
);
return
b
;
return
b
;
}
}
...
@@ -308,13 +307,13 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -308,13 +307,13 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
QywxXcxSendMessageDTO
messageDTO
=
new
QywxXcxSendMessageDTO
();
QywxXcxSendMessageDTO
messageDTO
=
new
QywxXcxSendMessageDTO
();
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpId
);
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
qwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
qwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setUserIds
(
Collections
.
singletonList
(
wxUserId
));
messageDTO
.
setUserIds
(
Collections
.
singletonList
(
wxUserId
));
messageDTO
.
setTitle
(
title
);
messageDTO
.
setTitle
(
title
);
messageDTO
.
setItems
(
contentList
);
messageDTO
.
setItems
(
contentList
);
messageDTO
.
setPage
(
pageUrl
);
messageDTO
.
setPage
(
pageUrl
);
logger
.
info
(
"消息发送, corpId : {}, suitId : {}, messageDTO : {}"
,
corpId
,
config
.
getWxSuiteid
(),
JSONObject
.
toJSONString
(
messageDTO
));
logger
.
info
(
"消息发送, corpId : {}, suitId : {}, messageDTO : {}"
,
corpId
,
config
.
getWxSuiteid
(),
JSONObject
.
toJSONString
(
messageDTO
));
boolean
sendResult
=
qywxSuiteApiService
.
sendMessage
(
corpId
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
boolean
sendResult
=
qywxSuiteApiService
.
sendMessage
(
corpId
,
qwDTO
.
getSelf3thSecret
(
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"消息发送结果, sendResult : {}"
,
sendResult
);
logger
.
info
(
"消息发送结果, sendResult : {}"
,
sendResult
);
return
sendResult
;
return
sendResult
;
}
}
...
@@ -361,14 +360,14 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -361,14 +360,14 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
list
.
add
(
wxUserId
);
list
.
add
(
wxUserId
);
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpId
);
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterprise
.
getWxEnterpriseId
())
;
messageDTO
.
setAppid
(
QwUtils
.
getHbAppid
(
qwDTO
,
config
.
getAppid
()
));
messageDTO
.
setAppid
(
qwDTO
.
getHbWxaAppid
(
));
messageDTO
.
setUserIds
(
list
);
messageDTO
.
setUserIds
(
list
);
messageDTO
.
setPage
(
pageUrl
);
messageDTO
.
setPage
(
pageUrl
);
messageDTO
.
setTitle
(
title
);
messageDTO
.
setTitle
(
title
);
messageDTO
.
setItems
(
items
);
messageDTO
.
setItems
(
items
);
logger
.
info
(
"发送消息参数为corpId={},messageDTO={},"
,
corpId
,
JSONObject
.
toJSONString
(
messageDTO
));
logger
.
info
(
"发送消息参数为corpId={},messageDTO={},"
,
corpId
,
JSONObject
.
toJSONString
(
messageDTO
));
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpId
,
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
boolean
b
=
qywxSuiteApiService
.
sendMessage
(
corpId
,
qwDTO
.
getSelf3thSecret
(
),
messageDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"发送消息返回={}"
,
b
);
logger
.
info
(
"发送消息返回={}"
,
b
);
return
b
;
return
b
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmLinkApiServiceImpl.java
View file @
973b0041
...
@@ -61,7 +61,6 @@ import com.gic.haoban.manage.service.service.hm.HmLinkStoreService;
...
@@ -61,7 +61,6 @@ import com.gic.haoban.manage.service.service.hm.HmLinkStoreService;
import
com.gic.haoban.manage.service.service.hm.HmPageService
;
import
com.gic.haoban.manage.service.service.hm.HmPageService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.dto.es.MemberStoreClerkDataDTO
;
import
com.gic.member.api.dto.es.MemberStoreClerkDataDTO
;
import
com.gic.member.api.service.MemberService
;
import
com.gic.member.api.service.MemberService
;
...
@@ -541,7 +540,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -541,7 +540,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
paramsDTO
.
setUser
(
Arrays
.
asList
(
tabHaobanStaff
.
getWxUserId
()));
paramsDTO
.
setUser
(
Arrays
.
asList
(
tabHaobanStaff
.
getWxUserId
()));
}
}
}
}
QywxExternalcontactResultDTO
wxResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
paramsDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxExternalcontactResultDTO
wxResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
paramsDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
log
.
info
(
"创建动态活码参数corpid={},app={},param={},返回={}"
,
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
log
.
info
(
"创建动态活码参数corpid={},app={},param={},返回={}"
,
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
JSON
.
toJSONString
(
paramsDTO
),
JSON
.
toJSONString
(
wxResp
));
JSON
.
toJSONString
(
paramsDTO
),
JSON
.
toJSONString
(
wxResp
));
if
(
null
!=
wxResp
&&
0
==
wxResp
.
getErrcode
())
{
if
(
null
!=
wxResp
&&
0
==
wxResp
.
getErrcode
())
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
973b0041
...
@@ -59,7 +59,6 @@ import com.gic.haoban.manage.service.service.hm.HmQrcodeService;
...
@@ -59,7 +59,6 @@ import com.gic.haoban.manage.service.service.hm.HmQrcodeService;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
com.gic.haoban.manage.service.service.impl.log.LogRecordAfterServiceImpl
;
import
com.gic.haoban.manage.service.service.impl.log.LogRecordAfterServiceImpl
;
import
com.gic.haoban.manage.service.util.QwFriendLimitCountUtil
;
import
com.gic.haoban.manage.service.util.QwFriendLimitCountUtil
;
import
com.gic.haoban.manage.service.util.QwUtils
;
import
com.gic.log.record.anno.GicLogRecord
;
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
;
...
@@ -158,7 +157,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -158,7 +157,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
qywxExternalcontactDTO
.
setUser
(
userIds
);
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
qywxExternalcontactDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
qywxExternalcontactDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
qywxExternalcontactResultDTO
.
getErrcode
()
!=
0
)
{
if
(
qywxExternalcontactResultDTO
.
getErrcode
()
!=
0
)
{
GicLogRecordEvaluationContext
.
noWriteLog
();
GicLogRecordEvaluationContext
.
noWriteLog
();
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"创建企微活码失败,具体失败原因请参考企微报错http链接:"
+
qywxExternalcontactResultDTO
.
getErrmsg
());
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"创建企微活码失败,具体失败原因请参考企微报错http链接:"
+
qywxExternalcontactResultDTO
.
getErrmsg
());
...
@@ -341,7 +340,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -341,7 +340,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
}
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
qywxExternalcontactDTO
.
setUser
(
userIds
);
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
updateContactWay
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
qywxExternalcontactDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
updateContactWay
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
qywxExternalcontactDTO
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
if
(
qywxResponseDTO
.
getErrcode
()
!=
0
)
{
if
(
qywxResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
error
(
"更新企微活码失败"
);
logger
.
error
(
"更新企微活码失败"
);
GicLogRecordEvaluationContext
.
noWriteLog
();
GicLogRecordEvaluationContext
.
noWriteLog
();
...
@@ -691,7 +690,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -691,7 +690,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
String
wxConfigId
=
hmQrcodeBO
.
getWxConfigId
();
String
wxConfigId
=
hmQrcodeBO
.
getWxConfigId
();
if
(
StringUtils
.
isNotBlank
(
wxConfigId
))
{
if
(
StringUtils
.
isNotBlank
(
wxConfigId
))
{
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
hmQrcodeBO
.
getWxEnterpriseId
());
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
hmQrcodeBO
.
getWxEnterpriseId
());
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
QwUtils
.
getSecret
(
qwDTO
,
config
.
getWxSuiteid
()
),
wxConfigId
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelf3thSecret
(
),
wxConfigId
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
int
errcode
=
qywxResponseDTO
.
getErrcode
();
int
errcode
=
qywxResponseDTO
.
getErrcode
();
//https://open.work.weixin.qq.com/devtool/query?e=41044
//https://open.work.weixin.qq.com/devtool/query?e=41044
if
(
errcode
!=
0
)
{
if
(
errcode
!=
0
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/QwUtils.java
deleted
100644 → 0
View file @
0e4ffc0b
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
public
class
QwUtils
{
public
static
String
getSecret
(
WxEnterpriseQwDTO
qwDTO
,
String
suiteId
)
{
String
secret
=
suiteId
;
if
(
qwDTO
.
isSelf
())
{
secret
=
qwDTO
.
getSelfSecret
();
}
return
secret
;
}
public
static
String
getHbAppid
(
WxEnterpriseQwDTO
qwDTO
,
String
thirdAppid
)
{
String
appid
=
thirdAppid
;
if
(
qwDTO
.
isSelf
())
{
appid
=
qwDTO
.
getSelfAppid
();
}
return
appid
;
}
}
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