eight
2024-09-19 a940b56e9781e2b4e56dbe05a896dba33a6905c6
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -1,11 +1,8 @@
package cn.lihu.jh.module.ecg.service.appointment;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import cn.lihu.jh.module.ecg.controller.admin.appointment.vo.*;
import cn.lihu.jh.module.ecg.dal.dataobject.appointment.AppointmentDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
@@ -13,6 +10,11 @@
import cn.lihu.jh.framework.common.util.object.BeanUtils;
import cn.lihu.jh.module.ecg.dal.mysql.appointment.AppointmentMapper;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Date;
import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
@@ -33,6 +35,10 @@
    public Integer createAppointment(AppointmentSaveReqVO createReqVO) {
        // 插入
        AppointmentDO appointment = BeanUtils.toBean(createReqVO, AppointmentDO.class);
        appointment.setBookTime( LocalDateTime.now() );
        appointment.setBookSrc((byte)0);
        appointmentMapper.insert(appointment);
        // 返回
        return appointment.getId();