From 4a77a59c9beb27a9eddae81d8f5c680e736775c0 Mon Sep 17 00:00:00 2001 From: yangheqi <2378459785@qq.com> Date: Fri, 8 Aug 2025 09:24:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=B9=B6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../org/dromara/controller/ClsController.java | 5 ++-- .../dromara/controller/StudentController.java | 5 ++-- .../java/org/dromara/service/IClsService.java | 23 +++++++++++++++++++ .../org/dromara/service/IStudentService.java | 23 +++++++++++++++++++ .../service/{ => impl}/ClsService.java | 5 ++-- .../service/{ => impl}/StudentService.java | 5 ++-- 7 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IClsService.java create mode 100644 ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IStudentService.java rename ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/{ => impl}/ClsService.java (83%) rename ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/{ => impl}/StudentService.java (84%) diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index a54b736..5d89add 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -115,7 +115,7 @@ security: # 多租户配置 tenant: # 是否开启 - enable: true + enable: false # 排除表 excludes: - sys_menu diff --git a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/ClsController.java b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/ClsController.java index e9ca992..a1cd71a 100644 --- a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/ClsController.java +++ b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/ClsController.java @@ -3,7 +3,8 @@ package org.dromara.controller; import jakarta.annotation.Resource; import org.dromara.common.Result; import org.dromara.domain.Cls; -import org.dromara.service.ClsService; +import org.dromara.service.IClsService; +import org.dromara.service.impl.ClsService; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -13,7 +14,7 @@ import java.util.List; @RequestMapping("/cls") public class ClsController { @Resource - private ClsService clsService; + private IClsService clsService; /** * 新增数据 diff --git a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/StudentController.java b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/StudentController.java index c1477a7..365088e 100644 --- a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/StudentController.java +++ b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/controller/StudentController.java @@ -3,7 +3,8 @@ package org.dromara.controller; import jakarta.annotation.Resource; import org.dromara.common.Result; import org.dromara.domain.Student; -import org.dromara.service.StudentService; +import org.dromara.service.IStudentService; +import org.dromara.service.impl.StudentService; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -13,7 +14,7 @@ import java.util.List; @RequestMapping("/student") public class StudentController { @Resource - private StudentService studentService; + private IStudentService studentService; /** * 新增数据 diff --git a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IClsService.java b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IClsService.java new file mode 100644 index 0000000..0a6d017 --- /dev/null +++ b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IClsService.java @@ -0,0 +1,23 @@ +package org.dromara.service; + +import org.dromara.domain.Cls; + +import java.util.List; + +/** + * 班级业务接口 + * + * @author SkySource + * @Date: 2025/8/8 9:18 + */ +public interface IClsService { + void add(Cls cls); + + void update(Cls cls); + + void deleteById(Integer id); + + List selectAll(Cls cls); + + Cls selectById( Integer id); +} diff --git a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IStudentService.java b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IStudentService.java new file mode 100644 index 0000000..a97213d --- /dev/null +++ b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/IStudentService.java @@ -0,0 +1,23 @@ +package org.dromara.service; + +import org.dromara.domain.Student; + +import java.util.List; + +/** + * 学生Service接口 + * + * @author SkySource + * @Date: 2025/8/8 9:21 + */ +public interface IStudentService { + void add(Student student); + + void update(Student student); + + void deleteById(Integer id); + + List selectAll(Student student); + + Student selectById( Integer id); +} diff --git a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/ClsService.java b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/impl/ClsService.java similarity index 83% rename from ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/ClsService.java rename to ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/impl/ClsService.java index a6f95a1..67aa4ce 100644 --- a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/ClsService.java +++ b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/impl/ClsService.java @@ -1,15 +1,16 @@ -package org.dromara.service; +package org.dromara.service.impl; import jakarta.annotation.Resource; import org.dromara.domain.Cls; import org.dromara.mapper.ClsMapper; +import org.dromara.service.IClsService; import org.springframework.stereotype.Service; import java.util.List; @Service -public class ClsService { +public class ClsService implements IClsService { @Resource private ClsMapper clsMapper; diff --git a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/StudentService.java b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/impl/StudentService.java similarity index 84% rename from ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/StudentService.java rename to ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/impl/StudentService.java index c09232a..de30ae5 100644 --- a/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/StudentService.java +++ b/ruoyi-modules/ruoyi-student/src/main/java/org/dromara/service/impl/StudentService.java @@ -1,14 +1,15 @@ -package org.dromara.service; +package org.dromara.service.impl; import jakarta.annotation.Resource; import org.dromara.domain.Student; import org.dromara.mapper.StudentMapper; +import org.dromara.service.IStudentService; import org.springframework.stereotype.Service; import java.util.List; @Service -public class StudentService { +public class StudentService implements IStudentService { @Resource private StudentMapper studentMapper;