wangwei il y a 6 ans
Parent
commit
839aa07ce6

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

@@ -2,6 +2,7 @@ package cn.com.qmth.examcloud.core.examwork.dao.entity;
 
 import java.util.Date;
 
+import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
@@ -33,16 +34,19 @@ public class ExamOrgEntity extends JpaEntity {
 	/**
 	 * 考试ID
 	 */
+	@Column(nullable = false)
 	private Long examId;
 
 	/**
 	 * 顶级机构ID
 	 */
+	@Column(nullable = false)
 	private Long rootOrgId;
 
 	/**
 	 * 机构ID
 	 */
+	@Column(nullable = false)
 	private Long orgId;
 
 	/**

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

@@ -1,5 +1,6 @@
 package cn.com.qmth.examcloud.core.examwork.dao.entity;
 
+import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
@@ -27,10 +28,13 @@ public class ExamOrgPropertyEntity extends JpaEntity {
 	@GeneratedValue
 	private Long id;
 
+	@Column(nullable = false)
 	private Long examId;
 
+	@Column(nullable = false)
 	private Long orgId;
 
+	@Column(nullable = false)
 	private Long keyId;
 
 	@Lob

+ 1 - 0
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -204,6 +204,7 @@ public class ExamServiceImpl implements ExamService {
 		examOrgEntity.setEndTime(examInfo.getEndTime());
 		examOrgEntity.setId(examInfo.getId());
 		examOrgEntity.setRootOrgId(examInfo.getRootOrgId());
+		examOrgEntity.setExamId(examInfo.getExamId());
 
 		Map<ExamProperty, String> map = checkAndGetExamProperties(examInfo.getProperties());