|
@@ -158,6 +158,8 @@
|
|
|
<result property="makeGoodsCode" column="make_goods_code"/>
|
|
|
<result property="applyStatus" column="apply_status"/>
|
|
|
<result property="beforeStatus" column="before_status"/>
|
|
|
+ <result property="applyName" column="apply_name"/>
|
|
|
+ <result property="beforeName" column="before_name"/>
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
@@ -386,6 +388,8 @@
|
|
|
cgu.user_id,
|
|
|
(case WHEN (SELECT COUNT(1) FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = cgg.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) >0 then 1 ELSE 0 end) as apply_status,
|
|
|
(case WHEN (SELECT COUNT(1) FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) >0 then 1 ELSE 0 end) as before_status
|
|
|
+ (SELECT ea.apply_name FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = cgg.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) as apply_name,
|
|
|
+ (SELECT eb.before_name FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name
|
|
|
FROM
|
|
|
class_grade_user cgu
|
|
|
LEFT JOIN class_grade_goods cgg ON cgu.grade_id = cgg.grade_id
|