yonge 5 years ago
parent
commit
9e4709d2bb

+ 61 - 21
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtraExercilseQueryInfo.java

@@ -10,33 +10,73 @@ import java.util.Date;
  */
  */
 public class ExtraExercilseQueryInfo extends QueryInfo {
 public class ExtraExercilseQueryInfo extends QueryInfo {
 
 
-    private Integer teacherId;
+	private String batchNo;// 批次号
 
 
-    private Integer studentId;
+	private Integer teacherId;
 
 
-    private Date createTime;
+	private Integer studentId;
 
 
-    public Integer getTeacherId() {
-        return teacherId;
-    }
+	private Date createTime;
 
 
-    public void setTeacherId(Integer teacherId) {
-        this.teacherId = teacherId;
-    }
+	private String title;// 作业标题
 
 
-    public Integer getStudentId() {
-        return studentId;
-    }
+	private Date assignStartTime;// 布置作业的开始时间
 
 
-    public void setStudentId(Integer studentId) {
-        this.studentId = studentId;
-    }
+	private Date assignEndTime;// 布置作业的结束时间
 
 
-    public Date getCreateTime() {
-        return createTime;
-    }
+	public Integer getTeacherId() {
+		return teacherId;
+	}
 
 
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+	public void setTeacherId(Integer teacherId) {
+		this.teacherId = teacherId;
+	}
+
+	public Integer getStudentId() {
+		return studentId;
+	}
+
+	public void setStudentId(Integer studentId) {
+		this.studentId = studentId;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getBatchNo() {
+		return batchNo;
+	}
+
+	public void setBatchNo(String batchNo) {
+		this.batchNo = batchNo;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public Date getAssignStartTime() {
+		return assignStartTime;
+	}
+
+	public void setAssignStartTime(Date assignStartTime) {
+		this.assignStartTime = assignStartTime;
+	}
+
+	public Date getAssignEndTime() {
+		return assignEndTime;
+	}
+
+	public void setAssignEndTime(Date assignEndTime) {
+		this.assignEndTime = assignEndTime;
+	}
 }
 }

+ 24 - 1
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml

@@ -20,6 +20,26 @@
 		<result column="create_time_" property="createTime" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 		<result column="update_time_" property="updateTime" />
 	</resultMap>
 	</resultMap>
+
+	<sql id="queryPageCondition">
+		<where>
+			<if test="teacherId != null">
+				teacher_id_ = #{teacherId}
+			</if>
+			<if test="title != null">
+				title_ = #{title}
+			</if>
+			<if test="batchNo != null">
+				batch_no_ = #{batchNo}
+			</if>
+			<if test="assignStartTime != null">
+				AND create_time_ &gt;= #{assignStartTime}
+			</if>
+			<if test="assignEndTime != null">
+				AND create_time_ &lt;= #{assignEndTime}
+			</if>
+		</where>
+	</sql>
 	
 	
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="ExtracurricularExercises" >
 	<select id="get" resultMap="ExtracurricularExercises" >
@@ -87,12 +107,15 @@
 	
 	
 	<!-- 分页查询 -->
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="ExtracurricularExercises" parameterType="map">
 	<select id="queryPage" resultMap="ExtracurricularExercises" parameterType="map">
-		SELECT * FROM extracurricular_exercises ORDER BY id_ <include refid="global.limit"/>
+		SELECT * FROM extracurricular_exercises 
+		<include refid="queryPageCondition"/>
+		ORDER BY id_ <include refid="global.limit"/>
 	</select>
 	</select>
 	
 	
 	<!-- 查询当前表的总记录数 -->
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM extracurricular_exercises
 		SELECT COUNT(*) FROM extracurricular_exercises
+		<include refid="queryPageCondition"/>
 	</select>
 	</select>
 
 
 	<sql id="queryExtraExercisesCondition">
 	<sql id="queryExtraExercisesCondition">