优化预约处理接口
This commit is contained in:
parent
e3f2fe1692
commit
38c3cde726
|
@ -84,7 +84,7 @@ public class WxCounselorController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 预约列表
|
||||
* 预约处理列表
|
||||
*/
|
||||
@GetMapping("/reservation/pageList")
|
||||
public TableDataInfo<ReservationCounselorOrderVo> reservationPageList(PageQuery pageQuery) {
|
||||
|
@ -147,15 +147,6 @@ public class WxCounselorController extends BaseController {
|
|||
return R.ok(reservationService.selectOrderList(time, userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
@GetMapping("/order/pageList")
|
||||
public TableDataInfo<ReservationCounselorOrderVo> orderPageList(PageQuery pageQuery) {
|
||||
//todo
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取咨询师证书
|
||||
*
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.dromara.scale.controller.wx;
|
|||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.service.IReservationService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
@ -19,5 +20,14 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@RequestMapping("/wx/reservation/")
|
||||
public class WxReservationController extends BaseController {
|
||||
|
||||
private IReservationService reservationService;
|
||||
|
||||
/**
|
||||
* 查询咨询师预约列表
|
||||
*/
|
||||
// @GetMapping("/user/reservation/pageList")
|
||||
// public TableDataInfo<ReservationVo> userReservationOrderList(PageQuery pageQuery) {
|
||||
// Long userId = LoginHelper.getUserId();
|
||||
// return reservationService.queryPageList(bo, pageQuery);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ public class ReservationCounselorOrderVo implements Serializable {
|
|||
|
||||
private String name;
|
||||
|
||||
private String dayTime;
|
||||
|
||||
private String startTime;
|
||||
|
||||
private String endTime;
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>TODO<p>
|
||||
*
|
||||
* @author cjw
|
||||
* @version V1.0.0
|
||||
* @date 2024/9/23 15:42
|
||||
*/
|
||||
@Data
|
||||
public class ReservationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM-dd")
|
||||
private Date dayTime;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
|
||||
private Date endTime;
|
||||
|
||||
@Translation(type = TransConstant.USER_ID_TO_NICKNAME)
|
||||
private Long userId;
|
||||
}
|
|
@ -42,7 +42,11 @@ public class ReservationServiceImpl implements IReservationService {
|
|||
private final ReservationTimeMapper timeMapper;
|
||||
private final ReservationOrderMapper reservationOrderMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 预约处理列表 -只捞取未完成的数据
|
||||
* @param pageQuery 分页参数
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ReservationCounselorOrderVo> queryReservationPageList(PageQuery pageQuery) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
|
|
|
@ -9,8 +9,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
rt.id as timeId,
|
||||
ro.id as orderId,
|
||||
DATE_FORMAT(rt.start_time, '%H:%i') as startTime,
|
||||
DATE_FORMAT(rt.end_time, '%H:%i') as endTime
|
||||
DATE_FORMAT(rt.end_time, '%H:%i') as endTime,
|
||||
DATE_FORMAT(rd.day_time, '%Y-%m-%d') as dayTime
|
||||
from m_reservation_time rt
|
||||
left join m_reservation_day rd on rd.id = rt.day_id
|
||||
left join m_reservation_order ro on ro.time_id = rt.id
|
||||
left join sys_user u on u.user_id = ro.create_by
|
||||
where rt.counselor_id = #{counselorId}
|
||||
|
|
Loading…
Reference in New Issue