Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-staff
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 72c0e7d7
authored
Jun 29, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
招聘管理:离职后重新添加试岗并审批通过,账号处理
1 parent
654b85f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
6 deletions
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/recruitment/RecruitmentTrialOnboardingService.java
rpc-dj-staff/src/main/java/cn/com/glsx/dj/staff/service/recruitment/RecruitmentTrialOnboardingService.java
View file @
72c0e7d
...
...
@@ -8,6 +8,11 @@ import cn.com.glsx.dj.smartcarlife.model.ServiceMerchant;
import
cn.com.glsx.dj.smartcarlife.remote.SceneMerchantRefRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.SceneRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffBaseInfoRemote
;
import
cn.com.glsx.dj.smartcarlife.enums.StaffStatusEnum
;
import
cn.com.glsx.merchants.model.request.StaffBatchRequest
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.hutool.core.thread.ThreadUtil
;
import
java.util.concurrent.TimeUnit
;
import
cn.com.glsx.dj.staff.dto.recruitment.RecruitmentDemandDetailDTO
;
import
cn.com.glsx.dj.staff.dto.recruitment.RecruitmentProcessResultDTO
;
import
cn.com.glsx.dj.staff.dto.recruitment.RecruitmentTrialOnboardingDTO
;
...
...
@@ -50,6 +55,9 @@ public class RecruitmentTrialOnboardingService {
@Autowired
private
StaffBaseInfoRemote
staffBaseInfoRemote
;
@Autowired
private
MerchantStaffRemote
merchantStaffRemote
;
/**
* 处理试岗人员List
*
...
...
@@ -370,13 +378,43 @@ public class RecruitmentTrialOnboardingService {
}
dto
.
setShopItemList
(
shopItemList
);
// 9. 调用RPC开通驻店账号(幂等逻辑在内)
RpcResponse
<
String
>
response
=
staffBaseInfoRemote
.
initTrialStaff
(
dto
);
if
(
response
.
isSuccess
())
{
log
.
info
(
"试岗审批通过开通驻店账号成功,trialId:{},phone:{}"
,
trialId
,
trial
.
getPhoneNumber
());
}
else
{
log
.
error
(
"试岗审批通过开通驻店账号失败,trialId:{},phone:{},msg:{}"
,
trialId
,
trial
.
getPhoneNumber
(),
response
.
getMessage
());
// 9. 请求账户中心,将关联园区店账号状态恢复为正常
String
phone
=
trial
.
getPhoneNumber
();
for
(
Integer
yqMerchantId
:
yqGroupMap
.
keySet
())
{
try
{
StaffBatchRequest
staffBatchRequest
=
new
StaffBatchRequest
();
staffBatchRequest
.
setStaffPhone
(
phone
);
staffBatchRequest
.
setMerchantId
(
String
.
valueOf
(
yqMerchantId
));
staffBatchRequest
.
setStatus
(
StaffStatusEnum
.
NOT_DELETED
.
getValue
());
log
.
info
(
"试岗审批通过恢复账号状态,phone:{},yqMerchantId:{},trialId:{}"
,
phone
,
yqMerchantId
,
trialId
);
RpcResponse
<
Boolean
>
response
=
merchantStaffRemote
.
updateStaffStatusByPhone
(
staffBatchRequest
);
if
(
response
.
hasResult
())
{
log
.
info
(
"账户中心恢复账号状态成功,phone:{},yqMerchantId:{}"
,
phone
,
yqMerchantId
);
}
else
{
log
.
error
(
"账户中心恢复账号状态失败,phone:{},yqMerchantId:{},msg:{}"
,
phone
,
yqMerchantId
,
response
.
getMessage
());
}
}
catch
(
Exception
e
)
{
log
.
error
(
"账户中心恢复账号状态异常,phone:{},yqMerchantId:{}"
,
phone
,
yqMerchantId
,
e
);
}
}
// 10. 延迟1秒后异步开通驻店账号
ThreadUtil
.
execute
(()
->
{
try
{
TimeUnit
.
SECONDS
.
sleep
(
1
);
RpcResponse
<
String
>
response
=
staffBaseInfoRemote
.
initTrialStaff
(
dto
);
if
(
response
.
isSuccess
())
{
log
.
info
(
"试岗审批通过开通驻店账号成功,trialId:{},phone:{}"
,
trialId
,
phone
);
}
else
{
log
.
error
(
"试岗审批通过开通驻店账号失败,trialId:{},phone:{},msg:{}"
,
trialId
,
phone
,
response
.
getMessage
());
}
}
catch
(
InterruptedException
e
)
{
Thread
.
currentThread
().
interrupt
();
log
.
error
(
"延迟开通驻店账号线程中断,trialId:{}"
,
trialId
,
e
);
}
catch
(
Exception
e
)
{
log
.
error
(
"延迟开通驻店账号异常,trialId:{},phone:{}"
,
trialId
,
phone
,
e
);
}
});
}
/**
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment