From 1b76c95b7ab6bf3b937fd78e99f27f45ffbb99bb Mon Sep 17 00:00:00 2001 From: "yunhao.wang" Date: Fri, 16 Nov 2018 10:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=20=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/ImppEnumUtil.java | 70 ++++++++++++++++++- .../i3plus/pojo/platform/bean/RefUserMessage.java | 79 ++++++++++++++++++++++ .../i3plus/pojo/platform/bean/SysMessage.java | 70 +++++++++---------- .../repository/RefUserMessageRepository.java | 14 ++++ 4 files changed, 196 insertions(+), 37 deletions(-) create mode 100644 modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/RefUserMessage.java create mode 100644 modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/RefUserMessageRepository.java diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java index 941a2d4..f71827c 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/ImppEnumUtil.java @@ -417,8 +417,8 @@ public class ImppEnumUtil { @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum USER_MESSAGE_TYPE{ - NOTICE(1,"通知","通知"), - STATION_LETTER(2,"站内信","站内信"); + MAIL(1,"邮件","邮件"), + LETTER(2,"站内信","站内信"); private int value; private String name; @@ -681,4 +681,70 @@ public class ImppEnumUtil { return tmp; } } + + /** + * 消息内容类型 + * 1.SYSTEM:系统参数 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MESSAGE_CONTENT_TYPE{ + + HTML(1,"HTML","text/plain;charset=UTF-8"), + TEXT(2,"TEXT","text/plain;charset=UTF-8"); + + private int value; + private String name; + private String description; + + MESSAGE_CONTENT_TYPE() { + } + + MESSAGE_CONTENT_TYPE(int value, String name, String description) { + this.value = value; + this.name = name; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].name; + } + } + return tmp; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].name.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + } } diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/RefUserMessage.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/RefUserMessage.java new file mode 100644 index 0000000..0126912 --- /dev/null +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/RefUserMessage.java @@ -0,0 +1,79 @@ +package cn.estsh.i3plus.pojo.platform.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 关系-用户消息 + * @Reference : + * @Author : yunhao + * @CreateDate : 2018-11-15 20:35 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="REF_USER_MESSAGE") +@Api(value="关系-表达式与触发器",description = "关系-表达式与触发器") +public class RefUserMessage extends BaseBean { + + @Column(name="MESSAGE_ID") + @ApiParam(value ="消息id" ,example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long messageId; + + public Long getMessageId(){ + if(messageId != null) { + return messageId.longValue(); + }else{ + return messageId; + } + } + + @Column(name="MESSAGE_TITLE_RDD") + @ApiParam(value ="冗余消息标题") + private String messageTitleRdd; + + @Column(name="MESSAGE_TYPE_RDD") + @ApiParam(value ="冗余消息类型") + private Integer messageTypeRdd; + + @Column(name="RECEIVER_ID") + @ApiParam(value ="接收者ID" ,example = "-1") + @JsonSerialize(using = ToStringSerializer.class) + private Long receiverId; + + public Long getReceiverId(){ + if(messageId != null) { + return messageId.longValue(); + }else{ + return messageId; + } + } + + @Column(name="RECEIVER_NAME_RDD") + @ApiParam(value ="接收者名称" ,example = "-1") + private String receiverNameRdd; + + @Column(name="RECEIVER_TIME") + @ApiParam(value = "接收时间") + private String receiverTime; + + @Column(name="MESSAGE_STATUS") + @ApiParam(value = "消息状态") + private Integer messageStatus; +} diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysMessage.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysMessage.java index 56577b5..85f9b40 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysMessage.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysMessage.java @@ -34,53 +34,53 @@ public class SysMessage extends BaseBean { @Column(name="MESSAGE_TITLE") @ApiParam(value ="消息标题" , access ="消息标题") private String messageTitle; - - @Column(name="MESSAGE_TYPE_ID") + + @Column(name="MESSAGE_TYPE") @ApiParam(value ="消息类型(枚举:1.通知,2.站内信)" , example ="-1") - private Integer messageTypeId; + private Integer messageType; + + @Column(name="MESSAGE_CONTENT_TYPE") + @ApiParam(value ="消息内容类型(枚举:1.HTML,2.TEXT)" , example ="-1") + private Integer messageContentType; - @Column(name="MESSAGE_SEND_ID") + @Column(name="MESSAGE_CONTENT") + @ApiParam(value ="消息内容" , access ="消息内容") + private String messageContent; + + @Column(name="MESSAGE_SENDER_ID") @ApiParam(value ="发送者id" , example = "-1") @JsonSerialize(using = ToStringSerializer.class) - private Long messageSendId; + private Long messageSenderId; - public Long getMessageSendId() { - if(messageSendId != null) { - return messageSendId.longValue(); + public Long getMessageSenderId() { + if(messageSenderId != null) { + return messageSenderId.longValue(); }else{ - return messageSendId; + return messageSenderId; } } - @Column(name="RED_SEND_NAME") + @Column(name="MESSAGE_SENDER_NAME_RDD") @ApiParam(value ="发送者名称" ) - @JsonSerialize(using = ToStringSerializer.class) - private String redSendName; - - @Column(name="MESSAGE_RECIPIENT_ID") - @ApiParam(value ="接收者id" , example = "-1") - @JsonSerialize(using = ToStringSerializer.class) - private Long messageRecipientId; + private String messageSenderNameRdd; - public Long getMessageRecipientId() { - if(messageRecipientId != null) { - return messageRecipientId.longValue(); - }else{ - return messageRecipientId; - } - } + @Column(name="MESSAGE_RECEIVERS_ID") + @ApiParam(value ="发送者名称" ) + private String messageReceiversId; - @Column(name="RED_MESSAGE_RECIPIENT_NAME") - @ApiParam(value ="接收者名称" , example = "0") - @JsonSerialize(using = ToStringSerializer.class) - private String redMessageRecipientName; + @Column(name="MESSAGE_RECEIVERS_NAME_RDD") + @ApiParam(value ="接受者名称集合" ) + private String messageReceiversNameRdd; - @Column(name="MESSAGE_CONTENT") - @ApiParam(value ="消息内容" , access ="消息内容") - private String messageContent; - - @Column(name="MESSAGE_STATUS_ID") - @ApiParam(value ="消息状态(枚举:1.已读,2.未读)" , example ="-1") - private Integer messageStatusId; + @Column(name="MESSAGE_SEND_TIME") + @ApiParam(value ="发送时间" ) + private String messageSendTime; + + @Column(name="IS_URGENT") + @ApiParam(value ="是否紧急") + private Integer isUrgent; + @Column(name="IS_SYSTEM") + @ApiParam(value ="是否系统邮件") + private Integer isSystem; } diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/RefUserMessageRepository.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/RefUserMessageRepository.java new file mode 100644 index 0000000..e35acd8 --- /dev/null +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/RefUserMessageRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.platform.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.platform.bean.RefUserMessage; + +/** + * @Description : 关系-用户消息 + * @Reference : + * @Author : yunhao + * @CreateDate : 2018-11-15 20:45 + * @Modify: + **/ +public interface RefUserMessageRepository extends BaseRepository { +}