tams 代码初始化

This commit is contained in:
lizhengwei 2025-01-07 14:11:39 +08:00
parent 2d4cc38cfa
commit 78e810397b
14 changed files with 83 additions and 76 deletions

View File

@ -39,11 +39,11 @@
<artifactId>ruoyi-common-doc</artifactId> <artifactId>ruoyi-common-doc</artifactId>
</dependency> </dependency>
<!-- 远程调用模块 TODO rename --> <!-- &lt;!&ndash; 远程调用模块 TODO rename &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>org.dromara</groupId> <!-- <groupId>org.dromara</groupId>-->
<artifactId>ruoyi-api-system</artifactId> <!-- <artifactId>ruoyi-api-system</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>org.dromara</groupId> <groupId>org.dromara</groupId>
@ -67,16 +67,16 @@
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!-- Apache Dubbo 配置 --> <!-- &lt;!&ndash; Apache Dubbo 配置 &ndash;&gt;-->
<dependency> <!-- <dependency>-->
<groupId>org.apache.dubbo</groupId> <!-- <groupId>org.apache.dubbo</groupId>-->
<artifactId>dubbo-spring-boot-starter</artifactId> <!-- <artifactId>dubbo-spring-boot-starter</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <!-- <dependency>-->
<groupId>org.apache.dubbo</groupId> <!-- <groupId>org.apache.dubbo</groupId>-->
<artifactId>dubbo-nacos-spring-boot-starter</artifactId> <!-- <artifactId>dubbo-nacos-spring-boot-starter</artifactId>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>

View File

@ -1,37 +0,0 @@
package com.lhd.tams.module;
import com.lhd.tams.common.base.BaseController;
import com.lhd.tams.common.model.ApiResult;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 测试feign 用的后面删除
*/
@Tag(name = "报表")
@RequestMapping()
@RestController
public class Report2Controller extends BaseController {
@Autowired
private TenantRpc tenantRpc;
//todo 测试rpc然后在测试免权限rpc在测试传递租户信息用户信息链路追踪id
@GetMapping("/resource/sms/code")
public ResponseEntity<ApiResult<Object>> getReportTeacherCount() {
return success(tenantRpc.emailCode());
}
@GetMapping("/system/client/{id}")
public ResponseEntity<ApiResult<Object>> getReportTeacherCount2(@PathVariable Long id) {
return success(tenantRpc.getInfo(id));
}
}

View File

@ -2,6 +2,8 @@ package com.lhd.tams.module.classroom.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhd.tams.module.classroom.model.data.ClassroomDO; import com.lhd.tams.module.classroom.model.data.ClassroomDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ClassroomMapper extends BaseMapper<ClassroomDO> { public interface ClassroomMapper extends BaseMapper<ClassroomDO> {
} }

View File

@ -2,6 +2,8 @@ package com.lhd.tams.module.color.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhd.tams.module.color.model.data.ColorDO; import com.lhd.tams.module.color.model.data.ColorDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ColorMapper extends BaseMapper<ColorDO> { public interface ColorMapper extends BaseMapper<ColorDO> {
} }

View File

@ -2,6 +2,8 @@ package com.lhd.tams.module.course.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhd.tams.module.course.model.data.CourseDO; import com.lhd.tams.module.course.model.data.CourseDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CourseMapper extends BaseMapper<CourseDO> { public interface CourseMapper extends BaseMapper<CourseDO> {
} }

View File

@ -7,12 +7,14 @@ import com.lhd.tams.module.coursescheduling.model.data.CourseSchedulingDO;
import com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingExportVO; import com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingExportVO;
import com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingListVO; import com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingListVO;
import com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingReportVO; import com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingReportVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Mapper
public interface CourseSchedulingMapper extends BaseMapper<CourseSchedulingDO> { public interface CourseSchedulingMapper extends BaseMapper<CourseSchedulingDO> {
List<CourseSchedulingListVO> selectCourseSchedulingList(@Param(Constants.WRAPPER) Wrapper<?> queryWrapper); List<CourseSchedulingListVO> selectCourseSchedulingList(@Param(Constants.WRAPPER) Wrapper<?> queryWrapper);

View File

@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhd.tams.module.registration.model.data.RegistrationDO; import com.lhd.tams.module.registration.model.data.RegistrationDO;
import com.lhd.tams.module.registration.model.dto.RegistrationPageQuery; import com.lhd.tams.module.registration.model.dto.RegistrationPageQuery;
import com.lhd.tams.module.registration.model.vo.RegistrationListVO; import com.lhd.tams.module.registration.model.vo.RegistrationListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@Mapper
public interface RegistrationMapper extends BaseMapper<RegistrationDO> { public interface RegistrationMapper extends BaseMapper<RegistrationDO> {
List<RegistrationListVO> selectRegistrationMapperSum(@Param("params") RegistrationPageQuery params); List<RegistrationListVO> selectRegistrationMapperSum(@Param("params") RegistrationPageQuery params);
} }

View File

@ -2,6 +2,8 @@ package com.lhd.tams.module.student.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhd.tams.module.student.model.data.StudentDO; import com.lhd.tams.module.student.model.data.StudentDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface StudentMapper extends BaseMapper<StudentDO> { public interface StudentMapper extends BaseMapper<StudentDO> {
} }

View File

@ -2,6 +2,8 @@ package com.lhd.tams.module.teacher.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lhd.tams.module.teacher.model.data.TeacherDO; import com.lhd.tams.module.teacher.model.data.TeacherDO;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TeacherMapper extends BaseMapper<TeacherDO> { public interface TeacherMapper extends BaseMapper<TeacherDO> {
} }

View File

@ -12,17 +12,31 @@ spring:
stat-view-servlet: #访问监控网页的登录用户名和密码 stat-view-servlet: #访问监控网页的登录用户名和密码
login-username: druid login-username: druid
login-password: druid login-password: druid
redis: data:
host: localhost # Redis服务器地址 redis:
database: 0 # Redis数据库索引默认为0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口 database: 0
password: Lzw8800580/ # Redis服务器连接密码默认为空 # Redis服务器地址
timeout: 3000ms # 连接超时时间(毫秒) host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
password: Lzw8800580/
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
mvc:
pathmatch:
matching-strategy: ant_path_matcher
management: #开启SpringBoot Admin的监控 management: #开启SpringBoot Admin的监控

View File

@ -12,17 +12,31 @@ spring:
stat-view-servlet: #访问监控网页的登录用户名和密码 stat-view-servlet: #访问监控网页的登录用户名和密码
login-username: druid login-username: druid
login-password: druid login-password: druid
redis: data:
host: localhost # Redis服务器地址 redis:
database: 0 # Redis数据库索引默认为0 # Redis数据库索引默认为0
port: 6379 # Redis服务器连接端口 database: 0
password: Lzw8800580/ # Redis服务器连接密码默认为空 # Redis服务器地址
timeout: 3000ms # 连接超时时间(毫秒) host: 127.0.0.1
# Redis服务器连接端口
port: 6379
# Redis服务器连接密码默认为空
password: Lzw8800580/
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池最大连接数
max-active: 200
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 连接池中的最大空闲连接
max-idle: 10
# 连接池中的最小空闲连接
min-idle: 0
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
mvc:
pathmatch:
matching-strategy: ant_path_matcher
management: #开启SpringBoot Admin的监控 management: #开启SpringBoot Admin的监控
@ -86,11 +100,13 @@ tenant:
- sys_tenant_package - sys_tenant_package
- sys_saas_user_role - sys_saas_user_role
# MyBatisPlus配置 # MyBatisPlus配置
# https://baomidou.com/config/ # https://baomidou.com/config/
mybatis-plus: mybatis-plus:
# 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper # 多包名使用 例如 org.dromara.**.mapper,org.xxx.**.mapper
mapperPackage: com.lhd.tams.module.**.dao mapperPackage: com.luban.api.dao
# # 实体扫描多个package用逗号或者分号分隔 # # 实体扫描多个package用逗号或者分号分隔
# typeAliasesPackage: com.luban.api.entity # typeAliasesPackage: com.luban.api.entity
global-config: global-config:

View File

@ -9,7 +9,7 @@
cs.date, cs.attend_time attendTime, cs.finish_time finishTime cs.date, cs.attend_time attendTime, cs.finish_time finishTime
</sql> </sql>
<select id="selectCourseSchedulingList" resultType="CourseSchedulingListVO"> <select id="selectCourseSchedulingList" resultType="com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingListVO">
select select
<include refid="column"></include> <include refid="column"></include>
from t_course_scheduling cs from t_course_scheduling cs
@ -22,7 +22,7 @@
</if> </if>
</select> </select>
<select id="selectCourseSchedulingById" resultType="CourseSchedulingListVO"> <select id="selectCourseSchedulingById" resultType="com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingListVO">
select select
<include refid="column"></include> <include refid="column"></include>
from t_course_scheduling cs from t_course_scheduling cs
@ -55,7 +55,7 @@
order by time order by time
</select> </select>
<select id="selectByDateRange" resultType="CourseSchedulingExportVO"> <select id="selectByDateRange" resultType="com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingExportVO">
select date, select date,
concat(date_format(cs.attend_time, '%H:%i'), '-', date_format(cs.finish_time, '%H:%i')) time, concat(date_format(cs.attend_time, '%H:%i'), '-', date_format(cs.finish_time, '%H:%i')) time,
classroom.name classroomName, classroom.name classroomName,
@ -72,7 +72,7 @@
order by date, time order by date, time
</select> </select>
<select id="selectReportTeacherCount" resultType="CourseSchedulingReportVO"> <select id="selectReportTeacherCount" resultType="com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingReportVO">
select teacher.id, teacher.name, count(cs.id) count select teacher.id, teacher.name, count(cs.id) count
from t_teacher teacher from t_teacher teacher
left join t_course_scheduling cs on teacher.id = cs.teacher_id left join t_course_scheduling cs on teacher.id = cs.teacher_id
@ -81,7 +81,7 @@
order by count desc; order by count desc;
</select> </select>
<select id="selectReportCourseCount" resultType="CourseSchedulingReportVO"> <select id="selectReportCourseCount" resultType="com.lhd.tams.module.coursescheduling.model.vo.CourseSchedulingReportVO">
select course.id, course.name, course.background_color color, count(cs.id) count select course.id, course.name, course.background_color color, count(cs.id) count
from t_course course from t_course course
left join t_course_scheduling cs on course.id = cs.course_id left join t_course_scheduling cs on course.id = cs.course_id

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lhd.tams.module.registration.dao.RegistrationMapper"> <mapper namespace="com.lhd.tams.module.registration.dao.RegistrationMapper">
<select id="selectRegistrationMapperSum" resultType="RegistrationListVO"> <select id="selectRegistrationMapperSum" resultType="com.lhd.tams.module.registration.model.vo.RegistrationListVO">
select r.student_id, select r.student_id,
s.name student_name, s.name student_name,
s.phone student_phone, s.phone student_phone,