fixbug— 预定展示
This commit is contained in:
@@ -134,6 +134,13 @@ public interface VenueLessonMapper {
|
||||
*/
|
||||
void updateSaleNumBy(@Param("num")Integer num,@Param("lessonId") Integer lessonId);
|
||||
|
||||
/**
|
||||
* APP获取当前预订时间列
|
||||
* @param venueId
|
||||
* @return
|
||||
*/
|
||||
List<String> getLessonTypes(@Param("venueId") Integer venueId);
|
||||
|
||||
/**
|
||||
* APP获取当前预订情况
|
||||
* @param venueId
|
||||
|
||||
@@ -323,6 +323,10 @@ public class VenueLessonService extends BaseServiceImpl {
|
||||
public void updateSaleNum(Integer num,Integer lessonId){
|
||||
venueLessonMapper.updateSaleNumBy(num,lessonId);
|
||||
}
|
||||
@Transactional
|
||||
public List<String> getLessonTypes(Integer venueId) {
|
||||
return venueLessonMapper.getLessonTypes(venueId);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public List<VenueLessonStatus> getLessonOrder(Integer venueId){
|
||||
|
||||
@@ -213,5 +213,10 @@ public class VenueService extends BaseServiceImpl {
|
||||
public void clearNumber(Integer id) {
|
||||
venueMapper.updateNumber(0, id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Venue getVenue(Integer id){
|
||||
return venueMapper.findById(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -604,7 +604,15 @@
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 修改库存 -->
|
||||
<select id="getLessonTypes" resultType="string">
|
||||
select DISTINCT start_time from sv_venue_lesson a
|
||||
where a.date <![CDATA[ >= ]]> DATE_SUB(NOW(),INTERVAL 1 DAY)
|
||||
AND a.date <![CDATA[ <= ]]> DATE_ADD(NOW(),INTERVAL 4 DAY)
|
||||
and a.venue_id = #{venueId}
|
||||
ORDER BY a.start_time
|
||||
</select>
|
||||
|
||||
<!-- 获取预定信息 -->
|
||||
<select id="getLessonStatus" resultType="com.sv.dto.app.VenueLessonStatus">
|
||||
select (select x.name from sv_venue x where x.id = a.venue_id) as 'venueName',
|
||||
a.`name` as 'lessonName',a.date as 'searchDate',
|
||||
@@ -612,14 +620,15 @@
|
||||
a.sale_num as 'saleNum',(a.num-a.sale_num) as 'limitNum',
|
||||
IFNULL(t.orderUsers,'暂无预订') as 'orderUsers',a.note
|
||||
from sv_venue_lesson a LEFT JOIN
|
||||
(select b.lesson_id,group_concat(distinct d.nickname,'(',d.mobile,')' SEPARATOR '<![CDATA[ <br/> ]]>') as 'orderUsers'
|
||||
(select b.lesson_id,group_concat(distinct d.nickname SEPARATOR ',') as 'orderUsers'
|
||||
from sv_member_lesson_ticket b , sv_member d
|
||||
where b.member_id = d.id
|
||||
and b.`status` != '2'
|
||||
GROUP BY b.lesson_id) t on a.id = t.lesson_id
|
||||
where a.date <![CDATA[ >= ]]> NOW()
|
||||
AND a.date <![CDATA[ <= ]]> DATE_ADD(NOW(),INTERVAL 2 DAY)
|
||||
where a.date <![CDATA[ >= ]]> DATE_SUB(NOW(),INTERVAL 1 DAY)
|
||||
AND a.date <![CDATA[ <= ]]> DATE_ADD(NOW(),INTERVAL 4 DAY)
|
||||
and a.venue_id = #{venueId}
|
||||
ORDER BY a.date,a.start_time
|
||||
</select>
|
||||
|
||||
<!-- api 查询需要copy的信息 -->
|
||||
|
||||
Reference in New Issue
Block a user