REQ-3502: 处理消息重复发送问题
This commit is contained in:
parent
46d0052ef2
commit
79010b65f7
@ -1,16 +1,15 @@
|
||||
package cn.axzo.msg.center.service.dto;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
// 不要删除这个注解
|
||||
@EqualsAndHashCode
|
||||
public class PeerPerson {
|
||||
|
||||
public static PeerPerson nonPerson() {
|
||||
@ -50,6 +49,18 @@ public class PeerPerson {
|
||||
*/
|
||||
private Long workspaceId = 0L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof PeerPerson)) return false;
|
||||
PeerPerson person = (PeerPerson) o;
|
||||
return Objects.equals(personId, person.personId) && Objects.equals(ouId, person.ouId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(personId, ouId);
|
||||
}
|
||||
|
||||
public Long getPersonIdOrDefault() {
|
||||
return personId == null ? 0L : personId;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user