Joburgess 5 lat temu
rodzic
commit
372684ae70

+ 9 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/dao/ExamCertificationDao.java

@@ -0,0 +1,9 @@
+package com.keao.edu.user.dao;
+
+import com.keao.edu.common.dal.BaseDAO;
+import com.keao.edu.user.entity.ExamCertification;
+
+public interface ExamCertificationDao extends BaseDAO<Long, ExamCertification> {
+
+	
+}

+ 144 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamCertification.java

@@ -0,0 +1,144 @@
+package com.keao.edu.user.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(exam_certification):
+ */
+public class ExamCertification {
+
+	private Long id;
+
+	@ApiModelProperty(value = "考级项目编号")
+	private Integer examinationBasicId;
+
+	@ApiModelProperty(value = "学生编号")
+	private Integer studentId;
+
+	@ApiModelProperty(value = "证件号")
+	private String cardNo;
+
+	@ApiModelProperty(value = "专业编号")
+	private Integer subjectId;
+
+	@ApiModelProperty(value = "报考级别")
+	private Integer level;
+
+	@ApiModelProperty(value = "考试开始时间")
+	private java.util.Date examStartTime;
+
+	@ApiModelProperty(value = "考试结束时间")
+	private java.util.Date examEndTime;
+
+	@ApiModelProperty(value = "考试地址")
+	private String examAddress;
+
+	private java.util.Date createTime;
+
+	private java.util.Date updateTime;
+
+	private String tenantId;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setExaminationBasicId(Integer examinationBasicId){
+		this.examinationBasicId = examinationBasicId;
+	}
+	
+	public Integer getExaminationBasicId(){
+		return this.examinationBasicId;
+	}
+			
+	public void setStudentId(Integer studentId){
+		this.studentId = studentId;
+	}
+	
+	public Integer getStudentId(){
+		return this.studentId;
+	}
+			
+	public void setCardNo(String cardNo){
+		this.cardNo = cardNo;
+	}
+	
+	public String getCardNo(){
+		return this.cardNo;
+	}
+			
+	public void setSubjectId(Integer subjectId){
+		this.subjectId = subjectId;
+	}
+	
+	public Integer getSubjectId(){
+		return this.subjectId;
+	}
+			
+	public void setLevel(Integer level){
+		this.level = level;
+	}
+	
+	public Integer getLevel(){
+		return this.level;
+	}
+			
+	public void setExamStartTime(java.util.Date examStartTime){
+		this.examStartTime = examStartTime;
+	}
+	
+	public java.util.Date getExamStartTime(){
+		return this.examStartTime;
+	}
+			
+	public void setExamEndTime(java.util.Date examEndTime){
+		this.examEndTime = examEndTime;
+	}
+	
+	public java.util.Date getExamEndTime(){
+		return this.examEndTime;
+	}
+			
+	public void setExamAddress(String examAddress){
+		this.examAddress = examAddress;
+	}
+	
+	public String getExamAddress(){
+		return this.examAddress;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setTenantId(String tenantId){
+		this.tenantId = tenantId;
+	}
+	
+	public String getTenantId(){
+		return this.tenantId;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

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

@@ -1,7 +1,6 @@
 package com.keao.edu.user.entity;
 
 import com.keao.edu.auth.api.entity.SysUser;
-import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 

+ 97 - 0
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamCertificationMapper.xml

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.keao.edu.user.dao.ExamCertificationDao">
+	
+	<resultMap type="com.keao.edu.user.entity.ExamCertification" id="ExamCertification">
+		<result column="id_" property="id" />
+		<result column="examination_basic_id_" property="examinationBasicId" />
+		<result column="student_id_" property="studentId" />
+		<result column="card_no_" property="cardNo" />
+		<result column="subject_id_" property="subjectId" />
+		<result column="level_" property="level" />
+		<result column="exam_start_time_" property="examStartTime" />
+		<result column="exam_end_time_" property="examEndTime" />
+		<result column="exam_address_" property="examAddress" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="tenant_id_" property="tenantId" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="ExamCertification" >
+		SELECT * FROM exam_certification WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="ExamCertification">
+		SELECT * FROM exam_certification ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamCertification" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO exam_certification (id_,examination_basic_id_,student_id_,card_no_,subject_id_,level_,exam_start_time_,exam_end_time_,exam_address_,create_time_,update_time_,tenant_id_)
+		VALUES(#{id},#{examinationBasicId},#{studentId},#{cardNo},#{subjectId},#{level},#{examStartTime},#{examEndTime},#{examAddress},NOW(),NOW(),#{tenantId})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.keao.edu.user.entity.ExamCertification">
+		UPDATE exam_certification
+		<set>
+			<if test="examinationBasicId != null">
+				examination_basic_id_ = #{examinationBasicId},
+			</if>
+			<if test="subjectId != null">
+				subject_id_ = #{subjectId},
+			</if>
+			<if test="examEndTime != null">
+				exam_end_time_ = #{examEndTime},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="examStartTime != null">
+				exam_start_time_ = #{examStartTime},
+			</if>
+			<if test="tenantId != null">
+				tenant_id_ = #{tenantId},
+			</if>
+			<if test="cardNo != null">
+				card_no_ = #{cardNo},
+			</if>
+			<if test="studentId != null">
+				student_id_ = #{studentId},
+			</if>
+			<if test="level != null">
+				level_ = #{level},
+			</if>
+			<if test="examAddress != null">
+				exam_address_ = #{examAddress},
+			</if>
+			update_time_ = NOW()
+		</set> WHERE id_ = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM exam_certification WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="ExamCertification" parameterType="map">
+		SELECT * FROM exam_certification ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM exam_certification
+	</select>
+</mapper>

+ 10 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -10,8 +10,10 @@
 		<result column="id_" property="id" />
 		<result column="examination_basic_id_" property="examinationBasicId" />
 		<result column="student_id_" property="studentId" />
+		<association property="sysUser" columnPrefix="sys_user_" resultMap="com.keao.edu.user.dao.SysUserDao.SysUser"/>
 		<result column="agency_id_" property="agencyId" />
 		<result column="subject_id_" property="subjectId" />
+		<association property="subject" columnPrefix="subject_" resultMap="com.keao.edu.user.dao.SubjectDao.Subject"/>
 		<result column="level_" property="level" />
 		<result column="song_json_" property="songJson" />
 		<result column="last_exam_level_" property="lastExamLevel" />
@@ -92,10 +94,17 @@
 	<delete id="delete" >
 		DELETE FROM exam_registration WHERE id_ = #{id} 
 	</delete>
+
+	<sql id="queryCondition">
+		<where>
+
+		</where>
+	</sql>
 	
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="ExamRegistration" parameterType="map">
-		SELECT * FROM exam_registration ORDER BY id_ <include refid="global.limit"/>
+		SELECT * FROM exam_registration
+		ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	
 	<!-- 查询当前表的总记录数 -->