【notice\message】message 解析增加返回值

pull/3/head
liuhanqing 2021-01-12 21:54:26 +08:00
parent e84869cc04
commit d144158a9e
1 changed files with 29 additions and 0 deletions

View File

@ -1,9 +1,13 @@
package cn.stylefeng.roses.kernel.message.api.pojo;
import cn.stylefeng.roses.kernel.message.api.enums.MessageProrityLevelEnum;
import cn.stylefeng.roses.kernel.message.api.enums.MessageReadFlagEnum;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
/**
*
@ -69,4 +73,29 @@ public class MessageResponse implements Serializable {
*/
private Integer readFlag;
/**
*
*/
private String priorityLevelValue;
/**
* 0-1-
*/
private String readFlagValue;
public String getPriorityLevelValue(){
AtomicReference<String> value = new AtomicReference<>("");
Optional.ofNullable(this.priorityLevel).ifPresent(val ->{
value.set(MessageProrityLevelEnum.getName(this.priorityLevel));
});
return value.get();
}
public String getReadFlagValue(){
AtomicReference<String> value = new AtomicReference<>("");
Optional.ofNullable(this.readFlag).ifPresent(val ->{
value.set(MessageReadFlagEnum.getName(this.readFlag));
});
return value.get();
}
}