|
@@ -166,12 +166,23 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.bank.bo.QuestionQueryBo" resultMap="QuestionResultVo">
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.bank.bo.QuestionQueryBo" resultMap="QuestionResultVo">
|
|
- SELECT DISTINCT
|
|
|
|
|
|
+ SELECT
|
|
q.*
|
|
q.*
|
|
FROM
|
|
FROM
|
|
question q
|
|
question q
|
|
- LEFT JOIN question_business qb ON q.question_id = qb.major_id
|
|
|
|
- AND qb.type = 1
|
|
|
|
|
|
+ LEFT JOIN (SELECT
|
|
|
|
+ major_id,
|
|
|
|
+ type,
|
|
|
|
+ any_value ( education_type_id ),
|
|
|
|
+ any_value ( business_id ),
|
|
|
|
+ any_value ( project_id ),
|
|
|
|
+ any_value ( major_id )
|
|
|
|
+ FROM
|
|
|
|
+ question_business
|
|
|
|
+ where type = 1
|
|
|
|
+ GROUP BY
|
|
|
|
+ major_id,
|
|
|
|
+ type ) qb ON q.question_id = qb.major_id
|
|
WHERE
|
|
WHERE
|
|
1 = 1 AND q.status !=-1
|
|
1 = 1 AND q.status !=-1
|
|
<if test="status != null and status.size()!=0 ">
|
|
<if test="status != null and status.size()!=0 ">
|
|
@@ -205,17 +216,27 @@
|
|
<if test="pageSizeSelf != null and pageSizeSelf != ''">
|
|
<if test="pageSizeSelf != null and pageSizeSelf != ''">
|
|
LIMIT #{currIndex} , #{pageSizeSelf}
|
|
LIMIT #{currIndex} , #{pageSizeSelf}
|
|
</if>
|
|
</if>
|
|
- GROUP BY
|
|
|
|
- q.question_id
|
|
|
|
ORDER BY q.question_id DESC
|
|
ORDER BY q.question_id DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectList_COUNT" resultType="Long">
|
|
<select id="selectList_COUNT" resultType="Long">
|
|
SELECT
|
|
SELECT
|
|
- count(distinct q.question_id)
|
|
|
|
|
|
+ count( q.question_id)
|
|
FROM
|
|
FROM
|
|
question q
|
|
question q
|
|
- LEFT JOIN question_business qb ON q.question_id = qb.major_id and qb.type = 1
|
|
|
|
|
|
+ LEFT JOIN (SELECT
|
|
|
|
+ major_id,
|
|
|
|
+ type,
|
|
|
|
+ any_value ( education_type_id ),
|
|
|
|
+ any_value ( business_id ),
|
|
|
|
+ any_value ( project_id ),
|
|
|
|
+ any_value ( major_id )
|
|
|
|
+ FROM
|
|
|
|
+ question_business
|
|
|
|
+ where type = 1
|
|
|
|
+ GROUP BY
|
|
|
|
+ major_id,
|
|
|
|
+ type ) qb ON q.question_id = qb.major_id
|
|
WHERE
|
|
WHERE
|
|
1 = 1 AND q.status !=-1
|
|
1 = 1 AND q.status !=-1
|
|
<if test="status != null and status.size()!=0 ">
|
|
<if test="status != null and status.size()!=0 ">
|