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
049d60db
Commit
049d60db
authored
Apr 26, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:离职继承改为消息队列
parent
a61fd045
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
8 deletions
+32
-8
HandoverOperationApiService.java
...aoban/manage/api/service/HandoverOperationApiService.java
+11
-0
HandoverServiceImpl.java
...oban/manage/service/service/impl/HandoverServiceImpl.java
+0
-2
HandoverOperationApiServiceImpl.java
...ice/service/out/impl/HandoverOperationApiServiceImpl.java
+21
-6
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HandoverOperationApiService.java
View file @
049d60db
...
...
@@ -20,11 +20,22 @@ public interface HandoverOperationApiService {
*/
public
void
batchQywxHandoverTimeTask
(
String
params
);
/**
* 处理企微离职继承
*
* @param wxEnterpriseId wx企业标识
* @author mozhu
* @date 2022-04-26 17:29:30
*/
public
void
dealQywxEnterpriseHandoverMq
(
String
wxEnterpriseId
);
/**
* 定时处理企业微信 离职基础的结果(废弃)
*
* @param params
*/
@Deprecated
public
void
BatchQywxHandoverResultTimeTask
(
String
params
);
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/HandoverServiceImpl.java
View file @
049d60db
...
...
@@ -9,7 +9,6 @@ import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import
com.gic.haoban.manage.api.dto.HandoverStaffFriendCountDTO
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.entity.*
;
...
...
@@ -124,7 +123,6 @@ public class HandoverServiceImpl implements HandoverService {
});
handoverExternalMapper
.
insertBatch
(
needAdd
);
}
});
//删除不需要的staff数据
List
<
TabHandoverStaff
>
handoverStaffList
=
handoverStaffMapper
.
listByWxEnterpriseId
(
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HandoverOperationApiServiceImpl.java
View file @
049d60db
...
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.out.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.*
;
...
...
@@ -16,6 +17,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import
com.gic.haoban.manage.service.service.HandoverService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.wechat.api.dto.qywx.QywxTransferCustomerInfoDTO
;
import
com.gic.wechat.api.dto.qywx.QywxUnassignedInfoDTO
;
import
com.gic.wechat.api.dto.qywx.response.QywxGetUnassignedListDTO
;
...
...
@@ -60,17 +62,25 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
@Override
public
void
batchQywxHandoverTimeTask
(
String
params
)
{
logger
.
info
(
"定时拉取离职基础的人员:{}"
,
params
);
logger
.
info
(
"定时拉取离职基础的人员
start
:{}"
,
params
);
List
<
YwWxEnterpriseDTO
>
dtoList
=
wxEnterpriseApiService
.
listAll
();
for
(
YwWxEnterpriseDTO
enterpriseDTO
:
dtoList
)
{
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
try
{
dealQywxEnterpriseHandover
(
enterpriseDTO
.
getWxEnterpriseId
());
dealQywxEnterpriseHandoverResult
(
enterpriseDTO
.
getWxEnterpriseId
());
instance
.
sendMessage
(
"dealQywxEnterpriseHandoverMq"
,
enterpriseDTO
.
getWxEnterpriseId
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
info
(
"商户处理异常:{},{}"
,
JSONObject
.
toJSONString
(
enterpriseDTO
),
e
);
logger
.
info
(
"发送消息队列异常:{},{}"
,
JSONObject
.
toJSONString
(
enterpriseDTO
),
e
);
}
}
logger
.
info
(
"定时拉取离职基础的人员end:{}"
,
params
);
}
@Override
public
void
dealQywxEnterpriseHandoverMq
(
String
wxEnterpriseId
)
{
logger
.
info
(
"离职继承start...{}"
,
wxEnterpriseId
);
dealQywxEnterpriseHandover
(
wxEnterpriseId
);
dealQywxEnterpriseHandoverResult
(
wxEnterpriseId
);
logger
.
info
(
"离职继承end...{}"
,
wxEnterpriseId
);
}
@Override
...
...
@@ -96,11 +106,17 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
handoverService
.
saveHandover
(
wxEnterpriseId
,
allQywxUnassigned
);
}
/**
* 获取离职成员客户列表
* @param wxEnterpriseDTO
* @return
*/
private
List
<
QywxUnassignedInfoDTO
>
getAllQywxUnassigned
(
WxEnterpriseDTO
wxEnterpriseDTO
)
{
List
<
QywxUnassignedInfoDTO
>
ret
=
new
ArrayList
<>();
QywxGetUnassignedListDTO
unassignedListDTO
=
null
;
String
cursor
=
null
;
do
{
//离职成员客户列表
unassignedListDTO
=
qywxUserApiService
.
getUnassignedList
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
cursor
);
cursor
=
unassignedListDTO
.
getNextCursor
();
if
(
CollectionUtils
.
isNotEmpty
(
unassignedListDTO
.
getInfo
()))
{
...
...
@@ -140,7 +156,6 @@ public class HandoverOperationApiServiceImpl implements HandoverOperationApiServ
}
List
<
QywxTransferCustomerInfoDTO
>
customerResults
=
customerDTO
.
getCustomer
();
handoverService
.
dealResult
(
wxEnterpriseId
,
dto
.
getHandoverTransferId
(),
customerResults
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
info
(
"处理异常:{},{}"
,
JSONObject
.
toJSONString
(
dto
),
e
);
...
...
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