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
973556ac
Commit
973556ac
authored
Aug 26, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定制通讯录部门id
parent
4b7406c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+8
-1
CustomSwitcher.java
...va/com/gic/haoban/manage/service/util/CustomSwitcher.java
+6
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
973556ac
...
...
@@ -21,6 +21,7 @@ import com.gic.haoban.manage.service.entity.*;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.impl.PreDealServiceImpl
;
import
com.gic.haoban.manage.service.task.BaseSyncOperation
;
import
com.gic.haoban.manage.service.util.CustomSwitcher
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.service.qywx.QywxDepartmentApiService
;
...
...
@@ -544,7 +545,13 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
unlockTask
(
wxEnterpriseId
);
return
"没有配置secret"
;
}
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
=
qywxDepartmentApiService
.
listSelfDepartment
(
qwDTO
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
1
,
qwDTO
.
getUrlHost
());
Map
<
String
,
Integer
>
map
=
CustomSwitcher
.
haoban_department_id
;
int
id
=
1
;
if
(
null
!=
map
&&
null
!=
map
.
get
(
wxEnterpriseId
))
{
id
=
map
.
get
(
wxEnterpriseId
)
;
}
logger
.
info
(
"id={}"
,
id
);
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
=
qywxDepartmentApiService
.
listSelfDepartment
(
qwDTO
.
getDkCorpid
(),
secretSetting
.
getSecretVal
(),
id
,
qwDTO
.
getUrlHost
());
if
(
CollectionUtils
.
isEmpty
(
list
))
{
logger
.
info
(
"企微部门数量0,退出同步"
);
syncTaskService
.
updateTaskStatus
(
taskId
,
SyncTaskStatusEnum
.
exception_close
.
getVal
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/CustomSwitcher.java
View file @
973556ac
...
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.util;
import
com.gic.commons.switcher.Switcher
;
import
com.gic.commons.switcher.SwitcherNamespace
;
import
java.util.Map
;
@SwitcherNamespace
(
"BUZ.qywx.open"
)
public
class
CustomSwitcher
{
...
...
@@ -15,4 +17,7 @@ public class CustomSwitcher {
@Switcher
public
static
String
haoban_one_bind_many
;
@Switcher
public
static
Map
<
String
,
Integer
>
haoban_department_id
;
}
\ 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