我的预约;处理干预;其他优化
This commit is contained in:
parent
31dfdc388d
commit
262b423933
|
@ -7,12 +7,11 @@ import org.dromara.common.core.validate.EditGroup;
|
|||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.CounselorBo;
|
||||
import org.dromara.scale.domain.bo.CounselorExperienceBo;
|
||||
import org.dromara.scale.domain.bo.CounselorQualificationBo;
|
||||
import org.dromara.scale.domain.bo.ReservationDayBo;
|
||||
import org.dromara.scale.domain.bo.*;
|
||||
import org.dromara.scale.domain.vo.*;
|
||||
import org.dromara.scale.service.ICounselorExperienceService;
|
||||
import org.dromara.scale.service.ICounselorQualificationService;
|
||||
|
@ -63,6 +62,13 @@ public class WxCounselorController extends BaseController {
|
|||
return toAjax(counselorService.updateInfo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 预约列表
|
||||
*/
|
||||
@GetMapping("/reservation/pageList")
|
||||
public TableDataInfo<ReservationOrderVo> reservationPageList(PageQuery pageQuery) {
|
||||
return reservationService.queryReservationPageList(pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预约
|
||||
|
@ -98,6 +104,15 @@ public class WxCounselorController extends BaseController {
|
|||
return R.ok(reservationService.selectOrderList(time, userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
@GetMapping("/order/pageList")
|
||||
public TableDataInfo<ReservationOrderVo> orderPageList(PageQuery pageQuery) {
|
||||
//todo
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取咨询师证书
|
||||
*
|
||||
|
@ -177,4 +192,13 @@ public class WxCounselorController extends BaseController {
|
|||
return toAjax(counselorService.updateByBo(newBo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增干预记录
|
||||
*/
|
||||
@Log(title = "新增干预记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/intervene")
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysInterveneRecordBo bo) {
|
||||
return toAjax(reservationService.insertIntervene(bo));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ public class ReservationOrderVo implements Serializable {
|
|||
|
||||
private Long timeId;
|
||||
|
||||
private Long orderId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String startTime;
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.scale.domain.ReservationTime;
|
||||
import org.dromara.scale.domain.vo.ReservationTimeVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.scale.domain.ReservationTime;
|
||||
import org.dromara.scale.domain.vo.ReservationOrderVo;
|
||||
import org.dromara.scale.domain.vo.ReservationTimeVo;
|
||||
|
||||
/**
|
||||
* 预约-时间Mapper接口
|
||||
|
@ -14,4 +17,6 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||
@Mapper
|
||||
public interface ReservationTimeMapper extends BaseMapperPlus<ReservationTime, ReservationTimeVo> {
|
||||
|
||||
Page<ReservationOrderVo> selectPageList(@Param("page") Page<ReservationTime> page, @Param("counselorId") Long counselorId);
|
||||
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ public interface ICounselorService {
|
|||
|
||||
/**
|
||||
* 修改价格
|
||||
*
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
|
@ -82,9 +83,11 @@ public interface ICounselorService {
|
|||
/**
|
||||
* 校验并批量删除心理咨询师信息
|
||||
*
|
||||
* @param id 待删除的主键集合
|
||||
* @param id 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidById(Long id, Boolean isValid);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package org.dromara.scale.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.scale.domain.bo.ReservationDayBo;
|
||||
import org.dromara.scale.domain.bo.SysInterveneRecordBo;
|
||||
import org.dromara.scale.domain.vo.ReservationDateVo;
|
||||
import org.dromara.scale.domain.vo.ReservationOrderVo;
|
||||
|
||||
|
@ -8,6 +11,15 @@ import java.util.List;
|
|||
|
||||
public interface IReservationService {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询预约列表
|
||||
*
|
||||
* @param pageQuery 分页参数
|
||||
* @return 心理咨询师分页列表
|
||||
*/
|
||||
TableDataInfo<ReservationOrderVo> queryReservationPageList(PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 新增预约
|
||||
*
|
||||
|
@ -21,4 +33,12 @@ public interface IReservationService {
|
|||
List<ReservationDateVo> selectNotUseDateList(String time, Long counselorId);
|
||||
|
||||
List<ReservationOrderVo> selectOrderList(String time, Long counselorId);
|
||||
|
||||
/**
|
||||
* 新增干预记录
|
||||
*
|
||||
* @param bo 干预记录
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertIntervene(SysInterveneRecordBo bo);
|
||||
}
|
||||
|
|
|
@ -186,4 +186,5 @@ public class CounselorServiceImpl implements ICounselorService {
|
|||
}
|
||||
return baseMapper.deleteById(id) > 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
package org.dromara.scale.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.TimeBucket;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.scale.domain.ReservationDay;
|
||||
import org.dromara.scale.domain.ReservationTime;
|
||||
import org.dromara.scale.domain.bo.ReservationDayBo;
|
||||
import org.dromara.scale.domain.bo.SysInterveneRecordBo;
|
||||
import org.dromara.scale.domain.vo.ReservationDateVo;
|
||||
import org.dromara.scale.domain.vo.ReservationOrderVo;
|
||||
import org.dromara.scale.mapper.ReservationDayMapper;
|
||||
|
@ -34,6 +38,12 @@ public class ReservationServiceImpl implements IReservationService {
|
|||
|
||||
private final ReservationTimeMapper timeMapper;
|
||||
|
||||
@Override
|
||||
public TableDataInfo<ReservationOrderVo> queryReservationPageList(PageQuery pageQuery) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
Page<ReservationOrderVo> result = timeMapper.selectPageList(pageQuery.build(), userId);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertByBo(ReservationDayBo bo) {
|
||||
|
@ -85,4 +95,10 @@ public class ReservationServiceImpl implements IReservationService {
|
|||
public List<ReservationOrderVo> selectOrderList(String time, Long counselorId) {
|
||||
return dayMapper.selectOrderList(time, counselorId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean insertIntervene(SysInterveneRecordBo bo) {
|
||||
//todo
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<select id="selectOrderList" resultType="org.dromara.scale.domain.vo.ReservationOrderVo">
|
||||
select u.nick_name as name,
|
||||
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,
|
||||
rt.status
|
||||
|
|
|
@ -4,4 +4,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.scale.mapper.ReservationTimeMapper">
|
||||
|
||||
<select id="selectPageList" resultType="org.dromara.scale.domain.vo.ReservationOrderVo">
|
||||
select u.nick_name as name,
|
||||
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
|
||||
from m_reservation_time rt
|
||||
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}
|
||||
and rt.`status` = 1
|
||||
and ro.order_status = 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue