|
|
@@ -89,7 +89,9 @@
|
|
|
<result property="recordNum" column="record_num"/>
|
|
|
<result property="pass" column="pass"/>
|
|
|
<result property="cheat" column="cheat"/>
|
|
|
+ <result property="pending" column="pending"/>
|
|
|
<result property="examPass" column="exam_pass"/>
|
|
|
+ <result property="examPending" column="exam_pending"/>
|
|
|
<result property="examCheat" column="exam_cheat"/>
|
|
|
<result property="keyValue" column="key_value"/>
|
|
|
</resultMap>
|
|
|
@@ -277,14 +279,19 @@
|
|
|
= ubr.goods_id where ubr.`status`=1 and ubr.report_status =1 and ubr.user_id=#{userId} and cg.grade_id=cgg.grade_id ) as record_num,
|
|
|
(SELECT COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where
|
|
|
ups.`status` =1 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.user_id = #{userId} and up.type = 1) as pass,
|
|
|
+ (SELECT COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where
|
|
|
+ ups.`status` =2 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.user_id = #{userId} and up.type = 1) as pending,
|
|
|
(SELECT
|
|
|
COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where ups.`status`
|
|
|
=0 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.user_id = #{userId} and up.type = 1) as cheat,
|
|
|
(SELECT COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where
|
|
|
- ups.`status` =1 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.user_id = #{userId} and up.type = 2) as exam_pass,
|
|
|
+ ups.`status` =1 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.user_id = #{userId} and up.grade_id = cg.grade_id and up.type = 2) as exam_pass,
|
|
|
+ (SELECT
|
|
|
+ COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where ups.`status`
|
|
|
+ =0 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.grade_id = cg.grade_id and up.user_id = #{userId} and up.type = 2) as exam_cheat,
|
|
|
(SELECT
|
|
|
COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where ups.`status`
|
|
|
- =0 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.user_id = #{userId} and up.type = 2) as exam_cheat,
|
|
|
+ =2 and ups.period_status = 1 and up.goods_id=#{goodsId} and up.grade_id = cg.grade_id and up.user_id = #{userId} and up.type = 2) as exam_pending,
|
|
|
(SELECT up.key_value FROM user_profile up where up.goods_id = #{goodsId} and up.user_id =#{userId} and up.current_status = 1 and up.type_status =1 LIMIT 1) as key_value
|
|
|
FROM
|
|
|
class_grade_user cgu
|