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
6fccf647
Commit
6fccf647
authored
Apr 12, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自建
parent
bfe9d0c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
8 deletions
+47
-8
HmQrcodeTempServiceImpl.java
...nage/service/service/hm/impl/HmQrcodeTempServiceImpl.java
+11
-1
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+6
-1
HmLinkApiServiceImpl.java
...age/service/service/out/impl/hm/HmLinkApiServiceImpl.java
+6
-2
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+24
-4
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeTempServiceImpl.java
View file @
6fccf647
...
...
@@ -11,10 +11,12 @@ import org.springframework.stereotype.Service;
import
com.alibaba.fastjson.JSON
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.hm.HmQrcodeTempMapper
;
import
com.gic.haoban.manage.service.entity.hm.TabHmQrcodeTemp
;
import
com.gic.haoban.manage.service.pojo.qo.HmQrcodeTempQO
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.wechat.api.dto.qywx.response.QywxResponseDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
...
...
@@ -30,6 +32,8 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
private
QywxUserApiService
qywxUserApiService
;
@Autowired
private
Config
config
;
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Override
public
void
save
(
HmQrcodeTempQO
qo
)
{
...
...
@@ -57,7 +61,13 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
String
suiteId
=
config
.
getWxSuiteid
();
String
corpid
=
item
.
getCorpid
();
String
configId
=
item
.
getWxConfigId
();
QywxResponseDTO
resp
=
this
.
qywxUserApiService
.
delContactWay
(
corpid
,
suiteId
,
configId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
item
.
getWxEnterpriseId
());
QywxResponseDTO
resp
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
resp
=
qywxUserApiService
.
delContactWaySelf
(
qwDTO
.
getDkCorpid
()
,
qwDTO
.
getSelfSecret
(),
configId
);
}
else
{
resp
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
suiteId
,
configId
);
}
log
.
info
(
"删除临时活码={}{},返回={}"
,
configId
,
corpid
,
JSON
.
toJSONString
(
resp
));
this
.
hmQrcodeTempMapper
.
deleteByPrimaryKey
(
item
.
getId
());
}
catch
(
Exception
e
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
6fccf647
...
...
@@ -437,7 +437,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
else
{
userIds
.
add
(
relationDTO
.
getQwUserId
());
}
QywxExternalcontactResultDTO
configResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
send
);
QywxExternalcontactResultDTO
configResp
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
configResp
=
qywxUserApiService
.
addContactWaySelf
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
send
);
}
else
{
configResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
send
);
}
logger
.
info
(
"configId:{}"
,
JSON
.
toJSONString
(
configResp
));
String
configId
=
configResp
.
getConfig_id
();
if
(
StringUtils
.
isBlank
(
configId
))
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmLinkApiServiceImpl.java
View file @
6fccf647
...
...
@@ -540,8 +540,12 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
paramsDTO
.
setUser
(
Arrays
.
asList
(
tabHaobanStaff
.
getWxUserId
()));
}
}
QywxExternalcontactResultDTO
wxResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
paramsDTO
);
QywxExternalcontactResultDTO
wxResp
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
wxResp
=
qywxUserApiService
.
addContactWaySelf
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
paramsDTO
);
}
else
{
wxResp
=
qywxUserApiService
.
addContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
paramsDTO
);
}
log
.
info
(
"创建动态活码参数corpid={},app={},param={},返回={}"
,
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
JSON
.
toJSONString
(
paramsDTO
),
JSON
.
toJSONString
(
wxResp
));
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 @
6fccf647
...
...
@@ -159,7 +159,12 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
corpid
,
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWaySelf
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
qywxExternalcontactDTO
);
}
else
{
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
corpid
,
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
}
if
(
qywxExternalcontactResultDTO
.
getErrcode
()
!=
0
)
{
GicLogRecordEvaluationContext
.
noWriteLog
();
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"创建企微活码失败,具体失败原因请参考企微报错http链接:"
+
qywxExternalcontactResultDTO
.
getErrmsg
());
...
...
@@ -342,7 +347,12 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
updateContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
QywxResponseDTO
qywxResponseDTO
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
qywxResponseDTO
=
qywxUserApiService
.
updateContactWaySelf
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
(),
qywxExternalcontactDTO
);
}
else
{
qywxResponseDTO
=
qywxUserApiService
.
updateContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
}
if
(
qywxResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
error
(
"更新企微活码失败"
);
GicLogRecordEvaluationContext
.
noWriteLog
();
...
...
@@ -692,7 +702,12 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
String
wxConfigId
=
hmQrcodeBO
.
getWxConfigId
();
if
(
StringUtils
.
isNotBlank
(
wxConfigId
))
{
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
hmQrcodeBO
.
getWxEnterpriseId
());
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
wxConfigId
);
QywxResponseDTO
qywxResponseDTO
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
qywxResponseDTO
=
qywxUserApiService
.
delContactWaySelf
(
qwDTO
.
getDkCorpid
()
,
qwDTO
.
getSelfSecret
(),
wxConfigId
);
}
else
{
qywxResponseDTO
=
qywxUserApiService
.
delContactWay
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
wxConfigId
);
}
int
errcode
=
qywxResponseDTO
.
getErrcode
();
//https://open.work.weixin.qq.com/devtool/query?e=41044
if
(
errcode
!=
0
)
{
...
...
@@ -817,7 +832,12 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
//查询出所有正常的导购
//企微已经开启联系我
List
<
String
>
wxUserIdsList
=
qywxUserApiService
.
listCorpExternalUser
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
());
List
<
String
>
wxUserIdsList
=
null
;
if
(
qwDTO
.
getWxSecurityType
()==
5
)
{
wxUserIdsList
=
qywxUserApiService
.
listCorpExternalUserSelf
(
qwDTO
.
getDkCorpid
(),
qwDTO
.
getSelfSecret
());
}
else
{
wxUserIdsList
=
qywxUserApiService
.
listCorpExternalUser
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
());
}
this
.
staffService
.
updateOpenConcatFlag
(
wxUserIdsList
,
qwDTO
.
needOpenUserId3th
()?
1
:
0
)
;
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationService
.
listIdsByWxUserIds
(
wxUserIdsList
,
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
staffClerkRelationDTOS
))
{
...
...
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