REQ-3581: 调整接口
This commit is contained in:
parent
c7bf09589d
commit
bfcd95d00a
@ -1,5 +1,7 @@
|
||||
package cn.axzo.nanopart.ess.api.domain;
|
||||
|
||||
import cn.axzo.nanopart.ess.api.domain.contract.OrgPersonInfo;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@ -11,6 +13,13 @@ public interface OrgPerson {
|
||||
|
||||
Long getPersonId();
|
||||
|
||||
default OrgPersonInfo toOrgPersonInfo() {
|
||||
OrgPersonInfo orgPersonInfo = new OrgPersonInfo();
|
||||
orgPersonInfo.setOuId(getOuId());
|
||||
orgPersonInfo.setPersonId(getPersonId());
|
||||
return orgPersonInfo;
|
||||
}
|
||||
|
||||
static boolean equals(OrgPerson a, OrgPerson b) {
|
||||
return Objects.equals(a.getOuId(), b.getOuId())
|
||||
&& Objects.equals(a.getPersonId(), b.getPersonId());
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package cn.axzo.nanopart.ess.server.ess.domain;
|
||||
|
||||
import cn.axzo.nanopart.ess.api.domain.OrgPerson;
|
||||
import cn.axzo.nanopart.ess.api.domain.contract.OrgPersonInfo;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -39,13 +38,6 @@ public class PersonOpenId implements OrgPerson {
|
||||
return ouId + "_" + personId;
|
||||
}
|
||||
|
||||
public OrgPersonInfo toOrgPersonInfo() {
|
||||
OrgPersonInfo orgPersonInfo = new OrgPersonInfo();
|
||||
orgPersonInfo.setOuId(ouId);
|
||||
orgPersonInfo.setPersonId(personId);
|
||||
return orgPersonInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return toOpenId();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user