REQ-3581: 备份
This commit is contained in:
parent
9ef5e0a32d
commit
feb3a427a9
@ -61,7 +61,7 @@ public class OrgManager {
|
||||
// !! org and person
|
||||
|
||||
@Transactional
|
||||
public void maybeCreateOrgPersonAndSetAuthorized(Long ouId, Long personId) {
|
||||
public void addAuthorizedOrgPerson(Long ouId, Long personId) {
|
||||
EssPerson person = getOrCreateOrgPerson(ouId, personId);
|
||||
essPersonDao.setAuthorized(person);
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ class CallbackController implements EssCallbackApi, InitializingBean {
|
||||
OrgAuthorizationFinish result = request.readMsgData(OrgAuthorizationFinish.class);
|
||||
PersonOpenId person = PersonOpenId.parse(result.getProxyOperatorOpenId());
|
||||
if (result.isOpenSuccess()) {
|
||||
orgManager.maybeCreateOrgPersonAndSetAuthorized(person.getOuId(), person.getPersonId());
|
||||
orgManager.addAuthorizedOrgPerson(person.getOuId(), person.getPersonId());
|
||||
orgManager.setOrgAuthorized(person.getOuId(), person.getPersonId());
|
||||
}
|
||||
return IdBuilder.builder()
|
||||
@ -78,7 +78,7 @@ class CallbackController implements EssCallbackApi, InitializingBean {
|
||||
// 员工加入子企业的时候发送此通知
|
||||
registerHandler(CallbackType.ORG_PERSON_JOIN, request -> {
|
||||
PersonOpenId person = PersonOpenId.parse(request.readMsgData(OrgPersonJoin.class).getProxyOperatorOpenId());
|
||||
orgManager.maybeCreateOrgPersonAndSetAuthorized(person.getOuId(), person.getPersonId());
|
||||
orgManager.addAuthorizedOrgPerson(person.getOuId(), person.getPersonId());
|
||||
// 一般情况下只会存在一条记录
|
||||
for (EssSealPerson sealPerson : essSealPersonDao.getByPersonId(person.getPersonId())) {
|
||||
AddSealAuthorizationRequest addSealAuthorizationRequest = new AddSealAuthorizationRequest();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user