eight
2024-10-29 18f2eb72590ce5ff79693eb8a27188a499bbd114
appointment table key Integer -> Long
已修改7个文件
28 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentConfirmReqVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentRespVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentSaveReqVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
@@ -77,7 +77,7 @@
    @PostMapping("/create")
    @Operation(summary = "创建预约")
    @PreAuthorize("@ss.hasPermission('ecg:appointment:create')")
    public CommonResult<Integer> createAppointment(@Valid @RequestBody AppointmentSaveReqVO createReqVO) {
    public CommonResult<Long> createAppointment(@Valid @RequestBody AppointmentSaveReqVO createReqVO) {
        return success(appointmentService.createAppointment(createReqVO));
    }
@@ -93,7 +93,7 @@
    @Operation(summary = "删除预约")
    @Parameter(name = "id", description = "编号", required = true)
    @PreAuthorize("@ss.hasPermission('ecg:appointment:delete')")
    public CommonResult<Boolean> deleteAppointment(@RequestParam("id") Integer id) {
    public CommonResult<Boolean> deleteAppointment(@RequestParam("id") Long id) {
        appointmentService.deleteAppointment(id);
        return success(true);
    }
@@ -102,7 +102,7 @@
    @Operation(summary = "获得预约")
    @Parameter(name = "id", description = "编号", required = true, example = "1024")
    @PreAuthorize("@ss.hasPermission('ecg:appointment:query')")
    public CommonResult<AppointmentRespVO> getAppointment(@RequestParam("id") Integer id) {
    public CommonResult<AppointmentRespVO> getAppointment(@RequestParam("id") Long id) {
        AppointmentDO appointment = appointmentService.getAppointment(id);
        return success(BeanUtils.toBean(appointment, AppointmentRespVO.class));
    }
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentConfirmReqVO.java
@@ -12,7 +12,7 @@
@Data
public class AppointmentConfirmReqVO {
    private Integer id;
    private Long id;
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29034")
    //@NotEmpty(message = "患者编号不能为空")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentRespVO.java
@@ -16,7 +16,7 @@
@ExcelIgnoreUnannotated
public class AppointmentRespVO {
    private Integer id;
    private Long id;
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29034")
    @ExcelProperty("患者编号")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentSaveReqVO.java
@@ -13,7 +13,7 @@
@Data
public class AppointmentSaveReqVO {
    private Integer id;
    private Long id;
    @Schema(description = "患者编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29034")
    @NotEmpty(message = "患者编号不能为空")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java
@@ -33,7 +33,7 @@
     * id
     */
    @TableId
    private Integer id;
    private Long id;
    /**
     * 患者编号
     */
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java
@@ -21,7 +21,7 @@
     * @param createReqVO 创建信息
     * @return 编号
     */
    Integer createAppointment(@Valid AppointmentSaveReqVO createReqVO);
    Long createAppointment(@Valid AppointmentSaveReqVO createReqVO);
    /**
     * 更新预约
@@ -35,7 +35,7 @@
     *
     * @param id 编号
     */
    void deleteAppointment(Integer id);
    void deleteAppointment(Long id);
    /**
     * 获得预约
@@ -43,7 +43,7 @@
     * @param id 编号
     * @return 预约
     */
    AppointmentDO getAppointment(Integer id);
    AppointmentDO getAppointment(Long id);
    /**
     * 获得预约
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -46,7 +46,7 @@
    private AppointmentMapper appointmentMapper;
    @Override
    public Integer createAppointment(AppointmentSaveReqVO createReqVO) {
    public Long createAppointment(AppointmentSaveReqVO createReqVO) {
        // 插入
        AppointmentDO appointment = BeanUtils.toBean(createReqVO, AppointmentDO.class);
@@ -68,21 +68,21 @@
    }
    @Override
    public void deleteAppointment(Integer id) {
    public void deleteAppointment(Long id) {
        // 校验存在
        validateAppointmentExists(id);
        // 删除
        appointmentMapper.deleteById(id);
    }
    private void validateAppointmentExists(Integer id) {
    private void validateAppointmentExists(Long id) {
        if (appointmentMapper.selectById(id) == null) {
            throw exception(APPOINTMENT_NOT_EXISTS);
        }
    }
    @Override
    public AppointmentDO getAppointment(Integer id) {
    public AppointmentDO getAppointment(Long id) {
        return appointmentMapper.selectById(id);
    }