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
1
Merge Requests
1
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
c91b4a32
Commit
c91b4a32
authored
Aug 18, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:报错修改
parent
efdee5c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
TabQywxErrorLogServiceImpl.java
...nage/service/service/impl/TabQywxErrorLogServiceImpl.java
+9
-1
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+12
-8
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/TabQywxErrorLogServiceImpl.java
View file @
c91b4a32
...
...
@@ -10,6 +10,8 @@ import com.gic.haoban.manage.service.pojo.bo.TabQywxErrorLogBO;
import
com.gic.haoban.manage.service.service.QywxErrorLogService
;
import
com.gic.haoban.manage.service.service.WxApplicationService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -24,6 +26,7 @@ import java.util.List;
*/
@Service
public
class
TabQywxErrorLogServiceImpl
implements
QywxErrorLogService
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
TabQywxErrorLogServiceImpl
.
class
);
@Autowired
private
TabQywxErrorLogMapper
tabQywxErrorLogMapper
;
...
...
@@ -41,9 +44,14 @@ public class TabQywxErrorLogServiceImpl implements QywxErrorLogService {
tabQywxErrorLogBO
.
setWxEnterpriseId
(
tabHaobanWxApplication
.
getWxEnterpriseId
());
}
}
wxEnterpriseId
=
tabQywxErrorLogBO
.
getWxEnterpriseId
();
if
(
StringUtils
.
isBlank
(
wxEnterpriseId
))
{
logger
.
error
(
"企业微信id为空,corpid:{}"
,
corpid
);
return
null
;
}
tabQywxErrorLogBO
.
setId
(
UniqueIdUtils
.
uniqueLong
());
tabQywxErrorLogBO
.
setCreateTime
(
new
Date
());
this
.
tabQywxErrorLogMapper
.
insert
(
EntityUtil
.
changeEntityByOrika
(
TabQywxErrorLog
.
class
,
tabQywxErrorLogBO
));
this
.
tabQywxErrorLogMapper
.
insert
(
EntityUtil
.
changeEntityByOrika
(
TabQywxErrorLog
.
class
,
tabQywxErrorLogBO
));
return
tabQywxErrorLogBO
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
c91b4a32
...
...
@@ -133,8 +133,8 @@ public class MessageApiServiceImpl implements MessageApiService {
String
suiteId
=
dto
.
getSuiteId
();
String
authCorpId
=
dto
.
getAuthCorpId
();
String
staffThirdWxEnterpriseId
=
config
.
getStaffThirdWxEnterpriseId
();
if
(
staffThirdWxEnterpriseId
.
contains
(
authCorpId
)
)
{
log
.
info
(
"处理定制特殊企业同步:{}"
,
authCorpId
);
if
(
staffThirdWxEnterpriseId
.
contains
(
authCorpId
))
{
log
.
info
(
"处理定制特殊企业同步:{}"
,
authCorpId
);
if
(
CONTACT_APP
.
equals
(
suiteId
)
||
SELF_APP
.
equals
(
suiteId
))
{
log
.
info
(
"自建和客户联系回调不处理"
);
return
;
...
...
@@ -292,7 +292,9 @@ public class MessageApiServiceImpl implements MessageApiService {
}
departmentIds
.
append
(
department
.
getDepartmentId
()).
append
(
","
);
}
departmentIds
=
new
StringBuilder
(
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
));
if
(
departmentIds
.
length
()
>
0
)
{
departmentIds
=
new
StringBuilder
(
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
));
}
}
else
{
//部门没有修改
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listStaffDepartmentByStaffId
(
staff
.
getStaffId
());
...
...
@@ -300,7 +302,9 @@ public class MessageApiServiceImpl implements MessageApiService {
for
(
TabHaobanStaffDepartmentRelated
tabHaobanStaffDepartmentRelated
:
list
)
{
departmentIds
.
append
(
tabHaobanStaffDepartmentRelated
.
getDepartmentId
()).
append
(
","
);
}
departmentIds
=
new
StringBuilder
(
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
));
if
(
departmentIds
.
length
()
>
0
)
{
departmentIds
=
new
StringBuilder
(
departmentIds
.
substring
(
0
,
departmentIds
.
length
()
-
1
));
}
}
}
StaffDTO
staffDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
);
...
...
@@ -317,7 +321,7 @@ public class MessageApiServiceImpl implements MessageApiService {
if
(
null
!=
user
)
{
Integer
status
=
user
.
getStatus
();
// 1=已激活,2=已禁用,4=未激活,5=退出企业。
log
.
info
(
"企业微信用户状态:{}"
,
status
);
log
.
info
(
"企业微信用户状态:{}"
,
status
);
if
(
status
==
1
)
{
log
.
info
(
"企业微信用户存在,并且已激活无需删除:{}:{}"
,
wxEnterpriseId
,
userid
);
return
;
...
...
@@ -340,7 +344,7 @@ public class MessageApiServiceImpl implements MessageApiService {
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
());
}
}
}
...
...
@@ -705,7 +709,7 @@ public class MessageApiServiceImpl implements MessageApiService {
if
(
null
!=
user
)
{
Integer
status
=
user
.
getStatus
();
// 1=已激活,2=已禁用,4=未激活,5=退出企业。
log
.
info
(
"企业微信用户状态:{}"
,
status
);
log
.
info
(
"企业微信用户状态:{}"
,
status
);
if
(
status
==
1
)
{
log
.
info
(
"企业微信用户存在,并且已激活无需删除:{}:{}"
,
wxEnterpriseId
,
userid
);
return
;
...
...
@@ -728,7 +732,7 @@ public class MessageApiServiceImpl implements MessageApiService {
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
());
}
}
}
...
...
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