dcs 3 months ago
parent
commit
f750715f0a

+ 26 - 0
virgo.manager/src/main/java/com/bosshand/virgo/message/model/NotificationMessage.java

@@ -41,6 +41,16 @@ public class NotificationMessage implements Serializable {
 
     Boolean isCC;
 
+    /**
+     * 组织id
+     */
+    private long organizationId;
+
+    /**
+     * 项目id
+     */
+    private long projectId;
+
     public long getId() {
         return id;
     }
@@ -144,4 +154,20 @@ public class NotificationMessage implements Serializable {
     public void setIsCC(Boolean isCC) {
         this.isCC = isCC;
     }
+
+    public long getOrganizationId() {
+        return organizationId;
+    }
+
+    public void setOrganizationId(long organizationId) {
+        this.organizationId = organizationId;
+    }
+
+    public long getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(long projectId) {
+        this.projectId = projectId;
+    }
 }

+ 8 - 2
virgo.manager/src/main/resources/mapper/NotificationMessage.xml

@@ -11,6 +11,8 @@
 		<result column="sentTime" property="sentTime" />
 		<result column="viewed" property="viewed" />
 		<result column="userId" property="userId" />
+		<result column="organizationId" property="organizationId" />
+		<result column="projectId" property="projectId" />
 		<result column="sender" property="sender" />
 		<result column="systemMessage" property="systemMessage" />
 		<result column="pushed" property="pushed" />
@@ -31,6 +33,8 @@
 			<if test="messageType != 0">and messageType = #{messageType}</if>
 			<if test="viewed != null">and viewed = #{viewed}</if>
 			<if test="userId != 0">and userId = #{userId}</if>
+			<if test="organizationId != 0">and organizationId = #{organizationId}</if>
+			<if test="projectId != 0">and projectId = #{projectId}</if>
 			<if test="sender != null">and sender = #{sender}</if>
 			<if test="pushed != null">and pushed = #{pushed}</if>
 			<if test="isCC != null">and isCC = #{isCC}</if>
@@ -45,6 +49,8 @@
 			<if test="p.messageType != 0">and a.messageType = #{p.messageType}</if>
 			<if test="p.viewed != null">and a.viewed = #{p.viewed}</if>
 			<if test="p.userId != 0">and a.userId = #{p.userId}</if>
+			<if test="p.organizationId != 0">and a.organizationId = #{p.organizationId}</if>
+			<if test="p.projectId != 0">and a.projectId = #{p.projectId}</if>
 			<if test="p.sender != null">and a.sender = #{p.sender}</if>
 			<if test="p.pushed != null">and a.pushed = #{p.pushed}</if>
 			<if test="p.isCC != null">and a.isCC = #{p.isCC}</if>
@@ -53,8 +59,8 @@
 	</select>
 	
 	<insert id="insert">
-		INSERT INTO mgr_user_message(messageType, title, message, sentTime, viewed, userId, sender, systemMessage, pushed, json, isCC) VALUES
-		(#{messageType}, #{title}, #{message}, now(), #{viewed}, #{userId}, #{sender}, #{systemMessage}, #{pushed}, #{json}, #{isCC})
+		INSERT INTO mgr_user_message(messageType, title, message, sentTime, viewed, userId, organizationId, projectId, sender, systemMessage, pushed, json, isCC) VALUES
+		(#{messageType}, #{title}, #{message}, now(), #{viewed}, #{userId}, #{organizationId}, #{projectId}, #{sender}, #{systemMessage}, #{pushed}, #{json}, #{isCC})
 	</insert>
 
 	<select id="get" resultMap="NotificationMessageResult">