瀏覽代碼

修改类结构

zhouzeyu 1 周之前
父節點
當前提交
b37f5b9171
共有 41 個文件被更改,包括 150 次插入113 次删除
  1. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusClinicController.java
  2. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusDeviceAlarmController.java
  3. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusDeviceController.java
  4. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusDeviceHistoryController.java
  5. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusHospitalConfigController.java
  6. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusHospitalController.java
  7. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusPatientController.java
  8. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusTherapyPlanController.java
  9. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusTherapyRecordController.java
  10. 6 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/po/BusHospitalPO.java
  11. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusClinicRepository.java
  12. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusDeviceAlarmRepository.java
  13. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusDeviceHistoryRepository.java
  14. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusDeviceRepository.java
  15. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusHospitalConfigRepository.java
  16. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusHospitalRepository.java
  17. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusPatientRepository.java
  18. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusTherapyPlanRepository.java
  19. 2 0
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusTherapyRecordRepository.java
  20. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusClinicService.java
  21. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusDeviceAlarmService.java
  22. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusDeviceHistoryService.java
  23. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusDeviceService.java
  24. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusHospitalConfigService.java
  25. 5 2
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusHospitalService.java
  26. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusPatientService.java
  27. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusTherapyPlanService.java
  28. 1 1
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusTherapyRecordService.java
  29. 10 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusClinicServiceImpl.java
  30. 9 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusDeviceAlarmServiceImpl.java
  31. 9 11
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusDeviceHistoryServiceImpl.java
  32. 9 11
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusDeviceServiceImpl.java
  33. 10 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusHospitalConfigServiceImpl.java
  34. 9 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusHospitalServiceImpl.java
  35. 12 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusPatientServiceImpl.java
  36. 10 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusTherapyPlanServiceImpl.java
  37. 9 10
      tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusTherapyRecordServiceImpl.java
  38. 8 0
      tr-modules/tr-modules-phototherapy/src/main/resources/mapper/phototherapy/BusHospitalMapper.xml
  39. 5 0
      tr-test/.flattened-pom.xml
  40. 2 0
      tr-test/src/main/java/cn/tr/test/WebApplication.java
  41. 2 2
      tr-test/src/main/resources/application.yml

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusClinicController.java

@@ -65,7 +65,7 @@ public class BusClinicController extends BaseController{
     @Operation(summary = "删除临床表", description = "权限: phototherapy:clinic:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:clinic:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busClinicService.removeBusClinicByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusDeviceAlarmController.java

@@ -65,7 +65,7 @@ public class BusDeviceAlarmController extends BaseController{
     @Operation(summary = "删除设备报警表", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busDeviceAlarmService.removeBusDeviceAlarmByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusDeviceController.java

@@ -65,7 +65,7 @@ public class BusDeviceController extends BaseController{
     @Operation(summary = "删除设备表", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busDeviceService.removeBusDeviceByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusDeviceHistoryController.java

@@ -65,7 +65,7 @@ public class BusDeviceHistoryController extends BaseController{
     @Operation(summary = "删除设备历史", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<Long> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<Long> ids) {
         return CommonResult.success(busDeviceHistoryService.removeBusDeviceHistoryByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusHospitalConfigController.java

@@ -65,7 +65,7 @@ public class BusHospitalConfigController extends BaseController{
     @Operation(summary = "删除医院-系统配置表", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busHospitalConfigService.removeBusHospitalConfigByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusHospitalController.java

@@ -65,7 +65,7 @@ public class BusHospitalController extends BaseController{
     @Operation(summary = "删除医院信息表", description = "权限: phototherapy:hospital:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:hospital:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busHospitalService.removeBusHospitalByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusPatientController.java

@@ -65,7 +65,7 @@ public class BusPatientController extends BaseController{
     @Operation(summary = "删除患者表", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busPatientService.removeBusPatientByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusTherapyPlanController.java

@@ -65,7 +65,7 @@ public class BusTherapyPlanController extends BaseController{
     @Operation(summary = "删除设计方案", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busTherapyPlanService.removeBusTherapyPlanByIds(ids));
     }
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/controller/BusTherapyRecordController.java

@@ -65,7 +65,7 @@ public class BusTherapyRecordController extends BaseController{
     @Operation(summary = "删除治疗记录", description = "权限: phototherapy:common:remove")
     @PostMapping("/removeByIds")
     @SaCheckPermission("phototherapy:common:remove")
-    public CommonResult<Integer> delete(@RequestBody Collection<String> ids) {
+    public CommonResult<Boolean> delete(@RequestBody Collection<String> ids) {
         return CommonResult.success(busTherapyRecordService.removeBusTherapyRecordByIds(ids));
     }
 }

+ 6 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/po/BusHospitalPO.java

@@ -1,6 +1,8 @@
 package cn.tr.module.phototherapy.common.po;
 
 import cn.tr.core.pojo.TenantPO;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -19,6 +21,10 @@ import lombok.ToString;
 @ToString
 public class BusHospitalPO extends TenantPO {
 
+    /** 医院名称 */
+    @Schema(description = "医院id")
+    @TableId(value = "tenant_id", type = IdType.INPUT)
+    private String tenantId;
 
     /** 医院名称 */
     @Schema(description = "医院名称")

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusClinicRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusClinicPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 临床表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusClinicPO;
  * @author CodeGenerator
  * @date 2026-01-12
  **/
+@Repository
 @Mapper
 public interface BusClinicRepository extends BaseMapper<BusClinicPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusDeviceAlarmRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusDeviceAlarmPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 设备报警表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusDeviceAlarmPO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusDeviceAlarmRepository extends BaseMapper<BusDeviceAlarmPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusDeviceHistoryRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusDeviceHistoryPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 设备历史Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusDeviceHistoryPO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusDeviceHistoryRepository extends BaseMapper<BusDeviceHistoryPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusDeviceRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusDevicePO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 设备表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusDevicePO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusDeviceRepository extends BaseMapper<BusDevicePO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusHospitalConfigRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusHospitalConfigPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 医院-系统配置表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusHospitalConfigPO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusHospitalConfigRepository extends BaseMapper<BusHospitalConfigPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusHospitalRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusHospitalPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 医院信息表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusHospitalPO;
  * @author CodeGenerator
  * @date 2026-01-12
  **/
+@Repository
 @Mapper
 public interface BusHospitalRepository extends BaseMapper<BusHospitalPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusPatientRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusPatientPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 患者表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusPatientPO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusPatientRepository extends BaseMapper<BusPatientPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusTherapyPlanRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusTherapyPlanPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 治疗方案表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusTherapyPlanPO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusTherapyPlanRepository extends BaseMapper<BusTherapyPlanPO> {
 }

+ 2 - 0
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/repository/BusTherapyRecordRepository.java

@@ -3,6 +3,7 @@ package cn.tr.module.phototherapy.common.repository;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Mapper;
 import cn.tr.module.phototherapy.common.po.BusTherapyRecordPO;
+import org.springframework.stereotype.Repository;
 
 /**
  * 治疗记录表Mapper接口
@@ -10,6 +11,7 @@ import cn.tr.module.phototherapy.common.po.BusTherapyRecordPO;
  * @author CodeGenerator
  * @date 2026-01-13
  **/
+@Repository
 @Mapper
 public interface BusTherapyRecordRepository extends BaseMapper<BusTherapyRecordPO> {
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusClinicService.java

@@ -51,5 +51,5 @@ public interface IBusClinicService{
      * @author CodeGenerator
      * @date   2026-01-12
      */
-    int removeBusClinicByIds(Collection<String> ids);
+    boolean removeBusClinicByIds(Collection<String> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusDeviceAlarmService.java

@@ -51,5 +51,5 @@ public interface IBusDeviceAlarmService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusDeviceAlarmByIds(Collection<String> ids);
+    boolean removeBusDeviceAlarmByIds(Collection<String> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusDeviceHistoryService.java

@@ -51,5 +51,5 @@ public interface IBusDeviceHistoryService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusDeviceHistoryByIds(Collection<Long> ids);
+    boolean removeBusDeviceHistoryByIds(Collection<Long> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusDeviceService.java

@@ -51,5 +51,5 @@ public interface IBusDeviceService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusDeviceByIds(Collection<String> ids);
+    boolean removeBusDeviceByIds(Collection<String> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusHospitalConfigService.java

@@ -51,5 +51,5 @@ public interface IBusHospitalConfigService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusHospitalConfigByIds(Collection<String> ids);
+    boolean removeBusHospitalConfigByIds(Collection<String> ids);
 }

+ 5 - 2
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusHospitalService.java

@@ -2,6 +2,9 @@ package cn.tr.module.phototherapy.common.service;
 
 import cn.tr.module.phototherapy.common.dto.BusHospitalDTO;
 import cn.tr.module.phototherapy.common.dto.BusHospitalQueryDTO;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.web.bind.annotation.PathVariable;
+
 import java.util.*;
 import java.util.Collection;
 
@@ -27,7 +30,7 @@ public interface IBusHospitalService{
      * @author   CodeGenerator
      * @date     2026-01-12
      */
-    BusHospitalDTO selectBusHospitalById(String tenantId);
+    BusHospitalDTO selectBusHospitalById(@Param("tenantId") String tenantId);
 
     /**
      * 编辑医院信息表
@@ -51,5 +54,5 @@ public interface IBusHospitalService{
      * @author CodeGenerator
      * @date   2026-01-12
      */
-    int removeBusHospitalByIds(Collection<String> ids);
+    boolean removeBusHospitalByIds(Collection<String> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusPatientService.java

@@ -51,5 +51,5 @@ public interface IBusPatientService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusPatientByIds(Collection<String> ids);
+    boolean removeBusPatientByIds(Collection<String> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusTherapyPlanService.java

@@ -51,5 +51,5 @@ public interface IBusTherapyPlanService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusTherapyPlanByIds(Collection<String> ids);
+    boolean removeBusTherapyPlanByIds(Collection<String> ids);
 }

+ 1 - 1
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/IBusTherapyRecordService.java

@@ -51,5 +51,5 @@ public interface IBusTherapyRecordService{
      * @author CodeGenerator
      * @date   2026-01-13
      */
-    int removeBusTherapyRecordByIds(Collection<String> ids);
+    boolean removeBusTherapyRecordByIds(Collection<String> ids);
 }

+ 10 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusClinicServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusClinicQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusClinicService;
 import cn.tr.module.phototherapy.common.mapper.BusClinicMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,8 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-12
  **/
 @Service
-public class BusClinicServiceImpl implements IBusClinicService {
-    @Resource
-    private BusClinicRepository baseRepository;
+public class BusClinicServiceImpl extends ServiceImpl<BusClinicRepository, BusClinicPO> implements IBusClinicService {
+
 
 
     /**
@@ -37,7 +37,7 @@ public class BusClinicServiceImpl implements IBusClinicService {
     @Override
     public List<BusClinicDTO> selectBusClinicList(BusClinicQueryDTO query){
         return BusClinicMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusClinicPO>()
+                this.list(new LambdaQueryWrapper<BusClinicPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusClinicPO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getPatientId()), BusClinicPO::getPatientId, query.getPatientId())
                     .eq(ObjectUtil.isNotNull(query.getUserId()), BusClinicPO::getUserId, query.getUserId())
@@ -62,7 +62,7 @@ public class BusClinicServiceImpl implements IBusClinicService {
     */
     @Override
     public BusClinicDTO selectBusClinicById(String id){
-        return BusClinicMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusClinicMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -74,7 +74,7 @@ public class BusClinicServiceImpl implements IBusClinicService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusClinicById(BusClinicDTO source){
-            return baseRepository.updateById(BusClinicMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusClinicMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -86,7 +86,7 @@ public class BusClinicServiceImpl implements IBusClinicService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusClinic(BusClinicDTO source){
-        return baseRepository.insert(BusClinicMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusClinicMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -97,10 +97,10 @@ public class BusClinicServiceImpl implements IBusClinicService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusClinicByIds(Collection<String> ids){
+    public boolean removeBusClinicByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 9 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusDeviceAlarmServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusDeviceAlarmQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusDeviceAlarmService;
 import cn.tr.module.phototherapy.common.mapper.BusDeviceAlarmMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,7 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusDeviceAlarmServiceImpl implements IBusDeviceAlarmService {
-    @Resource
-    private BusDeviceAlarmRepository baseRepository;
+public class BusDeviceAlarmServiceImpl extends ServiceImpl<BusDeviceAlarmRepository, BusDeviceAlarmPO> implements IBusDeviceAlarmService {
 
 
     /**
@@ -37,7 +36,7 @@ public class BusDeviceAlarmServiceImpl implements IBusDeviceAlarmService {
     @Override
     public List<BusDeviceAlarmDTO> selectBusDeviceAlarmList(BusDeviceAlarmQueryDTO query){
         return BusDeviceAlarmMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusDeviceAlarmPO>()
+                this.list(new LambdaQueryWrapper<BusDeviceAlarmPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusDeviceAlarmPO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getDeviceId()), BusDeviceAlarmPO::getDeviceId, query.getDeviceId())
                     .eq(ObjectUtil.isNotNull(query.getUploadTime()), BusDeviceAlarmPO::getUploadTime, query.getUploadTime())
@@ -58,7 +57,7 @@ public class BusDeviceAlarmServiceImpl implements IBusDeviceAlarmService {
     */
     @Override
     public BusDeviceAlarmDTO selectBusDeviceAlarmById(String id){
-        return BusDeviceAlarmMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusDeviceAlarmMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -70,7 +69,7 @@ public class BusDeviceAlarmServiceImpl implements IBusDeviceAlarmService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusDeviceAlarmById(BusDeviceAlarmDTO source){
-            return baseRepository.updateById(BusDeviceAlarmMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusDeviceAlarmMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -82,7 +81,7 @@ public class BusDeviceAlarmServiceImpl implements IBusDeviceAlarmService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusDeviceAlarm(BusDeviceAlarmDTO source){
-        return baseRepository.insert(BusDeviceAlarmMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusDeviceAlarmMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -93,10 +92,10 @@ public class BusDeviceAlarmServiceImpl implements IBusDeviceAlarmService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusDeviceAlarmByIds(Collection<String> ids){
+    public boolean removeBusDeviceAlarmByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 9 - 11
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusDeviceHistoryServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusDeviceHistoryQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusDeviceHistoryService;
 import cn.tr.module.phototherapy.common.mapper.BusDeviceHistoryMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,10 +24,7 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusDeviceHistoryServiceImpl implements IBusDeviceHistoryService {
-    @Resource
-    private BusDeviceHistoryRepository baseRepository;
-
+public class BusDeviceHistoryServiceImpl extends ServiceImpl<BusDeviceHistoryRepository, BusDeviceHistoryPO> implements IBusDeviceHistoryService {
 
     /**
     * 根据条件查询设备历史
@@ -37,7 +35,7 @@ public class BusDeviceHistoryServiceImpl implements IBusDeviceHistoryService {
     @Override
     public List<BusDeviceHistoryDTO> selectBusDeviceHistoryList(BusDeviceHistoryQueryDTO query){
         return BusDeviceHistoryMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusDeviceHistoryPO>()
+                this.list(new LambdaQueryWrapper<BusDeviceHistoryPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusDeviceHistoryPO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getDeviceId()), BusDeviceHistoryPO::getDeviceId, query.getDeviceId())
                     .eq(ObjectUtil.isNotNull(query.getPatientUniqueId()), BusDeviceHistoryPO::getPatientUniqueId, query.getPatientUniqueId())
@@ -64,7 +62,7 @@ public class BusDeviceHistoryServiceImpl implements IBusDeviceHistoryService {
     */
     @Override
     public BusDeviceHistoryDTO selectBusDeviceHistoryById(Long id){
-        return BusDeviceHistoryMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusDeviceHistoryMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -76,7 +74,7 @@ public class BusDeviceHistoryServiceImpl implements IBusDeviceHistoryService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusDeviceHistoryById(BusDeviceHistoryDTO source){
-            return baseRepository.updateById(BusDeviceHistoryMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusDeviceHistoryMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -88,7 +86,7 @@ public class BusDeviceHistoryServiceImpl implements IBusDeviceHistoryService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusDeviceHistory(BusDeviceHistoryDTO source){
-        return baseRepository.insert(BusDeviceHistoryMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusDeviceHistoryMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -99,10 +97,10 @@ public class BusDeviceHistoryServiceImpl implements IBusDeviceHistoryService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusDeviceHistoryByIds(Collection<Long> ids){
+    public boolean removeBusDeviceHistoryByIds(Collection<Long> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 9 - 11
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusDeviceServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusDeviceQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusDeviceService;
 import cn.tr.module.phototherapy.common.mapper.BusDeviceMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,10 +24,7 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusDeviceServiceImpl implements IBusDeviceService {
-    @Resource
-    private BusDeviceRepository baseRepository;
-
+public class BusDeviceServiceImpl extends ServiceImpl<BusDeviceRepository, BusDevicePO> implements IBusDeviceService {
 
     /**
     * 根据条件查询设备表
@@ -37,7 +35,7 @@ public class BusDeviceServiceImpl implements IBusDeviceService {
     @Override
     public List<BusDeviceDTO> selectBusDeviceList(BusDeviceQueryDTO query){
         return BusDeviceMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusDevicePO>()
+                this.list(new LambdaQueryWrapper<BusDevicePO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusDevicePO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getDeviceId()), BusDevicePO::getDeviceId, query.getDeviceId())
                     .eq(ObjectUtil.isNotNull(query.getTherapyId()), BusDevicePO::getTherapyId, query.getTherapyId())
@@ -62,7 +60,7 @@ public class BusDeviceServiceImpl implements IBusDeviceService {
     */
     @Override
     public BusDeviceDTO selectBusDeviceById(String id){
-        return BusDeviceMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusDeviceMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -74,7 +72,7 @@ public class BusDeviceServiceImpl implements IBusDeviceService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusDeviceById(BusDeviceDTO source){
-            return baseRepository.updateById(BusDeviceMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusDeviceMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -86,7 +84,7 @@ public class BusDeviceServiceImpl implements IBusDeviceService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusDevice(BusDeviceDTO source){
-        return baseRepository.insert(BusDeviceMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusDeviceMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -97,10 +95,10 @@ public class BusDeviceServiceImpl implements IBusDeviceService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusDeviceByIds(Collection<String> ids){
+    public boolean removeBusDeviceByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 10 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusHospitalConfigServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusHospitalConfigQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusHospitalConfigService;
 import cn.tr.module.phototherapy.common.mapper.BusHospitalConfigMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,8 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusHospitalConfigServiceImpl implements IBusHospitalConfigService {
-    @Resource
-    private BusHospitalConfigRepository baseRepository;
+public class BusHospitalConfigServiceImpl extends ServiceImpl<BusHospitalConfigRepository, BusHospitalConfigPO> implements IBusHospitalConfigService {
+
 
 
     /**
@@ -37,7 +37,7 @@ public class BusHospitalConfigServiceImpl implements IBusHospitalConfigService {
     @Override
     public List<BusHospitalConfigDTO> selectBusHospitalConfigList(BusHospitalConfigQueryDTO query){
         return BusHospitalConfigMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusHospitalConfigPO>()
+                this.list(new LambdaQueryWrapper<BusHospitalConfigPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusHospitalConfigPO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getComplianceThreshold()), BusHospitalConfigPO::getComplianceThreshold, query.getComplianceThreshold())
                     .eq(ObjectUtil.isNotNull(query.getDeviationPlanTime()), BusHospitalConfigPO::getDeviationPlanTime, query.getDeviationPlanTime())
@@ -55,7 +55,7 @@ public class BusHospitalConfigServiceImpl implements IBusHospitalConfigService {
     */
     @Override
     public BusHospitalConfigDTO selectBusHospitalConfigById(String id){
-        return BusHospitalConfigMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusHospitalConfigMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -67,7 +67,7 @@ public class BusHospitalConfigServiceImpl implements IBusHospitalConfigService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusHospitalConfigById(BusHospitalConfigDTO source){
-            return baseRepository.updateById(BusHospitalConfigMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusHospitalConfigMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -79,7 +79,7 @@ public class BusHospitalConfigServiceImpl implements IBusHospitalConfigService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusHospitalConfig(BusHospitalConfigDTO source){
-        return baseRepository.insert(BusHospitalConfigMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusHospitalConfigMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -90,10 +90,10 @@ public class BusHospitalConfigServiceImpl implements IBusHospitalConfigService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusHospitalConfigByIds(Collection<String> ids){
+    public boolean removeBusHospitalConfigByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeBatchByIds(ids);
     };
 }

+ 9 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusHospitalServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusHospitalQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusHospitalService;
 import cn.tr.module.phototherapy.common.mapper.BusHospitalMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,7 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-12
  **/
 @Service
-public class BusHospitalServiceImpl implements IBusHospitalService {
-    @Resource
-    private BusHospitalRepository baseRepository;
+public class BusHospitalServiceImpl extends ServiceImpl<BusHospitalRepository, BusHospitalPO> implements IBusHospitalService {
 
 
     /**
@@ -37,7 +36,7 @@ public class BusHospitalServiceImpl implements IBusHospitalService {
     @Override
     public List<BusHospitalDTO> selectBusHospitalList(BusHospitalQueryDTO query){
         return BusHospitalMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusHospitalPO>()
+                this.list(new LambdaQueryWrapper<BusHospitalPO>()
                     .eq(ObjectUtil.isNotNull(query.getTenantId()), BusHospitalPO::getTenantId, query.getTenantId())
                     .like(ObjectUtil.isNotNull(query.getHospitalName()), BusHospitalPO::getHospitalName, query.getHospitalName())
                     .eq(ObjectUtil.isNotNull(query.getLogoPath()), BusHospitalPO::getLogoPath, query.getLogoPath())
@@ -53,7 +52,7 @@ public class BusHospitalServiceImpl implements IBusHospitalService {
     */
     @Override
     public BusHospitalDTO selectBusHospitalById(String tenantId){
-        return BusHospitalMapper.INSTANCE.convertDto(baseRepository.selectById(tenantId));
+        return BusHospitalMapper.INSTANCE.convertDto(this.getById(tenantId));
     };
 
     /**
@@ -65,7 +64,7 @@ public class BusHospitalServiceImpl implements IBusHospitalService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusHospitalById(BusHospitalDTO source){
-            return baseRepository.updateById(BusHospitalMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusHospitalMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -77,7 +76,7 @@ public class BusHospitalServiceImpl implements IBusHospitalService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusHospital(BusHospitalDTO source){
-        return baseRepository.insert(BusHospitalMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusHospitalMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -88,10 +87,10 @@ public class BusHospitalServiceImpl implements IBusHospitalService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusHospitalByIds(Collection<String> ids){
+    public boolean removeBusHospitalByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 12 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusPatientServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusPatientQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusPatientService;
 import cn.tr.module.phototherapy.common.mapper.BusPatientMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,10 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusPatientServiceImpl implements IBusPatientService {
-    @Resource
-    private BusPatientRepository baseRepository;
+public class BusPatientServiceImpl extends ServiceImpl<BusPatientRepository, BusPatientPO> implements IBusPatientService {
+
+    @Autowired
+    private BusPatientRepository busPatientRepository;
 
 
     /**
@@ -37,7 +39,7 @@ public class BusPatientServiceImpl implements IBusPatientService {
     @Override
     public List<BusPatientDTO> selectBusPatientList(BusPatientQueryDTO query){
         return BusPatientMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusPatientPO>()
+                this.list(new LambdaQueryWrapper<BusPatientPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusPatientPO::getId, query.getId())
                     .like(ObjectUtil.isNotNull(query.getName()), BusPatientPO::getName, query.getName())
                     .eq(ObjectUtil.isNotNull(query.getGender()), BusPatientPO::getGender, query.getGender())
@@ -60,7 +62,7 @@ public class BusPatientServiceImpl implements IBusPatientService {
     */
     @Override
     public BusPatientDTO selectBusPatientById(String id){
-        return BusPatientMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusPatientMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -72,7 +74,7 @@ public class BusPatientServiceImpl implements IBusPatientService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusPatientById(BusPatientDTO source){
-            return baseRepository.updateById(BusPatientMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusPatientMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -84,7 +86,7 @@ public class BusPatientServiceImpl implements IBusPatientService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusPatient(BusPatientDTO source){
-        return baseRepository.insert(BusPatientMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusPatientMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -95,10 +97,10 @@ public class BusPatientServiceImpl implements IBusPatientService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusPatientByIds(Collection<String> ids){
+    public boolean removeBusPatientByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 10 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusTherapyPlanServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusTherapyPlanQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusTherapyPlanService;
 import cn.tr.module.phototherapy.common.mapper.BusTherapyPlanMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,8 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusTherapyPlanServiceImpl implements IBusTherapyPlanService {
-    @Resource
-    private BusTherapyPlanRepository baseRepository;
+public class BusTherapyPlanServiceImpl extends ServiceImpl<BusTherapyPlanRepository, BusTherapyPlanPO> implements IBusTherapyPlanService {
+
 
 
     /**
@@ -37,7 +37,7 @@ public class BusTherapyPlanServiceImpl implements IBusTherapyPlanService {
     @Override
     public List<BusTherapyPlanDTO> selectBusTherapyPlanList(BusTherapyPlanQueryDTO query){
         return BusTherapyPlanMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusTherapyPlanPO>()
+                this.list(new LambdaQueryWrapper<BusTherapyPlanPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusTherapyPlanPO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getPlanDoctor()), BusTherapyPlanPO::getPlanDoctor, query.getPlanDoctor())
                     .like(ObjectUtil.isNotNull(query.getPlanName()), BusTherapyPlanPO::getPlanName, query.getPlanName())
@@ -59,7 +59,7 @@ public class BusTherapyPlanServiceImpl implements IBusTherapyPlanService {
     */
     @Override
     public BusTherapyPlanDTO selectBusTherapyPlanById(String id){
-        return BusTherapyPlanMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusTherapyPlanMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -71,7 +71,7 @@ public class BusTherapyPlanServiceImpl implements IBusTherapyPlanService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusTherapyPlanById(BusTherapyPlanDTO source){
-            return baseRepository.updateById(BusTherapyPlanMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusTherapyPlanMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -83,7 +83,7 @@ public class BusTherapyPlanServiceImpl implements IBusTherapyPlanService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusTherapyPlan(BusTherapyPlanDTO source){
-        return baseRepository.insert(BusTherapyPlanMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusTherapyPlanMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -94,10 +94,10 @@ public class BusTherapyPlanServiceImpl implements IBusTherapyPlanService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusTherapyPlanByIds(Collection<String> ids){
+    public boolean removeBusTherapyPlanByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 9 - 10
tr-modules/tr-modules-phototherapy/src/main/java/cn/tr/module/phototherapy/common/service/impl/BusTherapyRecordServiceImpl.java

@@ -1,5 +1,7 @@
 package cn.tr.module.phototherapy.common.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -13,7 +15,6 @@ import cn.tr.module.phototherapy.common.dto.BusTherapyRecordQueryDTO;
 import java.util.*;
 import cn.tr.module.phototherapy.common.service.IBusTherapyRecordService;
 import cn.tr.module.phototherapy.common.mapper.BusTherapyRecordMapper;
-import jakarta.annotation.Resource;
 import cn.tr.core.exception.TRExcCode;
 
 /**
@@ -23,9 +24,7 @@ import cn.tr.core.exception.TRExcCode;
  * @date 2026-01-13
  **/
 @Service
-public class BusTherapyRecordServiceImpl implements IBusTherapyRecordService {
-    @Resource
-    private BusTherapyRecordRepository baseRepository;
+public class BusTherapyRecordServiceImpl extends ServiceImpl<BusTherapyRecordRepository, BusTherapyRecordPO> implements IBusTherapyRecordService {
 
 
     /**
@@ -37,7 +36,7 @@ public class BusTherapyRecordServiceImpl implements IBusTherapyRecordService {
     @Override
     public List<BusTherapyRecordDTO> selectBusTherapyRecordList(BusTherapyRecordQueryDTO query){
         return BusTherapyRecordMapper.INSTANCE.convertDtoList(
-                baseRepository.selectList(new LambdaQueryWrapper<BusTherapyRecordPO>()
+                this.list(new LambdaQueryWrapper<BusTherapyRecordPO>()
                     .eq(ObjectUtil.isNotNull(query.getId()), BusTherapyRecordPO::getId, query.getId())
                     .eq(ObjectUtil.isNotNull(query.getDeviceId()), BusTherapyRecordPO::getDeviceId, query.getDeviceId())
                     .eq(ObjectUtil.isNotNull(query.getClinicId()), BusTherapyRecordPO::getClinicId, query.getClinicId())
@@ -62,7 +61,7 @@ public class BusTherapyRecordServiceImpl implements IBusTherapyRecordService {
     */
     @Override
     public BusTherapyRecordDTO selectBusTherapyRecordById(String id){
-        return BusTherapyRecordMapper.INSTANCE.convertDto(baseRepository.selectById(id));
+        return BusTherapyRecordMapper.INSTANCE.convertDto(this.getById(id));
     };
 
     /**
@@ -74,7 +73,7 @@ public class BusTherapyRecordServiceImpl implements IBusTherapyRecordService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBusTherapyRecordById(BusTherapyRecordDTO source){
-            return baseRepository.updateById(BusTherapyRecordMapper.INSTANCE.convertPO(source))!=0;
+            return this.updateById(BusTherapyRecordMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -86,7 +85,7 @@ public class BusTherapyRecordServiceImpl implements IBusTherapyRecordService {
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean insertBusTherapyRecord(BusTherapyRecordDTO source){
-        return baseRepository.insert(BusTherapyRecordMapper.INSTANCE.convertPO(source))!=0;
+        return this.save(BusTherapyRecordMapper.INSTANCE.convertPO(source));
     };
 
     /**
@@ -97,10 +96,10 @@ public class BusTherapyRecordServiceImpl implements IBusTherapyRecordService {
     */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public int removeBusTherapyRecordByIds(Collection<String> ids){
+    public boolean removeBusTherapyRecordByIds(Collection<String> ids){
         if(CollectionUtil.isEmpty(ids)){
             throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"请选择要删除的数据");
         }
-        return baseRepository.deleteByIds(ids);
+        return this.removeByIds(ids);
     };
 }

+ 8 - 0
tr-modules/tr-modules-phototherapy/src/main/resources/mapper/phototherapy/BusHospitalMapper.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.tr.module.phototherapy.common.repository.BusHospitalRepository">
+
+
+</mapper>

+ 5 - 0
tr-test/.flattened-pom.xml

@@ -69,6 +69,11 @@
       <groupId>org.flywaydb</groupId>
       <artifactId>flyway-database-postgresql</artifactId>
     </dependency>
+    <dependency>
+      <groupId>cn.tr</groupId>
+      <artifactId>tr-modules-phototherapy</artifactId>
+      <version>2.0.0</version>
+    </dependency>
   </dependencies>
   <build>
     <defaultGoal>compile</defaultGoal>

+ 2 - 0
tr-test/src/main/java/cn/tr/test/WebApplication.java

@@ -2,6 +2,7 @@ package cn.tr.test;
 
 import cn.dev33.satoken.strategy.SaAnnotationStrategy;
 import cn.dev33.satoken.strategy.SaStrategy;
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.scheduling.annotation.EnableAsync;
@@ -14,6 +15,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
  * @date 2023年02月22日
  */
 @SpringBootApplication(scanBasePackages = "cn.tr.module.*")
+@MapperScan({"cn.tr.module.*.**.repository","cn.tr.module.*.modular.*.mapper"})
 @EnableCaching
 @EnableAsync
 @EnableScheduling

+ 2 - 2
tr-test/src/main/resources/application.yml

@@ -31,13 +31,13 @@ spring:
   data:
     redis:
       # 地址
-      host: 192.168.100.102
+      host: 172.31.18.78
       # 端口,默认为6379
       port: 6379
       # 数据库索引
       database: 0
       # 密码
-      password: foobared
+      password: root
       # 连接超时时间
       timeout: 30s
       # 客户端名称