package com.qianwen.smartman.modules.notify.dto; import java.io.Serializable; import java.util.Date; import com.qianwen.core.tool.utils.BeanUtil; import com.qianwen.core.tool.utils.StringUtil; import com.qianwen.smartman.modules.notify.entity.NotifySubscriberEntity; import com.qianwen.smartman.modules.notify.subscriber.Notify; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/dto/Notification.class */ public class Notification implements Serializable { private String id; private String subscribeId; private String subscriber; private String businessKey; private String businessName; private String message; private Date notifyTime; public void setId(final String id) { this.id = id; } public void setSubscribeId(final String subscribeId) { this.subscribeId = subscribeId; } public void setSubscriber(final String subscriber) { this.subscriber = subscriber; } public void setBusinessKey(final String businessKey) { this.businessKey = businessKey; } public void setBusinessName(final String businessName) { this.businessName = businessName; } public void setMessage(final String message) { this.message = message; } public void setNotifyTime(final Date notifyTime) { this.notifyTime = notifyTime; } public boolean equals(final Object o) { if (o == this) { return true; } if (o instanceof Notification) { Notification other = (Notification) o; if (other.canEqual(this)) { Object this$id = getId(); Object other$id = other.getId(); if (this$id == null) { if (other$id != null) { return false; } } else if (!this$id.equals(other$id)) { return false; } Object this$subscribeId = getSubscribeId(); Object other$subscribeId = other.getSubscribeId(); if (this$subscribeId == null) { if (other$subscribeId != null) { return false; } } else if (!this$subscribeId.equals(other$subscribeId)) { return false; } Object this$subscriber = getSubscriber(); Object other$subscriber = other.getSubscriber(); if (this$subscriber == null) { if (other$subscriber != null) { return false; } } else if (!this$subscriber.equals(other$subscriber)) { return false; } Object this$businessKey = getBusinessKey(); Object other$businessKey = other.getBusinessKey(); if (this$businessKey == null) { if (other$businessKey != null) { return false; } } else if (!this$businessKey.equals(other$businessKey)) { return false; } Object this$businessName = getBusinessName(); Object other$businessName = other.getBusinessName(); if (this$businessName == null) { if (other$businessName != null) { return false; } } else if (!this$businessName.equals(other$businessName)) { return false; } Object this$message = getMessage(); Object other$message = other.getMessage(); if (this$message == null) { if (other$message != null) { return false; } } else if (!this$message.equals(other$message)) { return false; } Object this$notifyTime = getNotifyTime(); Object other$notifyTime = other.getNotifyTime(); return this$notifyTime == null ? other$notifyTime == null : this$notifyTime.equals(other$notifyTime); } return false; } return false; } protected boolean canEqual(final Object other) { return other instanceof Notification; } public int hashCode() { Object $id = getId(); int result = (1 * 59) + ($id == null ? 43 : $id.hashCode()); Object $subscribeId = getSubscribeId(); int result2 = (result * 59) + ($subscribeId == null ? 43 : $subscribeId.hashCode()); Object $subscriber = getSubscriber(); int result3 = (result2 * 59) + ($subscriber == null ? 43 : $subscriber.hashCode()); Object $businessKey = getBusinessKey(); int result4 = (result3 * 59) + ($businessKey == null ? 43 : $businessKey.hashCode()); Object $businessName = getBusinessName(); int result5 = (result4 * 59) + ($businessName == null ? 43 : $businessName.hashCode()); Object $message = getMessage(); int result6 = (result5 * 59) + ($message == null ? 43 : $message.hashCode()); Object $notifyTime = getNotifyTime(); return (result6 * 59) + ($notifyTime == null ? 43 : $notifyTime.hashCode()); } public String toString() { return "Notification(id=" + getId() + ", subscribeId=" + getSubscribeId() + ", subscriber=" + getSubscriber() + ", businessKey=" + getBusinessKey() + ", businessName=" + getBusinessName() + ", message=" + getMessage() + ", notifyTime=" + getNotifyTime() + ")"; } public String getId() { return this.id; } public String getSubscribeId() { return this.subscribeId; } public String getSubscriber() { return this.subscriber; } public String getBusinessKey() { return this.businessKey; } public String getBusinessName() { return this.businessName; } public String getMessage() { return this.message; } public Date getNotifyTime() { return this.notifyTime; } public static Notification from(NotifySubscriberEntity entity) { Notification notification = new Notification(); notification.subscribeId = entity.getId().toString(); notification.subscriber = entity.getSubscriber(); notification.businessKey = entity.getBusinessKey(); return notification; } public Notification copyWithMessage(Notify message) { Notification target = (Notification) BeanUtil.copy(this, Notification.class); target.setId(StringUtil.randomUUID()); target.setMessage(message.getMessage()); target.setSubscribeId(message.getDataId()); target.setNotifyTime(message.getNotifyTime()); return target; } }