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
QianQiXiang
haoban-manage3.0
Commits
1bf76dea
Commit
1bf76dea
authored
Apr 14, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5d97088f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
DepartmentApiService.java
...m/gic/haoban/manage/api/service/DepartmentApiService.java
+2
-0
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+6
-0
ApplicationController.java
...c/haoban/manage/web/controller/ApplicationController.java
+9
-4
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DepartmentApiService.java
View file @
1bf76dea
...
...
@@ -160,5 +160,7 @@ public interface DepartmentApiService {
ServiceResponse
<
List
<
DepartmentDTO
>>
listStoreListByStaffId
(
String
wxUserId
);
void
initwxDepartmentMQ
(
String
res
);
boolean
initLock
(
String
wxEnterpriseId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DepartmentApiServiceImpl.java
View file @
1bf76dea
...
...
@@ -513,6 +513,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
RedisUtil
.
unlock
(
"init_enterprise_"
+
wxEnterpriseId
);
}
@Override
public
boolean
initLock
(
String
wxEnterpriseId
){
return
RedisUtil
.
isLocked
(
"init_enterprise_"
+
wxEnterpriseId
);
}
private
void
addAllDepartment
(
List
<
com
.
gic
.
wechat
.
api
.
dto
.
qywx
.
DepartmentDTO
>
list
,
Integer
parentId
,
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ApplicationController.java
View file @
1bf76dea
...
...
@@ -109,9 +109,14 @@ public class ApplicationController extends WebBaseController{
WxEnterpriseDTO
enterpriseDTO
=
this
.
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
enterpriseDTO
!=
null
){
if
(
StringUtils
.
isNotBlank
(
enterpriseDTO
.
getContactSecret
())
&&
enterpriseDTO
.
getContactFlag
()
!=
null
&&
enterpriseDTO
.
getContactFlag
()
==
0
){
this
.
departmentApiService
.
initwxDepartment
(
enterpriseDTO
.
getCorpid
(),
enterpriseDTO
.
getContactSecret
(),
enterpriseDTO
.
getWxEnterpriseId
());
enterpriseDTO
.
setContactFlag
(
1
);
wxEnterpriseApiService
.
update
(
enterpriseDTO
);
log
.
info
(
"【初始化部门调用】{},{},{}"
,
RouterConstant
.
INIT_WX_DEPARTMENT_SERVICENAME
,
RouterConstant
.
INIT_WX_DEPARTMENT_METHODNAME
,
wxEnterpriseId
);
try
{
GICMQClientUtil
.
getClientInstance
().
sendCommonMessage
(
RouterConstant
.
ROUTERTYPE
,
wxEnterpriseId
,
RouterConstant
.
INIT_WX_DEPARTMENT_SERVICENAME
,
RouterConstant
.
INIT_WX_DEPARTMENT_METHODNAME
);
}
catch
(
Exception
e
)
{
log
.
info
(
e
.
getMessage
(),
e
);
}
}
}
...
...
@@ -162,7 +167,7 @@ public class ApplicationController extends WebBaseController{
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
WxEnterpriseDTO
enterpriseDTO
=
this
.
wxEnterpriseApiService
.
getOne
(
wxEnterpriseId
);
if
(
enterpriseDTO
!=
null
){
if
(
StringUtils
.
isNotBlank
(
enterpriseDTO
.
getContactSecret
())
&&
enterpriseDTO
.
getContactFlag
()
!=
null
){
if
(
StringUtils
.
isNotBlank
(
enterpriseDTO
.
getContactSecret
())
&&
enterpriseDTO
.
getContactFlag
()
!=
null
&&
enterpriseDTO
.
getContactFlag
()
==
0
){
log
.
info
(
"【初始化部门调用】{},{},{}"
,
RouterConstant
.
INIT_WX_DEPARTMENT_SERVICENAME
,
RouterConstant
.
INIT_WX_DEPARTMENT_METHODNAME
,
wxEnterpriseId
);
try
{
...
...
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