|
@@ -48,15 +48,19 @@
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findByConcerts" resultMap="ConcertsVOResult" >
|
|
<select id="findByConcerts" resultMap="ConcertsVOResult" >
|
|
|
<![CDATA[ select b.site_place_id,a.name as site_place_name,
|
|
<![CDATA[ select b.site_place_id,a.name as site_place_name,
|
|
|
- b.id,b.start_time,b.end_time ,b.selling_price,
|
|
|
|
|
- CASE
|
|
|
|
|
- WHEN c.order_status <=1 THEN 1
|
|
|
|
|
- ELSE 0
|
|
|
|
|
- END AS concertStatus
|
|
|
|
|
- from nm_site_place a
|
|
|
|
|
- left join nm_site_price_rules b on a.id = b.site_place_id
|
|
|
|
|
- LEFT JOIN nm_order_pro_info c on c.product_id =b.id and c.use_date_str =#{today}
|
|
|
|
|
- where a.site_id = #{siteId} and b.category_id =#{categoryId} and b.day_of_week =#{weekDay} and b.del_flag = 0
|
|
|
|
|
|
|
+ b.id,b.start_time,b.end_time ,b.selling_price,
|
|
|
|
|
+ CASE
|
|
|
|
|
+ WHEN c.order_status <=1 THEN 1
|
|
|
|
|
+ WHEN DATE_ADD(CURRENT_TIME(), INTERVAL 8 HOUR) < TIME(b.end_time)
|
|
|
|
|
+ AND TIME_TO_SEC(TIMEDIFF(TIME(b.end_time), TIME(b.start_time)))/2 >
|
|
|
|
|
+ TIME_TO_SEC(TIMEDIFF(TIME(b.end_time), DATE_ADD(CURRENT_TIME(), INTERVAL 8 HOUR)))
|
|
|
|
|
+ THEN 0
|
|
|
|
|
+ ELSE 1
|
|
|
|
|
+ END AS concertStatus
|
|
|
|
|
+ from nm_site_place a
|
|
|
|
|
+ left join nm_site_price_rules b on a.id = b.site_place_id
|
|
|
|
|
+ LEFT JOIN nm_order_pro_info c on c.product_id =b.id and c.use_date_str =#{today}
|
|
|
|
|
+ where a.site_id = #{siteId} and b.category_id =#{categoryId} and b.day_of_week =#{weekDay} and b.del_flag = 0
|
|
|
]]>
|
|
]]>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findBySidAndCid" resultType="org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO">
|
|
<select id="findBySidAndCid" resultType="org.jeecg.modules.app.vo.stadium.StadiumConcertsResponseVO">
|
|
@@ -84,16 +88,19 @@
|
|
|
g.id = #{id} and g.del_flag = 0
|
|
g.id = #{id} and g.del_flag = 0
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findByConcertsAndTime" resultMap="ConcertsVOResult">
|
|
<select id="findByConcertsAndTime" resultMap="ConcertsVOResult">
|
|
|
- <![CDATA[ select b.site_place_id,a.name as site_place_name,
|
|
|
|
|
- b.id,b.start_time,b.end_time ,b.selling_price,
|
|
|
|
|
- CASE
|
|
|
|
|
- WHEN c.order_status <=1 THEN 1
|
|
|
|
|
- WHEN DATE_ADD(CURRENT_TIME(), INTERVAL 8 HOUR) < TIME(b.end_time) THEN 0
|
|
|
|
|
- ELSE 1
|
|
|
|
|
|
|
+ <![CDATA[ select b.site_place_id,a.name as site_place_name,
|
|
|
|
|
+ b.id,b.start_time,b.end_time ,b.selling_price,
|
|
|
|
|
+ CASE
|
|
|
|
|
+ WHEN c.order_status <=1 THEN 1
|
|
|
|
|
+ WHEN DATE_ADD(CURRENT_TIME(), INTERVAL 8 HOUR) < TIME(b.end_time)
|
|
|
|
|
+ AND TIME_TO_SEC(TIMEDIFF(TIME(b.end_time), TIME(b.start_time)))/2 >
|
|
|
|
|
+ TIME_TO_SEC(TIMEDIFF(TIME(b.end_time), DATE_ADD(CURRENT_TIME(), INTERVAL 8 HOUR)))
|
|
|
|
|
+ THEN 0
|
|
|
|
|
+ ELSE 1
|
|
|
END AS concertStatus
|
|
END AS concertStatus
|
|
|
- from nm_site_place a
|
|
|
|
|
- left join nm_site_price_rules b on a.id = b.site_place_id
|
|
|
|
|
- LEFT JOIN nm_order_pro_info c on c.product_id =b.id and c.use_date_str =#{today}
|
|
|
|
|
|
|
+ from nm_site_place a
|
|
|
|
|
+ left join nm_site_price_rules b on a.id = b.site_place_id
|
|
|
|
|
+ LEFT JOIN nm_order_pro_info c on c.product_id =b.id and c.use_date_str =#{today}
|
|
|
where a.site_id = #{siteId} and b.category_id =#{categoryId} and b.day_of_week =#{weekDay} and b.del_flag = 0
|
|
where a.site_id = #{siteId} and b.category_id =#{categoryId} and b.day_of_week =#{weekDay} and b.del_flag = 0
|
|
|
]]>
|
|
]]>
|
|
|
</select>
|
|
</select>
|