From d618f890a02db51e0a16c1ca7392754e756e52f2 Mon Sep 17 00:00:00 2001 From: BLRTTX <2232721325@qq.com> Date: Wed, 18 Dec 2024 12:04:04 +0800 Subject: [PATCH] 12.18 --- .../controller/appointment/Appointment.java | 15 ++++++++---- .../app/service/AppointmentInfoService.java | 3 +++ .../impl/AppointmentInfoServiceImpl.java | 8 +++++-- .../vo/appointment/AppointmentSetOrderVo.java | 24 +++++++++++++++++++ 4 files changed, 43 insertions(+), 7 deletions(-) create mode 100644 web/web-app/src/main/java/com/atjy/web/app/vo/appointment/AppointmentSetOrderVo.java diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/appointment/Appointment.java b/web/web-app/src/main/java/com/atjy/web/app/controller/appointment/Appointment.java index d0947eb..2466e09 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/appointment/Appointment.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/appointment/Appointment.java @@ -4,13 +4,11 @@ import com.atjy.common.result.Result; import com.atjy.web.app.service.AppointmentInfoService; import com.atjy.web.app.vo.appointment.AppointmentInfoVo; import com.atjy.web.app.vo.appointment.AppointmentOrderVo; +import com.atjy.web.app.vo.appointment.AppointmentSetOrderVo; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; @Tag(name = "预约信息") @RestController @@ -29,6 +27,13 @@ public class Appointment { @Operation(summary = "获取预约订单") @PostMapping("getAppointmentOrderByIdAndTime") public Result getAppointmentOrderByIdAndTime(@RequestParam Long id, @RequestParam String date) { - return Result.ok(service.getAppointmentOrderByIdAndTime(id,date)); + return Result.ok(service.getAppointmentOrderByIdAndTime(id, date)); + } + + @Operation(summary = "生成预约订单") + @PostMapping("setAppointmentOrder") + public Result setAppointmentOrder(@RequestBody AppointmentSetOrderVo appointmentSetOrderVo) { + service.setAppointmentOrder(appointmentSetOrderVo); + return null; } } diff --git a/web/web-app/src/main/java/com/atjy/web/app/service/AppointmentInfoService.java b/web/web-app/src/main/java/com/atjy/web/app/service/AppointmentInfoService.java index 115b517..64d183c 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/service/AppointmentInfoService.java +++ b/web/web-app/src/main/java/com/atjy/web/app/service/AppointmentInfoService.java @@ -4,10 +4,13 @@ import com.atjy.common.result.Result; import com.atjy.model.entity.AppointmentInfo; import com.atjy.web.app.vo.appointment.AppointmentInfoVo; import com.atjy.web.app.vo.appointment.AppointmentOrderVo; +import com.atjy.web.app.vo.appointment.AppointmentSetOrderVo; import com.baomidou.mybatisplus.extension.service.IService; public interface AppointmentInfoService extends IService { AppointmentInfoVo getAppointmentByIdAndTime(Long id, String date); AppointmentOrderVo getAppointmentOrderByIdAndTime(Long id, String date); + + void setAppointmentOrder(AppointmentSetOrderVo appointmentSetOrderVo); } diff --git a/web/web-app/src/main/java/com/atjy/web/app/service/impl/AppointmentInfoServiceImpl.java b/web/web-app/src/main/java/com/atjy/web/app/service/impl/AppointmentInfoServiceImpl.java index c3bb532..84bb0bc 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/service/impl/AppointmentInfoServiceImpl.java +++ b/web/web-app/src/main/java/com/atjy/web/app/service/impl/AppointmentInfoServiceImpl.java @@ -1,13 +1,12 @@ package com.atjy.web.app.service.impl; -import com.atjy.common.login.LoginUser; import com.atjy.common.login.LoginUserHolder; import com.atjy.model.entity.*; -import com.atjy.web.app.controller.appointment.Appointment; import com.atjy.web.app.mapper.*; import com.atjy.web.app.service.AppointmentInfoService; import com.atjy.web.app.vo.appointment.AppointmentInfoVo; import com.atjy.web.app.vo.appointment.AppointmentOrderVo; +import com.atjy.web.app.vo.appointment.AppointmentSetOrderVo; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; @@ -84,4 +83,9 @@ public class AppointmentInfoServiceImpl extends ServiceImpl