From 84162f22d348ad8bb631ce70a92a2d88e5a75073 Mon Sep 17 00:00:00 2001 From: BLRTTX <2232721325@qq.com> Date: Thu, 19 Dec 2024 12:25:44 +0800 Subject: [PATCH] 12.19 --- .../atjy/model/entity/UserAppointment.java | 6 +-- .../appointment/AppointmentController.java | 43 +++++++++++++++ .../myself/UserAppointmentController.java | 30 +++++++++++ .../admin/mapper/AppointmentInfoMapper.java | 7 +++ .../admin/mapper/DoctorAppointmentMapper.java | 10 ++++ .../admin/mapper/UserAppointmentMapper.java | 10 ++++ .../admin/service/AppointmentInfoService.java | 8 +++ .../admin/service/UserAppointmentService.java | 8 +++ .../impl/AppointmentInfoServiceImpl.java | 53 +++++++++++++++++++ .../impl/UserAppointmentServiceImpl.java | 11 ++++ ...ntment.java => AppointmentController.java} | 6 +-- .../consult/AiConsultController.java | 2 +- .../controller/doctor/DoctorController.java | 2 +- .../homepage/HomepageController.java | 2 +- .../hospital/HospitalController.java | 2 +- .../app/controller/login/LoginController.java | 2 +- ...er.java => UserAppointmentController.java} | 3 +- .../app/service/DoctorAppointmentService.java | 7 +++ .../impl/AppointmentInfoServiceImpl.java | 8 +-- .../impl/DoctorAppointmentServiceImpl.java | 11 ++++ .../impl/UserAppointmentServiceImpl.java | 4 -- .../mapper/UserAppointmentMapper.xml | 6 +-- 22 files changed, 214 insertions(+), 27 deletions(-) create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/controller/appointment/AppointmentController.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/controller/myself/UserAppointmentController.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/mapper/AppointmentInfoMapper.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/mapper/DoctorAppointmentMapper.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/mapper/UserAppointmentMapper.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/service/AppointmentInfoService.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/service/UserAppointmentService.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/service/impl/AppointmentInfoServiceImpl.java create mode 100644 web/web-admin/src/main/java/com/atjy/web/admin/service/impl/UserAppointmentServiceImpl.java rename web/web-app/src/main/java/com/atjy/web/app/controller/appointment/{Appointment.java => AppointmentController.java} (89%) rename web/web-app/src/main/java/com/atjy/web/app/controller/myself/{AppointmentController.java => UserAppointmentController.java} (96%) create mode 100644 web/web-app/src/main/java/com/atjy/web/app/service/DoctorAppointmentService.java create mode 100644 web/web-app/src/main/java/com/atjy/web/app/service/impl/DoctorAppointmentServiceImpl.java diff --git a/model/src/main/java/com/atjy/model/entity/UserAppointment.java b/model/src/main/java/com/atjy/model/entity/UserAppointment.java index 7d20347..91d69d4 100644 --- a/model/src/main/java/com/atjy/model/entity/UserAppointment.java +++ b/model/src/main/java/com/atjy/model/entity/UserAppointment.java @@ -17,9 +17,9 @@ public class UserAppointment extends BaseEntity { @TableField(value = "user_id") private Long userId; - @Schema(description = "预约时间id") - @TableField(value = "appointment_id") - private Long appointmentId; + @Schema(description = "预约时间") + @TableField(value = "appointmentDate") + private String appointmentDate; @Schema(description = "状态") @TableField(value = "state") diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/controller/appointment/AppointmentController.java b/web/web-admin/src/main/java/com/atjy/web/admin/controller/appointment/AppointmentController.java new file mode 100644 index 0000000..ddd77b6 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/controller/appointment/AppointmentController.java @@ -0,0 +1,43 @@ +package com.atjy.web.admin.controller.appointment; + +import com.atjy.common.result.Result; +import com.atjy.model.entity.AppointmentInfo; +import com.atjy.web.admin.service.AppointmentInfoService; +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.*; + +import java.util.List; + +@Tag(name = "预约信息管理") +@RestController +@RequestMapping("/admin/appointment") +public class AppointmentController { + + @Autowired + private AppointmentInfoService service; + + @Operation(summary = "获取全部预约日期") + @GetMapping("getAllAppointmentDate") + public Result> getAllAppointmentDate() { + return Result.ok(service.list()); + } + + @Operation(summary = "删除预约日期") + @PostMapping("deleteAppointmentDate") + public Result deleteAppointmentDate(@RequestParam Long id) { + service.deleteAppointmentDate(id); + return Result.ok(); + } + + @Operation(summary = "增加预约日期") + @PostMapping("addAppointmentDate") + public Result addAppointmentDate(@RequestParam String date) { + AppointmentInfo appointmentInfo = new AppointmentInfo(); + appointmentInfo.setAppointmentDate(date); + service.saveOrUpdate(appointmentInfo); + return Result.ok(); + } + +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/controller/myself/UserAppointmentController.java b/web/web-admin/src/main/java/com/atjy/web/admin/controller/myself/UserAppointmentController.java new file mode 100644 index 0000000..00a6b66 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/controller/myself/UserAppointmentController.java @@ -0,0 +1,30 @@ +package com.atjy.web.admin.controller.myself; + +import com.atjy.common.result.Result; +import com.atjy.model.entity.UserAppointment; +import com.atjy.web.admin.service.UserAppointmentService; +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.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Tag(name = "就诊信息管理") +@RestController +@RequestMapping("/admin/center/appointment") +public class UserAppointmentController { + + @Autowired + private UserAppointmentService service; + + @Operation(summary = "获取全部就诊详情") + @GetMapping("getAllAppointment") + public Result> getAllAppointment() { + return Result.ok(service.list()); + } + + +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/mapper/AppointmentInfoMapper.java b/web/web-admin/src/main/java/com/atjy/web/admin/mapper/AppointmentInfoMapper.java new file mode 100644 index 0000000..e81e1d8 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/mapper/AppointmentInfoMapper.java @@ -0,0 +1,7 @@ +package com.atjy.web.admin.mapper; + +import com.atjy.model.entity.AppointmentInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +public interface AppointmentInfoMapper extends BaseMapper { +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/mapper/DoctorAppointmentMapper.java b/web/web-admin/src/main/java/com/atjy/web/admin/mapper/DoctorAppointmentMapper.java new file mode 100644 index 0000000..d17476c --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/mapper/DoctorAppointmentMapper.java @@ -0,0 +1,10 @@ +package com.atjy.web.admin.mapper; + +import com.atjy.model.entity.DoctorAppointment; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +public interface DoctorAppointmentMapper extends BaseMapper { + +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/mapper/UserAppointmentMapper.java b/web/web-admin/src/main/java/com/atjy/web/admin/mapper/UserAppointmentMapper.java new file mode 100644 index 0000000..c2f0ed5 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/mapper/UserAppointmentMapper.java @@ -0,0 +1,10 @@ +package com.atjy.web.admin.mapper; + +import com.atjy.model.entity.UserAppointment; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import java.util.List; + +public interface UserAppointmentMapper extends BaseMapper { + +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/service/AppointmentInfoService.java b/web/web-admin/src/main/java/com/atjy/web/admin/service/AppointmentInfoService.java new file mode 100644 index 0000000..02bc481 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/service/AppointmentInfoService.java @@ -0,0 +1,8 @@ +package com.atjy.web.admin.service; + +import com.atjy.model.entity.AppointmentInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface AppointmentInfoService extends IService { + void deleteAppointmentDate(Long id); +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/service/UserAppointmentService.java b/web/web-admin/src/main/java/com/atjy/web/admin/service/UserAppointmentService.java new file mode 100644 index 0000000..87046d8 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/service/UserAppointmentService.java @@ -0,0 +1,8 @@ +package com.atjy.web.admin.service; + +import com.atjy.model.entity.UserAppointment; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface UserAppointmentService extends IService { + +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/AppointmentInfoServiceImpl.java b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/AppointmentInfoServiceImpl.java new file mode 100644 index 0000000..56ba77a --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/AppointmentInfoServiceImpl.java @@ -0,0 +1,53 @@ +package com.atjy.web.admin.service.impl; + +import com.atjy.common.exception.HassleFreeException; +import com.atjy.common.result.ResultCodeEnum; +import com.atjy.model.entity.AppointmentInfo; +import com.atjy.model.entity.DoctorAppointment; +import com.atjy.model.entity.UserAppointment; +import com.atjy.web.admin.mapper.AppointmentInfoMapper; +import com.atjy.web.admin.mapper.DoctorAppointmentMapper; +import com.atjy.web.admin.mapper.UserAppointmentMapper; +import com.atjy.web.admin.service.AppointmentInfoService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.mysql.cj.log.Log; +import org.apache.ibatis.annotations.Select; +import org.checkerframework.checker.index.qual.SubstringIndexUnknown; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Service +public class AppointmentInfoServiceImpl extends ServiceImpl implements AppointmentInfoService { + + @Autowired + private AppointmentInfoMapper appointmentInfoMapper; + + @Autowired + private DoctorAppointmentMapper doctorAppointmentMapper; + + @Override + public void deleteAppointmentDate(Long id) { + String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); + List doctorAppointmentList = doctorAppointmentMapper.selectList(new LambdaQueryWrapper().eq(DoctorAppointment::getAppointmentId, id)); + if (appointmentInfoMapper.selectById(id).getAppointmentDate().compareTo(date) < 0) { + ArrayList ids = new ArrayList<>(); + for (DoctorAppointment doctorAppointment : doctorAppointmentList) { + ids.add(doctorAppointment.getId()); + } + doctorAppointmentMapper.deleteByIds(ids); + appointmentInfoMapper.deleteById(id); + } else { + if (!doctorAppointmentList.isEmpty()) { + throw new HassleFreeException(ResultCodeEnum.DELETE_ERROR); + } else { + appointmentInfoMapper.deleteById(id); + } + } + } +} diff --git a/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/UserAppointmentServiceImpl.java b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/UserAppointmentServiceImpl.java new file mode 100644 index 0000000..6938694 --- /dev/null +++ b/web/web-admin/src/main/java/com/atjy/web/admin/service/impl/UserAppointmentServiceImpl.java @@ -0,0 +1,11 @@ +package com.atjy.web.admin.service.impl; + +import com.atjy.model.entity.UserAppointment; +import com.atjy.web.admin.mapper.UserAppointmentMapper; +import com.atjy.web.admin.service.UserAppointmentService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class UserAppointmentServiceImpl extends ServiceImpl implements UserAppointmentService { +} 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/AppointmentController.java similarity index 89% rename from web/web-app/src/main/java/com/atjy/web/app/controller/appointment/Appointment.java rename to web/web-app/src/main/java/com/atjy/web/app/controller/appointment/AppointmentController.java index 2466e09..4c52d54 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/AppointmentController.java @@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.*; @Tag(name = "预约信息") @RestController @RequestMapping("/app/appointment") -public class Appointment { +public class AppointmentController { @Autowired private AppointmentInfoService service; @@ -32,8 +32,8 @@ public class Appointment { @Operation(summary = "生成预约订单") @PostMapping("setAppointmentOrder") - public Result setAppointmentOrder(@RequestBody AppointmentSetOrderVo appointmentSetOrderVo) { + public Result setAppointmentOrder(@RequestBody AppointmentSetOrderVo appointmentSetOrderVo) { service.setAppointmentOrder(appointmentSetOrderVo); - return null; + return Result.ok(); } } diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/consult/AiConsultController.java b/web/web-app/src/main/java/com/atjy/web/app/controller/consult/AiConsultController.java index 8fe5ad5..8ce430b 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/consult/AiConsultController.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/consult/AiConsultController.java @@ -9,7 +9,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -@Tag(name = "问诊管理") +@Tag(name = "问诊信息") @RestController @RequestMapping("/app/ai") public class AiConsultController { diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/doctor/DoctorController.java b/web/web-app/src/main/java/com/atjy/web/app/controller/doctor/DoctorController.java index fa2f839..32a2025 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/doctor/DoctorController.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/doctor/DoctorController.java @@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -@Tag(name = "医生管理") +@Tag(name = "医生信息") @RestController @RequestMapping("/app/doctor") public class DoctorController { diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/homepage/HomepageController.java b/web/web-app/src/main/java/com/atjy/web/app/controller/homepage/HomepageController.java index 067d2ea..63f6e4a 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/homepage/HomepageController.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/homepage/HomepageController.java @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; -@Tag(name = "首页管理") +@Tag(name = "首页信息") @RestController @RequestMapping("/app/homepage") public class HomepageController { diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/hospital/HospitalController.java b/web/web-app/src/main/java/com/atjy/web/app/controller/hospital/HospitalController.java index 52ad5bc..31955c9 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/hospital/HospitalController.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/hospital/HospitalController.java @@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -@Tag(name = "医院管理") +@Tag(name = "医院信息") @RestController @RequestMapping("/app/hospital") public class HospitalController { diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/login/LoginController.java b/web/web-app/src/main/java/com/atjy/web/app/controller/login/LoginController.java index eb2deff..5a6f08b 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/login/LoginController.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/login/LoginController.java @@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -@Tag(name = "登录管理") +@Tag(name = "登录信息") @RestController @RequestMapping("/app") public class LoginController { diff --git a/web/web-app/src/main/java/com/atjy/web/app/controller/myself/AppointmentController.java b/web/web-app/src/main/java/com/atjy/web/app/controller/myself/UserAppointmentController.java similarity index 96% rename from web/web-app/src/main/java/com/atjy/web/app/controller/myself/AppointmentController.java rename to web/web-app/src/main/java/com/atjy/web/app/controller/myself/UserAppointmentController.java index 18108cc..4fd717d 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/controller/myself/AppointmentController.java +++ b/web/web-app/src/main/java/com/atjy/web/app/controller/myself/UserAppointmentController.java @@ -12,13 +12,12 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import java.util.ArrayList; import java.util.List; @Tag(name = "就诊信息") @RestController @RequestMapping("/app/center/appointment") -public class AppointmentController { +public class UserAppointmentController { @Autowired private UserAppointmentService service; diff --git a/web/web-app/src/main/java/com/atjy/web/app/service/DoctorAppointmentService.java b/web/web-app/src/main/java/com/atjy/web/app/service/DoctorAppointmentService.java new file mode 100644 index 0000000..e0242a1 --- /dev/null +++ b/web/web-app/src/main/java/com/atjy/web/app/service/DoctorAppointmentService.java @@ -0,0 +1,7 @@ +package com.atjy.web.app.service; + +import com.atjy.model.entity.DoctorAppointment; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface DoctorAppointmentService extends IService { +} 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 988ef5c..70bfbd9 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 @@ -63,9 +63,7 @@ public class AppointmentInfoServiceImpl extends ServiceImpl() .eq(UserAppointment::getUserId, LoginUserHolder.getLoginUser().getUserId()) .eq(UserAppointment::getDoctorId, id) - .eq(UserAppointment::getAppointmentId, appointmentInfoMapper.selectOne(new LambdaQueryWrapper() - .eq(AppointmentInfo::getAppointmentDate, date)) - .getId())); + .eq(UserAppointment::getAppointmentDate, date)); HospitalInfo hospitalInfo = hospitalMapper.selectOne(new LambdaQueryWrapper() .eq(HospitalInfo::getId, doctorMapper.selectOne(new LambdaQueryWrapper() @@ -93,9 +91,7 @@ public class AppointmentInfoServiceImpl extends ServiceImpl() - .eq(AppointmentInfo::getAppointmentDate, appointmentSetOrderVo.getAppointmentDate())) - .getId()); + userAppointment.setAppointmentDate(appointmentSetOrderVo.getAppointmentDate()); userAppointment.setState(AppointmentStatus.WAIT); userAppointment.setName(appointmentSetOrderVo.getName()); userAppointment.setPhone(appointmentSetOrderVo.getPhone()); diff --git a/web/web-app/src/main/java/com/atjy/web/app/service/impl/DoctorAppointmentServiceImpl.java b/web/web-app/src/main/java/com/atjy/web/app/service/impl/DoctorAppointmentServiceImpl.java new file mode 100644 index 0000000..c3c5b27 --- /dev/null +++ b/web/web-app/src/main/java/com/atjy/web/app/service/impl/DoctorAppointmentServiceImpl.java @@ -0,0 +1,11 @@ +package com.atjy.web.app.service.impl; + +import com.atjy.model.entity.DoctorAppointment; +import com.atjy.web.app.mapper.DoctorAppointmentMapper; +import com.atjy.web.app.service.DoctorAppointmentService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class DoctorAppointmentServiceImpl extends ServiceImpl implements DoctorAppointmentService { +} diff --git a/web/web-app/src/main/java/com/atjy/web/app/service/impl/UserAppointmentServiceImpl.java b/web/web-app/src/main/java/com/atjy/web/app/service/impl/UserAppointmentServiceImpl.java index bb40a6a..4b23dca 100644 --- a/web/web-app/src/main/java/com/atjy/web/app/service/impl/UserAppointmentServiceImpl.java +++ b/web/web-app/src/main/java/com/atjy/web/app/service/impl/UserAppointmentServiceImpl.java @@ -1,12 +1,8 @@ package com.atjy.web.app.service.impl; -import com.atjy.model.entity.GraphInfo; -import com.atjy.model.enums.GraphItemType; -import com.atjy.web.app.mapper.GraphInfoMapper; import com.atjy.web.app.mapper.UserAppointmentMapper; import com.atjy.web.app.service.UserAppointmentService; import com.atjy.web.app.vo.appointment.AppointmentVo; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/web/web-app/src/main/resources/mapper/UserAppointmentMapper.xml b/web/web-app/src/main/resources/mapper/UserAppointmentMapper.xml index 489a46b..d6c664a 100644 --- a/web/web-app/src/main/resources/mapper/UserAppointmentMapper.xml +++ b/web/web-app/src/main/resources/mapper/UserAppointmentMapper.xml @@ -9,7 +9,7 @@ ua.state, ua.fees, ua.name, - ai.appointment_date, + ua.appointment_date, di.doctor_name, di.hospital_name, di.level, @@ -17,7 +17,6 @@ di.briefly, di.url from user_appointment ua - join appointment_info ai on ai.id = ua.appointment_id and ai.is_deleted = 0 join (select hi.id hi_id, hi.hospital_name, di.id, @@ -43,7 +42,7 @@ ua.state, ua.fees, ua.name, - ai.appointment_date, + ua.appointment_date, di.doctor_name, di.hospital_name, di.level, @@ -51,7 +50,6 @@ di.briefly, di.url from user_appointment ua - join appointment_info ai on ai.id = ua.appointment_id and ai.is_deleted = 0 join (select hi.id hi_id, hi.hospital_name, di.id,