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
4c7bc159
Commit
4c7bc159
authored
May 31, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时同步企业微信通讯录列表
parent
b99f847f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
0 deletions
+53
-0
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+7
-0
WxEnterpriseMapper.java
.../haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
+6
-0
WxEnterpriseService.java
...ic/haoban/manage/service/service/WxEnterpriseService.java
+6
-0
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+5
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+19
-0
WxEnterpriseMapper.xml
...-service/src/main/resources/mapper/WxEnterpriseMapper.xml
+10
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
4c7bc159
...
...
@@ -348,5 +348,12 @@ public interface StaffApiService {
* @param params 企业微信id,多个按”,“隔开
*/
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
updateExternalUserId
(
String
params
);
/**
* 定时任务
* 同步企业微信通讯录列表
* @param params 回调参数
* @return
*/
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
syncQywxStaffList
(
String
params
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/WxEnterpriseMapper.java
View file @
4c7bc159
...
...
@@ -89,4 +89,9 @@ public interface WxEnterpriseMapper {
*/
List
<
TabHaobanWxEnterprise
>
listAllByWxSecurityType
(
@Param
(
"wxSecurityType"
)
Integer
wxSecurityType
);
void
updateWxaAppid
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxaAppid"
)
String
wxaAppid
);
/**
* 根据是否配置回调地址查询所有企业微信
* @return
*/
List
<
WxEnterpriseDTO
>
listWxEnterpriseByCallbackFlag
(
@Param
(
"callbackFlag"
)
Integer
callbackFlag
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseService.java
View file @
4c7bc159
...
...
@@ -93,4 +93,10 @@ public interface WxEnterpriseService {
*/
void
deleteByWxEnterpriseId
(
String
wxEnterpriseId
,
String
wxaAppid
)
;
/**
* 根据是否配置回调地址查询所有企业微信
* @return
*/
List
<
WxEnterpriseDTO
>
listWxEnterpriseByCallbackFlag
(
Integer
callbackFlag
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
4c7bc159
...
...
@@ -311,4 +311,9 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
public
void
deleteByWxEnterpriseId
(
String
wxEnterpriseId
,
String
wxaAppid
)
{
this
.
mapper
.
updateWxaAppid
(
wxEnterpriseId
,
wxaAppid
);
}
@Override
public
List
<
WxEnterpriseDTO
>
listWxEnterpriseByCallbackFlag
(
Integer
callbackFlag
)
{
return
this
.
mapper
.
listWxEnterpriseByCallbackFlag
(
callbackFlag
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
4c7bc159
...
...
@@ -1204,4 +1204,23 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"定时刷新成员外部联系人结束"
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
true
);
}
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
syncQywxStaffList
(
String
params
)
{
logger
.
info
(
"定时刷新企业微信通讯录列表信息"
);
//查询所有未配置回调地址的自建应用
List
<
WxEnterpriseDTO
>
enterpriseDTOList
=
wxEnterpriseService
.
listWxEnterpriseByCallbackFlag
(
0
);
if
(
CollUtil
.
isNotEmpty
(
enterpriseDTOList
)){
for
(
WxEnterpriseDTO
dto
:
enterpriseDTOList
){
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
();
logger
.
info
(
"开始刷新:{}"
,
wxEnterpriseId
);
String
taskId
=
dealSyncOperationApiService
.
createQywxTask
(
wxEnterpriseId
,
"后门同步企业微信架构"
,
"定时同步处理"
,
"后门同步企业微信架构"
);
String
ret
=
dealSyncOperationApiService
.
dealQywxDepartment
(
taskId
,
wxEnterpriseId
);
if
(
null
!=
ret
)
{
logger
.
info
(
"企业微信id:{},异常信息返回:{}"
,
wxEnterpriseId
,
ret
);
}
}
}
return
null
;
}
}
haoban-manage3-service/src/main/resources/mapper/WxEnterpriseMapper.xml
View file @
4c7bc159
...
...
@@ -594,4 +594,13 @@
where wx_enterprise_id = #{wxEnterpriseId}
</update>
<select
id=
"listWxEnterpriseByCallbackFlag"
resultType=
"com.gic.haoban.manage.api.dto.WxEnterpriseDTO"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_wx_enterprise
where
status_flag = 1
and callback_flag = #{callbackFlag}
</select>
</mapper>
\ No newline at end of file
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