|
@@ -304,6 +304,7 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ AND child = 0
|
|
</where>
|
|
</where>
|
|
GROUP BY
|
|
GROUP BY
|
|
repository_id
|
|
repository_id
|
|
@@ -311,24 +312,25 @@
|
|
|
|
|
|
<select id="countQuestionNumByType" resultType="com.ynfy.buss.exam.question.dto.QuestionDTO">
|
|
<select id="countQuestionNumByType" resultType="com.ynfy.buss.exam.question.dto.QuestionDTO">
|
|
SELECT
|
|
SELECT
|
|
- type,
|
|
|
|
- COUNT(*) as num
|
|
|
|
|
|
+ type,
|
|
|
|
+ COUNT(*) as num
|
|
FROM
|
|
FROM
|
|
- question
|
|
|
|
|
|
+ question
|
|
<where>
|
|
<where>
|
|
repository_id = #{repositoryId}
|
|
repository_id = #{repositoryId}
|
|
|
|
+ AND child = 0
|
|
</where>
|
|
</where>
|
|
GROUP BY
|
|
GROUP BY
|
|
- type
|
|
|
|
|
|
+ type
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="countQuestionType" resultType="com.ynfy.buss.exam.question.dto.QuestionDTO">
|
|
<select id="countQuestionType" resultType="com.ynfy.buss.exam.question.dto.QuestionDTO">
|
|
SELECT
|
|
SELECT
|
|
- repository_id as repositoryId,
|
|
|
|
- type,
|
|
|
|
- COUNT(*) as num
|
|
|
|
|
|
+ repository_id as repositoryId,
|
|
|
|
+ type,
|
|
|
|
+ COUNT(*) as num
|
|
FROM
|
|
FROM
|
|
- question
|
|
|
|
|
|
+ question
|
|
<where>
|
|
<where>
|
|
<if test="repositoryIds !=null and repositoryIds.size()>0">
|
|
<if test="repositoryIds !=null and repositoryIds.size()>0">
|
|
AND repository_id IN
|
|
AND repository_id IN
|
|
@@ -336,9 +338,10 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ AND child = 0
|
|
</where>
|
|
</where>
|
|
GROUP BY
|
|
GROUP BY
|
|
- repository_id,
|
|
|
|
- type
|
|
|
|
|
|
+ repository_id,
|
|
|
|
+ type
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|