com.quhaodian.notice.rest.conver.NotificationSimpleConver Maven / Gradle / Ivy
package com.quhaodian.notice.rest.conver;
import com.quhaodian.data.rest.core.Conver;
import com.quhaodian.notice.data.entity.UserNotification;
import com.quhaodian.notice.rest.domain.simple.NotificationSimple;
public class NotificationSimpleConver implements Conver {
@Override
public NotificationSimple conver(UserNotification source) {
NotificationSimple result = new NotificationSimple();
result.setId(source.getId());
result.setTitle(source.getTitle());
result.setNote(source.getNote());
if (source.getAddDate() != null) {
result.setDate(source.getAddDate().getTime());
}
return result;
}
}