Joburgess 5 years ago
parent
commit
e621b5f13d

+ 12 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamRegistration.java

@@ -47,6 +47,9 @@ public class ExamRegistration {
 	@ApiModelProperty(value = "指导老师电话")
 	private String adviserPhone;
 
+	@ApiModelProperty(value = "证件号")
+	private String cardNo;
+
 	private java.util.Date createTime;
 
 	private java.util.Date updateTime;
@@ -156,7 +159,15 @@ public class ExamRegistration {
 	public String getAdviserPhone(){
 		return this.adviserPhone;
 	}
-			
+
+	public String getCardNo() {
+		return cardNo;
+	}
+
+	public void setCardNo(String cardNo) {
+		this.cardNo = cardNo;
+	}
+
 	public void setCreateTime(java.util.Date createTime){
 		this.createTime = createTime;
 	}

+ 18 - 19
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -20,6 +20,7 @@
 		<result column="last_exam_certificate_url_" property="lastExamCertificateUrl" />
 		<result column="adviser_name_" property="adviserName" />
 		<result column="adviser_phone_" property="adviserPhone" />
+		<result column="card_no_" property="cardNo" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 		<result column="tenant_id_" property="tenantId" />
@@ -37,13 +38,8 @@
 	
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamRegistration" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		<!--
-		<selectKey resultClass="int" keyProperty="id" > 
-		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
-		</selectKey>
-		-->
-		INSERT INTO exam_registration (id_,examination_basic_id_,student_id_,agency_id_,subject_id_,level_,song_json_,last_exam_level_,last_exam_certificate_url_,adviser_name_,adviser_phone_,create_time_,update_time_,tenant_id_)
-		VALUES(#{id},#{examinationBasicId},#{studentId},#{agencyId},#{subjectId},#{level},#{songJson},#{lastExamLevel},#{lastExamCertificateUrl},#{adviserName},#{adviserPhone},NOW(), NOW(),#{tenantId})
+		INSERT INTO exam_registration (id_,examination_basic_id_,student_id_,agency_id_,subject_id_,level_,song_json_,last_exam_level_,last_exam_certificate_url_,adviser_name_,adviser_phone_,card_no_,create_time_,update_time_,tenant_id_)
+		VALUES(#{id},#{examinationBasicId},#{studentId},#{agencyId},#{subjectId},#{level},#{songJson},#{lastExamLevel},#{lastExamCertificateUrl},#{adviserName},#{adviserPhone},#{cardNo},NOW(), NOW(),#{tenantId})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -51,40 +47,43 @@
 		UPDATE exam_registration
 		<set>
 			<if test="examinationBasicId != null">
-			examination_basic_id_ = #{examinationBasicId},
+				examination_basic_id_ = #{examinationBasicId},
 			</if>
 			<if test="subjectId != null">
-			subject_id_ = #{subjectId},
+				subject_id_ = #{subjectId},
 			</if>
 			<if test="adviserPhone != null">
-			adviser_phone_ = #{adviserPhone},
+				adviser_phone_ = #{adviserPhone},
 			</if>
 			<if test="lastExamLevel != null">
-			last_exam_level_ = #{lastExamLevel},
+				last_exam_level_ = #{lastExamLevel},
 			</if>
 			<if test="id != null">
-			id_ = #{id},
+				id_ = #{id},
 			</if>
 			<if test="tenantId != null">
-			tenant_id_ = #{tenantId},
+				tenant_id_ = #{tenantId},
 			</if>
 			<if test="level != null">
-			level_ = #{level},
+				level_ = #{level},
 			</if>
 			<if test="agencyId != null">
-			agency_id_ = #{agencyId},
+				agency_id_ = #{agencyId},
 			</if>
 			<if test="songJson != null">
-			song_json_ = #{songJson},
+				song_json_ = #{songJson},
 			</if>
 			<if test="adviserName != null">
-			adviser_name_ = #{adviserName},
+				adviser_name_ = #{adviserName},
 			</if>
 			<if test="studentId != null">
-			student_id_ = #{studentId},
+				student_id_ = #{studentId},
 			</if>
 			<if test="lastExamCertificateUrl != null">
-			last_exam_certificate_url_ = #{lastExamCertificateUrl},
+				last_exam_certificate_url_ = #{lastExamCertificateUrl},
+			</if>
+			<if test="cardNo!=null">
+				card_no_ =#{cardNo},
 			</if>
 				update_time_ = NOW()
 		</set> WHERE id_ = #{id}