Joburgess 5 år sedan
förälder
incheckning
89916e34d7

+ 1 - 0
edu-user/edu-user-biz/src/main/java/com/keao/edu/user/dao/ExamRegistrationDao.java

@@ -185,4 +185,5 @@ public interface ExamRegistrationDao extends BaseDAO<Long, ExamRegistration> {
      * @return com.keao.edu.user.dto.OrganExamRegistStatisticsDto
      */
     List<OrganExamRegistStatisticsDto> getOrganExamRegistStatistics(Map<String, Object> params);
+    int countOrganExamRegistStatistics(Map<String, Object> params);
 }

+ 21 - 4
edu-user/edu-user-biz/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -656,13 +656,30 @@
 		FROM
 			organization o
 			LEFT JOIN exam_registration er ON er.organ_id_ = o.id_ AND er.status_ IN ('AUDIT_WAIT', 'AUDIT_PASS', 'AUDIT_REJECT')
-		WHERE o.id_ IN
-			<foreach collection="organIds" item="organId" separator="," open="(" close=")">
-				#{organId}
-			</foreach>
+		WHERE 1=1
+			<if test="organIds!=null">
+				AND o.id_ IN
+				<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+					#{organId}
+				</foreach>
+			</if>
 		GROUP BY
 			o.id_
 		ORDER BY o.id_
 		<include refid="global.limit"/>
 	</select>
+
+	<select id="countOrganExamRegistStatistics" resultType="int">
+		SELECT
+			COUNT(o.id_)
+		FROM
+			organization o
+		WHERE 1=1
+			<if test="organIds!=null">
+				AND o.id_ IN
+				<foreach collection="organIds" item="organId" separator="," open="(" close=")">
+					#{organId}
+				</foreach>
+			</if>
+	</select>
 </mapper>