Browse Source

Merge remote-tracking branch 'origin/master'

lideyin 6 years ago
parent
commit
6f5b9b900e

+ 118 - 0
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/NoticeEntity.java

@@ -0,0 +1,118 @@
+package cn.com.qmth.examcloud.core.examwork.dao.entity;
+
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Index;
+import javax.persistence.Lob;
+import javax.persistence.Table;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import cn.com.qmth.examcloud.api.commons.enums.NoticeStatus;
+import cn.com.qmth.examcloud.web.jpa.WithIdJpaEntity;
+
+/**
+ * 公告
+ *
+ * @author WANGWEI
+ * @date 2019年6月27日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Entity
+@Table(name = "EC_E_EXAM_STUDENT", indexes = {
+		@Index(name = "IDX_E_NOTICE_001001", columnList = "rootOrgId", unique = false)})
+public class NoticeEntity extends WithIdJpaEntity {
+
+	private static final long serialVersionUID = 7071809872436511009L;
+
+	/**
+	 * 学校id
+	 */
+	@Column(nullable = false)
+	private Long rootOrgId;
+
+	/**
+	 * 标题
+	 */
+	@Column(nullable = false, length = 100)
+	private String title;
+
+	/**
+	 * 内容
+	 */
+	@Lob
+	private String content;
+
+	/**
+	 * 发布者
+	 */
+	@Column(nullable = false, length = 100)
+	private String publisher;
+
+	/**
+	 * 发布时间
+	 */
+	@Column(nullable = true)
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	private Date publishTime;
+
+	/**
+	 * 公告状态
+	 */
+	@Column(nullable = false)
+	@Enumerated(EnumType.STRING)
+	private NoticeStatus noticeStatus;
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public String getContent() {
+		return content;
+	}
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	public String getPublisher() {
+		return publisher;
+	}
+
+	public void setPublisher(String publisher) {
+		this.publisher = publisher;
+	}
+
+	public Date getPublishTime() {
+		return publishTime;
+	}
+
+	public void setPublishTime(Date publishTime) {
+		this.publishTime = publishTime;
+	}
+
+	public NoticeStatus getNoticeStatus() {
+		return noticeStatus;
+	}
+
+	public void setNoticeStatus(NoticeStatus noticeStatus) {
+		this.noticeStatus = noticeStatus;
+	}
+
+}

+ 99 - 0
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/NoticeReadEntity.java

@@ -0,0 +1,99 @@
+package cn.com.qmth.examcloud.core.examwork.dao.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Index;
+import javax.persistence.Table;
+
+import cn.com.qmth.examcloud.api.commons.security.bean.UserType;
+import cn.com.qmth.examcloud.web.jpa.WithIdJpaEntity;
+
+/**
+ * 公告阅读记录
+ *
+ * @author WANGWEI
+ * @date 2019年6月27日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Entity
+@Table(name = "EC_E_NOTICE_READ", indexes = {
+		@Index(name = "IDX_E_N_READ_001001", columnList = "noticeId", unique = false),
+		@Index(name = "IDX_E_N_READ_001002", columnList = "noticeId,userType,userId", unique = true)})
+public class NoticeReadEntity extends WithIdJpaEntity {
+
+	private static final long serialVersionUID = 7071809872436511009L;
+
+	/**
+	 * 学校id
+	 */
+	@Column(nullable = false)
+	private Long rootOrgId;
+
+	/**
+	 * 公告ID
+	 */
+	@Column(nullable = false)
+	private Long noticeId;
+
+	/**
+	 * 用户类型
+	 */
+	@Column(nullable = false)
+	@Enumerated(EnumType.STRING)
+	private UserType userType;
+
+	/**
+	 * 用户ID
+	 */
+	@Column(nullable = false)
+	private Long userId;
+
+	/**
+	 * 是否已读
+	 */
+	@Column(nullable = false)
+	private Boolean read;
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getNoticeId() {
+		return noticeId;
+	}
+
+	public void setNoticeId(Long noticeId) {
+		this.noticeId = noticeId;
+	}
+
+	public UserType getUserType() {
+		return userType;
+	}
+
+	public void setUserType(UserType userType) {
+		this.userType = userType;
+	}
+
+	public Long getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Long userId) {
+		this.userId = userId;
+	}
+
+	public Boolean getRead() {
+		return read;
+	}
+
+	public void setRead(Boolean read) {
+		this.read = read;
+	}
+
+}

+ 89 - 0
examcloud-core-examwork-dao/src/main/java/cn/com/qmth/examcloud/core/examwork/dao/entity/NoticeReceiverRuleEntity.java

@@ -0,0 +1,89 @@
+package cn.com.qmth.examcloud.core.examwork.dao.entity;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Index;
+import javax.persistence.Table;
+
+import cn.com.qmth.examcloud.api.commons.enums.NoticeReceiverRuleType;
+import cn.com.qmth.examcloud.web.jpa.WithIdJpaEntity;
+
+/**
+ * 公告接收规则
+ *
+ * @author WANGWEI
+ * @date 2019年6月27日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Entity
+@Table(name = "EC_E_NOTICE_RECEIVER_RULE", indexes = {
+		@Index(name = "IDX_E_N_RULE_001001", columnList = "rootOrgId", unique = false),
+		@Index(name = "IDX_E_N_RULE_001002", columnList = "noticeId", unique = false),
+		@Index(name = "IDX_E_N_RULE_001003", columnList = "noticeId,ruleType,ruleValue", unique = false)})
+public class NoticeReceiverRuleEntity extends WithIdJpaEntity {
+
+	private static final long serialVersionUID = 7071809872436511009L;
+
+	/**
+	 * 学校id
+	 */
+	@Column(nullable = false)
+	private Long rootOrgId;
+
+	/**
+	 * 公告ID
+	 */
+	@Column(nullable = false)
+	private Long noticeId;
+
+	/**
+	 * 规则类型
+	 */
+	@Column(nullable = false)
+	@Enumerated(EnumType.STRING)
+	private NoticeReceiverRuleType ruleType;
+
+	/**
+	 * 规则值<br>
+	 * ruleType=STUDENTS_OF_EXAM,ruleValue为examId<br>
+	 * ruleType=ALL_STUDENTS,ruleValue为null<br>
+	 * ruleType=COMMON_USERS_OF_ROEL,ruleValue为roleId<br>
+	 */
+	@Column(nullable = true, length = 100)
+	private String ruleValue;
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getNoticeId() {
+		return noticeId;
+	}
+
+	public void setNoticeId(Long noticeId) {
+		this.noticeId = noticeId;
+	}
+
+	public NoticeReceiverRuleType getRuleType() {
+		return ruleType;
+	}
+
+	public void setRuleType(NoticeReceiverRuleType ruleType) {
+		this.ruleType = ruleType;
+	}
+
+	public String getRuleValue() {
+		return ruleValue;
+	}
+
+	public void setRuleValue(String ruleValue) {
+		this.ruleValue = ruleValue;
+	}
+
+}

+ 1 - 1
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/bean/ExamSpecialSettingsInfo.java

@@ -6,7 +6,7 @@ import java.util.Map;
 import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
 
 /**
- * 考试机构设置
+ * 考试特殊设置
  *
  * @author WANGWEI
  * @date 2018年5月16日