mirror of
https://github.com/chillzhuang/SpringBlade.git
synced 2024-11-16 23:49:30 +08:00
override hashcode method for Menu.class
This commit is contained in:
parent
30bb595fce
commit
3296b43b48
@ -119,6 +119,11 @@ public class Menu implements Serializable {
|
|||||||
private Integer isDeleted;
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return (this.getId() == null) ? -1 : this.getId();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (this == obj) {
|
if (this == obj) {
|
||||||
@ -134,4 +139,6 @@ public class Menu implements Serializable {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user