Selaa lähdekoodia

修改通知进度表结构

lideyin 6 vuotta sitten
vanhempi
commit
3fbf0ea7b4

+ 9 - 8
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/NoticePublishScheduleEntity.java

@@ -10,6 +10,7 @@ import javax.persistence.Table;
 
 import cn.com.qmth.examcloud.api.commons.enums.PublishStatus;
 import cn.com.qmth.examcloud.web.jpa.JpaEntity;
+import cn.com.qmth.examcloud.web.jpa.WithIdJpaEntity;
 
 /**
  * 公告发布进度实体
@@ -19,16 +20,16 @@ import cn.com.qmth.examcloud.web.jpa.JpaEntity;
  */
 @Entity
 @Table(name = "EC_E_NOTICE_PUBLISH_SCHEDULE", indexes = {
-		@Index(name = "IDX_E_NOTICE_PUBLISH_SCHEDULE_001001", columnList = "rootOrgId", unique = false)})
-public class NoticePublishScheduleEntity extends JpaEntity {
+		@Index(name = "IDX_E_NOTICE_PUBLISH_SCHEDULE_001001", columnList = "rootOrgId", unique = false),
+		@Index(name = "IDX_E_NOTICE_PUBLISH_SCHEDULE_001002", columnList = "rootOrgId,noticeId", unique = true)})
+public class NoticePublishScheduleEntity extends WithIdJpaEntity {
 
 	private static final long serialVersionUID = 7071809872436511009L;
 
 	/**
 	 * 公告id
 	 */
-	@Id
-	private Long id;
+	private Long noticeId;
 
 	/**
 	 * 学校id
@@ -53,12 +54,12 @@ public class NoticePublishScheduleEntity extends JpaEntity {
 	 */
 	private Long maxCommonUserId;
 
-	public Long getId() {
-		return id;
+	public Long getNoticeId() {
+		return noticeId;
 	}
 
-	public void setId(Long id) {
-		this.id = id;
+	public void setNoticeId(Long noticeId) {
+		this.noticeId = noticeId;
 	}
 
 	public Long getRootOrgId() {