|
@ -59,18 +59,20 @@ |
|
|
if(a.aa = 0,c.start_time,null) as start_timeP, |
|
|
if(a.aa = 0,c.start_time,null) as start_timeP, |
|
|
if(a.aa = 1,c.end_time,null) as endTime, |
|
|
if(a.aa = 1,c.end_time,null) as endTime, |
|
|
if(a.aa = 0,c.end_time,null) as endTimeP |
|
|
if(a.aa = 0,c.end_time,null) as endTimeP |
|
|
|
|
|
|
|
|
FROM |
|
|
FROM |
|
|
`t_compete_project_config` c |
|
|
`t_compete_project_config` c |
|
|
LEFT JOIN t_compete_project p on c.project_id = p.id |
|
|
LEFT JOIN t_compete_project p on c.project_id = p.id |
|
|
LEFT JOIN ( |
|
|
LEFT JOIN ( |
|
|
SELECT |
|
|
SELECT |
|
|
id, |
|
|
id, |
|
|
if(FROM_UNIXTIME(start_time/1000,'%h') <= 12,1 ,0) as aa |
|
|
if(FROM_UNIXTIME(start_time/1000,'%H') < 12,1 ,0) as aa |
|
|
FROM |
|
|
FROM |
|
|
t_compete_project_config |
|
|
t_compete_project_config b |
|
|
|
|
|
where b.rec_status=0 |
|
|
)a on c.id = a.id |
|
|
)a on c.id = a.id |
|
|
where c.project_id = p.id |
|
|
where c.project_id = p.id |
|
|
|
|
|
and c.rec_status = 0 |
|
|
|
|
|
and p.rec_status = 0 |
|
|
ORDER BY c.start_time |
|
|
ORDER BY c.start_time |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectStartTime" resultType="com.ccsens.mt.bean.po.CompeteProjectConfig" parameterType="java.util.Map"> |
|
|
<select id="selectStartTime" resultType="com.ccsens.mt.bean.po.CompeteProjectConfig" parameterType="java.util.Map"> |
|
|