新增根据年月日获取预约列表
This commit is contained in:
parent
a6b6142925
commit
64e275b207
|
@ -137,6 +137,17 @@ public class WxCounselorController extends BaseController {
|
|||
return R.ok(reservationService.selectTimeListBy7Day(counselorId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取咨询师预约日历时间段-客户
|
||||
*
|
||||
* @param counselorId 咨询师
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/reservation/day")
|
||||
public R<List<ReservationDayVo>> getReservationTimeList(String day, Long counselorId) {
|
||||
return R.ok(reservationService.selectTimeListByDay(day, counselorId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取预约订单
|
||||
*
|
||||
|
|
|
@ -21,7 +21,21 @@ public interface ReservationDayMapper extends BaseMapperPlus<ReservationDay, Res
|
|||
|
||||
List<ReservationDateVo> selectUseDateList(@Param("time") String time, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询time中大于当天的数据
|
||||
* @param time 年-月
|
||||
* @param day 年-月-日
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<ReservationDateVo> selectNotUseDateList(@Param("time") String time,@Param("day") String day, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询day的数据
|
||||
* @param day 年-月-日
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
//List<ReservationDateVo> selectNotUseDateList(@Param("day") String day, @Param("userId") Long userId);
|
||||
List<ReservationOrderListVo> selectOrderList(@Param("time") String time, @Param("userId") Long userId);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@ public interface IReservationService {
|
|||
|
||||
List<ReservationDayVo> selectTimeListBy7Day(Long counselorId);
|
||||
|
||||
List<ReservationDayVo> selectTimeListByDay(String day,Long counselorId);
|
||||
|
||||
List<ReservationOrderListVo> selectOrderList(String time, Long counselorId);
|
||||
|
||||
/**
|
||||
|
|
|
@ -126,6 +126,22 @@ public class ReservationServiceImpl implements IReservationService {
|
|||
return dayList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReservationDayVo> selectTimeListByDay(String day, Long counselorId) {
|
||||
List<ReservationDayVo> dayList = dayMapper.selectVoList(new LambdaQueryWrapper<ReservationDay>()
|
||||
.eq(ReservationDay::getCounselorId, counselorId)
|
||||
.apply("DATE_FORMAT(day_time, '%Y-%m-%d') =" + day));
|
||||
for (ReservationDayVo one : dayList) {
|
||||
Date dayTime = one.getDayTime();
|
||||
one.setWeek(DateUtils.getWeek(dayTime));
|
||||
List<ReservationTime> timeList = timeMapper.selectList(new LambdaQueryWrapper<ReservationTime>()
|
||||
.eq(ReservationTime::getDayId, one.getId())
|
||||
.orderByAsc(ReservationTime::getStartTime));
|
||||
one.setTimeList(timeList);
|
||||
}
|
||||
return dayList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ReservationOrderListVo> selectOrderList(String time, Long counselorId) {
|
||||
return dayMapper.selectOrderList(time, counselorId);
|
||||
|
|
Loading…
Reference in New Issue