Joburgess há 5 anos atrás
pai
commit
be485bccf5

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

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

+ 81 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/entity/ExamLifecycleLog.java

@@ -0,0 +1,81 @@
+package com.keao.edu.user.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(exam_lifecycle_log):
+ */
+public class ExamLifecycleLog {
+
+	/**  */
+	private Long id;
+	
+	/** 考试项目编号 */
+	private Integer examinationBasicId;
+	
+	/** 事件名称 */
+	private String eventName;
+	
+	/** 操作人编号 */
+	private Integer operatorUserId;
+	
+	/** 备注 */
+	private String memo;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	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 setEventName(String eventName){
+		this.eventName = eventName;
+	}
+	
+	public String getEventName(){
+		return this.eventName;
+	}
+			
+	public void setOperatorUserId(Integer operatorUserId){
+		this.operatorUserId = operatorUserId;
+	}
+	
+	public Integer getOperatorUserId(){
+		return this.operatorUserId;
+	}
+			
+	public void setMemo(String memo){
+		this.memo = memo;
+	}
+	
+	public String getMemo(){
+		return this.memo;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 8 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/ExamLifecycleLogService.java

@@ -0,0 +1,8 @@
+package com.keao.edu.user.service;
+
+import com.keao.edu.common.service.BaseService;
+import com.keao.edu.user.entity.ExamLifecycleLog;
+
+public interface ExamLifecycleLogService extends BaseService<Long, ExamLifecycleLog> {
+
+}

+ 22 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamLifecycleLogServiceImpl.java

@@ -0,0 +1,22 @@
+package com.keao.edu.user.service.impl;
+
+import com.keao.edu.common.dal.BaseDAO;
+import com.keao.edu.common.service.impl.BaseServiceImpl;
+import com.keao.edu.user.dao.ExamLifecycleLogDao;
+import com.keao.edu.user.entity.ExamLifecycleLog;
+import com.keao.edu.user.service.ExamLifecycleLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ExamLifecycleLogServiceImpl extends BaseServiceImpl<Long, ExamLifecycleLog> implements ExamLifecycleLogService {
+	
+	@Autowired
+	private ExamLifecycleLogDao examLifecycleLogDao;
+
+	@Override
+	public BaseDAO<Long, ExamLifecycleLog> getDAO() {
+		return examLifecycleLogDao;
+	}
+	
+}

+ 75 - 0
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamLifecycleLogMapper.xml

@@ -0,0 +1,75 @@
+<?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.ExamLifecycleLogDao">
+	
+	<resultMap type="com.keao.edu.user.entity.ExamLifecycleLog" id="ExamLifecycleLog">
+		<result column="id_" property="id" />
+		<result column="examination_basic_id_" property="examinationBasicId" />
+		<result column="event_name_" property="eventName" />
+		<result column="operator_user_id_" property="operatorUserId" />
+		<result column="memo_" property="memo" />
+		<result column="create_time_" property="createTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="ExamLifecycleLog" >
+		SELECT * FROM exam_lifecycle_log WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="ExamLifecycleLog">
+		SELECT * FROM exam_lifecycle_log ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamLifecycleLog" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO exam_lifecycle_log (id_,examination_basic_id_,event_name_,operator_user_id_,memo_,create_time_)
+		VALUES(#{id},#{examinationBasicId},#{eventName},#{operatorUserId},#{memo},NOW)
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.keao.edu.user.entity.ExamLifecycleLog">
+		UPDATE exam_lifecycle_log
+		<set>
+			<if test="examinationBasicId != null">
+				examination_basic_id_ = #{examinationBasicId},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="memo != null">
+				memo_ = #{memo},
+			</if>
+			<if test="operatorUserId != null">
+				operator_user_id_ = #{operatorUserId},
+			</if>
+			<if test="eventName != null">
+				event_name_ = #{eventName},
+			</if>
+		</set> WHERE id_ = #{id}
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM exam_lifecycle_log WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="ExamLifecycleLog" parameterType="map">
+		SELECT * FROM exam_lifecycle_log ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM exam_lifecycle_log
+	</select>
+</mapper>