Compare commits

...

No commits in common. 'e22198bf8dd6fc29161a65c2771d3f17c7fa9c9e' and 'ea30a14a1ee0acbbcc7c37c7666264a08b48291e' have entirely different histories.

6
.idea/.gitignore vendored

@ -2,7 +2,11 @@
/shelf/ /shelf/
/workspace.xml /workspace.xml
# 数据源本地存储已忽略文件 # 数据源本地存储已忽略文件
/../../../../../../../../../../:\Users\33424\Desktop\新建文件夹\T501\springboot542健身房管理系统--论文pf\健身房管理系统代码\jianshenfanggl\.idea/dataSources/ <<<<<<< HEAD
/../../../../../../:\Users\33424\Desktop\jianshenfanggl没有注释\.idea/dataSources/
=======
/../../../../../../../:\Users\33424\Desktop\gym\jianshenfanggl\.idea/dataSources/
>>>>>>> develop
/dataSources.local.xml /dataSources.local.xml
# 基于编辑器的 HTTP 客户端请求 # 基于编辑器的 HTTP 客户端请求
/httpRequests/ /httpRequests/

@ -0,0 +1 @@
jianshenfanggl

@ -6,7 +6,6 @@
<sourceOutputDir name="target/generated-sources/annotations" /> <sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" /> <outputRelativeToContentRoot value="true" />
<module name="jianshenfanggl" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
</component> </component>

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -2,7 +2,11 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<<<<<<< HEAD
<module fileurl="file://$PROJECT_DIR$/jianshenfanggl.iml" filepath="$PROJECT_DIR$/jianshenfanggl.iml" /> <module fileurl="file://$PROJECT_DIR$/jianshenfanggl.iml" filepath="$PROJECT_DIR$/jianshenfanggl.iml" />
=======
<module fileurl="file://$PROJECT_DIR$/.idea/jianshenfanggl.iml" filepath="$PROJECT_DIR$/.idea/jianshenfanggl.iml" />
>>>>>>> develop
</modules> </modules>
</component> </component>
</project> </project>

@ -2,6 +2,9 @@
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/gymnasium" vcs="Git" /> <<<<<<< HEAD
<mapping directory="$PROJECT_DIR$/gym" vcs="Git" />
=======
>>>>>>> develop
</component> </component>
</project> </project>

File diff suppressed because it is too large Load Diff

1
gym

@ -0,0 +1 @@
Subproject commit efe5258eda99ba1aac5fb7fffdc2414d5412705d

@ -1 +0,0 @@
Subproject commit d5671cbed3a55c363c969be020f0241740e621c8

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
</module>

@ -1,187 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.jlwl</groupId>
<!-- 导入项目的名称 -->
<artifactId>jianshenfanggl</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>jianshenfanggl</name>
<description>健身房管理系统</description>
<properties>
<java.version>1.8</java.version>
<fastjson.version>1.2.8</fastjson.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!--访问静态资源-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatisplus-spring-boot-starter</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.0.12</version>
</dependency>
<!-- FastJson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!--<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<scope>4.0</scope>
<version>4.0</version>
</dependency>-->
<!-- 百度人工智能 -->
<dependency>
<groupId>com.baidu.aip</groupId>
<artifactId>java-sdk</artifactId>
<version>4.4.1</version>
</dependency>
<!-- poi高版本额外包 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-examples</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-excelant</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.10.170.ALL</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

@ -1,40 +0,0 @@
// 声明这是一个Spring配置类
package com.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import com.interceptor.AuthorizationInterceptor;
@Configuration
public class InterceptorConfig extends WebMvcConfigurationSupport{
@Bean
public AuthorizationInterceptor getAuthorizationInterceptor() {
return new AuthorizationInterceptor();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(getAuthorizationInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**");
super.addInterceptors(registry);
}
/**
* springboot 2.0WebMvcConfigurationSupport访addResourceHandlers
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/resources/")
.addResourceLocations("classpath:/static/")
.addResourceLocations("classpath:/admin/")
.addResourceLocations("classpath:/img/")
.addResourceLocations("classpath:/front/")
.addResourceLocations("classpath:/public/");
super.addResourceHandlers(registry);
}
}

@ -1,86 +1,61 @@
package com.ServletContextListener; // 定义包名为com.ServletContextListener package com.ServletContextListener;
import com.baomidou.mybatisplus.mapper.EntityWrapper; // MyBatis-Plus条件构造器 import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.DictionaryEntity; // 字典实体类 import com.entity.DictionaryEntity;
import com.service.DictionaryService; // 字典服务接口 import com.service.DictionaryService;
import com.thread.MyThreadMethod; // 自定义线程类 import com.thread.MyThreadMethod;
import org.slf4j.Logger; // 日志接口 import org.slf4j.Logger;
import org.slf4j.LoggerFactory; // 日志工厂 import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext; // Spring应用上下文 import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils; // Web应用上下文工具类 import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletContextListener; // Servlet上下文监听器接口 import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent; // Servlet上下文事件 import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener; // Web监听器注解 import javax.servlet.annotation.WebListener;
import java.util.HashMap; // HashMap类 import java.util.HashMap;
import java.util.List; // List接口 import java.util.List;
import java.util.Map; // Map接口 import java.util.Map;
/**
// 字典初始化监听器 * ,,
//在Web应用启动时初始化字典数据并启动后台线程 */
//使用@WebListener注解声明为Servlet监听器
@WebListener @WebListener
public class DictionaryServletContextListener implements ServletContextListener { public class DictionaryServletContextListener implements ServletContextListener {
// 日志记录器
private static final Logger logger = LoggerFactory.getLogger(DictionaryServletContextListener.class); private static final Logger logger = LoggerFactory.getLogger(DictionaryServletContextListener.class);
// 自定义线程实例
private MyThreadMethod myThreadMethod; private MyThreadMethod myThreadMethod;
// 上下文销毁方法
//在服务器停止时调用
//@param sce Servlet上下文事件
@Override @Override
public void contextDestroyed(ServletContextEvent sce) { public void contextDestroyed(ServletContextEvent sce) {
logger.info("----------服务器停止----------"); logger.info("----------服务器停止----------");
} }
// 上下文初始化方法
//在服务器启动时调用
//@param sce Servlet上下文事件
@Override @Override
public void contextInitialized(ServletContextEvent sce) { public void contextInitialized(ServletContextEvent sce) {
// 获取Spring应用上下文
ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext()); ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());
// 字典表初始化
logger.info("----------字典表初始化开始----------"); logger.info("----------字典表初始化开始----------");
// 获取字典服务Bean
DictionaryService dictionaryService = (DictionaryService)appContext.getBean("dictionaryService"); DictionaryService dictionaryService = (DictionaryService)appContext.getBean("dictionaryService");
// 查询所有字典数据
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>()); List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
// 构建字典Map结构外层Map的key是字典类型value是对应的字典项Map
// 内层Map的key是字典codevalue是字典名称
Map<String, Map<Integer,String>> map = new HashMap<>(); Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
// 遍历字典数据并构建Map结构
for(DictionaryEntity d : dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode()); Map<Integer, String> m = map.get(d.getDicCode());
if(m == null || m.isEmpty()){ if(m ==null || m.isEmpty()){
m = new HashMap<>(); m = new HashMap<>();
} }
m.put(d.getCodeIndex(), d.getIndexName()); m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(), m); map.put(d.getDicCode(),m);
} }
// 将字典Map存入ServletContext全局属性
sce.getServletContext().setAttribute("dictionaryMap", map); sce.getServletContext().setAttribute("dictionaryMap", map);
logger.info("----------字典表初始化完成----------"); logger.info("----------字典表初始化完成----------");
// 启动后台线程
logger.info("----------线程执行开始----------"); logger.info("----------线程执行开始----------");
if (myThreadMethod == null) { if (myThreadMethod == null) {
myThreadMethod = new MyThreadMethod(); // 创建线程实例 myThreadMethod = new MyThreadMethod();
myThreadMethod.start(); // 启动线程 myThreadMethod.start(); // servlet 上下文初始化时启动线程myThreadMethod
} }
logger.info("----------线程执行结束----------"); logger.info("----------线程执行结束----------");
} }
}
}

@ -1,6 +1,7 @@
// 声明该代码文件所在的包名为 com.annotation
package com.annotation;
// 声明该代码文件所在的包名
package com.annotation;
// 导入 java.lang.annotation.ElementType 类,该类用于指定注解可以应用的目标元素类型, // 导入 java.lang.annotation.ElementType 类,该类用于指定注解可以应用的目标元素类型,
// 例如类、方法、字段等,在定义注解时需要使用它来指定注解的作用目标 // 例如类、方法、字段等,在定义注解时需要使用它来指定注解的作用目标
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
@ -17,11 +18,14 @@ import java.lang.annotation.RetentionPolicy;
// 配合 ElementType 来确定注解可以作用在哪些地方,比如类、方法、字段等 // 配合 ElementType 来确定注解可以作用在哪些地方,比如类、方法、字段等
import java.lang.annotation.Target; import java.lang.annotation.Target;
//登录用户信息 // 登录的用户信息
//自定义注解,用于标识需要注入当前登录用户信息的方法参数 // 自定义注解,标识需要注入当前登录用户信息的方法参数
@Target(ElementType.PARAMETER) // 指定该注解只能用于方法参数上 @Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME) // 指定该注解在运行时保留,可以通过反射读取 // 指定该注解只能用于方法参数上
@Retention(RetentionPolicy.RUNTIME)
// 指定该注解在运行时保留,可以通过反射读取
public @interface APPLoginUser { public @interface APPLoginUser {
// 定义一个空注解,作为标记使用 // 定义一个空注解,作为标记使用
// 实际使用时可以配合拦截器或参数解析器,自动注入当前登录用户对象 // 实际使用时可以配合拦截器或参数解析器,自动注入当前登录用户对象
} }

@ -1,3 +1,4 @@
// 定义该文件所在的包路径,将该 Java 类组织到 com.annotation 这个包空间下,方便项目的模块化管理和避免类名冲突 // 定义该文件所在的包路径,将该 Java 类组织到 com.annotation 这个包空间下,方便项目的模块化管理和避免类名冲突
package com.annotation; package com.annotation;
@ -12,6 +13,7 @@ import java.lang.annotation.RetentionPolicy;
// 导入用于指定自定义注解可以应用的目标元素类型的注解,和 ElementType 配合使用,明确注解具体能作用在哪些程序元素上 // 导入用于指定自定义注解可以应用的目标元素类型的注解,和 ElementType 配合使用,明确注解具体能作用在哪些程序元素上
import java.lang.annotation.Target; import java.lang.annotation.Target;
// 指定该注解可以应用于字段(类的成员变量)上 // 指定该注解可以应用于字段(类的成员变量)上
@Target(ElementType.FIELD) @Target(ElementType.FIELD)
// 指定该注解在运行时保留,可以通过反射读取 // 指定该注解在运行时保留,可以通过反射读取
@ -23,4 +25,5 @@ public @interface ColumnInfo {
// 定义type属性表示字段的类型 // 定义type属性表示字段的类型
String type(); String type();
} }

@ -1,16 +1,20 @@
// 定义该文件所在的包路径 // 定义该文件所在的包路径
package com.annotation; package com.annotation;
// 导入注解相关的包 // 导入注解相关的包
import java.lang.annotation.*; import java.lang.annotation.*;
// 忽略Token验证的注解
//忽略Token验证的注解 // 被此注解标记的方法将跳过Token验证检查
//被此注解标记的方法将跳过Token验证检查 @Target(ElementType.METHOD)
@Target(ElementType.METHOD) // 指定该注解只能用于方法上 // 指定该注解只能用于方法上
@Retention(RetentionPolicy.RUNTIME) // 指定该注解在运行时保留,可以通过反射读取 @Retention(RetentionPolicy.RUNTIME)
@Documented // 表示该注解应该被包含在JavaDoc中 // 指定该注解在运行时保留,可以通过反射读取
@Documented
// 表示该注解应该被包含在JavaDoc中
public @interface IgnoreAuth { public @interface IgnoreAuth {
// 这是一个标记注解,不包含任何属性 // 这是一个标记注解,不包含任何属性
// 仅用于标识需要跳过Token验证的方法 // 仅用于标识需要跳过Token验证的方法
} }

@ -1,3 +1,4 @@
// 定义该文件所在的包路径,在 Java 里,包是组织类和接口的一种方式,此包路径为 com.annotation能防止命名冲突也便于代码的管理与维护 // 定义该文件所在的包路径,在 Java 里,包是组织类和接口的一种方式,此包路径为 com.annotation能防止命名冲突也便于代码的管理与维护
package com.annotation; package com.annotation;
@ -13,12 +14,14 @@ import java.lang.annotation.RetentionPolicy;
// 导入 java.lang.annotation.Target 注解,它用于指定自定义注解可以应用的目标元素类型,与 ElementType 结合使用,能精确控制注解的使用范围 // 导入 java.lang.annotation.Target 注解,它用于指定自定义注解可以应用的目标元素类型,与 ElementType 结合使用,能精确控制注解的使用范围
import java.lang.annotation.Target; import java.lang.annotation.Target;
// 登录用户信息注解
//登录用户信息注解 // 用于标识Controller方法中需要注入当前登录用户信息的参数
//用于标识Controller方法中需要注入当前登录用户信息的参数 @Target(ElementType.PARAMETER)
@Target(ElementType.PARAMETER) // 指定该注解只能用于方法参数上 // 指定该注解只能用于方法参数上
@Retention(RetentionPolicy.RUNTIME) // 指定该注解在运行时保留,可以通过反射读取 @Retention(RetentionPolicy.RUNTIME)
// 指定该注解在运行时保留,可以通过反射读取
public @interface LoginUser { public @interface LoginUser {
// 这是一个标记注解,不包含任何属性 // 这是一个标记注解,不包含任何属性
// 用于标识需要自动注入当前登录用户信息的参数 // 用于标识需要自动注入当前登录用户信息的参数
} }

@ -1,3 +1,4 @@
// 声明当前文件所在的包路径,在 Java 项目中,包用于组织代码结构,这里表示该文件属于 com.config 包,有助于模块化管理和避免命名冲突 // 声明当前文件所在的包路径,在 Java 项目中,包用于组织代码结构,这里表示该文件属于 com.config 包,有助于模块化管理和避免命名冲突
package com.config; package com.config;
@ -15,19 +16,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupp
// 导入自定义的拦截器类,该拦截器类用于处理请求的授权逻辑,在请求到达控制器之前进行权限检查等操作 // 导入自定义的拦截器类,该拦截器类用于处理请求的授权逻辑,在请求到达控制器之前进行权限检查等操作
import com.interceptor.AuthorizationInterceptor; import com.interceptor.AuthorizationInterceptor;
//拦截器配置类
//用于配置Spring MVC拦截器和静态资源处理
@Configuration // 标识这是一个Spring配置类
public class InterceptorConfig extends WebMvcConfigurationSupport {
//创建授权拦截器Bean
//@return AuthorizationInterceptor实例
@Bean
public AuthorizationInterceptor getAuthorizationInterceptor() {
return new AuthorizationInterceptor();
}
//配置拦截器规则 //配置拦截器规则
//@param registry 拦截器注册器 //@param registry 拦截器注册器
@ -39,23 +27,27 @@ public class InterceptorConfig extends WebMvcConfigurationSupport {
.excludePathPatterns("/static/**"); // 排除静态资源路径 .excludePathPatterns("/static/**"); // 排除静态资源路径
super.addInterceptors(registry); super.addInterceptors(registry);
} }
// 配置静态资源处理
// 注意在SpringBoot 2.0中自定义WebMvc配置会覆盖默认配置
//配置静态资源处理 // 需要手动添加静态资源路径配置
//注意在SpringBoot 2.0中自定义WebMvc配置会覆盖默认配置 // @param registry 资源处理器注册器
//需要手动添加静态资源路径配置 @Override
//@param registry 资源处理器注册器 public void addResourceHandlers(ResourceHandlerRegistry registry) {
@Override // 配置静态资源访问路径
public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**");
// 配置静态资源访问路径 // 添加各类静态资源目录位置
registry.addResourceHandler("/**") // 匹配所有URL路径 // resources目录
// 添加各类静态资源目录位置 registry.addResourceLocations("classpath:/resources/");
.addResourceLocations("classpath:/resources/") // resources目录 // static目录
.addResourceLocations("classpath:/static/") // static目录 registry.addResourceLocations("classpath:/static/");
.addResourceLocations("classpath:/admin/") // admin目录 // admin目录
.addResourceLocations("classpath:/img/") // img目录 registry.addResourceLocations("classpath:/admin/");
.addResourceLocations("classpath:/front/") // front目录 // img目录
.addResourceLocations("classpath:/public/"); // public目录 registry.addResourceLocations("classpath:/img/");
super.addResourceHandlers(registry); // front目录
} registry.addResourceLocations("classpath:/front/");
} // public目录
registry.addResourceLocations("classpath:/public/");
super.addResourceHandlers(registry);
}
}

@ -1,3 +1,4 @@
// 声明当前文件所在的包路径 // 声明当前文件所在的包路径
package com.config; package com.config;
@ -45,4 +46,6 @@ public class MyMetaObjectHandler extends MetaObjectHandler {
// 如需启用更新填充,可在此添加类似: // 如需启用更新填充,可在此添加类似:
// this.setFieldValByName("utime", new Date(), metaObject); // this.setFieldValByName("utime", new Date(), metaObject);
} }
}
}

@ -1,3 +1,4 @@
// 声明当前文件所在的包路径,在 Java 项目里,包用于组织和管理代码,此包路径为 com.config有助于将相关的配置类集中管理避免命名冲突 // 声明当前文件所在的包路径,在 Java 项目里,包用于组织和管理代码,此包路径为 com.config有助于将相关的配置类集中管理避免命名冲突
package com.config; package com.config;
@ -30,4 +31,6 @@ public class MybatisPlusConfig {
// - 性能分析插件 // - 性能分析插件
// - 乐观锁插件 // - 乐观锁插件
// - SQL注入器等 // - SQL注入器等
}
}

@ -22,43 +22,49 @@ import com.utils.StringUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
// 导入JSON对象类 // 导入JSON对象类
import org.json.JSONObject; import org.json.JSONObject;
// 导入日志相关类 // 导入SLF4J日志框架相关类(用于日志记录)
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
// 导入Spring框架相关注解和类 // 导入Spring框架核心注解和工具类
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired; // 自动依赖注入注解
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value; // 配置文件值注入注解
import org.springframework.util.ResourceUtils; import org.springframework.util.ResourceUtils; // Spring资源工具类
// 导入Spring MVC注解
import org.springframework.web.bind.annotation.PathVariable; // 导入Spring MVC控制器相关注解
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.PathVariable; // 路径变量注解
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestBody; // 请求体注解
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestMapping; // 请求映射注解
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RequestParam; // 请求参数注解
import org.springframework.web.bind.annotation.RestController; // REST控制器注解
// 导入自定义注解
import com.annotation.IgnoreAuth; // 导入项目自定义注解
// 导入百度AI相关类 import com.annotation.IgnoreAuth; // 忽略认证的自定义注解
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest; // 导入百度AI人脸识别SDK相关类
import com.baidu.aip.util.Base64Util; import com.baidu.aip.face.AipFace; // 百度人脸识别客户端主类
// 导入MyBatis-Plus相关类 import com.baidu.aip.face.MatchRequest; // 人脸比对请求类
import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baidu.aip.util.Base64Util; // 百度Base64编码工具类
import com.baomidou.mybatisplus.mapper.Wrapper;
// 导入实体类 // 导入MyBatis-Plus ORM框架相关类
import com.entity.ConfigEntity; import com.baomidou.mybatisplus.mapper.EntityWrapper; // 实体条件构造器
// 导入服务类 import com.baomidou.mybatisplus.mapper.Wrapper; // 条件构造器接口
import com.service.CommonService;
import com.service.ConfigService; // 导入项目实体类
// 导入工具类 import com.entity.ConfigEntity; // 系统配置实体类
import com.utils.BaiduUtil;
import com.utils.FileUtil; // 导入项目服务层接口
import com.utils.R; import com.service.CommonService; // 通用服务接口
import com.service.ConfigService; // 配置服务接口
//通用接口控制器 // 导入项目工具类
//提供系统通用的各种功能接口 import com.utils.BaiduUtil; // 百度AI工具类
import com.utils.FileUtil; // 文件操作工具类
import com.utils.R; // 统一响应结果封装类
//通用接口控制器
//提供系统通用的各种功能接口
@RestController // 标识这是一个RESTful风格的控制器 @RestController // 标识这是一个RESTful风格的控制器
public class CommonController { public class CommonController {
// 日志记录器使用slf4j的LoggerFactory创建 // 日志记录器使用slf4j的LoggerFactory创建
@ -69,16 +75,16 @@ public class CommonController {
private CommonService commonService; private CommonService commonService;
// * MySQL数据库备份接口 // * MySQL数据库备份接口
// * @param mysqlUrl MySQL安装路径 // * @param mysqlUrl MySQL安装路径
// * @param hostIP 数据库服务器IP // * @param hostIP 数据库服务器IP
// * @param userName 数据库用户名 // * @param userName 数据库用户名
// * @param hostPort 数据库端口 // * @param hostPort 数据库端口
//* @param password 数据库密码 //* @param password 数据库密码
//* @param savePath 备份文件保存路径 //* @param savePath 备份文件保存路径
//* @param fileName 备份文件名 //* @param fileName 备份文件名
//* @param databaseName 要备份的数据库名 //* @param databaseName 要备份的数据库名
//* @return 操作结果 //* @return 操作结果
@IgnoreAuth // 忽略权限验证 @IgnoreAuth // 忽略权限验证
@RequestMapping("/beifen") // 映射请求路径 @RequestMapping("/beifen") // 映射请求路径
@ -147,16 +153,16 @@ public class CommonController {
} }
//* MySQL数据库还原接口 //* MySQL数据库还原接口
// * @param mysqlUrl MySQL安装路径 // * @param mysqlUrl MySQL安装路径
// * @param hostIP 数据库服务器IP // * @param hostIP 数据库服务器IP
//* @param userName 数据库用户名 //* @param userName 数据库用户名
// * @param hostPort 数据库端口 // * @param hostPort 数据库端口
// * @param password 数据库密码 // * @param password 数据库密码
// * @param savePath 备份文件路径 // * @param savePath 备份文件路径
// * @param fileName 备份文件名 // * @param fileName 备份文件名
// * @param databaseName 要还原的数据库名 // * @param databaseName 要还原的数据库名
//* @return 操作结果 //* @return 操作结果
@IgnoreAuth // 忽略权限验证 @IgnoreAuth // 忽略权限验证
@RequestMapping("/huanyuan") // 映射请求路径 @RequestMapping("/huanyuan") // 映射请求路径
@ -206,7 +212,7 @@ public class CommonController {
// * 饼状图求和接口 // * 饼状图求和接口
//* @param params 请求参数Map //* @param params 请求参数Map
// * @return 包含求和结果的响应 // * @return 包含求和结果的响应
@RequestMapping("/pieSum") // 映射请求路径 @RequestMapping("/pieSum") // 映射请求路径
@ -222,7 +228,7 @@ public class CommonController {
// * 饼状图统计接口 // * 饼状图统计接口
// * @param params 请求参数Map // * @param params 请求参数Map
//* @return 包含统计结果的响应 //* @return 包含统计结果的响应
@RequestMapping("/pieCount") // 映射请求路径 @RequestMapping("/pieCount") // 映射请求路径
public R pieCount(@RequestParam Map<String,Object> params) { public R pieCount(@RequestParam Map<String,Object> params) {
@ -234,9 +240,9 @@ public class CommonController {
return R.ok().put("data", result); return R.ok().put("data", result);
} }
// * 单列柱状图求和接口 // * 单列柱状图求和接口
// * @param params 请求参数Map // * @param params 请求参数Map
//* @return 包含图表数据的响应 //* @return 包含图表数据的响应
@RequestMapping("/barSumOne") // 映射请求路径 @RequestMapping("/barSumOne") // 映射请求路径
public R barSumOne(@RequestParam Map<String,Object> params) { public R barSumOne(@RequestParam Map<String,Object> params) {

@ -53,7 +53,7 @@ public class ConfigController {
} }
// 详情 // 详情
@IgnoreAuth // 忽略认证注解 @IgnoreAuth // 忽略认证注解
@RequestMapping("/detail/{id}") // 映射请求路径为 "/detail/{id}" @RequestMapping("/detail/{id}") // 映射请求路径为 "/detail/{id}"
public R detail(@PathVariable("id") String id) { // 从路径变量中获取 id 参数 public R detail(@PathVariable("id") String id) { // 从路径变量中获取 id 参数
@ -62,7 +62,7 @@ public class ConfigController {
} }
// 根据name获取信息 // 根据name获取信息
@RequestMapping("/info") // 映射请求路径为 "/info" @RequestMapping("/info") // 映射请求路径为 "/info"
public R infoByName(@RequestParam String name) { // 从请求参数中获取 name 参数 public R infoByName(@RequestParam String name) { // 从请求参数中获取 name 参数
@ -71,7 +71,7 @@ public class ConfigController {
} }
// 保存 // 保存
@PostMapping("/save") // 映射请求路径为 "/save",并指定请求方法为 POST @PostMapping("/save") // 映射请求路径为 "/save",并指定请求方法为 POST
public R save(@RequestBody ConfigEntity config) { // 从请求体中获取配置实体对象 public R save(@RequestBody ConfigEntity config) { // 从请求体中获取配置实体对象
// ValidatorUtils.validateEntity(config); // 验证实体(注释掉) // ValidatorUtils.validateEntity(config); // 验证实体(注释掉)
@ -80,7 +80,7 @@ public class ConfigController {
} }
//修改 //修改
@RequestMapping("/update") // 映射请求路径为 "/update" @RequestMapping("/update") // 映射请求路径为 "/update"
public R update(@RequestBody ConfigEntity config) { // 从请求体中获取配置实体对象 public R update(@RequestBody ConfigEntity config) { // 从请求体中获取配置实体对象

@ -59,10 +59,10 @@ import com.utils.R;
// FastJSON包 // FastJSON包
import com.alibaba.fastjson.*; import com.alibaba.fastjson.*;
//字典 //字典
//后端接口 //后端接口
//@author //@author
// @email // @email
@RestController // 声明这是一个RESTful风格的控制器 @RestController // 声明这是一个RESTful风格的控制器
@Controller // 声明这是一个Spring MVC控制器 @Controller // 声明这是一个Spring MVC控制器
@ -100,7 +100,7 @@ public class DictionaryController {
private UsersService usersService; // 注入管理员服务 private UsersService usersService; // 注入管理员服务
//后端列表 //后端列表
@RequestMapping("/page") // 处理分页请求 @RequestMapping("/page") // 处理分页请求
@IgnoreAuth // 忽略鉴权 @IgnoreAuth // 忽略鉴权
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -118,7 +118,7 @@ public class DictionaryController {
} }
//后端详情 //后端详情
@RequestMapping("/info/{id}") // 处理详情请求 @RequestMapping("/info/{id}") // 处理详情请求
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -136,7 +136,7 @@ public class DictionaryController {
} }
//后端保存 //后端保存
@RequestMapping("/save") // 处理保存请求 @RequestMapping("/save") // 处理保存请求
public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){ public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString()); // 记录日志 logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString()); // 记录日志
@ -177,7 +177,7 @@ public class DictionaryController {
} }
//后端修改 //后端修改
@RequestMapping("/update") // 处理更新请求 @RequestMapping("/update") // 处理更新请求
public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString()); // 记录日志 logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString()); // 记录日志
@ -205,7 +205,7 @@ public class DictionaryController {
} }
//删除 //删除
@RequestMapping("/delete") // 处理删除请求 @RequestMapping("/delete") // 处理删除请求
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志 logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志
@ -216,7 +216,7 @@ public class DictionaryController {
} }
//最大值 //最大值
@RequestMapping("/maxCodeIndex") // 处理获取最大编码请求 @RequestMapping("/maxCodeIndex") // 处理获取最大编码请求
public R maxCodeIndex(@RequestBody DictionaryEntity dictionary){ public R maxCodeIndex(@RequestBody DictionaryEntity dictionary){
logger.debug("maxCodeIndex:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString()); // 记录日志 logger.debug("maxCodeIndex:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString()); // 记录日志
@ -235,7 +235,7 @@ public class DictionaryController {
} }
//批量上传 //批量上传
@RequestMapping("/batchInsert") // 处理批量上传请求 @RequestMapping("/batchInsert") // 处理批量上传请求
public R save(String fileName, HttpServletRequest request){ public R save(String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志 logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志

@ -64,8 +64,8 @@ import com.service.ConfigService;
import com.utils.R; import com.utils.R;
//上传文件映射表 //上传文件映射表
//文件上传下载控制器 //文件上传下载控制器
@RestController // 声明为RESTful控制器 @RestController // 声明为RESTful控制器
@RequestMapping("file") // 基础请求路径映射 @RequestMapping("file") // 基础请求路径映射
@SuppressWarnings({"unchecked","rawtypes"}) // 抑制警告 @SuppressWarnings({"unchecked","rawtypes"}) // 抑制警告
@ -74,11 +74,11 @@ public class FileController{
private ConfigService configService; private ConfigService configService;
//上传文件 //上传文件
//@param file 上传的文件对象 //@param file 上传的文件对象
//@param type 文件类型标识 //@param type 文件类型标识
//@return 上传结果 //@return 上传结果
//* @throws Exception 可能抛出的异常 //* @throws Exception 可能抛出的异常
@RequestMapping("/upload") // 文件上传请求映射 @RequestMapping("/upload") // 文件上传请求映射
public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception { public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
@ -122,9 +122,9 @@ public class FileController{
} }
//下载文件 //下载文件
//@param fileName 要下载的文件名 //@param fileName 要下载的文件名
// @return 文件下载响应 // @return 文件下载响应
@IgnoreAuth // 忽略权限验证 @IgnoreAuth // 忽略权限验证
@RequestMapping("/download") // 文件下载请求映射 @RequestMapping("/download") // 文件下载请求映射

@ -32,10 +32,10 @@ import com.utils.R; // 导入统一返回结果类
import com.alibaba.fastjson.*; // 导入FastJSON相关类 import com.alibaba.fastjson.*; // 导入FastJSON相关类
//健身论坛 //健身论坛
//后端接口 //后端接口
//@author //@author
//@email //@email
@RestController @RestController
@Controller @Controller
@ -73,7 +73,7 @@ public class ForumController {
private UsersService usersService; // 管理员服务 private UsersService usersService; // 管理员服务
//后端列表 //后端列表
@RequestMapping("/page") @RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
@ -90,7 +90,7 @@ public class ForumController {
} }
//后端详情 //后端详情
@RequestMapping("/info/{id}") @RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
@ -133,7 +133,7 @@ public class ForumController {
} }
//后端保存 //后端保存
@RequestMapping("/save") @RequestMapping("/save")
public R save(@RequestBody ForumEntity forum, HttpServletRequest request){ public R save(@RequestBody ForumEntity forum, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString()); logger.debug("save方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());
@ -170,7 +170,7 @@ public class ForumController {
} }
//后端修改 //后端修改
@RequestMapping("/update") @RequestMapping("/update")
public R update(@RequestBody ForumEntity forum, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody ForumEntity forum, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString()); logger.debug("update方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());
@ -187,7 +187,7 @@ public class ForumController {
} }
//删除 //删除
@RequestMapping("/delete") @RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
@ -198,7 +198,7 @@ public class ForumController {
} }
//批量上传 //批量上传
@RequestMapping("/batchInsert") @RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){ public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
@ -259,7 +259,7 @@ public class ForumController {
} }
//前端详情 //前端详情
@RequestMapping("/detail/{id}") @RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
@ -303,7 +303,7 @@ public class ForumController {
} }
//前端保存 //前端保存
@RequestMapping("/add") @RequestMapping("/add")
public R add(@RequestBody ForumEntity forum, HttpServletRequest request){ public R add(@RequestBody ForumEntity forum, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString()); logger.debug("add方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());

@ -32,10 +32,10 @@ import com.utils.R; // 导入统一返回结果类
import com.alibaba.fastjson.*; // 导入FastJSON相关类 import com.alibaba.fastjson.*; // 导入FastJSON相关类
//课程收藏 //课程收藏
//后端接口 //后端接口
//@author //@author
// @email // @email
@RestController // 标识为RESTful控制器 @RestController // 标识为RESTful控制器
@Controller // 标识为Spring控制器 @Controller // 标识为Spring控制器
@ -73,7 +73,7 @@ public class JianshenkechengCollectionController {
private UsersService usersService; // 管理员服务 private UsersService usersService; // 管理员服务
//后端列表 //后端列表
@RequestMapping("/page") // 处理分页请求 @RequestMapping("/page") // 处理分页请求
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录日志 logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录日志
@ -97,7 +97,7 @@ public class JianshenkechengCollectionController {
} }
//后端详情 //后端详情
@RequestMapping("/info/{id}") // 处理详情请求 @RequestMapping("/info/{id}") // 处理详情请求
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -127,7 +127,7 @@ public class JianshenkechengCollectionController {
} }
//后端保存 //后端保存
@RequestMapping("/save") // 处理保存请求 @RequestMapping("/save") // 处理保存请求
public R save(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request){ public R save(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString()); // 记录日志 logger.debug("save方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString()); // 记录日志
@ -157,7 +157,7 @@ public class JianshenkechengCollectionController {
} }
//后端修改 //后端修改
@RequestMapping("/update") // 处理更新请求 @RequestMapping("/update") // 处理更新请求
public R update(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString()); // 记录日志 logger.debug("update方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString()); // 记录日志
@ -168,7 +168,7 @@ public class JianshenkechengCollectionController {
} }
//删除 //删除
@RequestMapping("/delete") // 处理删除请求 @RequestMapping("/delete") // 处理删除请求
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志 logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志
@ -179,7 +179,7 @@ public class JianshenkechengCollectionController {
} }
//批量上传 //批量上传
@RequestMapping("/batchInsert") // 处理批量上传请求 @RequestMapping("/batchInsert") // 处理批量上传请求
public R save( String fileName, HttpServletRequest request){ public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志 logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志
@ -222,7 +222,7 @@ public class JianshenkechengCollectionController {
} }
//前端列表 //前端列表
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/list") // 处理列表请求 @RequestMapping("/list") // 处理列表请求
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -240,7 +240,7 @@ public class JianshenkechengCollectionController {
} }
//前端详情 //前端详情
@RequestMapping("/detail/{id}") // 处理详情请求 @RequestMapping("/detail/{id}") // 处理详情请求
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -271,7 +271,7 @@ public class JianshenkechengCollectionController {
} }
//前端保存 //前端保存
@RequestMapping("/add") // 处理添加请求 @RequestMapping("/add") // 处理添加请求
public R add(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request){ public R add(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString()); // 记录日志 logger.debug("add方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString()); // 记录日志

@ -32,10 +32,10 @@ import com.utils.R; // 导入统一返回结果类
import com.alibaba.fastjson.*; // 导入FastJSON相关类 import com.alibaba.fastjson.*; // 导入FastJSON相关类
// 健身课程 // 健身课程
//后端接口 //后端接口
//@author //@author
//@email //@email
@RestController // 标识为RESTful控制器 @RestController // 标识为RESTful控制器
@Controller // 标识为Spring控制器 @Controller // 标识为Spring控制器
@ -73,7 +73,7 @@ public class JianshenkechengController {
private UsersService usersService; // 管理员服务 private UsersService usersService; // 管理员服务
//后端列表 //后端列表
@RequestMapping("/page") // 处理分页请求 @RequestMapping("/page") // 处理分页请求
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录日志 logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录日志
@ -98,7 +98,7 @@ public class JianshenkechengController {
} }
//后端详情 //后端详情
@RequestMapping("/info/{id}") // 处理详情请求 @RequestMapping("/info/{id}") // 处理详情请求
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -122,7 +122,7 @@ public class JianshenkechengController {
} }
//后端保存 //后端保存
@RequestMapping("/save") // 处理保存请求 @RequestMapping("/save") // 处理保存请求
public R save(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request){ public R save(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString()); // 记录日志 logger.debug("save方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString()); // 记录日志
@ -160,7 +160,7 @@ public class JianshenkechengController {
} }
//后端修改 //后端修改
@RequestMapping("/update") // 处理更新请求 @RequestMapping("/update") // 处理更新请求
public R update(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString()); // 记录日志 logger.debug("update方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString()); // 记录日志
@ -181,7 +181,7 @@ public class JianshenkechengController {
} }
//删除 //删除
@RequestMapping("/delete") // 处理删除请求 @RequestMapping("/delete") // 处理删除请求
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志 logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志
@ -201,7 +201,7 @@ public class JianshenkechengController {
} }
//批量上传 //批量上传
@RequestMapping("/batchInsert") // 处理批量上传请求 @RequestMapping("/batchInsert") // 处理批量上传请求
public R save( String fileName, HttpServletRequest request){ public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志 logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志
@ -244,7 +244,7 @@ public class JianshenkechengController {
} }
//个性推荐 //个性推荐
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/gexingtuijian") // 处理个性推荐请求 @RequestMapping("/gexingtuijian") // 处理个性推荐请求
public R gexingtuijian(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R gexingtuijian(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -308,7 +308,7 @@ public class JianshenkechengController {
} }
//前端列表 //前端列表
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/list") // 处理列表请求 @RequestMapping("/list") // 处理列表请求
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -326,7 +326,7 @@ public class JianshenkechengController {
} }
//前端详情 //前端详情
@RequestMapping("/detail/{id}") // 处理详情请求 @RequestMapping("/detail/{id}") // 处理详情请求
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -356,7 +356,7 @@ public class JianshenkechengController {
} }
//前端保存 //前端保存
@RequestMapping("/add") // 处理添加请求 @RequestMapping("/add") // 处理添加请求
public R add(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request){ public R add(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString()); // 记录日志 logger.debug("add方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString()); // 记录日志

@ -32,10 +32,10 @@ import com.utils.R; // 导入统一返回结果类
import com.alibaba.fastjson.*; // 导入FastJSON相关类 import com.alibaba.fastjson.*; // 导入FastJSON相关类
//课程留言 //课程留言
//后端接口 //后端接口
//@author //@author
//@email //@email
@RestController // 标识为RESTful控制器用于处理HTTP请求 @RestController // 标识为RESTful控制器用于处理HTTP请求
@Controller // 标识为Spring控制器 @Controller // 标识为Spring控制器
@RequestMapping("/jianshenkechengLiuyan") // 定义请求映射路径 @RequestMapping("/jianshenkechengLiuyan") // 定义请求映射路径
@ -72,8 +72,8 @@ public class JianshenkechengLiuyanController {
private UsersService usersService; // 自动注入管理员服务 private UsersService usersService; // 自动注入管理员服务
//后端列表 //后端列表
//处理分页查询请求 //处理分页查询请求
@RequestMapping("/page") // 映射分页查询请求 @RequestMapping("/page") // 映射分页查询请求
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录请求日志 logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录请求日志
@ -96,8 +96,8 @@ public class JianshenkechengLiuyanController {
} }
//后端详情 //后端详情
//根据ID查询单条留言详情 //根据ID查询单条留言详情
@RequestMapping("/info/{id}") // 映射详情查询请求 @RequestMapping("/info/{id}") // 映射详情查询请求
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志 logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志
@ -128,8 +128,8 @@ public class JianshenkechengLiuyanController {
} }
//后端保存 //后端保存
//处理新增留言请求 //处理新增留言请求
@RequestMapping("/save") // 映射保存请求 @RequestMapping("/save") // 映射保存请求
public R save(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request){ public R save(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString()); // 记录请求日志 logger.debug("save方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString()); // 记录请求日志
@ -148,8 +148,8 @@ public class JianshenkechengLiuyanController {
} }
//后端修改 //后端修改
//处理更新留言请 //处理更新留言请
@RequestMapping("/update") // 映射更新请求 @RequestMapping("/update") // 映射更新请求
public R update(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString()); // 记录请求日志 logger.debug("update方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString()); // 记录请求日志
@ -169,8 +169,8 @@ public class JianshenkechengLiuyanController {
} }
//删除 //删除
//处理删除留言请求 //处理删除留言请求
@RequestMapping("/delete") // 映射删除请求 @RequestMapping("/delete") // 映射删除请求
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录请求日志 logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录请求日志
@ -180,8 +180,8 @@ public class JianshenkechengLiuyanController {
} }
//批量上传 //批量上传
//处理批量导入数据请求 //处理批量导入数据请求
@RequestMapping("/batchInsert") // 映射批量导入请求 @RequestMapping("/batchInsert") // 映射批量导入请求
public R save(String fileName, HttpServletRequest request){ public R save(String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录请求日志 logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录请求日志
@ -222,8 +222,8 @@ public class JianshenkechengLiuyanController {
} }
//前端列表 //前端列表
//处理前端分页查询请求 //处理前端分页查询请求
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/list") // 映射列表查询请求 @RequestMapping("/list") // 映射列表查询请求
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -240,8 +240,8 @@ public class JianshenkechengLiuyanController {
} }
//前端详情 //前端详情
//处理前端详情查询请求 //处理前端详情查询请求
@RequestMapping("/detail/{id}") // 映射详情查询请求 @RequestMapping("/detail/{id}") // 映射详情查询请求
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志 logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志
@ -272,8 +272,8 @@ public class JianshenkechengLiuyanController {
} }
//前端保存 //前端保存
//处理前端新增留言请求 //处理前端新增留言请求
@RequestMapping("/add") // 映射新增请求 @RequestMapping("/add") // 映射新增请求
public R add(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request){ public R add(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString()); // 记录请求日志 logger.debug("add方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString()); // 记录请求日志

@ -1,174 +1,203 @@
// 声明当前 Java 文件所属的包,此包一般用于存放控制器相关的类,负责处理 HTTP 请求和响应 // 声明当前 Java 文件所属的包,此包用于存放控制器类处理与教练相关的HTTP请求
package com.controller; package com.controller;
// 导入 Java 标准库中的 File 类,用于操作文件和目录 // 导入Java IO包中的File类用于文件操作
import java.io.File; import java.io.File;
// 导入 Java 标准库中的 BigDecimal 类,用于进行高精度的十进制数运 // 导入Java数学包中的BigDecimal类用于高精度计
import java.math.BigDecimal; import java.math.BigDecimal;
// 导入 Java 标准库中的 URL 类,用于表示统一资源定位符,可用于处理网络资源 // 导入Java网络包中的URL类用于处理统一资源定位符
import java.net.URL; import java.net.URL;
// 导入 Java 标准库中的 SimpleDateFormat 类,用于格式化和解析日期时间 // 导入Java文本包中的SimpleDateFormat类用于日期格式化
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
// 导入阿里巴巴的 FastJSON 库中的 JSONObject 类,用于处理 JSON 对象,方便进行 JSON 数据的操作 // 导入FastJSON库中的JSONObject类用于JSON数据处理
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
// 导入 Java 标准库中的 java.util 包下的所有类,该包包含了集合框架、日期和时间、随机数生成等常用工具类 // 导入Java工具包中的所有类包括集合、日期等工具
import java.util.*; import java.util.*;
// 导入 Spring 框架 BeanUtils 类,用于对象属性复制,方便在不同对象之间传递数据 // 导入Spring框架的BeanUtils类用于对象属性复制
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
// 导入 Java Servlet API 中的 HttpServletRequest 类,用于封装 HTTP 请求信息,在控制器中可获取请求参数等 // 导入Servlet的HttpServletRequest类用于处理HTTP请求
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
// 导入 Spring 框架 ContextLoader 类,用于获取 Spring 的应用上下文 // 导入Spring框架的ContextLoader类用于获取应用上下文
import org.springframework.web.context.ContextLoader; import org.springframework.web.context.ContextLoader;
// 导入 Java Servlet API 中 ServletContext 类,用于表示 Servlet 上下文,可获取应用的全局信息 // 导入Servlet的ServletContext类表示Servlet上下文
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
// 导入自定义的 TokenService 类,该类可能用于处理令牌相关的业务逻辑 // 导入自定义的TokenService类用于令牌管理
import com.service.TokenService; import com.service.TokenService;
// 导入自定义的 utils 包下的所有类,这些类通常包含一些通用的工具方法 // 导入自定义工具类包中的所有工具类
import com.utils.*; import com.utils.*;
// 导入 Java 反射机制中的 InvocationTargetException 类,当使用反射调用方法时,如果被调用的方法抛出异常,会被封装成该异常抛出 // 导入反射相关的InvocationTargetException类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入自定义的 DictionaryService 类,该类可能用于处理字典数据的业务逻辑 // 导入自定义的DictionaryService类用于字典数据管理
import com.service.DictionaryService; import com.service.DictionaryService;
// 导入 Apache Commons Lang3 库中的 StringUtils 类,提供了许多方便的字符串操作方法 // 导入Apache Commons Lang3库的StringUtils类用于字符串处理
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
// 导入自定义的 IgnoreAuth 注解,该注解可能用于标记不需要进行身份验证的接口 // 导入自定义的IgnoreAuth注解用于标记不需要认证的接口
import com.annotation.IgnoreAuth; import com.annotation.IgnoreAuth;
// 导入 SLF4J 日志框架 Logger 接口,用于记录日志信息 // 导入SLF4J日志框架的Logger接口
import org.slf4j.Logger; import org.slf4j.Logger;
// 导入 SLF4J 日志框架 LoggerFactory ,用于创建 Logger 实例 // 导入SLF4J日志框架的LoggerFactory类
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
// 导入 Spring 框架中的 Autowired 注解,用于自动注入依赖的 Bean // 导入Spring框架的Autowired注解用于依赖注入
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
// 导入 Spring 框架 Controller 注解,用于标记该类为控制器类,处理 HTTP 请求 // 导入Spring框架的Controller注解标记该类为控制器
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
// 导入 Spring 框架 RestController RequestMapping 等注解,用于构建 RESTful 风格的接口 // 导入Spring框架的RestController和RequestMapping等注解
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
// 导入 MyBatis-Plus 框架中的 EntityWrapper 类,用于构建实体对象的查询条件 // 导入MyBatis Plus的EntityWrapper类用于构建查询条件
import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.EntityWrapper;
// 导入 MyBatis-Plus 框架中的 Wrapper 接口EntityWrapper 实现了该接口,用于灵活构建查询条件 // 导入MyBatis Plus的Wrapper接口
import com.baomidou.mybatisplus.mapper.Wrapper; import com.baomidou.mybatisplus.mapper.Wrapper;
// 导入自定义的 entity 包下的所有类,这些类通常是实体类,对应数据库表结构 // 导入自定义实体类包中的所有类
import com.entity.*; import com.entity.*;
// 导入自定义的 view 包下的所有类,这些类可能是用于视图展示的实体 // 导入自定义视图实体类包中的所有
import com.entity.view.*; import com.entity.view.*;
// 导入自定义的 service 包下的所有类,这些类通常包含业务逻辑处理方法 // 导入自定义服务类包中的所有类
import com.service.*; import com.service.*;
// 导入自定义的 PageUtils 类,用于处理分页相关的逻辑 // 导入自定义分页工具类
import com.utils.PageUtils; import com.utils.PageUtils;
// 导入自定义的 R 类,通常用于封装统一的响应结果 // 导入自定义统一返回结果类
import com.utils.R; import com.utils.R;
// 导入阿里巴巴的 FastJSON 库中的所有类,进一步方便进行 JSON 数据的操作 // 导入FastJSON库中的所有类
import com.alibaba.fastjson.*; import com.alibaba.fastjson.*;
/**
//教练 *
//后端接口 *
//@author */
//@email @RestController // 标记为RESTful控制器
@RestController @Controller // 标记为Spring控制器
@Controller @RequestMapping("/jiaolian") // 定义基础请求路径
@RequestMapping("/jiaolian")
public class JiaolianController { public class JiaolianController {
// 创建日志记录器
private static final Logger logger = LoggerFactory.getLogger(JiaolianController.class); private static final Logger logger = LoggerFactory.getLogger(JiaolianController.class);
// 定义常量表名
private static final String TABLE_NAME = "jiaolian"; private static final String TABLE_NAME = "jiaolian";
// 自动注入教练服务
@Autowired @Autowired
private JiaolianService jiaolianService; private JiaolianService jiaolianService;
// 自动注入令牌服务
@Autowired @Autowired
private TokenService tokenService; private TokenService tokenService;
// 自动注入字典服务
@Autowired @Autowired
private DictionaryService dictionaryService;//字典 private DictionaryService dictionaryService;
// 自动注入论坛服务
@Autowired @Autowired
private ForumService forumService;//健身论坛 private ForumService forumService;
// 自动注入健身课程服务
@Autowired @Autowired
private JianshenkechengService jianshenkechengService;//健身课程 private JianshenkechengService jianshenkechengService;
// 自动注入课程收藏服务
@Autowired @Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏 private JianshenkechengCollectionService jianshenkechengCollectionService;
// 自动注入课程留言服务
@Autowired @Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言 private JianshenkechengLiuyanService jianshenkechengLiuyanService;
// 自动注入教练预约服务
@Autowired @Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请 private JiaolianYuyueService jiaolianYuyueService;
// 自动注入健身资讯服务
@Autowired @Autowired
private NewsService newsService;//健身资讯 private NewsService newsService;
// 自动注入单页数据服务
@Autowired @Autowired
private SingleSeachService singleSeachService;//单页数据 private SingleSeachService singleSeachService;
// 自动注入用户服务
@Autowired @Autowired
private YonghuService yonghuService;//用户 private YonghuService yonghuService;
// 自动注入管理员服务
@Autowired @Autowired
private UsersService usersService;//管理员 private UsersService usersService;
/**
//后端列表 *
*/
@RequestMapping("/page") @RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); logger.debug("分页查询方法:,,控制器:{},,参数:{}",this.getClass().getName(),JSONObject.toJSONString(params));
// 获取当前用户角色
String role = String.valueOf(request.getSession().getAttribute("role")); String role = String.valueOf(request.getSession().getAttribute("role"));
// 根据角色设置查询条件
if(false) if(false)
return R.error(511,"永不会进入"); return R.error(511,"永不会进入");
else if("用户".equals(role)) else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId")); params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role)) else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId")); params.put("jiaolianId",request.getSession().getAttribute("userId"));
params.put("dataDeleteStart",1);params.put("dataDeleteEnd",1); // 设置数据删除状态条件
params.put("dataDeleteStart",1);
params.put("dataDeleteEnd",1);
// 检查参数有效性
CommonUtil.checkMap(params); CommonUtil.checkMap(params);
// 调用服务层查询分页数据
PageUtils page = jiaolianService.queryPage(params); PageUtils page = jiaolianService.queryPage(params);
//字典数据转换 // 字典数据转换
List<JiaolianView> list =(List<JiaolianView>)page.getList(); List<JiaolianView> list =(List<JiaolianView>)page.getList();
for(JiaolianView c:list){ for(JiaolianView c:list){
//修改对应字典表字段 // 转换字典表字段
dictionaryService.dictionaryConvert(c, request); dictionaryService.dictionaryConvert(c, request);
} }
// 返回分页数据
return R.ok().put("data", page); return R.ok().put("data", page);
} }
/**
//后端详情 *
*/
@RequestMapping("/info/{id}") @RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("详情查询方法:,,控制器:{},,ID:{}",this.getClass().getName(),id);
// 根据ID查询教练信息
JiaolianEntity jiaolian = jiaolianService.selectById(id); JiaolianEntity jiaolian = jiaolianService.selectById(id);
if(jiaolian !=null){ if(jiaolian !=null){
//entity转view // 实体转视图
JiaolianView view = new JiaolianView(); JiaolianView view = new JiaolianView();
BeanUtils.copyProperties( jiaolian , view );//把实体数据重构到view中 // 复制属性
//修改对应字典表字段 BeanUtils.copyProperties( jiaolian , view );
// 转换字典表字段
dictionaryService.dictionaryConvert(view, request); dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view); return R.ok().put("data", view);
}else { }else {
return R.error(511,"查不到数据"); return R.error(511,"查不到数据");
} }
} }
//后端保存 /**
*
*/
@RequestMapping("/save") @RequestMapping("/save")
public R save(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request){ public R save(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jiaolian:{}",this.getClass().getName(),jiaolian.toString()); logger.debug("保存方法:,,控制器:{},,教练信息:{}",this.getClass().getName(),jiaolian.toString());
// 获取当前用户角色
String role = String.valueOf(request.getSession().getAttribute("role")); String role = String.valueOf(request.getSession().getAttribute("role"));
if(false) if(false)
return R.error(511,"永远不会进入"); return R.error(511,"永远不会进入");
// 构建查询条件,检查用户名和手机号是否已存在
Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>() Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>()
.eq("username", jiaolian.getUsername()) .eq("username", jiaolian.getUsername())
.or() .or()
.eq("jiaolian_phone", jiaolian.getJiaolianPhone()) .eq("jiaolian_phone", jiaolian.getJiaolianPhone())
.eq("data_delete", 1) .eq("data_delete", 1)
; ;
logger.info("sql语句:"+queryWrapper.getSqlSegment()); logger.info("SQL语句:"+queryWrapper.getSqlSegment());
// 执行查询
JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper); JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper);
if(jiaolianEntity==null){ if(jiaolianEntity==null){
jiaolian.setDataDelete(1); // 设置默认值
jiaolian.setInsertTime(new Date()); jiaolian.setDataDelete(1); // 数据删除状态
jiaolian.setCreateTime(new Date()); jiaolian.setInsertTime(new Date()); // 插入时间
jiaolian.setPassword("123456"); jiaolian.setCreateTime(new Date()); // 创建时间
jiaolian.setPassword("123456"); // 默认密码
// 保存教练信息
jiaolianService.insert(jiaolian); jiaolianService.insert(jiaolian);
return R.ok(); return R.ok();
}else { }else {
@ -176,42 +205,47 @@ public class JiaolianController {
} }
} }
/**
//后端修改 *
*/
@RequestMapping("/update") @RequestMapping("/update")
public R update(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jiaolian:{}",this.getClass().getName(),jiaolian.toString()); logger.debug("修改方法:,,控制器:{},,教练信息:{}",this.getClass().getName(),jiaolian.toString());
JiaolianEntity oldJiaolianEntity = jiaolianService.selectById(jiaolian.getId());//查询原先数据 // 查询原有数据
JiaolianEntity oldJiaolianEntity = jiaolianService.selectById(jiaolian.getId());
// 获取当前用户角色
String role = String.valueOf(request.getSession().getAttribute("role")); String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false) // 处理空字段
// return R.error(511,"永远不会进入");
if("".equals(jiaolian.getJiaolianPhoto()) || "null".equals(jiaolian.getJiaolianPhoto())){ if("".equals(jiaolian.getJiaolianPhoto()) || "null".equals(jiaolian.getJiaolianPhoto())){
jiaolian.setJiaolianPhoto(null); jiaolian.setJiaolianPhoto(null);
} }
if("".equals(jiaolian.getJiaolianContent()) || "null".equals(jiaolian.getJiaolianContent())){ if("".equals(jiaolian.getJiaolianContent()) || "null".equals(jiaolian.getJiaolianContent())){
jiaolian.setJiaolianContent(null); jiaolian.setJiaolianContent(null);
} }
jiaolianService.updateById(jiaolian);//根据id更新 // 更新数据
return R.ok(); jiaolianService.updateById(jiaolian);
return R.ok();
} }
/**
*
*/
//删除
@RequestMapping("/delete") @RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); logger.debug("删除方法:,,控制器:{},,IDs:{}",this.getClass().getName(),ids.toString());
List<JiaolianEntity> oldJiaolianList =jiaolianService.selectBatchIds(Arrays.asList(ids));//要删除的数据 // 查询要删除的数据
List<JiaolianEntity> oldJiaolianList =jiaolianService.selectBatchIds(Arrays.asList(ids));
// 准备更新列表
ArrayList<JiaolianEntity> list = new ArrayList<>(); ArrayList<JiaolianEntity> list = new ArrayList<>();
for(Integer id:ids){ for(Integer id:ids){
JiaolianEntity jiaolianEntity = new JiaolianEntity(); JiaolianEntity jiaolianEntity = new JiaolianEntity();
jiaolianEntity.setId(id); jiaolianEntity.setId(id);
jiaolianEntity.setDataDelete(2); jiaolianEntity.setDataDelete(2); // 标记为删除
list.add(jiaolianEntity); list.add(jiaolianEntity);
} }
// 批量更新删除状态
if(list != null && list.size() >0){ if(list != null && list.size() >0){
jiaolianService.updateBatchById(list); jiaolianService.updateBatchById(list);
} }
@ -219,19 +253,24 @@ public class JiaolianController {
return R.ok(); return R.ok();
} }
/**
*
//批量上传 */
@RequestMapping("/batchInsert") @RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){ public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); logger.debug("批量导入方法:,,控制器:{},,文件名:{}",this.getClass().getName(),fileName);
// 获取当前用户ID
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))); Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
// 创建日期格式化对象
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try { try {
List<JiaolianEntity> jiaolianList = new ArrayList<>();//上传的东西 // 准备导入的数据列表
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段 List<JiaolianEntity> jiaolianList = new ArrayList<>();
// 需要检查重复的字段映射
Map<String, List<String>> seachFields= new HashMap<>();
// 当前日期
Date date = new Date(); Date date = new Date();
// 检查文件后缀
int lastIndexOf = fileName.lastIndexOf("."); int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){ if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀"); return R.error(511,"该文件没有后缀");
@ -240,53 +279,54 @@ public class JiaolianController {
if(!".xls".equals(suffix)){ if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件"); return R.error(511,"只支持后缀为xls的excel文件");
}else{ }else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径 // 获取文件路径
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);
File file = new File(resource.getFile()); File file = new File(resource.getFile());
if(!file.exists()){ if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员"); return R.error(511,"找不到上传文件,请联系管理员");
}else{ }else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件 // 读取Excel文件
dataList.remove(0);//删除第一行,因为第一行是提示 List<List<String>> dataList = PoiUtil.poiImport(file.getPath());
dataList.remove(0);// 删除标题行
for(List<String> data:dataList){ for(List<String> data:dataList){
//循环 // 创建教练实体
JiaolianEntity jiaolianEntity = new JiaolianEntity(); JiaolianEntity jiaolianEntity = new JiaolianEntity();
// jiaolianEntity.setUsername(data.get(0)); //账户 要改的 // 设置各字段值示例代码实际应根据Excel列设置
// jiaolianEntity.setPassword("123456");//密码 // jiaolianEntity.setUsername(data.get(0)); // 账户
// jiaolianEntity.setJiaolianName(data.get(0)); //教练名称 要改的 // jiaolianEntity.setPassword("123456"); // 密码
// jiaolianEntity.setJiaolianPhone(data.get(0)); //教练手机号 要改的 // jiaolianEntity.setJiaolianName(data.get(0)); // 教练名称
// jiaolianEntity.setJiaolianPhoto("");//详情和图片 // jiaolianEntity.setJiaolianPhone(data.get(0)); // 教练手机号
// jiaolianEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的 // jiaolianEntity.setJiaolianPhoto(""); // 照片
// jiaolianEntity.setJiaolianEmail(data.get(0)); //教练邮箱 要改的 // jiaolianEntity.setSexTypes(Integer.valueOf(data.get(0))); // 性别
// jiaolianEntity.setJiaolianContent("");//详情和图片 // jiaolianEntity.setJiaolianEmail(data.get(0)); // 邮箱
// jiaolianEntity.setDataDelete(1);//逻辑删除字段 // jiaolianEntity.setJiaolianContent(""); // 内容
// jiaolianEntity.setInsertTime(date);//时间 // jiaolianEntity.setDataDelete(1); // 删除状态
// jiaolianEntity.setCreateTime(date);//时间 // jiaolianEntity.setInsertTime(date); // 插入时间
// jiaolianEntity.setCreateTime(date); // 创建时间
jiaolianList.add(jiaolianEntity); jiaolianList.add(jiaolianEntity);
// 收集需要检查重复的字段
//把要查询是否重复的字段放入map中 // 账户字段检查
//账户 if(seachFields.containsKey("username")){
if(seachFields.containsKey("username")){ List<String> username = seachFields.get("username");
List<String> username = seachFields.get("username"); username.add(data.get(0));
username.add(data.get(0));//要改的 }else{
}else{ List<String> username = new ArrayList<>();
List<String> username = new ArrayList<>(); username.add(data.get(0));
username.add(data.get(0));//要改的 seachFields.put("username",username);
seachFields.put("username",username); }
} // 手机号字段检查
//教练手机号 if(seachFields.containsKey("jiaolianPhone")){
if(seachFields.containsKey("jiaolianPhone")){ List<String> jiaolianPhone = seachFields.get("jiaolianPhone");
List<String> jiaolianPhone = seachFields.get("jiaolianPhone"); jiaolianPhone.add(data.get(0));
jiaolianPhone.add(data.get(0));//要改的 }else{
}else{ List<String> jiaolianPhone = new ArrayList<>();
List<String> jiaolianPhone = new ArrayList<>(); jiaolianPhone.add(data.get(0));
jiaolianPhone.add(data.get(0));//要改的 seachFields.put("jiaolianPhone",jiaolianPhone);
seachFields.put("jiaolianPhone",jiaolianPhone); }
}
} }
//查询是否重复 // 检查账户是否重复
//账户
List<JiaolianEntity> jiaolianEntities_username = jiaolianService.selectList(new EntityWrapper<JiaolianEntity>().in("username", seachFields.get("username")).eq("data_delete", 1)); List<JiaolianEntity> jiaolianEntities_username = jiaolianService.selectList(new EntityWrapper<JiaolianEntity>().in("username", seachFields.get("username")).eq("data_delete", 1));
if(jiaolianEntities_username.size() >0 ){ if(jiaolianEntities_username.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>(); ArrayList<String> repeatFields = new ArrayList<>();
@ -295,7 +335,7 @@ public class JiaolianController {
} }
return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString()); return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());
} }
//教练手机号 // 检查手机号是否重复
List<JiaolianEntity> jiaolianEntities_jiaolianPhone = jiaolianService.selectList(new EntityWrapper<JiaolianEntity>().in("jiaolian_phone", seachFields.get("jiaolianPhone")).eq("data_delete", 1)); List<JiaolianEntity> jiaolianEntities_jiaolianPhone = jiaolianService.selectList(new EntityWrapper<JiaolianEntity>().in("jiaolian_phone", seachFields.get("jiaolianPhone")).eq("data_delete", 1));
if(jiaolianEntities_jiaolianPhone.size() >0 ){ if(jiaolianEntities_jiaolianPhone.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>(); ArrayList<String> repeatFields = new ArrayList<>();
@ -304,6 +344,7 @@ public class JiaolianController {
} }
return R.error(511,"数据库的该表中的 [教练手机号] 字段已经存在 存在数据为:"+repeatFields.toString()); return R.error(511,"数据库的该表中的 [教练手机号] 字段已经存在 存在数据为:"+repeatFields.toString());
} }
// 批量插入数据
jiaolianService.insertBatch(jiaolianList); jiaolianService.insertBatch(jiaolianList);
return R.ok(); return R.ok();
} }
@ -315,17 +356,23 @@ public class JiaolianController {
} }
} }
/**
//登录 *
@IgnoreAuth */
@IgnoreAuth // 忽略认证
@RequestMapping(value = "/login") @RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) { public R login(String username, String password, String captcha, HttpServletRequest request) {
// 根据用户名查询教练
JiaolianEntity jiaolian = jiaolianService.selectOne(new EntityWrapper<JiaolianEntity>().eq("username", username)); JiaolianEntity jiaolian = jiaolianService.selectOne(new EntityWrapper<JiaolianEntity>().eq("username", username));
// 验证账号密码
if(jiaolian==null || !jiaolian.getPassword().equals(password)) if(jiaolian==null || !jiaolian.getPassword().equals(password))
return R.error("账号或密码不正确"); return R.error("账号或密码不正确");
// 检查账号状态
else if(jiaolian.getDataDelete() != 1) else if(jiaolian.getDataDelete() != 1)
return R.error("账户已被删除"); return R.error("账户已被删除");
// 生成令牌
String token = tokenService.generateToken(jiaolian.getId(),username, "jiaolian", "教练"); String token = tokenService.generateToken(jiaolian.getId(),username, "jiaolian", "教练");
// 构建返回结果
R r = R.ok(); R r = R.ok();
r.put("token", token); r.put("token", token);
r.put("role","教练"); r.put("role","教练");
@ -335,87 +382,107 @@ public class JiaolianController {
return r; return r;
} }
//注册 /**
@IgnoreAuth *
*/
@IgnoreAuth // 忽略认证
@PostMapping(value = "/register") @PostMapping(value = "/register")
public R register(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request) { public R register(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request) {
// ValidatorUtils.validateEntity(user); // 构建查询条件,检查用户名和手机号是否已存在
Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>() Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>()
.eq("username", jiaolian.getUsername()) .eq("username", jiaolian.getUsername())
.or() .or()
.eq("jiaolian_phone", jiaolian.getJiaolianPhone()) .eq("jiaolian_phone", jiaolian.getJiaolianPhone())
.andNew() .andNew()
.eq("data_delete", 1) .eq("data_delete", 1)
; ;
// 执行查询
JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper); JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper);
if(jiaolianEntity != null) if(jiaolianEntity != null)
return R.error("账户或者教练手机号已经被使用"); return R.error("账户或者教练手机号已经被使用");
jiaolian.setDataDelete(1); // 设置默认值
jiaolian.setInsertTime(new Date()); jiaolian.setDataDelete(1); // 数据状态
jiaolian.setCreateTime(new Date()); jiaolian.setInsertTime(new Date()); // 插入时间
jiaolian.setCreateTime(new Date()); // 创建时间
// 保存教练信息
jiaolianService.insert(jiaolian); jiaolianService.insert(jiaolian);
return R.ok(); return R.ok();
} }
/**
//重置密码 *
*/
@GetMapping(value = "/resetPassword") @GetMapping(value = "/resetPassword")
public R resetPassword(Integer id, HttpServletRequest request) { public R resetPassword(Integer id, HttpServletRequest request) {
// 根据ID查询教练
JiaolianEntity jiaolian = jiaolianService.selectById(id); JiaolianEntity jiaolian = jiaolianService.selectById(id);
// 重置密码为默认值
jiaolian.setPassword("123456"); jiaolian.setPassword("123456");
// 更新密码
jiaolianService.updateById(jiaolian); jiaolianService.updateById(jiaolian);
return R.ok(); return R.ok();
} }
/**
//修改密码 *
@GetMapping(value = "/updatePassword") */
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) { @GetMapping(value = "/updatePassword")
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
// 获取当前登录教练
JiaolianEntity jiaolian = jiaolianService.selectById((Integer)request.getSession().getAttribute("userId")); JiaolianEntity jiaolian = jiaolianService.selectById((Integer)request.getSession().getAttribute("userId"));
if(newPassword == null){ // 验证新密码
return R.error("新密码不能为空") ; if(newPassword == null){
} return R.error("新密码不能为空") ;
if(!oldPassword.equals(jiaolian.getPassword())){ }
return R.error("原密码输入错误"); // 验证旧密码
} if(!oldPassword.equals(jiaolian.getPassword())){
if(newPassword.equals(jiaolian.getPassword())){ return R.error("原密码输入错误");
return R.error("新密码不能和原密码一致") ; }
} // 检查新旧密码是否相同
if(newPassword.equals(jiaolian.getPassword())){
return R.error("新密码不能和原密码一致") ;
}
// 更新密码
jiaolian.setPassword(newPassword); jiaolian.setPassword(newPassword);
jiaolianService.updateById(jiaolian); jiaolianService.updateById(jiaolian);
return R.ok(); return R.ok();
} }
//忘记密码 /**
@IgnoreAuth *
*/
@IgnoreAuth // 忽略认证
@RequestMapping(value = "/resetPass") @RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request) { public R resetPass(String username, HttpServletRequest request) {
// 根据用户名查询教练
JiaolianEntity jiaolian = jiaolianService.selectOne(new EntityWrapper<JiaolianEntity>().eq("username", username)); JiaolianEntity jiaolian = jiaolianService.selectOne(new EntityWrapper<JiaolianEntity>().eq("username", username));
if(jiaolian!=null){ if(jiaolian!=null){
// 重置密码为默认值
jiaolian.setPassword("123456"); jiaolian.setPassword("123456");
// 更新密码
jiaolianService.updateById(jiaolian); jiaolianService.updateById(jiaolian);
return R.ok(); return R.ok();
}else{ }else {
return R.error("账号不存在"); return R.error("账号不存在");
} }
} }
/**
//获取用户的session用户信息 *
*/
@RequestMapping("/session") @RequestMapping("/session")
public R getCurrJiaolian(HttpServletRequest request){ public R getCurrJiaolian(HttpServletRequest request){
// 从会话中获取用户ID
Integer id = (Integer)request.getSession().getAttribute("userId"); Integer id = (Integer)request.getSession().getAttribute("userId");
// 查询教练信息
JiaolianEntity jiaolian = jiaolianService.selectById(id); JiaolianEntity jiaolian = jiaolianService.selectById(id);
if(jiaolian !=null){ if(jiaolian !=null){
//entity转view // 实体转视图
JiaolianView view = new JiaolianView(); JiaolianView view = new JiaolianView();
BeanUtils.copyProperties( jiaolian , view );//把实体数据重构到view中 // 复制属性
BeanUtils.copyProperties( jiaolian , view );
//修改对应字典表字段 // 转换字典字段
dictionaryService.dictionaryConvert(view, request); dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view); return R.ok().put("data", view);
}else { }else {
@ -423,84 +490,86 @@ public class JiaolianController {
} }
} }
/**
* 退
//退出 */
@GetMapping(value = "logout") @GetMapping(value = "logout")
public R logout(HttpServletRequest request) { public R logout(HttpServletRequest request) {
// 使会话失效
request.getSession().invalidate(); request.getSession().invalidate();
return R.ok("退出成功"); return R.ok("退出成功");
} }
/**
*
*/
//前端列表 @IgnoreAuth // 忽略认证
@IgnoreAuth
@RequestMapping("/list") @RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); logger.debug("前端列表查询方法:,,控制器:{},,参数:{}",this.getClass().getName(),JSONObject.toJSONString(params));
// 检查参数有效性
CommonUtil.checkMap(params); CommonUtil.checkMap(params);
// 查询分页数据
PageUtils page = jiaolianService.queryPage(params); PageUtils page = jiaolianService.queryPage(params);
//字典数据转换 // 字典数据转换
List<JiaolianView> list =(List<JiaolianView>)page.getList(); List<JiaolianView> list =(List<JiaolianView>)page.getList();
for(JiaolianView c:list) for(JiaolianView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段 dictionaryService.dictionaryConvert(c, request); // 转换字典字段
return R.ok().put("data", page); return R.ok().put("data", page);
} }
/**
//前端详情 *
*/
@RequestMapping("/detail/{id}") @RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("前端详情查询方法:,,控制器:{},,ID:{}",this.getClass().getName(),id);
// 根据ID查询教练
JiaolianEntity jiaolian = jiaolianService.selectById(id); JiaolianEntity jiaolian = jiaolianService.selectById(id);
if(jiaolian !=null){ if(jiaolian !=null){
// 实体转视图
JiaolianView view = new JiaolianView();
//entity转view // 复制属性
JiaolianView view = new JiaolianView(); BeanUtils.copyProperties( jiaolian , view );
BeanUtils.copyProperties( jiaolian , view );//把实体数据重构到view中 // 转换字典字段
dictionaryService.dictionaryConvert(view, request);
//修改对应字典表字段 return R.ok().put("data", view);
dictionaryService.dictionaryConvert(view, request); }else {
return R.ok().put("data", view); return R.error(511,"查不到数据");
}else { }
return R.error(511,"查不到数据");
}
} }
/**
*
//前端保存 */
@RequestMapping("/add") @RequestMapping("/add")
public R add(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request){ public R add(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jiaolian:{}",this.getClass().getName(),jiaolian.toString()); logger.debug("前端保存方法:,,控制器:{},,教练信息:{}",this.getClass().getName(),jiaolian.toString());
// 构建查询条件,检查用户名和手机号是否已存在
Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>() Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>()
.eq("username", jiaolian.getUsername()) .eq("username", jiaolian.getUsername())
.or() .or()
.eq("jiaolian_phone", jiaolian.getJiaolianPhone()) .eq("jiaolian_phone", jiaolian.getJiaolianPhone())
.andNew() .andNew()
.eq("data_delete", 1) .eq("data_delete", 1)
// .notIn("jiaolian_types", new Integer[]{102}) ;
; logger.info("SQL语句:"+queryWrapper.getSqlSegment());
logger.info("sql语句:"+queryWrapper.getSqlSegment()); // 执行查询
JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper); JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper);
if(jiaolianEntity==null){ if(jiaolianEntity==null){
jiaolian.setDataDelete(1); // 设置默认值
jiaolian.setInsertTime(new Date()); jiaolian.setDataDelete(1); // 数据状态
jiaolian.setCreateTime(new Date()); jiaolian.setInsertTime(new Date()); // 插入时间
jiaolian.setPassword("123456"); jiaolian.setCreateTime(new Date()); // 创建时间
jiaolianService.insert(jiaolian); jiaolian.setPassword("123456"); // 默认密码
// 保存教练信息
jiaolianService.insert(jiaolian);
return R.ok(); return R.ok();
}else { }else {
return R.error(511,"账户或者教练手机号已经被使用"); return R.error(511,"账户或者教练手机号已经被使用");
} }
} }
}
}

@ -32,10 +32,10 @@ import com.utils.R; // 导入统一返回结果类
import com.alibaba.fastjson.*; // 导入FastJSON相关类 import com.alibaba.fastjson.*; // 导入FastJSON相关类
//教练预约申请 //教练预约申请
//后端接口 //后端接口
//@author //@author
// @email // @email
@RestController // 标识为RESTful控制器用于处理HTTP请求 @RestController // 标识为RESTful控制器用于处理HTTP请求
@Controller // 标识为Spring控制器 @Controller // 标识为Spring控制器
@ -73,8 +73,8 @@ public class JiaolianYuyueController {
private UsersService usersService; // 自动注入管理员服务 private UsersService usersService; // 自动注入管理员服务
//后端列表 //后端列表
//处理分页查询请求 //处理分页查询请求
@RequestMapping("/page") // 映射分页查询请求 @RequestMapping("/page") // 映射分页查询请求
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录请求日志 logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); // 记录请求日志
@ -97,8 +97,8 @@ public class JiaolianYuyueController {
} }
//后端详情 //后端详情
//根据ID查询单条预约详情 //根据ID查询单条预约详情
@RequestMapping("/info/{id}") // 映射详情查询请求 @RequestMapping("/info/{id}") // 映射详情查询请求
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志 logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志
@ -122,8 +122,8 @@ public class JiaolianYuyueController {
} }
//后端保存 //后端保存
//处理新增预约请求 //处理新增预约请求
@RequestMapping("/save") // 映射保存请求 @RequestMapping("/save") // 映射保存请求
public R save(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request){ public R save(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString()); // 记录请求日志 logger.debug("save方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString()); // 记录请求日志
@ -158,8 +158,8 @@ public class JiaolianYuyueController {
} }
//后端修改 //后端修改
//处理更新预约请求 //处理更新预约请求
@RequestMapping("/update") // 映射更新请求 @RequestMapping("/update") // 映射更新请求
public R update(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString()); // 记录请求日志 logger.debug("update方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString()); // 记录请求日志
@ -178,8 +178,8 @@ public class JiaolianYuyueController {
} }
//审核 //审核
//处理预约审核请求 //处理预约审核请求
@RequestMapping("/shenhe") // 映射审核请求 @RequestMapping("/shenhe") // 映射审核请求
public R shenhe(@RequestBody JiaolianYuyueEntity jiaolianYuyueEntity, HttpServletRequest request){ public R shenhe(@RequestBody JiaolianYuyueEntity jiaolianYuyueEntity, HttpServletRequest request){
logger.debug("shenhe方法:,,Controller:{},,jiaolianYuyueEntity:{}",this.getClass().getName(),jiaolianYuyueEntity.toString()); // 记录请求日志 logger.debug("shenhe方法:,,Controller:{},,jiaolianYuyueEntity:{}",this.getClass().getName(),jiaolianYuyueEntity.toString()); // 记录请求日志
@ -191,8 +191,8 @@ public class JiaolianYuyueController {
} }
//删除 //删除
//处理删除预约请求 //处理删除预约请求
@RequestMapping("/delete") // 映射删除请求 @RequestMapping("/delete") // 映射删除请求
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录请求日志 logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录请求日志
@ -202,8 +202,8 @@ public class JiaolianYuyueController {
} }
//批量上传 //批量上传
//处理批量导入数据请求 //处理批量导入数据请求
@RequestMapping("/batchInsert") // 映射批量导入请求 @RequestMapping("/batchInsert") // 映射批量导入请求
public R save(String fileName, HttpServletRequest request){ public R save(String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录请求日志 logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录请求日志
@ -264,8 +264,8 @@ public class JiaolianYuyueController {
} }
//前端列表 //前端列表
//处理前端分页查询请求 //处理前端分页查询请求
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/list") // 映射列表查询请求 @RequestMapping("/list") // 映射列表查询请求
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -282,8 +282,8 @@ public class JiaolianYuyueController {
} }
//前端详情 //前端详情
//处理前端详情查询请求 //处理前端详情查询请求
@RequestMapping("/detail/{id}") // 映射详情查询请求 @RequestMapping("/detail/{id}") // 映射详情查询请求
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志 logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录请求日志
@ -307,7 +307,7 @@ public class JiaolianYuyueController {
} }
//前端保存 //前端保存
//处理前端新增预约请求 //处理前端新增预约请求
@RequestMapping("/add") // 映射新增请求 @RequestMapping("/add") // 映射新增请求
public R add(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request){ public R add(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request){

@ -33,10 +33,10 @@ import com.alibaba.fastjson.*; // 阿里巴巴FastJSON库
//健身资讯 //健身资讯
//后端接口 //后端接口
//@author //@author
// @email // @email
@RestController @RestController
@Controller @Controller
@ -74,11 +74,11 @@ public class NewsController {
private UsersService usersService; // 管理员服务 private UsersService usersService; // 管理员服务
//后端列表 //后端列表
//分页查询健身资讯数据 //分页查询健身资讯数据
//@param params 请求参数,包含分页和查询条件 //@param params 请求参数,包含分页和查询条件
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回分页数据和状态信息 //@return 返回分页数据和状态信息
@RequestMapping("/page") @RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
@ -102,11 +102,11 @@ public class NewsController {
} }
//后端详情 //后端详情
//根据ID查询单条健身资讯详情 //根据ID查询单条健身资讯详情
//@param id 资讯ID //@param id 资讯ID
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回资讯详情和状态信息 //@return 返回资讯详情和状态信息
@RequestMapping("/info/{id}") @RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
@ -124,11 +124,11 @@ public class NewsController {
} }
//后端保存 //后端保存
//新增健身资讯 //新增健身资讯
//@param news 资讯实体 //@param news 资讯实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果状态 //@return 返回操作结果状态
@RequestMapping("/save") @RequestMapping("/save")
public R save(@RequestBody NewsEntity news, HttpServletRequest request){ public R save(@RequestBody NewsEntity news, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString()); logger.debug("save方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
@ -155,11 +155,11 @@ public class NewsController {
} }
} }
//后端修改 //后端修改
//更新健身资讯 //更新健身资讯
//@param news 资讯实体 //@param news 资讯实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果状态 //@return 返回操作结果状态
@RequestMapping("/update") @RequestMapping("/update")
public R update(@RequestBody NewsEntity news, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody NewsEntity news, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString()); logger.debug("update方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
@ -180,11 +180,11 @@ public class NewsController {
} }
//删除 //删除
//批量删除健身资讯 //批量删除健身资讯
//@param ids 要删除的资讯ID数组 //@param ids 要删除的资讯ID数组
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果状态 //@return 返回操作结果状态
@RequestMapping("/delete") @RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
@ -195,11 +195,11 @@ public class NewsController {
} }
//批量上传 //批量上传
//通过Excel文件批量导入健身资讯数据 //通过Excel文件批量导入健身资讯数据
//@param fileName Excel文件名 //@param fileName Excel文件名
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果状态 //@return 返回操作结果状态
@RequestMapping("/batchInsert") @RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){ public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
@ -251,11 +251,11 @@ public class NewsController {
} }
//前端列表 //前端列表
//分页查询健身资讯数据(无需认证) //分页查询健身资讯数据(无需认证)
//@param params 请求参数,包含分页和查询条件 //@param params 请求参数,包含分页和查询条件
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回分页数据和状态信息 //@return 返回分页数据和状态信息
@IgnoreAuth @IgnoreAuth
@RequestMapping("/list") @RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -273,11 +273,11 @@ public class NewsController {
} }
//前端详情 //前端详情
//根据ID查询单条健身资讯详情 //根据ID查询单条健身资讯详情
//@param id 资讯ID //@param id 资讯ID
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回资讯详情和状态信息 //@return 返回资讯详情和状态信息
@RequestMapping("/detail/{id}") @RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
@ -296,11 +296,11 @@ public class NewsController {
} }
//前端保存 //前端保存
//新增健身资讯 //新增健身资讯
//@param news 资讯实体 //@param news 资讯实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果状态 //@return 返回操作结果状态
@RequestMapping("/add") @RequestMapping("/add")
public R add(@RequestBody NewsEntity news, HttpServletRequest request){ public R add(@RequestBody NewsEntity news, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString()); logger.debug("add方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());

@ -35,10 +35,10 @@ import com.utils.R; // 通用返回结果类
import com.alibaba.fastjson.*; // FastJSON工具包 import com.alibaba.fastjson.*; // FastJSON工具包
//单页数据 //单页数据
//后端接口控制器 //后端接口控制器
//@author //@author
//@email //@email
@RestController // 标识这是一个RESTful风格的控制器 @RestController // 标识这是一个RESTful风格的控制器
@Controller // 标识这是一个Spring MVC控制器 @Controller // 标识这是一个Spring MVC控制器
@ -77,11 +77,11 @@ public class SingleSeachController {
private UsersService usersService; // 管理员服务 private UsersService usersService; // 管理员服务
//后端列表 //后端列表
//分页查询单页数据 //分页查询单页数据
//@param params 请求参数Map //@param params 请求参数Map
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回分页数据结果 //@return 返回分页数据结果
@RequestMapping("/page") @RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -105,11 +105,11 @@ public class SingleSeachController {
} }
//后端详情 //后端详情
//根据ID查询单条单页数据详情 //根据ID查询单条单页数据详情
//@param id 数据ID //@param id 数据ID
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回查询结果 //@return 返回查询结果
@RequestMapping("/info/{id}") @RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -125,12 +125,12 @@ public class SingleSeachController {
} }
//后端保存 //后端保存
//新增单页数据 //新增单页数据
//@param singleSeach 单页数据实体 //@param singleSeach 单页数据实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果 //@return 返回操作结果
//@RequestMapping("/save") //@RequestMapping("/save")
public R save(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request){ public R save(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString()); // 记录日志 logger.debug("save方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString()); // 记录日志
String role = String.valueOf(request.getSession().getAttribute("role")); // 获取用户角色 String role = String.valueOf(request.getSession().getAttribute("role")); // 获取用户角色
@ -153,10 +153,10 @@ public class SingleSeachController {
} }
//后端修改 //后端修改
//更新单页数据 //更新单页数据
//@param singleSeach 单页数据实体 //@param singleSeach 单页数据实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果 //@return 返回操作结果
@RequestMapping("/update") @RequestMapping("/update")
public R update(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString()); // 记录日志 logger.debug("update方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString()); // 记录日志
@ -175,11 +175,11 @@ public class SingleSeachController {
} }
//删除 //删除
//批量删除单页数据 //批量删除单页数据
//@param ids 要删除的ID数组 //@param ids 要删除的ID数组
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果 //@return 返回操作结果
@RequestMapping("/delete") @RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志 logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); // 记录日志
@ -189,11 +189,11 @@ public class SingleSeachController {
} }
//批量上传/ //批量上传/
//通过Excel批量导入数据 //通过Excel批量导入数据
//@param fileName Excel文件名 //@param fileName Excel文件名
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果 //@return 返回操作结果
@RequestMapping("/batchInsert") @RequestMapping("/batchInsert")
public R save(String fileName, HttpServletRequest request){ public R save(String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志 logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); // 记录日志
@ -235,11 +235,11 @@ public class SingleSeachController {
} }
//前端列表 //前端列表
//无需认证的分页查询 //无需认证的分页查询
//@param params 请求参数Map //@param params 请求参数Map
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回分页数据结果 //@return 返回分页数据结果
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/list") @RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -255,11 +255,11 @@ public class SingleSeachController {
} }
//前端详情 //前端详情
//根据类型查询单条数据 //根据类型查询单条数据
//@param id 数据类型ID //@param id 数据类型ID
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回查询结果 //@return 返回查询结果
@RequestMapping("/detail/{id}") @RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志 logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); // 记录日志
@ -272,11 +272,11 @@ public class SingleSeachController {
} }
//前端保存 //前端保存
//新增单页数据 //新增单页数据
//@param singleSeach 单页数据实体 //@param singleSeach 单页数据实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回操作结果 //@return 返回操作结果
@RequestMapping("/add") @RequestMapping("/add")
public R add(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request){ public R add(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString()); // 记录日志 logger.debug("add方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString()); // 记录日志

@ -31,7 +31,7 @@ import com.utils.PageUtils; // 分页工具类
import com.utils.R; // 统一返回结果类 import com.utils.R; // 统一返回结果类
//用户登录相关功能控制器 //用户登录相关功能控制器
//处理用户认证、注册、密码管理等操作 //处理用户认证、注册、密码管理等操作
@RequestMapping("users") // 定义基础请求路径为/users @RequestMapping("users") // 定义基础请求路径为/users
@RestController // 标识这是一个RESTful风格的控制器 @RestController // 标识这是一个RESTful风格的控制器
public class UsersController { public class UsersController {
@ -43,12 +43,12 @@ public class UsersController {
private TokenService tokenService; private TokenService tokenService;
//用户登录接口 //用户登录接口
//@param username 用户名 //@param username 用户名
//@param password 密码 //@param password 密码
//@param captcha 验证码(未使用) //@param captcha 验证码(未使用)
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回登录结果和Token信息 //@return 返回登录结果和Token信息
@IgnoreAuth // 忽略认证检查 @IgnoreAuth // 忽略认证检查
@PostMapping(value = "/login") // 处理POST /users/login请求 @PostMapping(value = "/login") // 处理POST /users/login请求
public R login(String username, String password, String captcha, HttpServletRequest request) { public R login(String username, String password, String captcha, HttpServletRequest request) {
@ -69,9 +69,9 @@ public class UsersController {
} }
//用户注册接口 //用户注册接口
//@param user 用户实体对象(通过请求体传入) //@param user 用户实体对象(通过请求体传入)
//@return 返回注册结果 //@return 返回注册结果
@IgnoreAuth // 忽略认证检查 @IgnoreAuth // 忽略认证检查
@PostMapping(value = "/register") // 处理POST /users/register请求 @PostMapping(value = "/register") // 处理POST /users/register请求
public R register(@RequestBody UsersEntity user){ public R register(@RequestBody UsersEntity user){
@ -84,9 +84,9 @@ public class UsersController {
} }
//用户退出接口 //用户退出接口
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回退出结果 //@return 返回退出结果
@GetMapping(value = "logout") // 处理GET /users/logout请求 @GetMapping(value = "logout") // 处理GET /users/logout请求
public R logout(HttpServletRequest request) { public R logout(HttpServletRequest request) {
request.getSession().invalidate(); // 使会话失效 request.getSession().invalidate(); // 使会话失效
@ -94,11 +94,11 @@ public class UsersController {
} }
//修改密码接口 //修改密码接口
//@param oldPassword 旧密码 //@param oldPassword 旧密码
//@param newPassword 新密码 //@param newPassword 新密码
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回修改结果 //@return 返回修改结果
@GetMapping(value = "/updatePassword") // 处理GET /users/updatePassword请求 @GetMapping(value = "/updatePassword") // 处理GET /users/updatePassword请求
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) { public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
// 获取当前用户 // 获取当前用户
@ -122,10 +122,10 @@ public class UsersController {
} }
//密码重置接口 //密码重置接口
//@param username 用户名 //@param username 用户名
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 返回重置结果 //@return 返回重置结果
@IgnoreAuth // 忽略认证检查 @IgnoreAuth // 忽略认证检查
@RequestMapping(value = "/resetPass") // 处理/users/resetPass请求 @RequestMapping(value = "/resetPass") // 处理/users/resetPass请求
public R resetPass(String username, HttpServletRequest request){ public R resetPass(String username, HttpServletRequest request){
@ -141,10 +141,10 @@ public class UsersController {
} }
//分页查询用户列表 //分页查询用户列表
//@param params 请求参数Map //@param params 请求参数Map
//@param user 用户实体(用于条件查询) //@param user 用户实体(用于条件查询)
//@return 返回分页结果 //@return 返回分页结果
@RequestMapping("/page") // 处理/users/page请求 @RequestMapping("/page") // 处理/users/page请求
public R page(@RequestParam Map<String, Object> params,UsersEntity user){ public R page(@RequestParam Map<String, Object> params,UsersEntity user){
// 创建条件构造器 // 创建条件构造器
@ -155,9 +155,9 @@ public class UsersController {
} }
//查询用户列表 //查询用户列表
//@param user 用户实体(用于条件查询) //@param user 用户实体(用于条件查询)
//@return 返回用户列表 //@return 返回用户列表
@RequestMapping("/list") // 处理/users/list请求 @RequestMapping("/list") // 处理/users/list请求
public R list(UsersEntity user){ public R list(UsersEntity user){
// 创建条件构造器 // 创建条件构造器
@ -168,9 +168,9 @@ public class UsersController {
} }
//获取用户详细信息 //获取用户详细信息
//@param id 用户ID //@param id 用户ID
//@return 返回用户信息 //@return 返回用户信息
@RequestMapping("/info/{id}") // 处理/users/info/{id}请求 @RequestMapping("/info/{id}") // 处理/users/info/{id}请求
public R info(@PathVariable("id") String id){ public R info(@PathVariable("id") String id){
UsersEntity user = usersService.selectById(id); // 根据ID查询用户 UsersEntity user = usersService.selectById(id); // 根据ID查询用户
@ -178,9 +178,9 @@ public class UsersController {
} }
// 获取当前会话用户信息 // 获取当前会话用户信息
//@param request HTTP请求对象 //@param request HTTP请求对象
// @return 返回当前用户信息 // @return 返回当前用户信息
@RequestMapping("/session") // 处理/users/session请求 @RequestMapping("/session") // 处理/users/session请求
public R getCurrUser(HttpServletRequest request){ public R getCurrUser(HttpServletRequest request){
@ -191,9 +191,9 @@ public class UsersController {
} }
//保存用户信息 //保存用户信息
//@param user 用户实体对象(通过请求体传入) //@param user 用户实体对象(通过请求体传入)
// @return 返回保存结果 // @return 返回保存结果
@PostMapping("/save") // 处理POST /users/save请求 @PostMapping("/save") // 处理POST /users/save请求
public R save(@RequestBody UsersEntity user){ public R save(@RequestBody UsersEntity user){
@ -206,9 +206,9 @@ public class UsersController {
} }
// 更新用户信息 // 更新用户信息
//@param user 用户实体对象(通过请求体传入) //@param user 用户实体对象(通过请求体传入)
//@return 返回更新结果 //@return 返回更新结果
@RequestMapping("/update") // 处理/users/update请求 @RequestMapping("/update") // 处理/users/update请求
public R update(@RequestBody UsersEntity user){ public R update(@RequestBody UsersEntity user){
@ -217,9 +217,9 @@ public class UsersController {
} }
//删除用户 //删除用户
//@param ids 用户ID数组(通过请求体传入) //@param ids 用户ID数组(通过请求体传入)
// @return 返回删除结果 // @return 返回删除结果
@RequestMapping("/delete") // 处理/users/delete请求 @RequestMapping("/delete") // 处理/users/delete请求
public R delete(@RequestBody Long[] ids){ public R delete(@RequestBody Long[] ids){

@ -56,8 +56,8 @@ import com.utils.R; // 统一返回结果类
import com.alibaba.fastjson.*; // FastJSON工具类 import com.alibaba.fastjson.*; // FastJSON工具类
//用户控制器 //用户控制器
// 处理用户相关操作的RESTful接口 // 处理用户相关操作的RESTful接口
@RestController // 标识为RESTful控制器 @RestController // 标识为RESTful控制器
@Controller // 标识为Spring MVC控制器 @Controller // 标识为Spring MVC控制器
@ -96,9 +96,9 @@ public class YonghuController {
private UsersService usersService; // 管理员服务 private UsersService usersService; // 管理员服务
//后端分页列表 //后端分页列表
//@param params 请求参数Map //@param params 请求参数Map
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 分页结果 //@return 分页结果
@RequestMapping("/page") @RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
@ -122,10 +122,10 @@ public class YonghuController {
} }
//后端详情 //后端详情
//@param id 用户ID //@param id 用户ID
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 用户详情 //@return 用户详情
@RequestMapping("/info/{id}") @RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){ public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
@ -141,9 +141,9 @@ public class YonghuController {
} }
//后端保存用户 //后端保存用户
//@param yonghu 用户实体 //@param yonghu 用户实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 操作结果 //@return 操作结果
@RequestMapping("/save") @RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){ public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString()); logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
@ -176,10 +176,10 @@ public class YonghuController {
} }
//后端修改用户 //后端修改用户
//@param yonghu 用户实体 //@param yonghu 用户实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 操作结果 //@return 操作结果
@RequestMapping("/update") @RequestMapping("/update")
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString()); logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
@ -195,10 +195,10 @@ public class YonghuController {
} }
//删除用户(逻辑删除) //删除用户(逻辑删除)
//@param ids 用户ID数组 //@param ids 用户ID数组
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 操作结果 //@return 操作结果
@RequestMapping("/delete") @RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){ public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString()); logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
@ -217,10 +217,10 @@ public class YonghuController {
} }
//批量导入用户数据 //批量导入用户数据
//@param fileName Excel文件名 //@param fileName Excel文件名
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 导入结果 //@return 导入结果
@RequestMapping("/batchInsert") @RequestMapping("/batchInsert")
public R save(String fileName, HttpServletRequest request){ public R save(String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName); logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
@ -323,12 +323,12 @@ public class YonghuController {
} }
//用户登录 //用户登录
//@param username 用户名 //@param username 用户名
//@param password 密码 //@param password 密码
//@param captcha 验证码 //@param captcha 验证码
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 登录结果 //@return 登录结果
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping(value = "/login") @RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) { public R login(String username, String password, String captcha, HttpServletRequest request) {
@ -348,10 +348,10 @@ public class YonghuController {
} }
//用户注册 //用户注册
//@param yonghu 用户实体 //@param yonghu 用户实体
// @param request HTTP请求对象 // @param request HTTP请求对象
//@return 注册结果 //@return 注册结果
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@PostMapping(value = "/register") @PostMapping(value = "/register")
@ -378,10 +378,10 @@ public class YonghuController {
} }
//重置密码为默认值 //重置密码为默认值
//@param id 用户ID //@param id 用户ID
//@param request HTTP请求对象 //@param request HTTP请求对象
// @return 操作结果 // @return 操作结果
@GetMapping(value = "/resetPassword") @GetMapping(value = "/resetPassword")
public R resetPassword(Integer id, HttpServletRequest request) { public R resetPassword(Integer id, HttpServletRequest request) {
@ -392,10 +392,10 @@ public class YonghuController {
} }
//修改密码 //修改密码
//@param oldPassword 旧密码 //@param oldPassword 旧密码
//@param newPassword 新密码 //@param newPassword 新密码
//@param request HTTP请求对象 //@param request HTTP请求对象
// @return 操作结果 // @return 操作结果
@GetMapping(value = "/updatePassword") @GetMapping(value = "/updatePassword")
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) { public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
@ -415,9 +415,9 @@ public class YonghuController {
} }
//忘记密码(重置为默认密码) //忘记密码(重置为默认密码)
//@param username 用户名 //@param username 用户名
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 操作结果 //@return 操作结果
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping(value = "/resetPass") @RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request) { public R resetPass(String username, HttpServletRequest request) {
@ -432,9 +432,9 @@ public class YonghuController {
} }
//获取当前会话用户信息 //获取当前会话用户信息
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 用户信息 //@return 用户信息
@RequestMapping("/session") @RequestMapping("/session")
public R getCurrYonghu(HttpServletRequest request){ public R getCurrYonghu(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId"); // 获取当前用户ID Integer id = (Integer)request.getSession().getAttribute("userId"); // 获取当前用户ID
@ -450,9 +450,9 @@ public class YonghuController {
} }
//用户退出 //用户退出
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 操作结果 //@return 操作结果
@GetMapping(value = "logout") @GetMapping(value = "logout")
public R logout(HttpServletRequest request) { public R logout(HttpServletRequest request) {
request.getSession().invalidate(); // 使会话失效 request.getSession().invalidate(); // 使会话失效
@ -460,10 +460,10 @@ public class YonghuController {
} }
//前端分页列表 //前端分页列表
//@param params 请求参数 //@param params 请求参数
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 分页结果 //@return 分页结果
@IgnoreAuth // 忽略认证 @IgnoreAuth // 忽略认证
@RequestMapping("/list") @RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){ public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
@ -480,10 +480,10 @@ public class YonghuController {
} }
//前端详情 //前端详情
//@param id 用户ID //@param id 用户ID
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 用户详情 //@return 用户详情
@RequestMapping("/detail/{id}") @RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){ public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id); logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
@ -499,10 +499,10 @@ public class YonghuController {
} }
//前端保存用户 //前端保存用户
//@param yonghu 用户实体 //@param yonghu 用户实体
//@param request HTTP请求对象 //@param request HTTP请求对象
//@return 操作结果 //@return 操作结果
@RequestMapping("/add") @RequestMapping("/add")
public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){ public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString()); logger.debug("add方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());

@ -1,89 +1,43 @@
// 声明当前文件所在的包路径为com.dao表示这是一个数据访问层(Dao)的类
package com.dao; package com.dao;
// 导入java.util.List类用于处理有序集合数据
import java.util.List; import java.util.List;
// 导入java.util.Map类用于处理键值对映射数据
import java.util.Map; import java.util.Map;
//通用接口 /**
//提供各种数据查询和统计方法的接口定义,包括饼图、柱状图等的数据求和与计数。 *
*/
public interface CommonDao{ public interface CommonDao{
//获取饼图数据的求和结果
//@param params 查询参数
// @return 包含求和结果的列表
List<Map<String, Object>> pieSum(Map<String, Object> params); List<Map<String, Object>> pieSum(Map<String, Object> params);
//获取饼图数据的计数结果
// @param params 查询参数
// @return 包含计数结果的列表
List<Map<String, Object>> pieCount(Map<String, Object> params); List<Map<String, Object>> pieCount(Map<String, Object> params);
//获取单组柱状图数据的求和结果
//@param params 查询参数
// @return 包含求和结果的列表
List<Map<String, Object>> barSumOne(Map<String, Object> params); List<Map<String, Object>> barSumOne(Map<String, Object> params);
List<Map<String, Object>> barCountOne(Map<String, Object> params);
//获取单组柱状图数据的计数结果
//@param params 查询参数
// @return 包含计数结果的列表
List<Map<String, Object> >barCountOne(Map<String, Object> params);
//获取双组柱状图数据的求和结果
//@param params 查询参数
// @return 包含求和结果的列表
List<Map<String, Object>> barSumTwo(Map<String, Object> params); List<Map<String, Object>> barSumTwo(Map<String, Object> params);
//获取双组柱状图数据的计数结果
//@param params 查询参数
// @return 包含计数结果的列表
List<Map<String, Object>> barCountTwo(Map<String, Object> params); List<Map<String, Object>> barCountTwo(Map<String, Object> params);
//查询评分信息
// @param params 查询参数
// @return 包含评分信息的Map
Map<String, Object> queryScore(Map<String, Object> params); Map<String, Object> queryScore(Map<String, Object> params);
/**
*
// 新的级联字典表的分组求和方法 * @param params
//@param params 查询参数 * @return
// @return 包含分组求和结果的列表 */
List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params); List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params);
/**
*
// 新的级联字典表的分组条数统计方法 * @param params
//@param params 查询参数 * @return
// @return 包含分组条数统计结果的列表 */
List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params); List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params);
/**
*
//获取柱状图数据的求和结果 * @param params
//@param params 查询参数 * @return
// @return 包含求和结果的列表 */
List<Map<String, Object>> barSum(Map<String, Object> params); List<Map<String, Object>> barSum(Map<String, Object> params);
/**
//获取柱状图数据的计数结果 *
//@param params 查询参数 * @param params
// @return 包含计数结果的列表 * @return
*/
List<Map<String, Object>> barCount(Map<String, Object> params); List<Map<String, Object>> barCount(Map<String, Object> params);
} }

@ -1,16 +1,12 @@
// 声明当前文件所在的包路径表示该文件位于com.dao包下
package com.dao; package com.dao;
// 导入MyBatis Plus框架中的BaseMapper接口
// BaseMapper是MyBatis Plus提供的核心接口包含基本的CRUD操作方法
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入自定义的ConfigEntity实体类
// ConfigEntity通常对应数据库中的配置表用于存储配置信息
import com.entity.ConfigEntity; import com.entity.ConfigEntity;
//配置数据访问对象接口,用于对配置相关的数据库操作 /**
*
*/
public interface ConfigDao extends BaseMapper<ConfigEntity> { public interface ConfigDao extends BaseMapper<ConfigEntity> {
// 继承自MyBatis-Plus的BaseMapper无需额外编写基本的CRUD方法
} }

@ -1,36 +1,21 @@
// 声明当前文件所在的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入字典实体类,用于操作数据库中的字典表
import com.entity.DictionaryEntity; import com.entity.DictionaryEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入Java的List集合类用于返回多个结果的集合
import java.util.List; import java.util.List;
// 导入Java的Map集合类用于传递键值对参数
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页查询功能
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的Param注解用于给Mapper接口的参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入字典视图类,用于返回自定义的视图对象
import com.entity.view.DictionaryView; import com.entity.view.DictionaryView;
/**
//字典 Dao 接口 * Dao
//该接口继承自MyBatis Plus的BaseMapper提供对字典表的基本操作 *
//并定义了自定义的查询方法 * @author
// @author */
public interface DictionaryDao extends BaseMapper<DictionaryEntity> { public interface DictionaryDao extends BaseMapper<DictionaryEntity> {
//分页查询字典数据
// @param page 分页参数对象,包含当前页、每页数量等信息
//@param params 查询条件参数Map可以包含各种查询条件
// @return 返回字典视图对象的列表,包含查询结果数据
List<DictionaryView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<DictionaryView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,35 +1,21 @@
// 声明当前文件所在的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入ForumEntity实体类用于数据库表映射
import com.entity.ForumEntity; import com.entity.ForumEntity;
// 导入MyBatis Plus的BaseMapper接口提供基础的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入Java的List集合类
import java.util.List; import java.util.List;
// 导入Java的Map集合类用于存储键值对参数
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的Param注解用于给参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入论坛视图实体类,用于展示论坛数据
import com.entity.view.ForumView; import com.entity.view.ForumView;
/**
//健身论坛 Dao 接口 * Dao
// 该接口继承MyBatis Plus的BaseMapper提供对ForumEntity的基本数据库操作 *
// @author 作者信息(未填写具体作者) * @author
*/
public interface ForumDao extends BaseMapper<ForumEntity> { public interface ForumDao extends BaseMapper<ForumEntity> {
//分页查询论坛列表视图
// @param page 分页对象,包含当前页、每页显示条数等信息
//@param params 查询参数Map可以包含各种查询条件
// @return 返回论坛视图对象的列表,用于前端展示
List<ForumView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<ForumView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,35 +1,21 @@
// 声明当前文件所在的包路径表示这是com.dao包下的类
package com.dao; package com.dao;
// 导入课程收藏实体类,用于数据库操作
import com.entity.JianshenkechengCollectionEntity; import com.entity.JianshenkechengCollectionEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入Java的List集合类用于返回多条数据
import java.util.List; import java.util.List;
// 导入Java的Map集合类用于传递参数键值对
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的Param注解用于给Mapper方法参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入课程收藏的视图实体类,用于返回视图数据
import com.entity.view.JianshenkechengCollectionView; import com.entity.view.JianshenkechengCollectionView;
/**
//课程收藏 Dao 接口 * Dao
//继承MyBatis Plus的BaseMapper提供对课程收藏表的基本数据库操作 *
//@author 作者信息(未填写) * @author
*/
public interface JianshenkechengCollectionDao extends BaseMapper<JianshenkechengCollectionEntity> { public interface JianshenkechengCollectionDao extends BaseMapper<JianshenkechengCollectionEntity> {
// 分页查询课程收藏列表视图
//@param page 分页对象,包含当前页、每页条数等信息
//@param params 查询参数Map可以包含各种查询条件
//@return 返回课程收藏视图对象的列表
List<JianshenkechengCollectionView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<JianshenkechengCollectionView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,35 +1,21 @@
// 声明当前文件所在的包路径表示该文件位于com.dao包下
package com.dao; package com.dao;
// 导入健身课程实体类,用于数据库表映射
import com.entity.JianshenkechengEntity; import com.entity.JianshenkechengEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入List集合类用于返回多条数据
import java.util.List; import java.util.List;
// 导入Map集合类用于传递参数键值对
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的Param注解用于给Mapper方法参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入健身课程的视图类,用于展示数据
import com.entity.view.JianshenkechengView; import com.entity.view.JianshenkechengView;
/**
//健身课程 Dao 接口 * Dao
//继承MyBatis Plus的BaseMapper接口提供对JianshenkechengEntity的基本数据库操作 *
// @author 作者信息(未填写) * @author
*/
public interface JianshenkechengDao extends BaseMapper<JianshenkechengEntity> { public interface JianshenkechengDao extends BaseMapper<JianshenkechengEntity> {
// 分页查询健身课程列表
// @param page 分页对象,包含当前页、每页显示条数等信息
// @param params 查询参数Map集合可包含各种筛选条件
//@return 返回健身课程视图对象的列表,用于前端展示
List<JianshenkechengView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<JianshenkechengView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,35 +1,21 @@
// 声明当前文件所在的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入课程留言实体类,用于数据库操作
import com.entity.JianshenkechengLiuyanEntity; import com.entity.JianshenkechengLiuyanEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入List集合类用于返回多条数据
import java.util.List; import java.util.List;
// 导入Map集合类用于传递参数或返回键值对数据
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的Param注解用于给参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入课程留言的视图实体类,可能用于返回特定视图数据
import com.entity.view.JianshenkechengLiuyanView; import com.entity.view.JianshenkechengLiuyanView;
/**
//课程留言 Dao 接口 * Dao
//该接口继承自MyBatis Plus的BaseMapper提供对JianshenkechengLiuyanEntity的基本数据库操作 *
// 并扩展了分页查询方法 * @author
// @author 作者信息(未填写具体作者) */
public interface JianshenkechengLiuyanDao extends BaseMapper<JianshenkechengLiuyanEntity> { public interface JianshenkechengLiuyanDao extends BaseMapper<JianshenkechengLiuyanEntity> {
// 分页查询课程留言列表
// @param page 分页对象,包含当前页、每页显示条数等信息
// @param params 查询参数Map可以包含各种查询条件
// @return 返回课程留言视图对象列表,包含分页后的数据
List<JianshenkechengLiuyanView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<JianshenkechengLiuyanView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,35 +1,21 @@
// 声明当前文件所在的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入教练实体类,用于数据库操作
import com.entity.JiaolianEntity; import com.entity.JiaolianEntity;
// 导入MyBatis Plus的BaseMapper接口提供基本的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入List集合类用于返回多条数据
import java.util.List; import java.util.List;
// 导入Map集合类用于传递参数键值对
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页功能
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的Param注解用于给参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入教练视图类,用于返回视图数据
import com.entity.view.JiaolianView; import com.entity.view.JiaolianView;
/**
//教练 Dao 接口 * Dao
//定义与教练表相关的数据库操作方法 *
// @author * @author
*/
public interface JiaolianDao extends BaseMapper<JiaolianEntity> { public interface JiaolianDao extends BaseMapper<JiaolianEntity> {
// 分页查询教练信息列表
//@param page 分页对象,包含当前页、每页显示条数等信息
//@param params 查询参数Map集合可包含各种查询条件
//@return 返回教练视图对象列表,用于前端展示
List<JiaolianView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<JiaolianView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,36 +1,21 @@
// 声明当前类所在的包路径表示该类位于com.dao包下
package com.dao; package com.dao;
// 导入教练预约申请实体类,用于数据库操作
import com.entity.JiaolianYuyueEntity; import com.entity.JiaolianYuyueEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本的CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入List集合类用于返回多条数据
import java.util.List; import java.util.List;
// 导入Map集合类用于存储键值对参数
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入Param注解用于给Mapper接口的参数命名
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入教练预约申请的视图实体类,用于展示数据
import com.entity.view.JiaolianYuyueView; import com.entity.view.JiaolianYuyueView;
/**
// 教练预约申请 Dao 接口 * Dao
//该接口继承自MyBatis Plus的BaseMapper提供了基本的数据库操作方法 *
//同时定义了自定义的查询方法用于处理教练预约申请相关的业务逻辑 * @author
// @author 作者信息(未填写具体作者) */
public interface JiaolianYuyueDao extends BaseMapper<JiaolianYuyueEntity> { public interface JiaolianYuyueDao extends BaseMapper<JiaolianYuyueEntity> {
//分页查询教练预约申请列表
//@param page 分页对象,包含当前页码、每页显示条数等信息
//@param params 查询参数Map集合可以包含各种查询条件
// @return 返回教练预约申请的视图对象列表,用于前端展示
List<JiaolianYuyueView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<JiaolianYuyueView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,35 +1,21 @@
// 声明当前文件所属的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入新闻实体类,用于数据库表映射
import com.entity.NewsEntity; import com.entity.NewsEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入Java的List集合类
import java.util.List; import java.util.List;
// 导入Java的Map集合类用于键值对存储
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的参数注解用于标识方法参数
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入新闻视图实体类,用于展示层数据
import com.entity.view.NewsView; import com.entity.view.NewsView;
/**
// 健身资讯 Dao 接口 * Dao
//定义数据库访问层操作方法 *
// @author // 作者信息(未填写) * @author
*/
public interface NewsDao extends BaseMapper<NewsEntity> { public interface NewsDao extends BaseMapper<NewsEntity> {
//分页查询新闻资讯列表视图
//@param page 分页参数对象,包含当前页、每页数量等信息
// @param params 查询条件参数Map集合
// @return 返回新闻视图对象列表
List<NewsView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<NewsView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,34 +1,21 @@
// 声明当前文件所属的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入单页数据实体类,用于数据库表映射
import com.entity.SingleSeachEntity; import com.entity.SingleSeachEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入Java的List集合类用于存储查询结果列表
import java.util.List; import java.util.List;
// 导入Java的Map集合类用于存储键值对形式的查询参数
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类用于实现分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的参数注解用于标识方法参数
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入单页数据视图实体类,用于展示层数据
import com.entity.view.SingleSeachView; import com.entity.view.SingleSeachView;
/**
//单页数据 Dao 接口 * Dao
//定义数据库访问层操作方法 *
//@author // 作者信息(未填写) * @author
*/
public interface SingleSeachDao extends BaseMapper<SingleSeachEntity> { public interface SingleSeachDao extends BaseMapper<SingleSeachEntity> {
//分页查询单页数据列表视图
// @param page 分页参数对象,包含当前页、每页数量等信息
//@param params 查询条件参数Map集合
//@return 返回单页数据视图对象列表
List<SingleSeachView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<SingleSeachView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,39 +1,22 @@
// 声明当前文件所属的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入Java的List集合类用于存储查询结果列表
import java.util.List; import java.util.List;
// 导入MyBatis的参数注解用于标识方法参数
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入MyBatis Plus的基础Mapper接口提供基本CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入MyBatis Plus的条件构造器Wrapper用于动态SQL条件拼接
import com.baomidou.mybatisplus.mapper.Wrapper; import com.baomidou.mybatisplus.mapper.Wrapper;
// 导入MyBatis Plus的分页插件类用于分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入Token实体类用于数据库表映射
import com.entity.TokenEntity; import com.entity.TokenEntity;
/**
// Token数据访问层接口 * token
//定义Token相关的数据库操作方法 */
public interface TokenDao extends BaseMapper<TokenEntity> { public interface TokenDao extends BaseMapper<TokenEntity> {
//查询Token列表不带分页
//@param wrapper 条件构造器用于动态SQL条件拼接
//@return 返回Token实体对象列表
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper); List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
List<TokenEntity> selectListView(Pagination page,@Param("ew") Wrapper<TokenEntity> wrapper);
//查询Token列表带分页
//@param page 分页参数对象,包含当前页、每页数量等信息 }
//@param wrapper 条件构造器用于动态SQL条件拼接
// @return 返回Token实体对象列表
List<TokenEntity> selectListView(Pagination page, @Param("ew") Wrapper<TokenEntity> wrapper);
}

@ -1,40 +1,22 @@
// 声明当前文件所属的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入Java的List集合类用于存储查询结果列表
import java.util.List; import java.util.List;
// 导入MyBatis的参数注解用于标识方法参数
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入MyBatis Plus的基础Mapper接口提供基本CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入MyBatis Plus的条件构造器Wrapper用于动态SQL条件拼接
import com.baomidou.mybatisplus.mapper.Wrapper; import com.baomidou.mybatisplus.mapper.Wrapper;
// 导入MyBatis Plus的分页插件类用于分页查询
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入用户实体类,用于数据库表映射
import com.entity.UsersEntity; import com.entity.UsersEntity;
/**
// 用户数据访问层接口 *
// 定义用户相关的数据库操作方法 */
public interface UsersDao extends BaseMapper<UsersEntity> { public interface UsersDao extends BaseMapper<UsersEntity> {
// 查询用户列表(不带分页)
//@param wrapper 条件构造器用于动态SQL条件拼接
//@return 返回用户实体对象列表
List<UsersEntity> selectListView(@Param("ew") Wrapper<UsersEntity> wrapper); List<UsersEntity> selectListView(@Param("ew") Wrapper<UsersEntity> wrapper);
// 分页查询用户列表
// @param page 分页参数对象,包含当前页、每页数量等信息
//@param wrapper 条件构造器用于动态SQL条件拼接
//@return 返回用户实体对象列表
List<UsersEntity> selectListView(Pagination page, @Param("ew") Wrapper<UsersEntity> wrapper); List<UsersEntity> selectListView(Pagination page, @Param("ew") Wrapper<UsersEntity> wrapper);
} }

@ -1,35 +1,21 @@
// 声明当前文件所属的包路径表示该接口位于com.dao包下
package com.dao; package com.dao;
// 导入用户实体类,用于数据库表映射
import com.entity.YonghuEntity; import com.entity.YonghuEntity;
// 导入MyBatis Plus的基础Mapper接口提供基本CRUD操作
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
// 导入Java的List集合类
import java.util.List; import java.util.List;
// 导入Java的Map集合类用于键值对存储
import java.util.Map; import java.util.Map;
// 导入MyBatis Plus的分页插件类
import com.baomidou.mybatisplus.plugins.pagination.Pagination; import com.baomidou.mybatisplus.plugins.pagination.Pagination;
// 导入MyBatis的参数注解用于标识方法参数
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
// 导入用户视图实体类,用于展示层数据
import com.entity.view.YonghuView; import com.entity.view.YonghuView;
/**
//用户 Dao 接口 * Dao
//定义用户数据访问层操作方法 *
// @author // 作者信息(未填写) * @author
*/
public interface YonghuDao extends BaseMapper<YonghuEntity> { public interface YonghuDao extends BaseMapper<YonghuEntity> {
//分页查询用户列表视图
//@param page 分页参数对象,包含当前页、每页数量等信息
// @param params 查询条件参数Map集合
//@return 返回用户视图对象列表
List<YonghuView> selectListView(Pagination page,@Param("params")Map<String,Object> params); List<YonghuView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
} }

@ -1,61 +1,55 @@
package com.entity; package com.entity;
import java.io.Serializable; // Java序列化支持 import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.TableId; // 主键注解
import com.baomidou.mybatisplus.annotations.TableName; // 表名注解
import com.baomidou.mybatisplus.enums.IdType; // ID类型枚举
@TableName("config")
public class ConfigEntity implements Serializable {
// 序列化版本UID保证序列化兼容性 import com.baomidou.mybatisplus.annotations.TableId;
private static final long serialVersionUID = 1L; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
// 主键ID自增 /**
// 使用MyBatis-Plus的数据库ID自增策略 * @author yangliyuan
* @version 202027 8:36:05
* :
*/
@TableName("config")
public class ConfigEntity implements Serializable{
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
// 配置项名称(唯一标识) /**
// 存储配置的键名称,具有唯一性约束 * key
*/
private String name; private String name;
// 配置项值 /**
// 存储与配置名称对应的具体配置值 * value
*/
private String value; private String value;
// 获取主键ID
// @return 主键ID
public Long getId() { public Long getId() {
return id; return id;
} }
// 设置主键ID
// @param id 主键ID
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
// 获取配置项名称
// @return 配置项名称
public String getName() { public String getName() {
return name; return name;
} }
// 设置配置项名称
// @param name 配置项名称
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
// 获取配置项值
// @return 配置项值
public String getValue() { public String getValue() {
return value; return value;
} }
// 设置配置项值
// @param value 配置项值
public void setValue(String value) { public void setValue(String value) {
this.value = value; this.value = value;
} }
}
}

@ -1,224 +1,239 @@
// 包声明
package com.entity; package com.entity;
// 自定义注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 数据校验相关
import javax.validation.constraints.*; import javax.validation.constraints.*;
// Jackson序列化配置
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 反射相关
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 基础包
import java.io.Serializable; import java.io.Serializable;
import java.util.*; import java.util.*;
// 日期工具
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 日期格式处理
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// Bean工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// MyBatis-Plus注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 自定义日期工具
import com.utils.DateUtil; import com.utils.DateUtil;
// 字典实体类 /**
// 对应数据库dictionary表用于存储字典数据 *
// @author [作者名] *
// @email [邮箱地址] * @author
* @email
*/
@TableName("dictionary") @TableName("dictionary")
public class DictionaryEntity<T> implements Serializable { public class DictionaryEntity<T> implements Serializable {
// 序列化版本ID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 无参构造器 public DictionaryEntity() {
public DictionaryEntity() {
} }
// 泛型构造器(对象拷贝) public DictionaryEntity(T t) {
// 使用BeanUtils进行属性拷贝 try {
// @param t 源对象 BeanUtils.copyProperties(this, t);
public DictionaryEntity(T t) { } catch (IllegalAccessException | InvocationTargetException e) {
try { // TODO Auto-generated catch block
BeanUtils.copyProperties(this, t); e.printStackTrace();
} catch (IllegalAccessException | InvocationTargetException e) { }
// 异常处理(建议记录日志而不是直接打印) }
e.printStackTrace();
}
}
// 主键ID /**
// MyBatis-Plus自增主键策略 *
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="bigint(20)") @ColumnInfo(comment="主键",type="bigint(20)")
@TableField(value = "id") @TableField(value = "id")
private Long id; private Long id;
// 字典编码字段
// 存储字典类型标识代码 /**
*
*/
@ColumnInfo(comment="字段",type="varchar(200)") @ColumnInfo(comment="字段",type="varchar(200)")
@TableField(value = "dic_code") @TableField(value = "dic_code")
private String dicCode; private String dicCode;
// 字典名称字段
// 存储字典类型显示名称 /**
*
*/
@ColumnInfo(comment="字段名",type="varchar(200)") @ColumnInfo(comment="字段名",type="varchar(200)")
@TableField(value = "dic_name") @TableField(value = "dic_name")
private String dicName; private String dicName;
// 编码索引值
// 字典项的数值型编码 /**
*
*/
@ColumnInfo(comment="编码",type="int(11)") @ColumnInfo(comment="编码",type="int(11)")
@TableField(value = "code_index") @TableField(value = "code_index")
private Integer codeIndex; private Integer codeIndex;
// 编码显示名称
// 字典项的可读显示名称 /**
*
*/
@ColumnInfo(comment="编码名字",type="varchar(200)") @ColumnInfo(comment="编码名字",type="varchar(200)")
@TableField(value = "index_name") @TableField(value = "index_name")
private String indexName; private String indexName;
// 父级字典ID
// 用于构建多级字典结构0表示无父级 /**
* id
*/
@ColumnInfo(comment="父字段id",type="int(11)") @ColumnInfo(comment="父字段id",type="int(11)")
@TableField(value = "super_id") @TableField(value = "super_id")
private Integer superId; private Integer superId;
// 备注信息
// 存储字典项的附加说明 /**
*
*/
@ColumnInfo(comment="备注",type="varchar(200)") @ColumnInfo(comment="备注",type="varchar(200)")
@TableField(value = "beizhu") @TableField(value = "beizhu")
private String beizhu; private String beizhu;
// 创建时间
// 自动填充创建时间(插入时自动填充) /**
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") // 返回格式 *
@DateTimeFormat // 接收格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// 获取主键ID /**
// @return 主键ID *
*/
public Long getId() { public Long getId() {
return id; return id;
} }
// 设置主键ID /**
// @param id 主键ID *
*/
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/**
// 获取字典编码 *
// @return 字典编码 */
public String getDicCode() { public String getDicCode() {
return dicCode; return dicCode;
} }
// 设置字典编码 /**
// @param dicCode 字典编码 *
*/
public void setDicCode(String dicCode) { public void setDicCode(String dicCode) {
this.dicCode = dicCode; this.dicCode = dicCode;
} }
/**
// 获取字典名称 *
// @return 字典名称 */
public String getDicName() { public String getDicName() {
return dicName; return dicName;
} }
// 设置字典名称 /**
// @param dicName 字典名称 *
*/
public void setDicName(String dicName) { public void setDicName(String dicName) {
this.dicName = dicName; this.dicName = dicName;
} }
/**
// 获取编码索引 *
// @return 编码索引值 */
public Integer getCodeIndex() { public Integer getCodeIndex() {
return codeIndex; return codeIndex;
} }
// 设置编码索引 /**
// @param codeIndex 编码索引值 *
*/
public void setCodeIndex(Integer codeIndex) { public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex; this.codeIndex = codeIndex;
} }
/**
// 获取编码名称 *
// @return 编码显示名称 */
public String getIndexName() { public String getIndexName() {
return indexName; return indexName;
} }
// 设置编码名称 /**
// @param indexName 编码显示名称 *
*/
public void setIndexName(String indexName) { public void setIndexName(String indexName) {
this.indexName = indexName; this.indexName = indexName;
} }
/**
// 获取父级ID * id
// @return 父字典项ID */
public Integer getSuperId() { public Integer getSuperId() {
return superId; return superId;
} }
// 设置父级ID /**
// @param superId 父字典项ID * id
*/
public void setSuperId(Integer superId) { public void setSuperId(Integer superId) {
this.superId = superId; this.superId = superId;
} }
/**
// 获取备注信息 *
// @return 备注内容 */
public String getBeizhu() { public String getBeizhu() {
return beizhu; return beizhu;
} }
// 设置备注信息 /**
// @param beizhu 备注内容 *
*/
public void setBeizhu(String beizhu) { public void setBeizhu(String beizhu) {
this.beizhu = beizhu; this.beizhu = beizhu;
} }
/**
// 获取创建时间 *
// @return 创建时间对象 */
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间 /**
// @param createTime 创建时间对象 *
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// 对象字符串表示
// @return 格式化后的对象信息
@Override @Override
public String toString() { public String toString() {
return "Dictionary{" + return "Dictionary{" +
", id=" + id + ", id=" + id +
", dicCode=" + dicCode + ", dicCode=" + dicCode +
", dicName=" + dicName + ", dicName=" + dicName +
", codeIndex=" + codeIndex + ", codeIndex=" + codeIndex +
", indexName=" + indexName + ", indexName=" + indexName +
", superId=" + superId + ", superId=" + superId +
", beizhu=" + beizhu + ", beizhu=" + beizhu +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}"; "}";
} }
} }

@ -1,70 +1,52 @@
// 包路径声明,定义该类的存放位置
package com.entity; package com.entity;
// 自定义异常类继承自RuntimeException /**
// 用于在业务逻辑中抛出特定错误,包含错误信息和状态码 *
*/
public class EIException extends RuntimeException { public class EIException extends RuntimeException {
// 序列化版本ID用于反序列化时保持版本兼容性
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 异常信息字段,存储具体的错误描述 private String msg;
private String msg; private int code = 500;
// 状态码字段默认500表示服务器内部错误
private int code = 500; public EIException(String msg) {
super(msg);
// 构造器1通过错误信息创建异常对象 this.msg = msg;
// 参数msg - 需要传递的异常描述信息
public EIException(String msg) {
super(msg); // 调用父类构造器初始化异常信息
this.msg = msg; // 设置当前对象的msg字段
} }
// 构造器2通过错误信息和原因异常创建对象
// 参数msg - 异常描述信息
// 参数e - 触发当前异常的底层异常对象
public EIException(String msg, Throwable e) { public EIException(String msg, Throwable e) {
super(msg, e); // 调用父类构造器初始化信息和原因 super(msg, e);
this.msg = msg; // 设置当前对象的msg字段 this.msg = msg;
} }
// 构造器3通过错误信息和状态码创建异常对象
// 参数msg - 异常描述信息
// 参数code - 自定义状态码如400表示客户端错误
public EIException(String msg, int code) { public EIException(String msg, int code) {
super(msg); // 调用父类构造器初始化信息 super(msg);
this.msg = msg; // 设置msg字段 this.msg = msg;
this.code = code; // 设置状态码字段 this.code = code;
} }
// 构造器4通过错误信息、状态码和原因异常创建对象
// 参数msg - 异常描述信息
// 参数code - 自定义状态码
// 参数e - 触发当前异常的底层异常对象
public EIException(String msg, int code, Throwable e) { public EIException(String msg, int code, Throwable e) {
super(msg, e); // 调用父类构造器初始化信息和原因 super(msg, e);
this.msg = msg; // 设置msg字段 this.msg = msg;
this.code = code; // 设置状态码字段 this.code = code;
} }
// 以下为字段的getter和setter方法
// 获取异常信息
public String getMsg() { public String getMsg() {
return msg; return msg;
} }
// 设置异常信息
public void setMsg(String msg) { public void setMsg(String msg) {
this.msg = msg; this.msg = msg;
} }
// 获取状态码
public int getCode() { public int getCode() {
return code; return code;
} }
// 设置状态码
public void setCode(int code) { public void setCode(int code) {
this.code = code; this.code = code;
} }
} }

@ -1,252 +1,312 @@
// 包声明,表示该文件所在的包路径
package com.entity; package com.entity;
// 导入列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入验证相关的注解
import javax.validation.constraints.*; import javax.validation.constraints.*;
// 导入JSON忽略属性注解
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入集合工具类
import java.util.*; import java.util.*;
// 导入Ant日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入JSON格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Bean工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// 导入MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入MyBatis Plus主键类型枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// 导入MyBatis Plus字段填充枚举
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 导入日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
//健身论坛实体类 /**
//@author *
// @email *
* @author
// 指定数据库表名 * @email
*/
@TableName("forum") @TableName("forum")
public class ForumEntity<T> implements Serializable { public class ForumEntity<T> implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 无参构造方法
public ForumEntity() {
} public ForumEntity() {
}
public ForumEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// 带参构造方法使用BeanUtils复制属性
public ForumEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// 主键字段 /**
*
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)") @ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 帖子标题字段
/**
*
*/
@ColumnInfo(comment="帖子标题",type="varchar(200)") @ColumnInfo(comment="帖子标题",type="varchar(200)")
@TableField(value = "forum_name") @TableField(value = "forum_name")
private String forumName; private String forumName;
// 用户ID字段
/**
*
*/
@ColumnInfo(comment="用户",type="int(11)") @ColumnInfo(comment="用户",type="int(11)")
@TableField(value = "yonghu_id") @TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 教练ID字段
/**
*
*/
@ColumnInfo(comment="教练",type="int(11)") @ColumnInfo(comment="教练",type="int(11)")
@TableField(value = "jiaolian_id") @TableField(value = "jiaolian_id")
private Integer jiaolianId; private Integer jiaolianId;
// 管理员ID字段
/**
*
*/
@ColumnInfo(comment="管理员",type="int(11)") @ColumnInfo(comment="管理员",type="int(11)")
@TableField(value = "users_id") @TableField(value = "users_id")
private Integer usersId; private Integer usersId;
// 发布内容字段
/**
*
*/
@ColumnInfo(comment="发布内容",type="longtext") @ColumnInfo(comment="发布内容",type="longtext")
@TableField(value = "forum_content") @TableField(value = "forum_content")
private String forumContent; private String forumContent;
// 父ID字段
/**
* id
*/
@ColumnInfo(comment="父id",type="int(11)") @ColumnInfo(comment="父id",type="int(11)")
@TableField(value = "super_ids") @TableField(value = "super_ids")
private Integer superIds; private Integer superIds;
// 帖子状态字段
/**
*
*/
@ColumnInfo(comment="帖子状态",type="int(11)") @ColumnInfo(comment="帖子状态",type="int(11)")
@TableField(value = "forum_state_types") @TableField(value = "forum_state_types")
private Integer forumStateTypes; private Integer forumStateTypes;
// 发帖时间字段
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="发帖时间",type="timestamp") @ColumnInfo(comment="发帖时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT) @TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime; private Date insertTime;
// 修改时间字段
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="修改时间",type="timestamp") @ColumnInfo(comment="修改时间",type="timestamp")
@TableField(value = "update_time",fill = FieldFill.UPDATE) @TableField(value = "update_time",fill = FieldFill.UPDATE)
private Date updateTime; private Date updateTime;
// 创建时间字段
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// 获取主键方法
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// 设置主键方法
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取帖子标题方法 *
*/
public String getForumName() { public String getForumName() {
return forumName; return forumName;
} }
/**
*
*/
// 设置帖子标题方法
public void setForumName(String forumName) { public void setForumName(String forumName) {
this.forumName = forumName; this.forumName = forumName;
} }
/**
// 获取用户ID方法 *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
/**
*
*/
// 设置用户ID方法
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 获取教练ID方法 *
*/
public Integer getJiaolianId() { public Integer getJiaolianId() {
return jiaolianId; return jiaolianId;
} }
/**
*
*/
// 设置教练ID方法
public void setJiaolianId(Integer jiaolianId) { public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId; this.jiaolianId = jiaolianId;
} }
/**
// 获取管理员ID方法 *
*/
public Integer getUsersId() { public Integer getUsersId() {
return usersId; return usersId;
} }
/**
*
*/
// 设置管理员ID方法
public void setUsersId(Integer usersId) { public void setUsersId(Integer usersId) {
this.usersId = usersId; this.usersId = usersId;
} }
/**
// 获取发布内容方法 *
*/
public String getForumContent() { public String getForumContent() {
return forumContent; return forumContent;
} }
/**
*
*/
// 设置发布内容方法
public void setForumContent(String forumContent) { public void setForumContent(String forumContent) {
this.forumContent = forumContent; this.forumContent = forumContent;
} }
/**
// 获取父ID方法 * id
*/
public Integer getSuperIds() { public Integer getSuperIds() {
return superIds; return superIds;
} }
/**
* id
*/
// 设置父ID方法
public void setSuperIds(Integer superIds) { public void setSuperIds(Integer superIds) {
this.superIds = superIds; this.superIds = superIds;
} }
/**
// 获取帖子状态方法 *
*/
public Integer getForumStateTypes() { public Integer getForumStateTypes() {
return forumStateTypes; return forumStateTypes;
} }
/**
*
*/
// 设置帖子状态方法
public void setForumStateTypes(Integer forumStateTypes) { public void setForumStateTypes(Integer forumStateTypes) {
this.forumStateTypes = forumStateTypes; this.forumStateTypes = forumStateTypes;
} }
/**
// 获取发帖时间方法 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 设置发帖时间方法
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取修改时间方法 *
*/
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
/**
*
*/
// 设置修改时间方法
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
// 获取创建时间方法 *
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
*
*/
// 设置创建时间方法
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// toString方法用于对象字符串表示
@Override @Override
public String toString() { public String toString() {
return "Forum{" + return "Forum{" +
", id=" + id + ", id=" + id +
", forumName=" + forumName + ", forumName=" + forumName +
", yonghuId=" + yonghuId + ", yonghuId=" + yonghuId +
", jiaolianId=" + jiaolianId + ", jiaolianId=" + jiaolianId +
", usersId=" + usersId + ", usersId=" + usersId +
", forumContent=" + forumContent + ", forumContent=" + forumContent +
", superIds=" + superIds + ", superIds=" + superIds +
", forumStateTypes=" + forumStateTypes + ", forumStateTypes=" + forumStateTypes +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") + ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") + ", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}"; "}";
} }
} }

@ -1,176 +1,195 @@
// 包声明实体类包存放所有与数据库表映射的JavaBean对象
package com.entity; package com.entity;
// 字段注解:自定义数据库字段描述信息
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 数据校验注解:非空、范围等验证规则
import javax.validation.constraints.*; import javax.validation.constraints.*;
// JSON序列化注解忽略未定义字段
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 反射异常类:用于处理属性拷贝时的异常
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 序列化接口标识
import java.io.Serializable; import java.io.Serializable;
// 集合工具类
import java.util.*; import java.util.*;
// Apache Ant日期工具代码中未实际使用建议检查是否冗余
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// Spring日期格式注解请求参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// Jackson日期格式注解响应数据格式化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// Bean工具类对象属性拷贝
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// MyBatis Plus字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// MyBatis Plus主键策略枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// MyBatis Plus字段填充策略枚举
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 自定义日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/** /**
* *
* jianshenkecheng_collection *
* / * @author
* @author
* @email * @email
*/ */
@TableName("jianshenkecheng_collection") // 指定关联数据库表名 @TableName("jianshenkecheng_collection")
public class JianshenkechengCollectionEntity<T> implements Serializable { public class JianshenkechengCollectionEntity<T> implements Serializable {
// 序列化版本UID类版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 空参构造器JPA/MyBatis等框架需要
public JianshenkechengCollectionEntity() {
} public JianshenkechengCollectionEntity() {
// 泛型构造器:通过反射将泛型对象属性拷贝到当前实体 }
public JianshenkechengCollectionEntity(T t) {
try { public JianshenkechengCollectionEntity(T t) {
// 使用Apache BeanUtils进行属性拷贝 try {
BeanUtils.copyProperties(this, t); BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 异常处理(建议生产环境改为日志记录) // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
/**
*
*/
@TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id")
// 主键字段
@TableId(type = IdType.AUTO) // 主键自增策略
@ColumnInfo(comment="主键",type="int(11)") // 字段注释主键数据库类型int(11)
@TableField(value = "id") // 映射数据库字段名(可省略,默认驼峰转下划线)
private Integer id; private Integer id;
// 关联健身课程ID外键
@ColumnInfo(comment="健身课程",type="int(11)") // 字段注释:关联健身课程表 /**
@TableField(value = "jianshenkecheng_id") // 数据库字段名 *
*/
@ColumnInfo(comment="健身课程",type="int(11)")
@TableField(value = "jianshenkecheng_id")
private Integer jianshenkechengId; private Integer jianshenkechengId;
// 关联用户ID外键
@ColumnInfo(comment="用户",type="int(11)") // 字段注释:关联用户表 /**
@TableField(value = "yonghu_id") // 数据库字段名 *
*/
@ColumnInfo(comment="用户",type="int(11)")
@TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 收藏类型(需配合字典表或枚举类使用)
@ColumnInfo(comment="类型",type="int(11)") // 字段注释1-收藏 2-点赞等类型 /**
*
*/
@ColumnInfo(comment="类型",type="int(11)")
@TableField(value = "jianshenkecheng_collection_types") @TableField(value = "jianshenkecheng_collection_types")
private Integer jianshenkechengCollectionTypes; private Integer jianshenkechengCollectionTypes;
// 收藏时间(插入时自动填充)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") // 响应JSON格式 /**
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 请求参数格式 *
@ColumnInfo(comment="收藏时间",type="timestamp") // 数据库类型timestamp */
@TableField(value = "insert_time",fill = FieldFill.INSERT) // 插入时自动填充 @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="收藏时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime; private Date insertTime;
// 创建时间与insert_time可能存在冗余
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) // 与insert_time同样使用插入填充需确认业务需求 @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// Getter/Setter方法
// ----------------------------
// 主键访问器 /**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// 主键修改器
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 健身课程ID访问器 *
*/
public Integer getJianshenkechengId() { public Integer getJianshenkechengId() {
return jianshenkechengId; return jianshenkechengId;
} }
/**
*
*/
// 健身课程ID修改器
public void setJianshenkechengId(Integer jianshenkechengId) { public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId; this.jianshenkechengId = jianshenkechengId;
} }
/**
// 用户ID访问器 *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
/**
*
*/
// 用户ID修改器
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 收藏类型访问器 *
*/
public Integer getJianshenkechengCollectionTypes() { public Integer getJianshenkechengCollectionTypes() {
return jianshenkechengCollectionTypes; return jianshenkechengCollectionTypes;
} }
/**
*
*/
// 收藏类型修改器(建议使用枚举限定值)
public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) { public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) {
this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes; this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes;
} }
/**
// 收藏时间访问器 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 收藏时间修改器(通常自动填充,无需手动设置)
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 创建时间访问器 *
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
*
*/
// 创建时间修改器通常自动填充需确认与insert_time的区别
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// 对象字符串表示(调试用)
@Override @Override
public String toString() { public String toString() {
return "JianshenkechengCollection{" + return "JianshenkechengCollection{" +
", id=" + id + ", id=" + id +
", jianshenkechengId=" + jianshenkechengId + ", jianshenkechengId=" + jianshenkechengId +
", yonghuId=" + yonghuId + ", yonghuId=" + yonghuId +
", jianshenkechengCollectionTypes=" + jianshenkechengCollectionTypes + ", jianshenkechengCollectionTypes=" + jianshenkechengCollectionTypes +
// 使用自定义工具类格式化日期注意格式化为yyyy-MM-dd会丢失时间精度 ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") + "}";
"}";
} }
} }

@ -1,282 +1,356 @@
// 包声明实体类包存放所有与数据库表映射的JavaBean对象
package com.entity; package com.entity;
// 字段描述注解:自定义数据库字段元数据
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 数据校验注解:提供非空、范围等验证规则
import javax.validation.constraints.*; import javax.validation.constraints.*;
// JSON序列化配置忽略未定义属性
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 反射异常类:处理属性拷贝时的异常
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 序列化接口标识
import java.io.Serializable; import java.io.Serializable;
// 集合工具类
import java.util.*; import java.util.*;
// Apache Ant日期工具代码中未使用建议移除
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// Spring日期参数绑定注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// Bean属性拷贝工具
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// MyBatis Plus字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// MyBatis Plus主键策略枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// MyBatis Plus字段填充策略
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 自定义日期格式化工具
import com.utils.DateUtil; import com.utils.DateUtil;
// 健身课程实体 /**
//映射数据库表 jianshenkecheng *
//存储健身课程基本信息、统计数据和关联信息 *
* @author
@TableName("jianshenkecheng") // 指定关联数据库表名 * @email
*/
@TableName("jianshenkecheng")
public class JianshenkechengEntity<T> implements Serializable { public class JianshenkechengEntity<T> implements Serializable {
// 序列化版本标识(类版本控制)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 空构造器(持久层框架需要)
public JianshenkechengEntity() {
} public JianshenkechengEntity() {
// 泛型构造器:通过反射进行属性拷贝 }
public JianshenkechengEntity(T t) {
try { public JianshenkechengEntity(T t) {
BeanUtils.copyProperties(this, t); // 使用Apache工具类拷贝属性 try {
} catch (IllegalAccessException | InvocationTargetException e) { BeanUtils.copyProperties(this, t);
e.printStackTrace(); // 生产环境建议改为日志记录 } catch (IllegalAccessException | InvocationTargetException e) {
} // TODO Auto-generated catch block
} e.printStackTrace();
}
}
/**
*
*/
@TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id")
// 主键字段(自增策略)
@TableId(type = IdType.AUTO) // 主键生成策略:数据库自增
@ColumnInfo(comment="主键",type="int(11)") // 字段注释主键数据库类型int(11)
@TableField("id") // 映射数据库字段名(可省略)
private Integer id; private Integer id;
// 关联教练ID外键
@ColumnInfo(comment="教练",type="int(11)") // 关联jiaolian表主键 /**
@TableField("jiaolian_id") *
*/
@ColumnInfo(comment="教练",type="int(11)")
@TableField(value = "jiaolian_id")
private Integer jiaolianId; private Integer jiaolianId;
// 课程名称(需考虑唯一性约束)
@ColumnInfo(comment="健身课程名称",type="varchar(200)") // 数据库类型varchar(200) /**
@TableField("jianshenkecheng_name") *
*/
@ColumnInfo(comment="健身课程名称",type="varchar(200)")
@TableField(value = "jianshenkecheng_name")
private String jianshenkechengName; private String jianshenkechengName;
// 课程封面图URL建议添加OSS存储注释
@ColumnInfo(comment="健身课程照片",type="varchar(200)") // 存储图片路径 /**
@TableField("jianshenkecheng_photo") *
*/
@ColumnInfo(comment="健身课程照片",type="varchar(200)")
@TableField(value = "jianshenkecheng_photo")
private String jianshenkechengPhoto; private String jianshenkechengPhoto;
// 课程视频地址(建议标注支持的格式)
@ColumnInfo(comment="课程视频",type="varchar(200)") // 存储视频文件路径或URL /**
@TableField("jianshenkecheng_video") *
*/
@ColumnInfo(comment="课程视频",type="varchar(200)")
@TableField(value = "jianshenkecheng_video")
private String jianshenkechengVideo; private String jianshenkechengVideo;
// 点赞计数器(建议添加并发控制)
@ColumnInfo(comment="赞",type="int(11)") // 默认值建议设置为0 /**
@TableField("zan_number") *
*/
@ColumnInfo(comment="赞",type="int(11)")
@TableField(value = "zan_number")
private Integer zanNumber; private Integer zanNumber;
// 点踩计数器(考虑是否需要负值限制)
/**
*
*/
@ColumnInfo(comment="踩",type="int(11)") @ColumnInfo(comment="踩",type="int(11)")
@TableField("cai_number") @TableField(value = "cai_number")
private Integer caiNumber; private Integer caiNumber;
// 课程分类(应关联字典表或使用枚举类)
@ColumnInfo(comment="健身课程类型",type="int(11)") // 例1-有氧 2-力量 3-柔韧 /**
@TableField("jianshenkecheng_types") *
*/
@ColumnInfo(comment="健身课程类型",type="int(11)")
@TableField(value = "jianshenkecheng_types")
private Integer jianshenkechengTypes; private Integer jianshenkechengTypes;
// 点击量统计(可考虑每日统计优化)
@ColumnInfo(comment="健身课程热度",type="int(11)") // 记录课程查看次数 /**
@TableField("jianshenkecheng_clicknum") *
*/
@ColumnInfo(comment="健身课程热度",type="int(11)")
@TableField(value = "jianshenkecheng_clicknum")
private Integer jianshenkechengClicknum; private Integer jianshenkechengClicknum;
// 富文本课程介绍需考虑XSS防护
@ColumnInfo(comment="健身课程介绍",type="longtext") // 存储HTML格式内容 /**
@TableField("jianshenkecheng_content") *
*/
@ColumnInfo(comment="健身课程介绍",type="longtext")
@TableField(value = "jianshenkecheng_content")
private String jianshenkechengContent; private String jianshenkechengContent;
// 逻辑删除标志0-未删除 1-已删除)
@ColumnInfo(comment="逻辑删除",type="int(11)") // 替代物理删除 /**
@TableField("data_delete") *
*/
@ColumnInfo(comment="逻辑删除",type="int(11)")
@TableField(value = "data_delete")
private Integer dataDelete; private Integer dataDelete;
// 数据录入时间(管理后台操作时间)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") // 响应格式 /**
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 请求参数格式 *
@ColumnInfo(comment="录入时间",type="timestamp") // 数据库类型timestamp */
@TableField(value = "insert_time", fill = FieldFill.INSERT) // 新增时自动填充 @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="录入时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime; private Date insertTime;
// 课程创建时间业务时间可能与insert_time重复
/**
* homeMain
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") // 建议确认与insert_time的区别 @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time", fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// ----------------------------- Getter/Setter方法 -----------------------------
// 主键访问器 /**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// 主键修改器
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 教练ID访问器 *
*/
public Integer getJiaolianId() { public Integer getJiaolianId() {
return jiaolianId; return jiaolianId;
} }
/**
*
*/
// 教练ID修改器应校验教练存在性
public void setJiaolianId(Integer jiaolianId) { public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId; this.jiaolianId = jiaolianId;
} }
/**
// 课程名称访问器 *
*/
public String getJianshenkechengName() { public String getJianshenkechengName() {
return jianshenkechengName; return jianshenkechengName;
} }
/**
*
*/
// 课程名称修改器(建议添加唯一性校验)
public void setJianshenkechengName(String jianshenkechengName) { public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName; this.jianshenkechengName = jianshenkechengName;
} }
/**
// 课程图片访问器 *
*/
public String getJianshenkechengPhoto() { public String getJianshenkechengPhoto() {
return jianshenkechengPhoto; return jianshenkechengPhoto;
} }
/**
*
*/
// 课程图片修改器(建议添加格式校验)
public void setJianshenkechengPhoto(String jianshenkechengPhoto) { public void setJianshenkechengPhoto(String jianshenkechengPhoto) {
this.jianshenkechengPhoto = jianshenkechengPhoto; this.jianshenkechengPhoto = jianshenkechengPhoto;
} }
/**
// 课程视频访问器 *
*/
public String getJianshenkechengVideo() { public String getJianshenkechengVideo() {
return jianshenkechengVideo; return jianshenkechengVideo;
} }
/**
*
*/
// 课程视频修改器(建议添加视频格式校验)
public void setJianshenkechengVideo(String jianshenkechengVideo) { public void setJianshenkechengVideo(String jianshenkechengVideo) {
this.jianshenkechengVideo = jianshenkechengVideo; this.jianshenkechengVideo = jianshenkechengVideo;
} }
/**
// 点赞数访问器 *
*/
public Integer getZanNumber() { public Integer getZanNumber() {
return zanNumber; return zanNumber;
} }
/**
*
*/
// 点赞数修改器(建议添加非负校验)
public void setZanNumber(Integer zanNumber) { public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber; this.zanNumber = zanNumber;
} }
/**
// 点踩数访问器 *
*/
public Integer getCaiNumber() { public Integer getCaiNumber() {
return caiNumber; return caiNumber;
} }
/**
*
*/
// 点踩数修改器(建议添加非负校验)
public void setCaiNumber(Integer caiNumber) { public void setCaiNumber(Integer caiNumber) {
this.caiNumber = caiNumber; this.caiNumber = caiNumber;
} }
/**
// 课程类型访问器 *
*/
public Integer getJianshenkechengTypes() { public Integer getJianshenkechengTypes() {
return jianshenkechengTypes; return jianshenkechengTypes;
} }
/**
*
*/
// 课程类型修改器(应限制有效值范围)
public void setJianshenkechengTypes(Integer jianshenkechengTypes) { public void setJianshenkechengTypes(Integer jianshenkechengTypes) {
this.jianshenkechengTypes = jianshenkechengTypes; this.jianshenkechengTypes = jianshenkechengTypes;
} }
/**
// 点击量访问器 *
*/
public Integer getJianshenkechengClicknum() { public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum; return jianshenkechengClicknum;
} }
/**
*
*/
// 点击量修改器(建议只允许递增)
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) { public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum; this.jianshenkechengClicknum = jianshenkechengClicknum;
} }
/**
// 课程详情访问器 *
*/
public String getJianshenkechengContent() { public String getJianshenkechengContent() {
return jianshenkechengContent; return jianshenkechengContent;
} }
/**
*
*/
// 课程详情修改器建议添加HTML过滤
public void setJianshenkechengContent(String jianshenkechengContent) { public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent; this.jianshenkechengContent = jianshenkechengContent;
} }
/**
// 逻辑删除标志访问器 *
*/
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
/**
*
*/
// 逻辑删除标志修改器应限制0/1取值
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
// 录入时间访问器(通常自动生成) *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 录入时间修改器(通常无需手动设置)
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 创建时间访问器注意与insert_time区别 * homeMain
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
* homeMain
*/
// 创建时间修改器(需确认业务场景)
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// 对象字符串表示(调试用)
@Override @Override
public String toString() { public String toString() {
return "Jianshenkecheng{" + return "Jianshenkecheng{" +
", id=" + id + ", id=" + id +
", jiaolianId=" + jiaolianId + ", jiaolianId=" + jiaolianId +
", jianshenkechengName=" + jianshenkechengName + ", jianshenkechengName=" + jianshenkechengName +
", jianshenkechengPhoto=" + jianshenkechengPhoto + ", jianshenkechengPhoto=" + jianshenkechengPhoto +
", jianshenkechengVideo=" + jianshenkechengVideo + ", jianshenkechengVideo=" + jianshenkechengVideo +
", zanNumber=" + zanNumber + ", zanNumber=" + zanNumber +
", caiNumber=" + caiNumber + ", caiNumber=" + caiNumber +
", jianshenkechengTypes=" + jianshenkechengTypes + ", jianshenkechengTypes=" + jianshenkechengTypes +
", jianshenkechengClicknum=" + jianshenkechengClicknum + ", jianshenkechengClicknum=" + jianshenkechengClicknum +
", jianshenkechengContent=" + jianshenkechengContent + ", jianshenkechengContent=" + jianshenkechengContent +
", dataDelete=" + dataDelete + ", dataDelete=" + dataDelete +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") + // 格式化丢失时间精度 ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}"; "}";
} }
} }

@ -1,212 +1,243 @@
// 包声明实体类包存放所有与数据库表映射的JavaBean对象
package com.entity; package com.entity;
// 字段描述注解:自定义数据库字段元数据
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 数据校验注解:提供非空、长度等验证规则
import javax.validation.constraints.*; import javax.validation.constraints.*;
// JSON序列化配置忽略未定义属性
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 反射异常类:处理属性拷贝时的异常
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 序列化接口标识
import java.io.Serializable; import java.io.Serializable;
// 集合工具类
import java.util.*; import java.util.*;
// Apache Ant日期工具代码中未使用建议移除
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// Spring日期参数绑定注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// Bean属性拷贝工具
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// MyBatis Plus字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// MyBatis Plus主键策略枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// MyBatis Plus字段填充策略
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 自定义日期格式化工具
import com.utils.DateUtil; import com.utils.DateUtil;
// 课程留言实体 /**
// 映射数据库表 jianshenkecheng_liuyan *
// 存储用户对健身课程的留言及管理员回复信息 *
* @author
@TableName("jianshenkecheng_liuyan") // 指定关联数据库表名 * @email
*/
@TableName("jianshenkecheng_liuyan")
public class JianshenkechengLiuyanEntity<T> implements Serializable { public class JianshenkechengLiuyanEntity<T> implements Serializable {
// 序列化版本标识(类版本控制)
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 空构造器(持久层框架需要)
public JianshenkechengLiuyanEntity() {
} public JianshenkechengLiuyanEntity() {
}
public JianshenkechengLiuyanEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
*
*/
@TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id")
private Integer id;
/**
*
*/
@ColumnInfo(comment="健身课程",type="int(11)")
@TableField(value = "jianshenkecheng_id")
private Integer jianshenkechengId;
/**
*
*/
@ColumnInfo(comment="用户",type="int(11)")
@TableField(value = "yonghu_id")
private Integer yonghuId;
// 泛型构造器:通过反射进行属性拷贝
public JianshenkechengLiuyanEntity(T t) {
try {
BeanUtils.copyProperties(this, t); // 使用Apache工具类拷贝属性
} catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace(); // 生产环境建议改为日志记录
}
}
// 主键字段(自增策略) /**
@TableId(type = IdType.AUTO) // 主键生成策略:数据库自增 *
@ColumnInfo(comment="主键",type="int(11)") // 字段注释主键数据库类型int(11) */
@TableField("id") // 映射数据库字段名 @ColumnInfo(comment="留言内容",type="longtext")
private Integer id; // 唯一标识符 @TableField(value = "jianshenkecheng_liuyan_text")
// 关联健身课程ID外键 private String jianshenkechengLiuyanText;
@ColumnInfo(comment="健身课程",type="int(11)") // 关联jianshenkecheng表主键
@TableField("jianshenkecheng_id")
private Integer jianshenkechengId; // 被评论的课程ID
// 关联用户ID外键
@ColumnInfo(comment="用户",type="int(11)") // 关联yonghu表主键
@TableField("yonghu_id")
private Integer yonghuId; // 留言用户ID
// 留言内容(需考虑敏感词过滤) /**
@ColumnInfo(comment="留言内容",type="longtext") // 数据库类型longtext *
@TableField("jianshenkecheng_liuyan_text") */
private String jianshenkechengLiuyanText; // 用户留言正文 @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="留言时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime;
// 留言时间(自动填充)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") // 响应JSON格式
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 请求参数格式
@ColumnInfo(comment="留言时间",type="timestamp") // 数据库类型timestamp
@TableField(value = "insert_time", fill = FieldFill.INSERT) // 插入时自动填充
private Date insertTime; // 用户提交留言时间
// 管理员回复内容null表示未回复 /**
*
*/
@ColumnInfo(comment="回复内容",type="longtext") @ColumnInfo(comment="回复内容",type="longtext")
@TableField("reply_text") @TableField(value = "reply_text")
private String replyText; // 管理员回复正文
private String replyText;
// 回复时间(更新时自动填充) /**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat
@ColumnInfo(comment="回复时间",type="timestamp") @ColumnInfo(comment="回复时间",type="timestamp")
@TableField(value = "update_time", fill = FieldFill.UPDATE) // 更新时自动填充 @TableField(value = "update_time",fill = FieldFill.UPDATE)
private Date updateTime; // 最后回复/更新时间
// 创建时间与insert_time可能存在冗余 private Date updateTime;
/**
* listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time", fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; // 记录创建时间(建议确认业务需求)
private Date createTime;
// ----------------------------- Getter/Setter方法 -----------------------------
// 主键访问器 /**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// 主键修改器
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 课程ID访问器 *
*/
public Integer getJianshenkechengId() { public Integer getJianshenkechengId() {
return jianshenkechengId; return jianshenkechengId;
} }
/**
*
*/
// 课程ID修改器应校验课程存在性
public void setJianshenkechengId(Integer jianshenkechengId) { public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId; this.jianshenkechengId = jianshenkechengId;
} }
/**
// 用户ID访问器 *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
/**
*
*/
// 用户ID修改器应校验用户存在性
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 留言内容访问器 *
*/
public String getJianshenkechengLiuyanText() { public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText; return jianshenkechengLiuyanText;
} }
/**
*
*/
// 留言内容修改器(建议添加敏感词过滤)
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) { public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText; this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
} }
/**
// 留言时间访问器(通常自动生成) *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 留言时间修改器(通常无需手动设置)
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 回复内容访问器 *
*/
public String getReplyText() { public String getReplyText() {
return replyText; return replyText;
} }
/**
*
*/
// 回复内容修改器(需权限控制)
public void setReplyText(String replyText) { public void setReplyText(String replyText) {
this.replyText = replyText; this.replyText = replyText;
} }
/**
// 回复时间访问器 *
*/
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
/**
*
*/
// 回复时间修改器(通常自动更新)
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
// 创建时间访问器注意与insert_time区别 * listShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
* listShow
*/
// 创建时间修改器(需确认业务场景)
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// 对象字符串表示(调试用)
@Override @Override
public String toString() { public String toString() {
return "JianshenkechengLiuyan{" + return "JianshenkechengLiuyan{" +
// 主键ID ", id=" + id +
", id=" + id + ", jianshenkechengId=" + jianshenkechengId +
// 关联课程ID ", yonghuId=" + yonghuId +
", jianshenkechengId=" + jianshenkechengId + ", jianshenkechengLiuyanText=" + jianshenkechengLiuyanText +
// 用户ID ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", yonghuId=" + yonghuId + ", replyText=" + replyText +
// 留言内容(建议截断显示) ", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") +
", jianshenkechengLiuyanText=" + jianshenkechengLiuyanText + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
// 留言时间(格式化为日期) "}";
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") + }
// 回复内容(建议截断显示) }
", replyText=" + replyText +
// 最后更新时间(格式化为日期)
", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") +
// 记录创建时间
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -1,265 +1,333 @@
// 包声明,表示该文件所在的包路径
package com.entity; package com.entity;
// 导入列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入验证相关的注解
import javax.validation.constraints.*; import javax.validation.constraints.*;
// 导入JSON忽略属性注解
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入集合工具类
import java.util.*; import java.util.*;
// 导入Ant日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入JSON格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Bean工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// 导入MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入MyBatis Plus主键类型枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// 导入MyBatis Plus字段填充枚举
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 导入日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
//教练实体类 /**
//@author *
//@email *
// 指定数据库表名 * @author
* @email
*/
@TableName("jiaolian") @TableName("jiaolian")
public class JiaolianEntity<T> implements Serializable { public class JiaolianEntity<T> implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 无参构造方法
public JiaolianEntity() {
} public JiaolianEntity() {
// 带参构造方法使用BeanUtils复制属性 }
public JiaolianEntity(T t) {
try { public JiaolianEntity(T t) {
BeanUtils.copyProperties(this, t); try {
} catch (IllegalAccessException | InvocationTargetException e) { BeanUtils.copyProperties(this, t);
// TODO Auto-generated catch block } catch (IllegalAccessException | InvocationTargetException e) {
e.printStackTrace(); // TODO Auto-generated catch block
} e.printStackTrace();
} }
}
// 主键字段
/**
*
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)") @ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 账户字段
/**
*
*/
@ColumnInfo(comment="账户",type="varchar(200)") @ColumnInfo(comment="账户",type="varchar(200)")
@TableField(value = "username") @TableField(value = "username")
private String username; private String username;
// 密码字段
/**
*
*/
@ColumnInfo(comment="密码",type="varchar(200)") @ColumnInfo(comment="密码",type="varchar(200)")
@TableField(value = "password") @TableField(value = "password")
private String password; private String password;
// 教练名称字段
/**
*
*/
@ColumnInfo(comment="教练名称",type="varchar(200)") @ColumnInfo(comment="教练名称",type="varchar(200)")
@TableField(value = "jiaolian_name") @TableField(value = "jiaolian_name")
private String jiaolianName; private String jiaolianName;
// 教练手机号字段
/**
*
*/
@ColumnInfo(comment="教练手机号",type="varchar(200)") @ColumnInfo(comment="教练手机号",type="varchar(200)")
@TableField(value = "jiaolian_phone") @TableField(value = "jiaolian_phone")
private String jiaolianPhone; private String jiaolianPhone;
// 教练头像字段
/**
*
*/
@ColumnInfo(comment="教练头像",type="varchar(200)") @ColumnInfo(comment="教练头像",type="varchar(200)")
@TableField(value = "jiaolian_photo") @TableField(value = "jiaolian_photo")
private String jiaolianPhoto; private String jiaolianPhoto;
// 性别字段
/**
*
*/
@ColumnInfo(comment="性别",type="int(11)") @ColumnInfo(comment="性别",type="int(11)")
@TableField(value = "sex_types") @TableField(value = "sex_types")
private Integer sexTypes; private Integer sexTypes;
// 教练邮箱字段
/**
*
*/
@ColumnInfo(comment="教练邮箱",type="varchar(200)") @ColumnInfo(comment="教练邮箱",type="varchar(200)")
@TableField(value = "jiaolian_email") @TableField(value = "jiaolian_email")
private String jiaolianEmail; private String jiaolianEmail;
// 教练简介字段
/**
*
*/
@ColumnInfo(comment="教练简介",type="longtext") @ColumnInfo(comment="教练简介",type="longtext")
@TableField(value = "jiaolian_content") @TableField(value = "jiaolian_content")
private String jiaolianContent; private String jiaolianContent;
// 逻辑删除字段
/**
*
*/
@ColumnInfo(comment="逻辑删除",type="int(11)") @ColumnInfo(comment="逻辑删除",type="int(11)")
@TableField(value = "data_delete") @TableField(value = "data_delete")
private Integer dataDelete; private Integer dataDelete;
// 添加时间字段
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="添加时间",type="timestamp") @ColumnInfo(comment="添加时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT) @TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime; private Date insertTime;
// 创建时间字段
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// 获取主键方法
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// 设置主键方法
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取账户方法 *
*/
public String getUsername() { public String getUsername() {
return username; return username;
} }
/**
*
*/
// 设置账户方法
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
/**
// 获取密码方法 *
*/
public String getPassword() { public String getPassword() {
return password; return password;
} }
/**
*
*/
// 设置密码方法
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
// 获取教练名称方法 *
*/
public String getJiaolianName() { public String getJiaolianName() {
return jiaolianName; return jiaolianName;
} }
/**
*
*/
// 设置教练名称方法
public void setJiaolianName(String jiaolianName) { public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName; this.jiaolianName = jiaolianName;
} }
/**
// 获取教练手机号方法 *
*/
public String getJiaolianPhone() { public String getJiaolianPhone() {
return jiaolianPhone; return jiaolianPhone;
} }
/**
*
*/
// 设置教练手机号方法
public void setJiaolianPhone(String jiaolianPhone) { public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone; this.jiaolianPhone = jiaolianPhone;
} }
/**
// 获取教练头像方法 *
*/
public String getJiaolianPhoto() { public String getJiaolianPhoto() {
return jiaolianPhoto; return jiaolianPhoto;
} }
/**
*
*/
// 设置教练头像方法
public void setJiaolianPhoto(String jiaolianPhoto) { public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto; this.jiaolianPhoto = jiaolianPhoto;
} }
/**
// 获取性别方法 *
*/
public Integer getSexTypes() { public Integer getSexTypes() {
return sexTypes; return sexTypes;
} }
/**
*
*/
// 设置性别方法
public void setSexTypes(Integer sexTypes) { public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes; this.sexTypes = sexTypes;
} }
/**
// 获取教练邮箱方法 *
*/
public String getJiaolianEmail() { public String getJiaolianEmail() {
return jiaolianEmail; return jiaolianEmail;
} }
/**
*
*/
// 设置教练邮箱方法
public void setJiaolianEmail(String jiaolianEmail) { public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail; this.jiaolianEmail = jiaolianEmail;
} }
/**
// 获取教练简介方法 *
*/
public String getJiaolianContent() { public String getJiaolianContent() {
return jiaolianContent; return jiaolianContent;
} }
/**
*
*/
// 设置教练简介方法
public void setJiaolianContent(String jiaolianContent) { public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent; this.jiaolianContent = jiaolianContent;
} }
/**
// 获取逻辑删除方法 *
*/
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
/**
*
*/
// 设置逻辑删除方法
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
// 获取添加时间方法 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 设置添加时间方法
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取创建时间方法 *
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
*
*/
// 设置创建时间方法
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// toString方法用于对象字符串表示
@Override @Override
public String toString() { public String toString() {
return "Jiaolian{" + return "Jiaolian{" +
", id=" + id + ", id=" + id +
", username=" + username + ", username=" + username +
", password=" + password + ", password=" + password +
", jiaolianName=" + jiaolianName + ", jiaolianName=" + jiaolianName +
", jiaolianPhone=" + jiaolianPhone + ", jiaolianPhone=" + jiaolianPhone +
", jiaolianPhoto=" + jiaolianPhoto + ", jiaolianPhoto=" + jiaolianPhoto +
", sexTypes=" + sexTypes + ", sexTypes=" + sexTypes +
", jiaolianEmail=" + jiaolianEmail + ", jiaolianEmail=" + jiaolianEmail +
", jiaolianContent=" + jiaolianContent + ", jiaolianContent=" + jiaolianContent +
", dataDelete=" + dataDelete + ", dataDelete=" + dataDelete +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") + ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}"; "}";
} }
} }

@ -1,242 +1,266 @@
// 包声明:定义当前类所在的包路径
package com.entity; package com.entity;
// 引入自定义注解-用于字段信息描述
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 引入Java校验注解-用于参数校验
import javax.validation.constraints.*; import javax.validation.constraints.*;
// 引入JSON序列化忽略注解-用于过滤特定字段
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 引入反射相关异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 引入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 引入集合工具类
import java.util.*; import java.util.*;
// 引入Ant日期工具类实际建议使用Java8日期API
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 引入日期格式注解-用于请求参数格式化
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 引入JSON格式注解-用于响应数据格式化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 引入Bean操作工具类-用于对象属性拷贝
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 引入MyBatis Plus字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 引入MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// 引入MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 引入MyBatis Plus主键类型枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// 引入MyBatis Plus字段填充策略枚举
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 引入自定义日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
// 教练预约申请实体类
// @author
// @email /**
*
*
* @author
* @email
*/
@TableName("jiaolian_yuyue") @TableName("jiaolian_yuyue")
public class JiaolianYuyueEntity<T> implements Serializable { public class JiaolianYuyueEntity<T> implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 无参构造
public JiaolianYuyueEntity() {
} public JiaolianYuyueEntity() {
// 带参构造(通过反射拷贝属性) }
public JiaolianYuyueEntity(T t) {
try { public JiaolianYuyueEntity(T t) {
BeanUtils.copyProperties(this, t); try {
} catch (IllegalAccessException | InvocationTargetException e) { BeanUtils.copyProperties(this, t);
e.printStackTrace(); } catch (IllegalAccessException | InvocationTargetException e) {
} // TODO Auto-generated catch block
} e.printStackTrace();
}
}
// 主键
/**
*
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)") @ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 预约编号
/**
*
*/
@ColumnInfo(comment="预约编号",type="varchar(200)") @ColumnInfo(comment="预约编号",type="varchar(200)")
@TableField(value = "jiaolian_yuyue_uuid_number") @TableField(value = "jiaolian_yuyue_uuid_number")
private String jiaolianYuyueUuidNumber; private String jiaolianYuyueUuidNumber;
// 关联用户ID
/**
*
*/
@ColumnInfo(comment="用户",type="int(11)") @ColumnInfo(comment="用户",type="int(11)")
@TableField(value = "yonghu_id") @TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 预约备注
/**
*
*/
@ColumnInfo(comment="预约备注",type="longtext") @ColumnInfo(comment="预约备注",type="longtext")
@TableField(value = "jiaolian_yuyue_text") @TableField(value = "jiaolian_yuyue_text")
private String jiaolianYuyueText; private String jiaolianYuyueText;
// 预约时间(带格式转换)
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="预约时间",type="timestamp") @ColumnInfo(comment="预约时间",type="timestamp")
@TableField(value = "jiaolian_yuyue_time") @TableField(value = "jiaolian_yuyue_time")
private Date jiaolianYuyueTime; private Date jiaolianYuyueTime;
// 预约状态0待审核 1已同意 2已拒绝
/**
*
*/
@ColumnInfo(comment="预约状态",type="int(11)") @ColumnInfo(comment="预约状态",type="int(11)")
@TableField(value = "jiaolian_yuyue_yesno_types") @TableField(value = "jiaolian_yuyue_yesno_types")
private Integer jiaolianYuyueYesnoTypes; private Integer jiaolianYuyueYesnoTypes;
// 审核回复内容
/**
*
*/
@ColumnInfo(comment="审核回复",type="longtext") @ColumnInfo(comment="审核回复",type="longtext")
@TableField(value = "jiaolian_yuyue_yesno_text") @TableField(value = "jiaolian_yuyue_yesno_text")
private String jiaolianYuyueYesnoText; private String jiaolianYuyueYesnoText;
// 申请时间(自动填充)
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="申请时间",type="timestamp") @ColumnInfo(comment="申请时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT) @TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime; private Date insertTime;
// 创建时间(列表展示用)
/**
* listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// id的get方法
// 获取:主键 /**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// id的set方法
// 设置:主键
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 预约编号的get方法 *
// 获取:预约编号 */
public String getJiaolianYuyueUuidNumber() { public String getJiaolianYuyueUuidNumber() {
return jiaolianYuyueUuidNumber; return jiaolianYuyueUuidNumber;
} }
/**
*
*/
// 预约编号的set方法
// 设置:预约编号
public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) { public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) {
this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber; this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber;
} }
/**
// 用户ID的get方法 *
// 获取:用户 */
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
/**
*
*/
// 用户ID的set方法
// 设置:用户
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 预约备注的get方法 *
// 获取:预约备注 */
public String getJiaolianYuyueText() { public String getJiaolianYuyueText() {
return jiaolianYuyueText; return jiaolianYuyueText;
} }
/**
*
*/
// 预约备注的set方法
// 设置:预约备注
public void setJiaolianYuyueText(String jiaolianYuyueText) { public void setJiaolianYuyueText(String jiaolianYuyueText) {
this.jiaolianYuyueText = jiaolianYuyueText; this.jiaolianYuyueText = jiaolianYuyueText;
} }
/**
// 预约时间的get方法 *
// 获取:预约时间 */
public Date getJiaolianYuyueTime() { public Date getJiaolianYuyueTime() {
return jiaolianYuyueTime; return jiaolianYuyueTime;
} }
/**
*
*/
// 预约时间的set方法
// 设置:预约时间
public void setJiaolianYuyueTime(Date jiaolianYuyueTime) { public void setJiaolianYuyueTime(Date jiaolianYuyueTime) {
this.jiaolianYuyueTime = jiaolianYuyueTime; this.jiaolianYuyueTime = jiaolianYuyueTime;
} }
/**
// 预约状态的get方法 *
// 获取:预约状态 */
public Integer getJiaolianYuyueYesnoTypes() { public Integer getJiaolianYuyueYesnoTypes() {
return jiaolianYuyueYesnoTypes; return jiaolianYuyueYesnoTypes;
} }
/**
*
*/
// 预约状态的set方法
// 设置:预约状态
public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) { public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) {
this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes; this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes;
} }
/**
// 审核回复的get方法 *
// 获取:审核回复 */
public String getJiaolianYuyueYesnoText() { public String getJiaolianYuyueYesnoText() {
return jiaolianYuyueYesnoText; return jiaolianYuyueYesnoText;
} }
/**
*
*/
// 审核回复的set方法
// 设置:审核回复
public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) { public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) {
this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText; this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText;
} }
/**
// 申请时间的get方法 *
// 获取:申请时间 */
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 申请时间的set方法
// 设置:申请时间
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 创建时间的get方法 * listShow
// 获取:创建时间 listShow */
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
* listShow
*/
// 创建时间的set方法
// 设置:创建时间 listShow
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// toString方法实体对象字符串表示
@Override @Override
public String toString() { public String toString() {
return "JiaolianYuyue{" + return "JiaolianYuyue{" +
// 主键字段 ", id=" + id +
", id=" + id + ", jiaolianYuyueUuidNumber=" + jiaolianYuyueUuidNumber +
// 预约编号字段 ", yonghuId=" + yonghuId +
", jiaolianYuyueUuidNumber=" + jiaolianYuyueUuidNumber + ", jiaolianYuyueText=" + jiaolianYuyueText +
// 用户ID字段 ", jiaolianYuyueTime=" + DateUtil.convertString(jiaolianYuyueTime,"yyyy-MM-dd") +
", yonghuId=" + yonghuId + ", jiaolianYuyueYesnoTypes=" + jiaolianYuyueYesnoTypes +
// 预约备注字段 ", jiaolianYuyueYesnoText=" + jiaolianYuyueYesnoText +
", jiaolianYuyueText=" + jiaolianYuyueText + ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
// 预约时间字段(格式化) ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
", jiaolianYuyueTime=" + DateUtil.convertString(jiaolianYuyueTime,"yyyy-MM-dd") + "}";
// 预约状态字段 }
", jiaolianYuyueYesnoTypes=" + jiaolianYuyueYesnoTypes + }
// 审核回复字段
", jiaolianYuyueYesnoText=" + jiaolianYuyueYesnoText +
// 申请时间字段(格式化)
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
// 创建时间字段(格式化)
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -1,184 +1,218 @@
// 包声明:定义当前类所在包路径
package com.entity; package com.entity;
// 导入列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入验证相关的注解
import javax.validation.constraints.*; import javax.validation.constraints.*;
// 导入JSON忽略属性注解
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入集合工具类
import java.util.*; import java.util.*;
// 导入Ant日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入JSON格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Bean工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// 导入MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入MyBatis Plus主键类型枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// 导入MyBatis Plus字段填充枚举
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 导入日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("news")
public class NewsEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public NewsEntity() {
}
public NewsEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
*
*/
@TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id")
private Integer id;
/**
*
*/
@ColumnInfo(comment="资讯标题",type="varchar(200)")
@TableField(value = "news_name")
private String newsName;
/**
*
*/
@ColumnInfo(comment="资讯类型",type="int(11)")
@TableField(value = "news_types")
private Integer newsTypes;
/**
*
*/
@ColumnInfo(comment="资讯图片",type="varchar(200)")
@TableField(value = "news_photo")
private String newsPhoto;
/** /**
* *
*/ */
// 指定数据库表名 @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@TableName("news") @DateTimeFormat
public class NewsEntity<T> implements Serializable { @ColumnInfo(comment="添加时间",type="timestamp")
// 序列化版本UID @TableField(value = "insert_time",fill = FieldFill.INSERT)
private static final long serialVersionUID = 1L;
private Date insertTime;
// 无参构造方法
public NewsEntity() {
/**
} *
*/
// 带参构造方法使用BeanUtils复制属性 @ColumnInfo(comment="资讯详情",type="longtext")
public NewsEntity(T t) { @TableField(value = "news_content")
try {
BeanUtils.copyProperties(this, t); private String newsContent;
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace(); /**
} *
} */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
// 主键字段 @DateTimeFormat
@TableId(type = IdType.AUTO) @ColumnInfo(comment="创建时间",type="timestamp")
@ColumnInfo(comment="主键",type="int(11)") @TableField(value = "create_time",fill = FieldFill.INSERT)
@TableField(value = "id")
private Integer id; private Date createTime;
// 资讯标题字段
@ColumnInfo(comment="资讯标题",type="varchar(200)") /**
@TableField(value = "news_name") *
private String newsName; */
public Integer getId() {
// 资讯类型字段 return id;
@ColumnInfo(comment="资讯类型",type="int(11)") }
@TableField(value = "news_types") /**
private Integer newsTypes; *
*/
// 资讯图片字段
@ColumnInfo(comment="资讯图片",type="varchar(200)") public void setId(Integer id) {
@TableField(value = "news_photo") this.id = id;
private String newsPhoto; }
/**
// 添加时间字段 *
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") */
@DateTimeFormat public String getNewsName() {
@ColumnInfo(comment="添加时间",type="timestamp") return newsName;
@TableField(value = "insert_time",fill = FieldFill.INSERT) }
private Date insertTime; /**
*
// 资讯详情字段 */
@ColumnInfo(comment="资讯详情",type="longtext")
@TableField(value = "news_content") public void setNewsName(String newsName) {
private String newsContent; this.newsName = newsName;
}
// 创建时间字段 /**
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") *
@DateTimeFormat */
@ColumnInfo(comment="创建时间",type="timestamp") public Integer getNewsTypes() {
@TableField(value = "create_time",fill = FieldFill.INSERT) return newsTypes;
private Date createTime; }
/**
// 获取主键方法 *
public Integer getId() { */
return id;
} public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
// 设置主键方法 }
public void setId(Integer id) { /**
this.id = id; *
} */
public String getNewsPhoto() {
// 获取资讯标题方法 return newsPhoto;
public String getNewsName() { }
return newsName; /**
} *
*/
// 设置资讯标题方法
public void setNewsName(String newsName) { public void setNewsPhoto(String newsPhoto) {
this.newsName = newsName; this.newsPhoto = newsPhoto;
} }
/**
// 获取资讯类型方法 *
public Integer getNewsTypes() { */
return newsTypes; public Date getInsertTime() {
} return insertTime;
}
// 设置资讯类型方法 /**
public void setNewsTypes(Integer newsTypes) { *
this.newsTypes = newsTypes; */
}
public void setInsertTime(Date insertTime) {
// 获取资讯图片方法 this.insertTime = insertTime;
public String getNewsPhoto() { }
return newsPhoto; /**
} *
*/
// 设置资讯图片方法 public String getNewsContent() {
public void setNewsPhoto(String newsPhoto) { return newsContent;
this.newsPhoto = newsPhoto; }
} /**
*
// 获取添加时间方法 */
public Date getInsertTime() {
return insertTime; public void setNewsContent(String newsContent) {
} this.newsContent = newsContent;
}
// 设置添加时间方法 /**
public void setInsertTime(Date insertTime) { *
this.insertTime = insertTime; */
} public Date getCreateTime() {
return createTime;
// 获取资讯详情方法 }
public String getNewsContent() { /**
return newsContent; *
} */
// 设置资讯详情方法 public void setCreateTime(Date createTime) {
public void setNewsContent(String newsContent) { this.createTime = createTime;
this.newsContent = newsContent; }
}
@Override
// 获取创建时间方法 public String toString() {
public Date getCreateTime() { return "News{" +
return createTime; ", id=" + id +
} ", newsName=" + newsName +
", newsTypes=" + newsTypes +
// 设置创建时间方法 ", newsPhoto=" + newsPhoto +
public void setCreateTime(Date createTime) { ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
this.createTime = createTime; ", newsContent=" + newsContent +
} ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
// toString方法用于对象字符串表示
@Override
public String toString() {
return "News{" +
", id=" + id +
", newsName=" + newsName +
", newsTypes=" + newsTypes +
", newsPhoto=" + newsPhoto +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", newsContent=" + newsContent +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
} }
}

@ -1,157 +1,193 @@
// 声明实体类所在的包
package com.entity; package com.entity;
// 导入列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入验证相关注解
import javax.validation.constraints.*; import javax.validation.constraints.*;
// 导入JSON忽略属性注解
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
// 导入反射相关异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入集合类
import java.util.*; import java.util.*;
// 导入Ant日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入JSON格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Bean工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus主键注解
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
// 导入MyBatis Plus表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入MyBatis Plus主键类型枚举
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// 导入MyBatis Plus字段填充枚举
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 导入日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
//单页数据 /**
//@author *
//@email *
// 指定表名 * @author
* @email
*/
@TableName("single_seach") @TableName("single_seach")
public class SingleSeachEntity<T> implements Serializable { public class SingleSeachEntity<T> implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 无参构造方法
public SingleSeachEntity() {
} public SingleSeachEntity() {
// 带参构造方法,使用泛型对象初始化 }
public SingleSeachEntity(T t) {
try { public SingleSeachEntity(T t) {
// 复制属性值 try {
BeanUtils.copyProperties(this, t); BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
// 主键字段
/**
*
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ColumnInfo(comment="主键",type="int(11)") @ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 名字字段
/**
*
*/
@ColumnInfo(comment="名字",type="varchar(200)") @ColumnInfo(comment="名字",type="varchar(200)")
@TableField(value = "single_seach_name") @TableField(value = "single_seach_name")
private String singleSeachName; private String singleSeachName;
// 数据类型字段
/**
*
*/
@ColumnInfo(comment="数据类型",type="int(11)") @ColumnInfo(comment="数据类型",type="int(11)")
@TableField(value = "single_seach_types") @TableField(value = "single_seach_types")
private Integer singleSeachTypes; private Integer singleSeachTypes;
// 图片字段
/**
*
*/
@ColumnInfo(comment="图片",type="varchar(200)") @ColumnInfo(comment="图片",type="varchar(200)")
@TableField(value = "single_seach_photo") @TableField(value = "single_seach_photo")
private String singleSeachPhoto; private String singleSeachPhoto;
// 内容字段
/**
*
*/
@ColumnInfo(comment="内容",type="longtext") @ColumnInfo(comment="内容",type="longtext")
@TableField(value = "single_seach_content") @TableField(value = "single_seach_content")
private String singleSeachContent; private String singleSeachContent;
// 创建时间字段
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp") @ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) @TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// 获取主键方法
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键方法 /**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
// 获取名字方法 /**
*
*/
public String getSingleSeachName() { public String getSingleSeachName() {
return singleSeachName; return singleSeachName;
} }
// 设置名字方法 /**
*
*/
public void setSingleSeachName(String singleSeachName) { public void setSingleSeachName(String singleSeachName) {
this.singleSeachName = singleSeachName; this.singleSeachName = singleSeachName;
} }
// 获取数据类型方法 /**
*
*/
public Integer getSingleSeachTypes() { public Integer getSingleSeachTypes() {
return singleSeachTypes; return singleSeachTypes;
} }
// 设置数据类型方法 /**
*
*/
public void setSingleSeachTypes(Integer singleSeachTypes) { public void setSingleSeachTypes(Integer singleSeachTypes) {
this.singleSeachTypes = singleSeachTypes; this.singleSeachTypes = singleSeachTypes;
} }
// 获取图片方法 /**
*
*/
public String getSingleSeachPhoto() { public String getSingleSeachPhoto() {
return singleSeachPhoto; return singleSeachPhoto;
} }
// 设置图片方法 /**
*
*/
public void setSingleSeachPhoto(String singleSeachPhoto) { public void setSingleSeachPhoto(String singleSeachPhoto) {
this.singleSeachPhoto = singleSeachPhoto; this.singleSeachPhoto = singleSeachPhoto;
} }
// 获取内容方法 /**
*
*/
public String getSingleSeachContent() { public String getSingleSeachContent() {
return singleSeachContent; return singleSeachContent;
} }
// 设置内容方法 /**
*
*/
public void setSingleSeachContent(String singleSeachContent) { public void setSingleSeachContent(String singleSeachContent) {
this.singleSeachContent = singleSeachContent; this.singleSeachContent = singleSeachContent;
} }
// 获取创建时间方法 /**
*
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间方法 /**
*
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// toString方法
@Override @Override
public String toString() { public String toString() {
return "SingleSeach{" + return "SingleSeach{" +
", id=" + id + ", id=" + id +
", singleSeachName=" + singleSeachName + ", singleSeachName=" + singleSeachName +
", singleSeachTypes=" + singleSeachTypes + ", singleSeachTypes=" + singleSeachTypes +
", singleSeachPhoto=" + singleSeachPhoto + ", singleSeachPhoto=" + singleSeachPhoto +
", singleSeachContent=" + singleSeachContent + ", singleSeachContent=" + singleSeachContent +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}"; "}";
} }
} }

@ -1,125 +1,121 @@
// 包声明
package com.entity; package com.entity;
// 导入相关类
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// token表实体类 /**
* token
*/
@TableName("token") @TableName("token")
public class TokenEntity implements Serializable { public class TokenEntity implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID自增
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
// 用户id /**
* id
*/
private Integer userid; private Integer userid;
// 用户名 /**
*
*/
private String username; private String username;
// 表名 /**
*
*/
private String tablename; private String tablename;
// 角色 /**
*
*/
private String role; private String role;
// token值 /**
* token
*/
private String token; private String token;
// 过期时间 /**
*
*/
private Date expiratedtime; private Date expiratedtime;
// 新增时间 /**
*
*/
private Date addtime; private Date addtime;
// 获取ID
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置ID
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
// 获取用户ID
public Integer getUserid() { public Integer getUserid() {
return userid; return userid;
} }
// 设置用户ID
public void setUserid(Integer userid) { public void setUserid(Integer userid) {
this.userid = userid; this.userid = userid;
} }
// 获取角色
public String getRole() { public String getRole() {
return role; return role;
} }
// 设置角色
public void setRole(String role) { public void setRole(String role) {
this.role = role; this.role = role;
} }
// 获取token
public String getToken() { public String getToken() {
return token; return token;
} }
// 获取表名
public String getTablename() { public String getTablename() {
return tablename; return tablename;
} }
// 设置表名
public void setTablename(String tablename) { public void setTablename(String tablename) {
this.tablename = tablename; this.tablename = tablename;
} }
// 设置token
public void setToken(String token) { public void setToken(String token) {
this.token = token; this.token = token;
} }
// 获取过期时间
public Date getExpiratedtime() { public Date getExpiratedtime() {
return expiratedtime; return expiratedtime;
} }
// 设置过期时间
public void setExpiratedtime(Date expiratedtime) { public void setExpiratedtime(Date expiratedtime) {
this.expiratedtime = expiratedtime; this.expiratedtime = expiratedtime;
} }
// 获取新增时间
public Date getAddtime() { public Date getAddtime() {
return addtime; return addtime;
} }
// 设置新增时间
public void setAddtime(Date addtime) { public void setAddtime(Date addtime) {
this.addtime = addtime; this.addtime = addtime;
} }
// 获取用户名
public String getUsername() { public String getUsername() {
return username; return username;
} }
// 设置用户名
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
// 全参数构造方法用户ID、用户名、表名、角色、token、过期时间
public TokenEntity(Integer userid, String username, String tablename,String role, String token, Date expiratedtime) { public TokenEntity(Integer userid, String username, String tablename,String role, String token, Date expiratedtime) {
super(); super();
this.userid = userid; this.userid = userid;
@ -129,8 +125,8 @@ public class TokenEntity implements Serializable {
this.token = token; this.token = token;
this.expiratedtime = expiratedtime; this.expiratedtime = expiratedtime;
} }
// 无参构造方法
public TokenEntity() { public TokenEntity() {
} }
}
}

@ -1,82 +1,77 @@
// 包声明
package com.entity; package com.entity;
// 导入相关类
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
// 用户实体类 /**
*
*/
@TableName("users") @TableName("users")
public class UsersEntity implements Serializable { public class UsersEntity implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID自增
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Integer id; private Integer id;
// 用户账号 /**
*
*/
private String username; private String username;
// 密码 /**
*
*/
private String password; private String password;
// 用户类型 /**
*
*/
private String role; private String role;
// 新增时间
private Date addtime; private Date addtime;
// 获取用户账号
public String getUsername() { public String getUsername() {
return username; return username;
} }
// 设置用户账号
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
// 获取密码
public String getPassword() { public String getPassword() {
return password; return password;
} }
// 设置密码
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
// 获取用户类型
public String getRole() { public String getRole() {
return role; return role;
} }
// 设置用户类型
public void setRole(String role) { public void setRole(String role) {
this.role = role; this.role = role;
} }
// 获取新增时间
public Date getAddtime() { public Date getAddtime() {
return addtime; return addtime;
} }
// 设置新增时间
public void setAddtime(Date addtime) { public void setAddtime(Date addtime) {
this.addtime = addtime; this.addtime = addtime;
} }
// 获取ID
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置ID
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
}
}

@ -1,273 +1,356 @@
// 包声明 package com.entity;
package com.entity;
// 导入Java核心库 import com.annotation.ColumnInfo;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
// 导入校验相关注解
import javax.validation.constraints.*; import javax.validation.constraints.*;
// 导入Jackson注解
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonFormat; import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
// 导入Apache工具类 import java.util.*;
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
import org.apache.commons.beanutils.BeanUtils;
// 导入Spring框架注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
// 导入MyBatis Plus注解 import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill; import com.baomidou.mybatisplus.enums.FieldFill;
// 导入自定义注解和工具类
import com.annotation.ColumnInfo;
import com.utils.DateUtil; import com.utils.DateUtil;
// 用户实体类对应数据库表yonghu
/**
*
*
* @author
* @email
*/
@TableName("yonghu") @TableName("yonghu")
public class YonghuEntity<T> implements Serializable { public class YonghuEntity<T> implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 无参构造方法
public YonghuEntity() {
}
// 带泛型参数的构造方法通过BeanUtils进行属性拷贝 public YonghuEntity() {
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// 异常处理(打印堆栈跟踪)
e.printStackTrace();
}
}
// 主键(自增) }
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
*
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
@ColumnInfo(comment = "主键", type = "int(11)") @ColumnInfo(comment="主键",type="int(11)")
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 用户账户
@ColumnInfo(comment = "账户", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="账户",type="varchar(200)")
@TableField(value = "username") @TableField(value = "username")
private String username; private String username;
// 登录密码
@ColumnInfo(comment = "密码", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="密码",type="varchar(200)")
@TableField(value = "password") @TableField(value = "password")
private String password; private String password;
// 用户真实姓名
@ColumnInfo(comment = "用户名称", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="用户名称",type="varchar(200)")
@TableField(value = "yonghu_name") @TableField(value = "yonghu_name")
private String yonghuName; private String yonghuName;
// 用户手机号码
@ColumnInfo(comment = "用户手机号", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="用户手机号",type="varchar(200)")
@TableField(value = "yonghu_phone") @TableField(value = "yonghu_phone")
private String yonghuPhone; private String yonghuPhone;
// 用户身份证号码
@ColumnInfo(comment = "用户身份证号", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
@TableField(value = "yonghu_id_number") @TableField(value = "yonghu_id_number")
private String yonghuIdNumber; private String yonghuIdNumber;
// 用户头像存储路径
@ColumnInfo(comment = "用户头像", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="用户头像",type="varchar(200)")
@TableField(value = "yonghu_photo") @TableField(value = "yonghu_photo")
private String yonghuPhoto; private String yonghuPhoto;
// 性别0=未知,1=男,2=女)
@ColumnInfo(comment = "性别", type = "int(11)") /**
*
*/
@ColumnInfo(comment="性别",type="int(11)")
@TableField(value = "sex_types") @TableField(value = "sex_types")
private Integer sexTypes; private Integer sexTypes;
// 用户电子邮箱
@ColumnInfo(comment = "用户邮箱", type = "varchar(200)") /**
*
*/
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
@TableField(value = "yonghu_email") @TableField(value = "yonghu_email")
private String yonghuEmail; private String yonghuEmail;
// 账户余额(十进制类型)
@ColumnInfo(comment = "现有余额", type = "decimal(10,2)") /**
*
*/
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
@TableField(value = "new_money") @TableField(value = "new_money")
private Double newMoney; private Double newMoney;
// 逻辑删除标记0=正常,1=删除)
@ColumnInfo(comment = "逻辑删除", type = "int(11)") /**
*
*/
@ColumnInfo(comment="逻辑删除",type="int(11)")
@TableField(value = "data_delete") @TableField(value = "data_delete")
private Integer dataDelete; private Integer dataDelete;
// 数据插入时间(自动填充)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
@ColumnInfo(comment = "添加时间", type = "timestamp") */
@TableField(value = "insert_time", fill = FieldFill.INSERT) @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="添加时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime; private Date insertTime;
// 记录创建时间(自动填充)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
@ColumnInfo(comment = "创建时间", type = "timestamp") */
@TableField(value = "create_time", fill = FieldFill.INSERT) @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
/**
*
*/
// 设置主键ID
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取用户账户 *
*/
public String getUsername() { public String getUsername() {
return username; return username;
} }
/**
*
*/
// 设置用户账户
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
/**
// 获取登录密码 *
*/
public String getPassword() { public String getPassword() {
return password; return password;
} }
/**
*
*/
// 设置登录密码
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
// 获取用户真实姓名 *
*/
public String getYonghuName() { public String getYonghuName() {
return yonghuName; return yonghuName;
} }
/**
*
*/
// 设置用户真实姓名
public void setYonghuName(String yonghuName) { public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName; this.yonghuName = yonghuName;
} }
/**
// 获取用户手机号 *
*/
public String getYonghuPhone() { public String getYonghuPhone() {
return yonghuPhone; return yonghuPhone;
} }
/**
*
*/
// 设置用户手机号
public void setYonghuPhone(String yonghuPhone) { public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone; this.yonghuPhone = yonghuPhone;
} }
/**
// 获取身份证号码 *
*/
public String getYonghuIdNumber() { public String getYonghuIdNumber() {
return yonghuIdNumber; return yonghuIdNumber;
} }
/**
*
*/
// 设置身份证号码
public void setYonghuIdNumber(String yonghuIdNumber) { public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber; this.yonghuIdNumber = yonghuIdNumber;
} }
/**
// 获取头像路径 *
*/
public String getYonghuPhoto() { public String getYonghuPhoto() {
return yonghuPhoto; return yonghuPhoto;
} }
/**
*
*/
// 设置头像路径
public void setYonghuPhoto(String yonghuPhoto) { public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto; this.yonghuPhoto = yonghuPhoto;
} }
/**
// 获取性别类型 *
*/
public Integer getSexTypes() { public Integer getSexTypes() {
return sexTypes; return sexTypes;
} }
/**
*
*/
// 设置性别类型
public void setSexTypes(Integer sexTypes) { public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes; this.sexTypes = sexTypes;
} }
/**
// 获取用户邮箱 *
*/
public String getYonghuEmail() { public String getYonghuEmail() {
return yonghuEmail; return yonghuEmail;
} }
/**
*
*/
// 设置用户邮箱
public void setYonghuEmail(String yonghuEmail) { public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail; this.yonghuEmail = yonghuEmail;
} }
/**
// 获取账户余额 *
*/
public Double getNewMoney() { public Double getNewMoney() {
return newMoney; return newMoney;
} }
/**
*
*/
// 设置账户余额
public void setNewMoney(Double newMoney) { public void setNewMoney(Double newMoney) {
this.newMoney = newMoney; this.newMoney = newMoney;
} }
/**
// 获取逻辑删除状态 *
*/
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
/**
*
*/
// 设置逻辑删除状态
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
// 获取数据插入时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
/**
*
*/
// 设置数据插入时间
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取记录创建时间 *
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
/**
*
*/
// 设置记录创建时间
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
// 重写toString方法返回对象字符串表示
@Override @Override
public String toString() { public String toString() {
return "Yonghu{" + return "Yonghu{" +
", id=" + id + ", id=" + id +
", username=" + username + ", username=" + username +
", password=" + password + ", password=" + password +
", yonghuName=" + yonghuName + ", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone + ", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber + ", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto + ", yonghuPhoto=" + yonghuPhoto +
", sexTypes=" + sexTypes + ", sexTypes=" + sexTypes +
", yonghuEmail=" + yonghuEmail + ", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney + ", newMoney=" + newMoney +
", dataDelete=" + dataDelete + ", dataDelete=" + dataDelete +
", insertTime=" + DateUtil.convertString(insertTime, "yyyy-MM-dd") + ", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime, "yyyy-MM-dd") + ", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}"; "}";
} }
} }

@ -1,155 +1,187 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入字典实体类,用于数据表映射
import com.entity.DictionaryEntity; import com.entity.DictionaryEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
// 字典模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
//该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class DictionaryModel implements Serializable { public class DictionaryModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
/**
*
*/
private Long id; private Long id;
//字典编码
/**
*
*/
private String dicCode; private String dicCode;
//字典名称
/**
*
*/
private String dicName; private String dicName;
// 编码索引
/**
*
*/
private Integer codeIndex; private Integer codeIndex;
//索引名称
/**
*
*/
private String indexName; private String indexName;
// 父级字典ID /**
* id
*/
private Integer superId; private Integer superId;
// 备注信息 /**
*
*/
private String beizhu; private String beizhu;
//创建时间 /**
//使用Jackson注解指定JSON格式 *
//使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Long getId() { public Long getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/**
*
//获取字典编码 */
// @return 字典编码
public String getDicCode() { public String getDicCode() {
return dicCode; return dicCode;
} }
//设置字典编码 /**
// @param dicCode 字典编码 *
*/
public void setDicCode(String dicCode) { public void setDicCode(String dicCode) {
this.dicCode = dicCode; this.dicCode = dicCode;
} }
/**
*
//获取字典名称 */
// @return 字典名称
public String getDicName() { public String getDicName() {
return dicName; return dicName;
} }
//设置字典名称
// @param dicName 字典名称
/**
*
*/
public void setDicName(String dicName) { public void setDicName(String dicName) {
this.dicName = dicName; this.dicName = dicName;
} }
/**
*
//获取编码索引 */
//@return 编码索引
public Integer getCodeIndex() { public Integer getCodeIndex() {
return codeIndex; return codeIndex;
} }
//设置编码索引
//@param codeIndex 编码索引
/**
*
*/
public void setCodeIndex(Integer codeIndex) { public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex; this.codeIndex = codeIndex;
} }
//获取索引名称 /**
//@return 索引名称 *
*/
public String getIndexName() { public String getIndexName() {
return indexName; return indexName;
} }
//设置索引名称
//@param indexName 索引名称
/**
*
*/
public void setIndexName(String indexName) { public void setIndexName(String indexName) {
this.indexName = indexName; this.indexName = indexName;
} }
//获取父级字典ID /**
//@return 父级字典ID * id
*/
public Integer getSuperId() { public Integer getSuperId() {
return superId; return superId;
} }
//设置父级字典ID
//@param superId 父级字典ID
/**
* id
*/
public void setSuperId(Integer superId) { public void setSuperId(Integer superId) {
this.superId = superId; this.superId = superId;
} }
//获取备注信息 /**
//@return 备注信息 *
*/
public String getBeizhu() { public String getBeizhu() {
return beizhu; return beizhu;
} }
// 设置备注信息
// @param beizhu 备注信息
/**
*
*/
public void setBeizhu(String beizhu) { public void setBeizhu(String beizhu) {
this.beizhu = beizhu; this.beizhu = beizhu;
} }
//获取创建时间 /**
// @return 创建时间 *
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间
// @param createTime 创建时间
/**
*
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,268 +1,251 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入论坛实体类,用于数据表映射
import com.entity.ForumEntity; import com.entity.ForumEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
// 健身论坛模型类
//用于接收前端传参的实体类
//(实际开发中可根据移动端需求手动移除无用字段,
// 后端一般直接使用entity实体类即可
//该类名称取自ModelAndView中的model名称
/**
*
*
* entity
* ModelAndView model
*/
public class ForumModel implements Serializable { public class ForumModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
private Integer id;
// 帖子标题 /**
*
*/
private Integer id;
private String forumName;
/**
*
*/
private String forumName;
// 关联用户ID
/**
*
*/
private Integer yonghuId; private Integer yonghuId;
// 关联教练ID /**
*
*/
private Integer jiaolianId; private Integer jiaolianId;
// 关联管理员ID /**
*
*/
private Integer usersId; private Integer usersId;
//帖子内容 /**
*
*/
private String forumContent; private String forumContent;
// 父级帖子ID用于回复关系 /**
* id
*/
private Integer superIds; private Integer superIds;
//帖子状态0-正常 1-置顶 2-精华等) /**
*
*/
private Integer forumStateTypes; private Integer forumStateTypes;
// 发帖时间 /**
//使用Jackson注解指定JSON格式 *
//使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
//最后修改时间 /**
//使用Jackson注解指定JSON格式 *
//使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date updateTime; private Date updateTime;
//创建时间(展示用) /**
// 使用Jackson注解指定JSON格式 * show2
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
//获取帖子标题 */
// @return 帖子标题
public String getForumName() { public String getForumName() {
return forumName; return forumName;
} }
//设置帖子标题 /**
// @param forumName 帖子标题 *
*/
public void setForumName(String forumName) { public void setForumName(String forumName) {
this.forumName = forumName; this.forumName = forumName;
} }
/**
*
//获取关联用户ID */
// @return 用户ID
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
//设置关联用户ID /**
//@param yonghuId 用户ID *
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
*
//获取关联教练ID */
// @return 教练ID
public Integer getJiaolianId() { public Integer getJiaolianId() {
return jiaolianId; return jiaolianId;
} }
//设置关联教练ID /**
// @param jiaolianId 教练ID *
*/
public void setJiaolianId(Integer jiaolianId) { public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId; this.jiaolianId = jiaolianId;
} }
/**
*
//获取关联管理员ID */
//@return 管理员ID
public Integer getUsersId() { public Integer getUsersId() {
return usersId; return usersId;
} }
//设置关联管理员ID /**
// @param usersId 管理员ID *
*/
public void setUsersId(Integer usersId) { public void setUsersId(Integer usersId) {
this.usersId = usersId; this.usersId = usersId;
} }
/**
*
//获取帖子内容 */
// @return 帖子内容
public String getForumContent() { public String getForumContent() {
return forumContent; return forumContent;
} }
//设置帖子内容 /**
// @param forumContent 帖子内容 *
*/
public void setForumContent(String forumContent) { public void setForumContent(String forumContent) {
this.forumContent = forumContent; this.forumContent = forumContent;
} }
/**
* id
//获取父级帖子ID */
// @return 父级帖子ID
public Integer getSuperIds() { public Integer getSuperIds() {
return superIds; return superIds;
} }
//设置父级帖子ID /**
// @param superIds 父级帖子ID * id
*/
public void setSuperIds(Integer superIds) { public void setSuperIds(Integer superIds) {
this.superIds = superIds; this.superIds = superIds;
} }
/**
*
//获取帖子状态 */
// @return 帖子状态
public Integer getForumStateTypes() { public Integer getForumStateTypes() {
return forumStateTypes; return forumStateTypes;
} }
//设置帖子状态 /**
// @param forumStateTypes 帖子状态 *
*/
public void setForumStateTypes(Integer forumStateTypes) { public void setForumStateTypes(Integer forumStateTypes) {
this.forumStateTypes = forumStateTypes; this.forumStateTypes = forumStateTypes;
} }
/**
*
//获取发帖时间 */
// @return 发帖时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//设置发帖时间 /**
// @param insertTime 发帖时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
*
//获取最后修改时间 */
// @return 修改时间
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
//设置最后修改时间 /**
// @param updateTime 修改时间 *
*/
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
* show2
//获取创建时间(展示用) */
// @return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间(展示用) /**
// @param createTime 创建时间 * show2
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,161 +1,149 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入健身课程收藏实体类,用于数据表映射
import com.entity.JianshenkechengCollectionEntity; import com.entity.JianshenkechengCollectionEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
// 健身课程收藏模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
//该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class JianshenkechengCollectionModel implements Serializable { public class JianshenkechengCollectionModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
private Integer id;
/**
*
*/
private Integer id;
// 关联的健身课程ID
/**
*
*/
private Integer jianshenkechengId; private Integer jianshenkechengId;
// 关联的用户ID /**
*
*/
private Integer yonghuId; private Integer yonghuId;
// 收藏类型1-收藏 2-点赞等) /**
*
*/
private Integer jianshenkechengCollectionTypes; private Integer jianshenkechengCollectionTypes;
// 收藏时间 /**
//使用Jackson注解指定JSON格式 *
//使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
// 创建时间(用于展示) /**
//使用Jackson注解指定JSON格式 * show3 photoShow
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// * 设置主键ID /**
//* @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
// * 获取关联的健身课程ID */
//* @return 健身课程ID
public Integer getJianshenkechengId() { public Integer getJianshenkechengId() {
return jianshenkechengId; return jianshenkechengId;
} }
// * 设置关联的健身课程ID /**
//* @param jianshenkechengId 健身课程ID *
*/
public void setJianshenkechengId(Integer jianshenkechengId) { public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId; this.jianshenkechengId = jianshenkechengId;
} }
/**
*
// * 获取关联的用户ID */
//* @return 用户ID
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
//* 设置关联的用户ID /**
//* @param yonghuId 用户ID *
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
*
//* 获取收藏类型 */
//* @return 收藏类型
public Integer getJianshenkechengCollectionTypes() { public Integer getJianshenkechengCollectionTypes() {
return jianshenkechengCollectionTypes; return jianshenkechengCollectionTypes;
} }
//* 设置收藏类型 /**
//* @param jianshenkechengCollectionTypes 收藏类型 *
*/
public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) { public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) {
this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes; this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes;
} }
/**
*
//* 获取收藏时间 */
//* @return 收藏时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//* 设置收藏时间 /**
//* @param insertTime 收藏时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
* show3 photoShow
//* 获取创建时间(用于展示) */
// @return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//* 设置创建时间(用于展示) /**
//* @param createTime 创建时间 * show3 photoShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,203 +1,191 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入健身课程留言实体类,用于数据表映射
import com.entity.JianshenkechengLiuyanEntity; import com.entity.JianshenkechengLiuyanEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
//* 健身课程留言模型类 /**
//* 用于接收前端传参的实体类 *
//* (实际开发中可根据移动端需求手动移除无用字段, *
//* 后端一般直接使用entity实体类即可 * entity
//* 该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class JianshenkechengLiuyanModel implements Serializable { public class JianshenkechengLiuyanModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//* 主键ID
private Integer id;
/**
*
*/
private Integer id;
//* 关联的健身课程ID
/**
*
*/
private Integer jianshenkechengId; private Integer jianshenkechengId;
//* 关联的用户ID /**
*
*/
private Integer yonghuId; private Integer yonghuId;
// * 留言内容 /**
*
*/
private String jianshenkechengLiuyanText; private String jianshenkechengLiuyanText;
//* 留言时间 /**
//* 使用Jackson注解指定JSON格式 *
//* 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
//* 回复内容 /**
*
*/
private String replyText; private String replyText;
//* 回复时间 /**
//* 使用Jackson注解指定JSON格式 *
//* 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date updateTime; private Date updateTime;
//* 创建时间(用于展示) /**
//* 使用Jackson注解指定JSON格式 * show3 listShow
//* 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//* 获取主键ID
//* @return 主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//* 设置主键ID
//* @param id 主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
//* 获取关联的健身课程ID *
//* @return 健身课程ID */
public Integer getJianshenkechengId() { public Integer getJianshenkechengId() {
return jianshenkechengId; return jianshenkechengId;
} }
//* 设置关联的健身课程ID
// * @param jianshenkechengId 健身课程ID
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) { public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId; this.jianshenkechengId = jianshenkechengId;
} }
/**
*
//* 获取关联的用户ID */
//* @return 用户ID
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
//* 设置关联的用户ID /**
//* @param yonghuId 用户ID *
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
*
// * 获取留言内容 */
//* @return 留言内容
public String getJianshenkechengLiuyanText() { public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText; return jianshenkechengLiuyanText;
} }
//* 设置留言内容 /**
// * @param jianshenkechengLiuyanText 留言内容 *
*/
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) { public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText; this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
} }
/**
*
//* 获取留言时间 */
// * @return 留言时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//* 设置留言时间 /**
//* @param insertTime 留言时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
*
//* 获取回复内容 */
//* @return 回复内容
public String getReplyText() { public String getReplyText() {
return replyText; return replyText;
} }
//* 设置回复内容 /**
// * @param replyText 回复内容 *
*/
public void setReplyText(String replyText) { public void setReplyText(String replyText) {
this.replyText = replyText; this.replyText = replyText;
} }
/**
*
//* 获取回复时间 */
//* @return 回复时间
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
//* 设置回复时间 /**
//* @param updateTime 回复时间 *
*/
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
* show3 listShow
//* 获取创建时间(用于展示) */
// * @return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//* 设置创建时间(用于展示) /**
//* @param createTime 创建时间 * show3 listShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,284 +1,289 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入健身课程实体类,用于数据表映射
import com.entity.JianshenkechengEntity; import com.entity.JianshenkechengEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
// 健身课程模型类 /**
// 用于接收前端传参的实体类 *
// (实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
// 该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class JianshenkechengModel implements Serializable { public class JianshenkechengModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键ID*/
/**
*
*/
private Integer id; private Integer id;
/**关联教练ID*/
/**
*
*/
private Integer jiaolianId; private Integer jiaolianId;
/**健身课程名称*/
/**
*
*/
private String jianshenkechengName; private String jianshenkechengName;
/**健身课程封面图片*/
/**
*
*/
private String jianshenkechengPhoto; private String jianshenkechengPhoto;
/**课程视频地址*/
/**
*
*/
private String jianshenkechengVideo; private String jianshenkechengVideo;
/**点赞数量*/
/**
*
*/
private Integer zanNumber; private Integer zanNumber;
/**点踩数量*/
/**
*
*/
private Integer caiNumber; private Integer caiNumber;
/**课程类型1-有氧 2-力量 3-瑜伽等)*/
/**
*
*/
private Integer jianshenkechengTypes; private Integer jianshenkechengTypes;
/**课程点击量/热度*/
/**
*
*/
private Integer jianshenkechengClicknum; private Integer jianshenkechengClicknum;
/**课程详细介绍*/
/**
*
*/
private String jianshenkechengContent; private String jianshenkechengContent;
/**逻辑删除标志0-未删除 1-已删除)*/
/**
*
*/
private Integer dataDelete; private Integer dataDelete;
//课程录入时间
// 使用Jackson注解指定JSON格式 /**
//使用Spring注解指定前端参数格式 *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
// 创建时间(用于多种展示场景) /**
//使用Jackson注解指定JSON格式 * show1 show2 photoShow homeMain
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
// 获取主键ID /**
//@return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
//获取关联教练ID */
// @return 教练ID
public Integer getJiaolianId() { public Integer getJiaolianId() {
return jiaolianId; return jiaolianId;
} }
//设置关联教练ID /**
// @param jiaolianId 教练ID *
*/
public void setJiaolianId(Integer jiaolianId) { public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId; this.jiaolianId = jiaolianId;
} }
/**
*
//获取健身课程名称 */
// @return 课程名称
public String getJianshenkechengName() { public String getJianshenkechengName() {
return jianshenkechengName; return jianshenkechengName;
} }
//设置健身课程名称 /**
// @param jianshenkechengName 课程名称 *
*/
public void setJianshenkechengName(String jianshenkechengName) { public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName; this.jianshenkechengName = jianshenkechengName;
} }
/**
*
//获取健身课程封面图片 */
// @return 封面图片路径
public String getJianshenkechengPhoto() { public String getJianshenkechengPhoto() {
return jianshenkechengPhoto; return jianshenkechengPhoto;
} }
//设置健身课程封面图片 /**
// @param jianshenkechengPhoto 封面图片路径 *
*/
public void setJianshenkechengPhoto(String jianshenkechengPhoto) { public void setJianshenkechengPhoto(String jianshenkechengPhoto) {
this.jianshenkechengPhoto = jianshenkechengPhoto; this.jianshenkechengPhoto = jianshenkechengPhoto;
} }
/**
*
//获取课程视频地址 */
// @return 视频地址
public String getJianshenkechengVideo() { public String getJianshenkechengVideo() {
return jianshenkechengVideo; return jianshenkechengVideo;
} }
//设置课程视频地址 /**
// @param jianshenkechengVideo 视频地址 *
*/
public void setJianshenkechengVideo(String jianshenkechengVideo) { public void setJianshenkechengVideo(String jianshenkechengVideo) {
this.jianshenkechengVideo = jianshenkechengVideo; this.jianshenkechengVideo = jianshenkechengVideo;
} }
/**
*
//获取点赞数量 */
// @return 点赞数
public Integer getZanNumber() { public Integer getZanNumber() {
return zanNumber; return zanNumber;
} }
//设置点赞数量 /**
// @param zanNumber 点赞数 *
*/
public void setZanNumber(Integer zanNumber) { public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber; this.zanNumber = zanNumber;
} }
/**
*
//获取点踩数量 */
//@return 点踩数
public Integer getCaiNumber() { public Integer getCaiNumber() {
return caiNumber; return caiNumber;
} }
//设置点踩数量 /**
// @param caiNumber 点踩数 *
*/
public void setCaiNumber(Integer caiNumber) { public void setCaiNumber(Integer caiNumber) {
this.caiNumber = caiNumber; this.caiNumber = caiNumber;
} }
/**
*
//获取课程类型 */
// @return 课程类型编号
public Integer getJianshenkechengTypes() { public Integer getJianshenkechengTypes() {
return jianshenkechengTypes; return jianshenkechengTypes;
} }
//设置课程类型* /**
//@param jianshenkechengTypes 课程类型编号 *
*/
public void setJianshenkechengTypes(Integer jianshenkechengTypes) { public void setJianshenkechengTypes(Integer jianshenkechengTypes) {
this.jianshenkechengTypes = jianshenkechengTypes; this.jianshenkechengTypes = jianshenkechengTypes;
} }
/**
*
//获取课程点击量 */
// @return 点击量
public Integer getJianshenkechengClicknum() { public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum; return jianshenkechengClicknum;
} }
//设置课程点击量 /**
// @param jianshenkechengClicknum 点击量 *
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) { public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum; this.jianshenkechengClicknum = jianshenkechengClicknum;
} }
/**
*
//获取课程详细介绍 */
// @return 课程介绍内容
public String getJianshenkechengContent() { public String getJianshenkechengContent() {
return jianshenkechengContent; return jianshenkechengContent;
} }
//设置课程详细介绍 /**
// @param jianshenkechengContent 课程介绍内容 *
*/
public void setJianshenkechengContent(String jianshenkechengContent) { public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent; this.jianshenkechengContent = jianshenkechengContent;
} }
/**
*
//获取逻辑删除标志 */
// @return 删除状态0未删除/1已删除
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
//设置逻辑删除标志 /**
// @param dataDelete 删除状态0未删除/1已删除 *
*/
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
*
//获取课程录入时间 */
// @return 录入时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//设置课程录入时间 /**
// @param insertTime 录入时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
* show1 show2 photoShow homeMain
//获取创建时间(用于多种展示场景) */
// @return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间(用于多种展示场景) /**
// @param createTime 创建时间 * show1 show2 photoShow homeMain
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,279 +1,269 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入教练实体类,用于数据表映射
import com.entity.JiaolianEntity; import com.entity.JiaolianEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
//教练模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
// 该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class JiaolianModel implements Serializable { public class JiaolianModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
private Integer id;
/**
*
*/
private Integer id;
//登录账号
/**
*
*/
private String username; private String username;
// 登录密码(通常需要加密存储) /**
*
*/
private String password; private String password;
// 教练姓名 /**
*
*/
private String jiaolianName; private String jiaolianName;
// 教练联系电话 /**
*
*/
private String jiaolianPhone; private String jiaolianPhone;
// 教练头像URL /**
*
*/
private String jiaolianPhoto; private String jiaolianPhoto;
// 性别1-男 2-女等) /**
*
*/
private Integer sexTypes; private Integer sexTypes;
// 教练电子邮箱 /**
*
*/
private String jiaolianEmail; private String jiaolianEmail;
// 教练详细介绍 /**
*
*/
private String jiaolianContent; private String jiaolianContent;
// 逻辑删除标志0-未删除 1-已删除) /**
*
*/
private Integer dataDelete; private Integer dataDelete;
//记录添加时间 /**
//使用Jackson注解指定JSON格式 *
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
//创建时间(用于多种展示场景) /**
//使Jackson注解指定JSON格式 * show1 show2 photoShow
//使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
//获取登录账号 */
// @return 登录账号
public String getUsername() { public String getUsername() {
return username; return username;
} }
//设置登录账号 /**
// @param username 登录账号 *
*/
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
/**
*
//获取登录密码 */
// @return 登录密码
public String getPassword() { public String getPassword() {
return password; return password;
} }
//设置登录密码 /**
// @param password 登录密码 *
*/
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
*
//获取教练姓名 */
// @return 教练姓名
public String getJiaolianName() { public String getJiaolianName() {
return jiaolianName; return jiaolianName;
} }
//设置教练姓名 /**
// @param jiaolianName 教练姓名 *
*/
public void setJiaolianName(String jiaolianName) { public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName; this.jiaolianName = jiaolianName;
} }
/**
*
//获取教练联系电话 */
// @return 联系电话
public String getJiaolianPhone() { public String getJiaolianPhone() {
return jiaolianPhone; return jiaolianPhone;
} }
//设置教练联系电话 /**
// @param jiaolianPhone 联系电话 *
*/
public void setJiaolianPhone(String jiaolianPhone) { public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone; this.jiaolianPhone = jiaolianPhone;
} }
/**
*
//获取教练头像URL */
// @return 头像URL
public String getJiaolianPhoto() { public String getJiaolianPhoto() {
return jiaolianPhoto; return jiaolianPhoto;
} }
//设置教练头像URL /**
// @param jiaolianPhoto 头像URL *
*/
public void setJiaolianPhoto(String jiaolianPhoto) { public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto; this.jiaolianPhoto = jiaolianPhoto;
} }
/**
*
//获取性别类型 */
// @return 性别类型编号
public Integer getSexTypes() { public Integer getSexTypes() {
return sexTypes; return sexTypes;
} }
// 设置性别类型
// @param sexTypes 性别类型编号 /**
*
*/
public void setSexTypes(Integer sexTypes) { public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes; this.sexTypes = sexTypes;
} }
/**
// 获取教练电子邮箱 *
// @return 电子邮箱 */
public String getJiaolianEmail() { public String getJiaolianEmail() {
return jiaolianEmail; return jiaolianEmail;
} }
//设置教练电子邮箱 /**
// @param jiaolianEmail 电子邮箱 *
*/
public void setJiaolianEmail(String jiaolianEmail) { public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail; this.jiaolianEmail = jiaolianEmail;
} }
/**
*
//获取教练详细介绍 */
// @return 详细介绍内容
public String getJiaolianContent() { public String getJiaolianContent() {
return jiaolianContent; return jiaolianContent;
} }
//设置教练详细介绍 /**
// @param jiaolianContent 详细介绍内容 *
*/
public void setJiaolianContent(String jiaolianContent) { public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent; this.jiaolianContent = jiaolianContent;
} }
/**
*
//获取逻辑删除标志 */
// @return 删除状态0未删除/1已删除
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
//设置逻辑删除标志 /**
// @param dataDelete 删除状态0未删除/1已删除 *
*/
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
*
//获取记录添加时间 */
// @return 添加时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//设置记录添加时间 /**
// @param insertTime 添加时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
//获取创建时间(用于多种展示场景) * show1 show2 photoShow
// @return 创建时间*/ */
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间(用于多种展示场景)
// @param createTime 创建时间*/ /**
* show1 show2 photoShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,228 +1,211 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入教练预约实体类,用于数据表映射
import com.entity.JiaolianYuyueEntity; import com.entity.JiaolianYuyueEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
// 教练预约申请模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
// 该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class JiaolianYuyueModel implements Serializable { public class JiaolianYuyueModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
private Integer id;
/**
*
*/
private Integer id;
// 预约唯一编号(用于业务标识)
/**
*
*/
private String jiaolianYuyueUuidNumber; private String jiaolianYuyueUuidNumber;
// 关联用户ID /**
*
*/
private Integer yonghuId; private Integer yonghuId;
// 预约备注信息 /**
*
*/
private String jiaolianYuyueText; private String jiaolianYuyueText;
//预约的具体时间 /**
//使用Jackson注解指定JSON格式 *
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date jiaolianYuyueTime; private Date jiaolianYuyueTime;
// 预约状态0-待审核 1-已通过 2-已拒绝) /**
*
*/
private Integer jiaolianYuyueYesnoTypes; private Integer jiaolianYuyueYesnoTypes;
// 审核回复内容 /**
*
*/
private String jiaolianYuyueYesnoText; private String jiaolianYuyueYesnoText;
//申请创建时间 /**
//使用Jackson注解指定JSON格式 *
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
//创建时间(用于展示) /**
//使用Jackson注解指定JSON格式 * show3 listShow
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
//获取预约唯一编号 */
// @return 预约编号
public String getJiaolianYuyueUuidNumber() { public String getJiaolianYuyueUuidNumber() {
return jiaolianYuyueUuidNumber; return jiaolianYuyueUuidNumber;
} }
//设置预约唯一编号 /**
//@param jiaolianYuyueUuidNumber 预约编号 *
*/
public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) { public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) {
this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber; this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber;
} }
/**
*
//获取关联用户ID */
// @return 用户ID
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
//设置关联用户ID /**
// @param yonghuId 用户ID *
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
*
//获取预约备注信息 */
// @return 备注内容
public String getJiaolianYuyueText() { public String getJiaolianYuyueText() {
return jiaolianYuyueText; return jiaolianYuyueText;
} }
//设置预约备注信息 /**
// @param jiaolianYuyueText 备注内容 *
*/
public void setJiaolianYuyueText(String jiaolianYuyueText) { public void setJiaolianYuyueText(String jiaolianYuyueText) {
this.jiaolianYuyueText = jiaolianYuyueText; this.jiaolianYuyueText = jiaolianYuyueText;
} }
/**
*
//获取预约的具体时间 */
// @return 预约时间
public Date getJiaolianYuyueTime() { public Date getJiaolianYuyueTime() {
return jiaolianYuyueTime; return jiaolianYuyueTime;
} }
//设置预约的具体时间 /**
// @param jiaolianYuyueTime 预约时间 *
*/
public void setJiaolianYuyueTime(Date jiaolianYuyueTime) { public void setJiaolianYuyueTime(Date jiaolianYuyueTime) {
this.jiaolianYuyueTime = jiaolianYuyueTime; this.jiaolianYuyueTime = jiaolianYuyueTime;
} }
/**
*
//获取预约状态 */
// @return 状态值
public Integer getJiaolianYuyueYesnoTypes() { public Integer getJiaolianYuyueYesnoTypes() {
return jiaolianYuyueYesnoTypes; return jiaolianYuyueYesnoTypes;
} }
//设置预约状态 /**
//@param jiaolianYuyueYesnoTypes 状态值 *
*/
public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) { public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) {
this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes; this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes;
} }
/**
*
//获取审核回复内容 */
//@return 回复内容
public String getJiaolianYuyueYesnoText() { public String getJiaolianYuyueYesnoText() {
return jiaolianYuyueYesnoText; return jiaolianYuyueYesnoText;
} }
//设置审核回复内容 /**
// @param jiaolianYuyueYesnoText 回复内容 *
*/
public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) { public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) {
this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText; this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText;
} }
/**
*
//获取申请创建时间 */
// @return 创建时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//设置申请创建时间 /**
//@param insertTime 创建时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
* show3 listShow
//获取创建时间(用于展示) */
// @return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间(用于展示) /**
// @param createTime 创建时间 * show3 listShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,179 +1,169 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入资讯实体类,用于数据表映射
import com.entity.NewsEntity; import com.entity.NewsEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
//健身资讯模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
//该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class NewsModel implements Serializable { public class NewsModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
private Integer id;
/**
*
*/
private Integer id;
// 资讯标题
/**
*
*/
private String newsName; private String newsName;
//资讯类型1-健身知识 2-饮食建议 3-训练计划等)
/**
*
*/
private Integer newsTypes; private Integer newsTypes;
// 资讯封面图片URL /**
*
*/
private String newsPhoto; private String newsPhoto;
//资讯添加时间 /**
//使用Jackson注解指定JSON格式 *
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
// 资讯详细内容HTML格式 /**
*
*/
private String newsContent; private String newsContent;
//创建时间(用于多种展示场景) /**
//使用Jackson注解指定JSON格式 * show1 show2 nameShow
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
//获取资讯标题 */
// @return 资讯标题
public String getNewsName() { public String getNewsName() {
return newsName; return newsName;
} }
//设置资讯标题 /**
// @param newsName 资讯标题 *
*/
public void setNewsName(String newsName) { public void setNewsName(String newsName) {
this.newsName = newsName; this.newsName = newsName;
} }
/**
*
//获取资讯类型 */
// @return 资讯类型编号
public Integer getNewsTypes() { public Integer getNewsTypes() {
return newsTypes; return newsTypes;
} }
//设置资讯类型 /**
// @param newsTypes 资讯类型编号 *
*/
public void setNewsTypes(Integer newsTypes) { public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes; this.newsTypes = newsTypes;
} }
/**
*
//获取资讯封面图片URL */
// @return 图片URL
public String getNewsPhoto() { public String getNewsPhoto() {
return newsPhoto; return newsPhoto;
} }
//设置资讯封面图片URL /**
// @param newsPhoto 图片URL *
*/
public void setNewsPhoto(String newsPhoto) { public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto; this.newsPhoto = newsPhoto;
} }
/**
*
//获取资讯添加时间 */
// @return 添加时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//设置资讯添加时间 /**
// @param insertTime 添加时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
*
//获取资讯详细内容 */
// @return 资讯内容
public String getNewsContent() { public String getNewsContent() {
return newsContent; return newsContent;
} }
//设置资讯详细内容 /**
//@param newsContent 资讯内容 *
*/
public void setNewsContent(String newsContent) { public void setNewsContent(String newsContent) {
this.newsContent = newsContent; this.newsContent = newsContent;
} }
//获取创建时间(用于多种展示场景) /**
// @return 创建时间 * show1 show2 nameShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间(用于多种展示场景) /**
// @param createTime 创建时间 * show1 show2 nameShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,156 +1,147 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入单页数据实体类,用于数据表映射
import com.entity.SingleSeachEntity; import com.entity.SingleSeachEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
// 单页数据模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
//该类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class SingleSeachModel implements Serializable { public class SingleSeachModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
/**
*
*/
private Integer id; private Integer id;
// 单页数据名称
/**
*
*/
private String singleSeachName; private String singleSeachName;
// 数据类型1-关于我们 2-服务条款 3-隐私政策等) /**
*
*/
private Integer singleSeachTypes; private Integer singleSeachTypes;
// 关联图片URL /**
*
*/
private String singleSeachPhoto; private String singleSeachPhoto;
// 单页内容HTML格式 /**
*
*/
private String singleSeachContent; private String singleSeachContent;
// 创建时间(用于展示) /**
//使用Jackson注解指定JSON格式 * show2 nameShow
//使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
// 获取主键ID /**
//@return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID /**
//@param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
// 获取单页数据名称 */
//@return 名称
public String getSingleSeachName() { public String getSingleSeachName() {
return singleSeachName; return singleSeachName;
} }
// 设置单页数据名称 /**
//@param singleSeachName 名称 *
*/
public void setSingleSeachName(String singleSeachName) { public void setSingleSeachName(String singleSeachName) {
this.singleSeachName = singleSeachName; this.singleSeachName = singleSeachName;
} }
/**
*
// 获取数据类型 */
//@return 数据类型编号
public Integer getSingleSeachTypes() { public Integer getSingleSeachTypes() {
return singleSeachTypes; return singleSeachTypes;
} }
// 设置数据类型 /**
// @param singleSeachTypes 数据类型编号 *
*/
public void setSingleSeachTypes(Integer singleSeachTypes) { public void setSingleSeachTypes(Integer singleSeachTypes) {
this.singleSeachTypes = singleSeachTypes; this.singleSeachTypes = singleSeachTypes;
} }
/**
*
// 获取关联图片URL */
//@return 图片URL
public String getSingleSeachPhoto() { public String getSingleSeachPhoto() {
return singleSeachPhoto; return singleSeachPhoto;
} }
// 设置关联图片URL /**
// @param singleSeachPhoto 图片URL *
*/
public void setSingleSeachPhoto(String singleSeachPhoto) { public void setSingleSeachPhoto(String singleSeachPhoto) {
this.singleSeachPhoto = singleSeachPhoto; this.singleSeachPhoto = singleSeachPhoto;
} }
/**
*
// 获取单页内容 */
//@return 内容
public String getSingleSeachContent() { public String getSingleSeachContent() {
return singleSeachContent; return singleSeachContent;
} }
// 设置单页内容 /**
//@param singleSeachContent 内容 *
*/
public void setSingleSeachContent(String singleSeachContent) { public void setSingleSeachContent(String singleSeachContent) {
this.singleSeachContent = singleSeachContent; this.singleSeachContent = singleSeachContent;
} }
/**
* show2 nameShow
// 获取创建时间(用于展示) */
//@return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间(用于展示) /**
//@param createTime 创建时间 * show2 nameShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,307 +1,289 @@
// 声明当前文件所属的包路径表示该类位于com.entity.model包下
package com.entity.model; package com.entity.model;
// 导入用户实体类,用于数据表映射
import com.entity.YonghuEntity; import com.entity.YonghuEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解用于JSON序列化/反序列化
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java的Date类用于处理日期时间
import java.util.Date; import java.util.Date;
// 导入Spring的日期格式化注解用于前端参数绑定
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Java的序列化接口
import java.io.Serializable; import java.io.Serializable;
//用户模型类 /**
//用于接收前端传参的实体类 *
//(实际开发中可根据移动端需求手动移除无用字段, *
// 后端一般直接使用entity实体类即可 * entity
//类名称取自ModelAndView中的model名称 * ModelAndView model
*/
public class YonghuModel implements Serializable { public class YonghuModel implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
private Integer id;
/**
*
*/
private Integer id;
// 登录账号
/**
*
*/
private String username; private String username;
// 登录密码(通常需要加密存储) /**
*
*/
private String password; private String password;
// 用户真实姓名 /**
*
*/
private String yonghuName; private String yonghuName;
// 用户手机号码 /**
*
*/
private String yonghuPhone; private String yonghuPhone;
// 用户身份证号码 /**
*
*/
private String yonghuIdNumber; private String yonghuIdNumber;
// 用户头像URL /**
*
*/
private String yonghuPhoto; private String yonghuPhoto;
// 性别1-男 2-女等) /**
*
*/
private Integer sexTypes; private Integer sexTypes;
//用户电子邮箱 /**
*
*/
private String yonghuEmail; private String yonghuEmail;
// 用户账户余额 /**
*
*/
private Double newMoney; private Double newMoney;
// 逻辑删除标志0-未删除 1-已删除) /**
*
*/
private Integer dataDelete; private Integer dataDelete;
//记录添加时间 /**
//使用Jackson注解指定JSON格式 *
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date insertTime; private Date insertTime;
//创建时间 /**
//使用Jackson注解指定JSON格式 *
// 使用Spring注解指定前端参数格式 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
private Date createTime; private Date createTime;
//获取主键ID /**
// @return 主键ID *
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
//设置主键ID /**
// @param id 主键ID *
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
*
//获取登录账号 */
// @return 登录账号
public String getUsername() { public String getUsername() {
return username; return username;
} }
//设置登录账号 /**
// @param username 登录账号 *
*/
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
/**
*
//获取登录密码 */
// @return 登录密码
public String getPassword() { public String getPassword() {
return password; return password;
} }
//设置登录密码 /**
// @param password 登录密码 *
*/
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
*
//获取用户真实姓名 */
// @return 用户姓名
public String getYonghuName() { public String getYonghuName() {
return yonghuName; return yonghuName;
} }
//设置用户真实姓名
//@param yonghuName 用户姓名
/**
*
*/
public void setYonghuName(String yonghuName) { public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName; this.yonghuName = yonghuName;
} }
/**
*
//获取用户手机号码 */
// @return 手机号码
public String getYonghuPhone() { public String getYonghuPhone() {
return yonghuPhone; return yonghuPhone;
} }
//设置用户手机号码 /**
// @param yonghuPhone 手机号码 *
*/
public void setYonghuPhone(String yonghuPhone) { public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone; this.yonghuPhone = yonghuPhone;
} }
/**
*
//获取用户身份证号码 */
// @return 身份证号码
public String getYonghuIdNumber() { public String getYonghuIdNumber() {
return yonghuIdNumber; return yonghuIdNumber;
} }
//设置用户身份证号码 /**
// @param yonghuIdNumber 身份证号码 *
*/
public void setYonghuIdNumber(String yonghuIdNumber) { public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber; this.yonghuIdNumber = yonghuIdNumber;
} }
/**
*
//获取用户头像URL */
// @return 头像URL
public String getYonghuPhoto() { public String getYonghuPhoto() {
return yonghuPhoto; return yonghuPhoto;
} }
//设置用户头像URL /**
// @param yonghuPhoto 头像URL *
*/
public void setYonghuPhoto(String yonghuPhoto) { public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto; this.yonghuPhoto = yonghuPhoto;
} }
/**
*
//获取性别类型 */
//@return 性别类型编号
public Integer getSexTypes() { public Integer getSexTypes() {
return sexTypes; return sexTypes;
} }
//设置性别类型 /**
// @param sexTypes 性别类型编号 *
*/
public void setSexTypes(Integer sexTypes) { public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes; this.sexTypes = sexTypes;
} }
/**
*
//获取用户电子邮箱 */
// @return 电子邮箱
public String getYonghuEmail() { public String getYonghuEmail() {
return yonghuEmail; return yonghuEmail;
} }
//设置用户电子邮箱 /**
//@param yonghuEmail 电子邮箱 *
*/
public void setYonghuEmail(String yonghuEmail) { public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail; this.yonghuEmail = yonghuEmail;
} }
/**
*
//获取用户账户余额 */
// @return 账户余额
public Double getNewMoney() { public Double getNewMoney() {
return newMoney; return newMoney;
} }
//设置用户账户余额 /**
// @param newMoney 账户余额 *
*/
public void setNewMoney(Double newMoney) { public void setNewMoney(Double newMoney) {
this.newMoney = newMoney; this.newMoney = newMoney;
} }
/**
*
//获取逻辑删除标志 */
// @return 删除状态0未删除/1已删除
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
//设置逻辑删除标志 /**
// @param dataDelete 删除状态0未删除/1已删除 *
*/
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
*
//获取记录添加时间 */
// @return 添加时间
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
//设置记录添加时间 /**
// @param insertTime 添加时间 *
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
*
//获取创建时间 */
// @return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间 /**
// @param createTime 创建时间 *
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,69 +1,53 @@
// 声明当前文件所属的包路径表示该类位于com.entity.view包下
package com.entity.view; package com.entity.view;
// 导入Apache Ant的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入字典实体类
import com.entity.DictionaryEntity; import com.entity.DictionaryEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入Java反射异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson的JSON格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入Java日期类
import java.util.Date; import java.util.Date;
// 导入自定义日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//字典视图类 *
//后端返回视图实体辅助类 *
//(通常用于返回后端关联的表或自定义字段) * 使
//继承自DictionaryEntity并实现Serializable接口 */
@TableName("dictionary") // 指定关联的数据库表名 @TableName("dictionary")
public class DictionaryView extends DictionaryEntity implements Serializable { public class DictionaryView extends DictionaryEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 当前表没有额外字段,所以这里为空 //当前表
// 无参构造函数
public DictionaryView() {
}
public DictionaryView() {
//带参构造函数 }
//通过BeanUtils将DictionaryEntity属性复制到当前视图对象
// @param dictionaryEntity 字典实体对象
public DictionaryView(DictionaryEntity dictionaryEntity) { public DictionaryView(DictionaryEntity dictionaryEntity) {
try { try {
// 使用BeanUtils复制属性
BeanUtils.copyProperties(this, dictionaryEntity); BeanUtils.copyProperties(this, dictionaryEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印复制属性时的异常堆栈 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//重写toString方法
// @return 返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "DictionaryView{" + return "DictionaryView{" +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,370 +1,392 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant的DateUtils工具类用于日期处理
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的ColumnInfo注解用于数据库字段映射
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入ForumEntity实体类表示论坛帖子
import com.entity.ForumEntity; import com.entity.ForumEntity;
// 导入MyBatis Plus的TableName注解用于表名映射
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类用于对象属性拷贝
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//健身论坛 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的TableName注解指定表名 */
@TableName("forum") @TableName("forum")
// 继承ForumEntity并实现Serializable接口
public class ForumView extends ForumEntity implements Serializable { public class ForumView extends ForumEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
//帖子状态的值 *
// 使用ColumnInfo注解标注字段信息包括注释和数据库类型 */
@ColumnInfo(comment="帖子状态的字典表值",type="varchar(200)") @ColumnInfo(comment="帖子状态的字典表值",type="varchar(200)")
private String forumStateValue; private String forumStateValue;
//级联表 教练 //级联表 教练
/**
//教练名称 *
// 教练名称字段 */
@ColumnInfo(comment="教练名称",type="varchar(200)")
private String jiaolianName; @ColumnInfo(comment="教练名称",type="varchar(200)")
private String jiaolianName;
//教练手机号 /**
// 教练手机号字段 *
@ColumnInfo(comment="教练手机号",type="varchar(200)") */
private String jiaolianPhone;
@ColumnInfo(comment="教练手机号",type="varchar(200)")
//教练头像 private String jiaolianPhone;
// 教练头像字段 /**
@ColumnInfo(comment="教练头像",type="varchar(200)") *
private String jiaolianPhoto; */
//教练邮箱 @ColumnInfo(comment="教练头像",type="varchar(200)")
// 教练邮箱字段 private String jiaolianPhoto;
@ColumnInfo(comment="教练邮箱",type="varchar(200)") /**
private String jiaolianEmail; *
*/
//教练简介
// 教练简介字段,使用长文本类型 @ColumnInfo(comment="教练邮箱",type="varchar(200)")
@ColumnInfo(comment="教练简介",type="longtext") private String jiaolianEmail;
private String jiaolianContent; /**
*
*/
@ColumnInfo(comment="教练简介",type="longtext")
private String jiaolianContent;
//级联表 用户 //级联表 用户
/**
//用户名称 *
// 用户名称字段 */
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName; @ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
//用户手机号 /**
// 用户手机号字段 *
@ColumnInfo(comment="用户手机号",type="varchar(200)") */
private String yonghuPhone;
@ColumnInfo(comment="用户手机号",type="varchar(200)")
//用户身份证号 private String yonghuPhone;
// 用户身份证号字段 /**
@ColumnInfo(comment="用户身份证号",type="varchar(200)") *
private String yonghuIdNumber; */
//用户头像 @ColumnInfo(comment="用户身份证号",type="varchar(200)")
// 用户头像字段 private String yonghuIdNumber;
@ColumnInfo(comment="用户头像",type="varchar(200)") /**
private String yonghuPhoto; *
*/
//用户邮箱
// 用户邮箱字段 @ColumnInfo(comment="用户头像",type="varchar(200)")
@ColumnInfo(comment="用户邮箱",type="varchar(200)") private String yonghuPhoto;
private String yonghuEmail; /**
*
//现有余额 */
// 用户余额字段,使用十进制类型
@ColumnInfo(comment="现有余额",type="decimal(10,2)") @ColumnInfo(comment="用户邮箱",type="varchar(200)")
private Double newMoney; private String yonghuEmail;
/**
*
*/
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
//级联表 管理员 //级联表 管理员
/**
//医院名 *
// 管理员用户名字段 */
@ColumnInfo(comment="医院名",type="varchar(100)") @ColumnInfo(comment="医院名",type="varchar(100)")
private String uusername; private String uusername;
/**
// 密码 *
// 管理员密码字段 */
@ColumnInfo(comment="密码",type="varchar(100)") @ColumnInfo(comment="密码",type="varchar(100)")
private String upassword; private String upassword;
/**
// 角色 *
// 管理员角色字段 */
@ColumnInfo(comment="角色",type="varchar(100)") @ColumnInfo(comment="角色",type="varchar(100)")
private String urole; private String urole;
/**
//新增时间 *
// 管理员新增时间字段 */
@ColumnInfo(comment="新增时间",type="timestamp") @ColumnInfo(comment="新增时间",type="timestamp")
private Date uaddtime; private Date uaddtime;
//重复字段 //重复字段
/**
* types
*/
@ColumnInfo(comment="重复字段 的types",type="Integer")
private Integer sexTypes;
@ColumnInfo(comment="重复字段 的值",type="varchar(200)")
private String sexValue;
//重复字段 的types
// 性别类型字段
@ColumnInfo(comment="重复字段 的types",type="Integer")
private Integer sexTypes;
// 性别值字段
@ColumnInfo(comment="重复字段 的值",type="varchar(200)")
private String sexValue;
// 无参构造方法
public ForumView() { public ForumView() {
} }
// 带参数的构造方法通过BeanUtils.copyProperties进行属性拷贝
public ForumView(ForumEntity forumEntity) { public ForumView(ForumEntity forumEntity) {
try { try {
BeanUtils.copyProperties(this, forumEntity); BeanUtils.copyProperties(this, forumEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的get和set方法
//获取: 帖子状态的值
//当前表的
/**
*
*/
public String getForumStateValue() { public String getForumStateValue() {
return forumStateValue; return forumStateValue;
} }
/**
//设置: 帖子状态的值 *
*/
public void setForumStateValue(String forumStateValue) { public void setForumStateValue(String forumStateValue) {
this.forumStateValue = forumStateValue; this.forumStateValue = forumStateValue;
} }
//级联表的get和set 教练
//获取: 教练名称
public String getJiaolianName() {
return jiaolianName;
}
//设置: 教练名称
public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName;
}
// 获取: 教练手机号
public String getJiaolianPhone() {
return jiaolianPhone;
}
//设置: 教练手机号
public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone;
}
//获取: 教练头像
public String getJiaolianPhoto() {
return jiaolianPhoto;
}
//设置: 教练头像
public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto;
}
//级联表的get和set 教练
//获取: 教练邮箱 /**
public String getJiaolianEmail() { *
return jiaolianEmail; */
} public String getJiaolianName() {
return jiaolianName;
}
/**
*
*/
public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName;
}
//设置: 教练邮箱 /**
public void setJiaolianEmail(String jiaolianEmail) { *
this.jiaolianEmail = jiaolianEmail; */
} public String getJiaolianPhone() {
return jiaolianPhone;
}
/**
*
*/
public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone;
}
/**
*
*/
public String getJiaolianPhoto() {
return jiaolianPhoto;
}
/**
*
*/
public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto;
}
//获取: 教练简介 /**
public String getJiaolianContent() { *
return jiaolianContent; */
} public String getJiaolianEmail() {
return jiaolianEmail;
}
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail;
}
//设置: 教练简介 /**
public void setJiaolianContent(String jiaolianContent) { *
this.jiaolianContent = jiaolianContent; */
} public String getJiaolianContent() {
return jiaolianContent;
}
/**
*
*/
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
//级联表的get和set 用户 //级联表的get和set 用户
//获取: 用户名称 /**
public String getYonghuName() { *
return yonghuName; */
} public String getYonghuName() {
return yonghuName;
//设置: 用户名称 }
public void setYonghuName(String yonghuName) { /**
this.yonghuName = yonghuName; *
} */
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
//获取: 用户手机号 }
public String getYonghuPhone() {
return yonghuPhone;
}
//设置: 用户手机号
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//获取: 用户身份证号
public String getYonghuIdNumber() {
return yonghuIdNumber;
}
//设置: 用户身份证号
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//获取: 用户头像
public String getYonghuPhoto() {
return yonghuPhoto;
}
//设置: 用户头像
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
//获取: 用户邮箱 /**
public String getYonghuEmail() { *
return yonghuEmail; */
} public String getYonghuPhone() {
return yonghuPhone;
}
/**
*
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//设置: 用户邮箱 /**
public void setYonghuEmail(String yonghuEmail) { *
this.yonghuEmail = yonghuEmail; */
} public String getYonghuIdNumber() {
return yonghuIdNumber;
}
/**
*
*/
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
/**
*
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
//获取: 现有余额 /**
public Double getNewMoney() { *
return newMoney; */
} public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
//设置: 现有余额 /**
public void setNewMoney(Double newMoney) { *
this.newMoney = newMoney; */
} public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
//级联表的get和set 管理员 //级联表的get和set 管理员
/**
*
*/
public String getUusername() {
return uusername;
}
/**
*
*/
public void setUusername(String uusername) {
this.uusername = uusername;
}
/**
*
*/
public String getUpassword() {
return upassword;
}
/**
*
*/
public void setUpassword(String upassword) {
this.upassword = upassword;
}
/**
*
*/
public String getUrole() {
return urole;
}
/**
*
*/
public void setUrole(String urole) {
this.urole = urole;
}
/**
*
*/
public Date getUaddtime() {
return uaddtime;
}
/**
*
*/
public void setUaddtime(Date uaddtime) {
this.uaddtime = uaddtime;
}
//获取: 医院名 //重复字段
public String getUusername() { /**
return uusername; * types
} */
public Integer getSexTypes() {
//设置: 医院名 return sexTypes;
public void setUusername(String uusername) { }
this.uusername = uusername; /**
} * types
*/
//获取: 密码 public void setSexTypes(Integer sexTypes) {
public String getUpassword() { this.sexTypes = sexTypes;
return upassword; }
} public String getSexValue() {
return sexValue;
//设置: 密码 }
public void setUpassword(String upassword) { public void setSexValue(String sexValue) {
this.upassword = upassword; this.sexValue = sexValue;
} }
//获取: 角色
public String getUrole() {
return urole;
}
//设置: 角色
public void setUrole(String urole) {
this.urole = urole;
}
// 获取: 新增时间
public Date getUaddtime() {
return uaddtime;
}
//设置: 新增时间
public void setUaddtime(Date uaddtime) {
this.uaddtime = uaddtime;
}
//重复字段的get和set方法
// 获取: 重复字段 的types
public Integer getSexTypes() {
return sexTypes;
}
// 设置: 重复字段 的types
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
// 获取: 重复字段 的值
public String getSexValue() {
return sexValue;
}
// 设置: 重复字段 的值
public void setSexValue(String sexValue) {
this.sexValue = sexValue;
}
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "ForumView{" + return "ForumView{" +
", forumStateValue=" + forumStateValue + ", forumStateValue=" + forumStateValue +
", yonghuName=" + yonghuName + ", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone + ", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber + ", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto + ", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail + ", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney + ", newMoney=" + newMoney +
", jiaolianName=" + jiaolianName + ", jiaolianName=" + jiaolianName +
", jiaolianPhone=" + jiaolianPhone + ", jiaolianPhone=" + jiaolianPhone +
", jiaolianPhoto=" + jiaolianPhoto + ", jiaolianPhoto=" + jiaolianPhoto +
", jiaolianEmail=" + jiaolianEmail + ", jiaolianEmail=" + jiaolianEmail +
", jiaolianContent=" + jiaolianContent + ", jiaolianContent=" + jiaolianContent +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,337 +1,389 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入课程收藏实体类
import com.entity.JianshenkechengCollectionEntity; import com.entity.JianshenkechengCollectionEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//课程收藏 *
// 后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的TableName注解指定数据库表名 */
@TableName("jianshenkecheng_collection") @TableName("jianshenkecheng_collection")
// 继承课程收藏实体类并实现序列化接口
public class JianshenkechengCollectionView extends JianshenkechengCollectionEntity implements Serializable { public class JianshenkechengCollectionView extends JianshenkechengCollectionEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
//类型的值 *
// 使用ColumnInfo注解标注字段的注释和类型 */
@ColumnInfo(comment="类型的字典表值",type="varchar(200)") @ColumnInfo(comment="类型的字典表值",type="varchar(200)")
private String jianshenkechengCollectionValue; private String jianshenkechengCollectionValue;
//级联表 健身课程 //级联表 健身课程
/**
//健身课程 的 教练 *
@ColumnInfo(comment="教练",type="int(11)") */
private Integer jianshenkechengJiaolianId; @ColumnInfo(comment="教练",type="int(11)")
private Integer jianshenkechengJiaolianId;
//健身课程名称 /**
@ColumnInfo(comment="健身课程名称",type="varchar(200)") *
private String jianshenkechengName; */
//健身课程照片 @ColumnInfo(comment="健身课程名称",type="varchar(200)")
@ColumnInfo(comment="健身课程照片",type="varchar(200)") private String jianshenkechengName;
private String jianshenkechengPhoto; /**
*
//课程视频 */
@ColumnInfo(comment="课程视频",type="varchar(200)")
private String jianshenkechengVideo; @ColumnInfo(comment="健身课程照片",type="varchar(200)")
private String jianshenkechengPhoto;
//赞 /**
@ColumnInfo(comment="赞",type="int(11)") *
private Integer zanNumber; */
//踩 @ColumnInfo(comment="课程视频",type="varchar(200)")
@ColumnInfo(comment="踩",type="int(11)") private String jianshenkechengVideo;
private Integer caiNumber; /**
*
//健身课程类型 */
@ColumnInfo(comment="健身课程类型",type="int(11)")
private Integer jianshenkechengTypes; @ColumnInfo(comment="赞",type="int(11)")
private Integer zanNumber;
//健身课程类型的值 /**
@ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)") *
private String jianshenkechengValue; */
//健身课程热度 @ColumnInfo(comment="踩",type="int(11)")
@ColumnInfo(comment="健身课程热度",type="int(11)") private Integer caiNumber;
private Integer jianshenkechengClicknum; /**
*
//健身课程介绍 */
@ColumnInfo(comment="健身课程介绍",type="longtext") @ColumnInfo(comment="健身课程类型",type="int(11)")
private String jianshenkechengContent; private Integer jianshenkechengTypes;
/**
*
*/
@ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)")
private String jianshenkechengValue;
/**
*
*/
@ColumnInfo(comment="健身课程热度",type="int(11)")
private Integer jianshenkechengClicknum;
/**
*
*/
@ColumnInfo(comment="健身课程介绍",type="longtext")
private String jianshenkechengContent;
//级联表 用户 //级联表 用户
/**
*
*/
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
/**
*
*/
@ColumnInfo(comment="用户手机号",type="varchar(200)")
private String yonghuPhone;
/**
*
*/
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
private String yonghuIdNumber;
/**
*
*/
@ColumnInfo(comment="用户头像",type="varchar(200)")
private String yonghuPhoto;
/**
*
*/
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
private String yonghuEmail;
/**
*
*/
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
//用户名称
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
//用户手机号
@ColumnInfo(comment="用户手机号",type="varchar(200)")
private String yonghuPhone;
//用户身份证号
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
private String yonghuIdNumber;
//用户头像
@ColumnInfo(comment="用户头像",type="varchar(200)")
private String yonghuPhoto;
//用户邮箱
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
private String yonghuEmail;
//现有余额
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
// 无参构造方法
public JianshenkechengCollectionView() { public JianshenkechengCollectionView() {
} }
// 带参构造方法通过BeanUtils.copyProperties复制属性
public JianshenkechengCollectionView(JianshenkechengCollectionEntity jianshenkechengCollectionEntity) { public JianshenkechengCollectionView(JianshenkechengCollectionEntity jianshenkechengCollectionEntity) {
try { try {
BeanUtils.copyProperties(this, jianshenkechengCollectionEntity); BeanUtils.copyProperties(this, jianshenkechengCollectionEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的get和set方法
//获取: 类型的值
//当前表的
/**
*
*/
public String getJianshenkechengCollectionValue() { public String getJianshenkechengCollectionValue() {
return jianshenkechengCollectionValue; return jianshenkechengCollectionValue;
} }
/**
//设置: 类型的值 *
*/
public void setJianshenkechengCollectionValue(String jianshenkechengCollectionValue) { public void setJianshenkechengCollectionValue(String jianshenkechengCollectionValue) {
this.jianshenkechengCollectionValue = jianshenkechengCollectionValue; this.jianshenkechengCollectionValue = jianshenkechengCollectionValue;
} }
//级联表的get和set 健身课程
//获取:健身课程 的 教练
public Integer getJianshenkechengJiaolianId() {
return jianshenkechengJiaolianId;
}
//设置:健身课程 的 教练
public void setJianshenkechengJiaolianId(Integer jianshenkechengJiaolianId) {
this.jianshenkechengJiaolianId = jianshenkechengJiaolianId;
}
//获取: 健身课程名称
public String getJianshenkechengName() {
return jianshenkechengName;
}
//设置: 健身课程名称
public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName;
}
//获取: 健身课程照片
public String getJianshenkechengPhoto() {
return jianshenkechengPhoto;
}
//设置: 健身课程照片
public void setJianshenkechengPhoto(String jianshenkechengPhoto) {
this.jianshenkechengPhoto = jianshenkechengPhoto;
}
//获取: 课程视频
public String getJianshenkechengVideo() {
return jianshenkechengVideo;
}
//设置: 课程视频
public void setJianshenkechengVideo(String jianshenkechengVideo) {
this.jianshenkechengVideo = jianshenkechengVideo;
}
//获取: 赞
public Integer getZanNumber() {
return zanNumber;
}
//设置: 赞
public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber;
}
//获取: 踩
public Integer getCaiNumber() {
return caiNumber;
}
//设置: 踩
public void setCaiNumber(Integer caiNumber) {
this.caiNumber = caiNumber;
}
//获取: 健身课程类型
public Integer getJianshenkechengTypes() {
return jianshenkechengTypes;
}
//设置: 健身课程类型
public void setJianshenkechengTypes(Integer jianshenkechengTypes) {
this.jianshenkechengTypes = jianshenkechengTypes;
}
//级联表的get和set 健身课程
/**
*
*/
public Integer getJianshenkechengJiaolianId() {
return jianshenkechengJiaolianId;
}
/**
*
*/
public void setJianshenkechengJiaolianId(Integer jianshenkechengJiaolianId) {
this.jianshenkechengJiaolianId = jianshenkechengJiaolianId;
}
//获取: 健身课程类型的值 /**
public String getJianshenkechengValue() { *
return jianshenkechengValue; */
} public String getJianshenkechengName() {
return jianshenkechengName;
}
/**
*
*/
public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName;
}
//设置: 健身课程类型的值 /**
public void setJianshenkechengValue(String jianshenkechengValue) { *
this.jianshenkechengValue = jianshenkechengValue; */
} public String getJianshenkechengPhoto() {
return jianshenkechengPhoto;
}
/**
*
*/
public void setJianshenkechengPhoto(String jianshenkechengPhoto) {
this.jianshenkechengPhoto = jianshenkechengPhoto;
}
/**
*
*/
public String getJianshenkechengVideo() {
return jianshenkechengVideo;
}
/**
*
*/
public void setJianshenkechengVideo(String jianshenkechengVideo) {
this.jianshenkechengVideo = jianshenkechengVideo;
}
//获取: 健身课程热度 /**
public Integer getJianshenkechengClicknum() { *
return jianshenkechengClicknum; */
} public Integer getZanNumber() {
return zanNumber;
}
/**
*
*/
public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber;
}
//设置: 健身课程热度 /**
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) { *
this.jianshenkechengClicknum = jianshenkechengClicknum; */
} public Integer getCaiNumber() {
return caiNumber;
}
/**
*
*/
public void setCaiNumber(Integer caiNumber) {
this.caiNumber = caiNumber;
}
/**
*
*/
public Integer getJianshenkechengTypes() {
return jianshenkechengTypes;
}
/**
*
*/
public void setJianshenkechengTypes(Integer jianshenkechengTypes) {
this.jianshenkechengTypes = jianshenkechengTypes;
}
//获取: 健身课程介绍 /**
public String getJianshenkechengContent() { *
return jianshenkechengContent; */
} public String getJianshenkechengValue() {
return jianshenkechengValue;
}
/**
*
*/
public void setJianshenkechengValue(String jianshenkechengValue) {
this.jianshenkechengValue = jianshenkechengValue;
}
/**
*
*/
public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum;
}
/**
*
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum;
}
//设置: 健身课程介绍 /**
public void setJianshenkechengContent(String jianshenkechengContent) { *
this.jianshenkechengContent = jianshenkechengContent; */
} public String getJianshenkechengContent() {
return jianshenkechengContent;
}
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
//级联表的get和set 用户 //级联表的get和set 用户
/**
*
*/
public String getYonghuName() {
return yonghuName;
}
/**
*
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
//获取: 用户名称 /**
public String getYonghuName() { *
return yonghuName; */
} public String getYonghuPhone() {
return yonghuPhone;
//设置: 用户名称 }
public void setYonghuName(String yonghuName) { /**
this.yonghuName = yonghuName; *
} */
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
//获取: 用户手机号 }
public String getYonghuPhone() {
return yonghuPhone;
}
//设置: 用户手机号
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//获取: 用户身份证号
public String getYonghuIdNumber() {
return yonghuIdNumber;
}
//设置: 用户身份证号
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//获取: 用户头像
public String getYonghuPhoto() {
return yonghuPhoto;
}
//设置: 用户头像
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
//获取: 用户邮箱 /**
public String getYonghuEmail() { *
return yonghuEmail; */
} public String getYonghuIdNumber() {
return yonghuIdNumber;
}
/**
*
*/
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//设置: 用户邮箱 /**
public void setYonghuEmail(String yonghuEmail) { *
this.yonghuEmail = yonghuEmail; */
} public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
//获取: 现有余额 /**
public Double getNewMoney() { *
return newMoney; */
} public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
//设置: 现有余额
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "JianshenkechengCollectionView{" + return "JianshenkechengCollectionView{" +
", jianshenkechengCollectionValue=" + jianshenkechengCollectionValue + ", jianshenkechengCollectionValue=" + jianshenkechengCollectionValue +
", jianshenkechengName=" + jianshenkechengName + ", jianshenkechengName=" + jianshenkechengName +
", jianshenkechengPhoto=" + jianshenkechengPhoto + ", jianshenkechengPhoto=" + jianshenkechengPhoto +
", jianshenkechengVideo=" + jianshenkechengVideo + ", jianshenkechengVideo=" + jianshenkechengVideo +
", zanNumber=" + zanNumber + ", zanNumber=" + zanNumber +
", caiNumber=" + caiNumber + ", caiNumber=" + caiNumber +
", jianshenkechengClicknum=" + jianshenkechengClicknum + ", jianshenkechengClicknum=" + jianshenkechengClicknum +
", jianshenkechengContent=" + jianshenkechengContent + ", jianshenkechengContent=" + jianshenkechengContent +
", yonghuName=" + yonghuName + ", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone + ", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber + ", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto + ", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail + ", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney + ", newMoney=" + newMoney +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,313 +1,370 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入课程留言实体类
import com.entity.JianshenkechengLiuyanEntity; import com.entity.JianshenkechengLiuyanEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//课程留言 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的TableName注解指定数据库表名 */
@TableName("jianshenkecheng_liuyan") @TableName("jianshenkecheng_liuyan")
// 继承课程留言实体类并实现序列化接口
public class JianshenkechengLiuyanView extends JianshenkechengLiuyanEntity implements Serializable { public class JianshenkechengLiuyanView extends JianshenkechengLiuyanEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
//级联表 健身课程 //级联表 健身课程
/**
//健身课程 的 教练 *
// 使用ColumnInfo注解标注字段的注释和类型 */
@ColumnInfo(comment="教练",type="int(11)") @ColumnInfo(comment="教练",type="int(11)")
private Integer jianshenkechengJiaolianId; private Integer jianshenkechengJiaolianId;
/**
//健身课程名称 *
@ColumnInfo(comment="健身课程名称",type="varchar(200)") */
private String jianshenkechengName;
@ColumnInfo(comment="健身课程名称",type="varchar(200)")
//健身课程照片 private String jianshenkechengName;
@ColumnInfo(comment="健身课程照片",type="varchar(200)") /**
private String jianshenkechengPhoto; *
*/
//课程视频
@ColumnInfo(comment="课程视频",type="varchar(200)") @ColumnInfo(comment="健身课程照片",type="varchar(200)")
private String jianshenkechengVideo; private String jianshenkechengPhoto;
/**
//赞 *
@ColumnInfo(comment="赞",type="int(11)") */
private Integer zanNumber;
@ColumnInfo(comment="课程视频",type="varchar(200)")
//踩 private String jianshenkechengVideo;
@ColumnInfo(comment="踩",type="int(11)") /**
private Integer caiNumber; *
*/
//健身课程类型
@ColumnInfo(comment="健身课程类型",type="int(11)") @ColumnInfo(comment="赞",type="int(11)")
private Integer jianshenkechengTypes; private Integer zanNumber;
/**
//健身课程类型的值 *
@ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)") */
private String jianshenkechengValue;
@ColumnInfo(comment="踩",type="int(11)")
//健身课程热度 private Integer caiNumber;
@ColumnInfo(comment="健身课程热度",type="int(11)") /**
private Integer jianshenkechengClicknum; *
*/
//健身课程介绍 @ColumnInfo(comment="健身课程类型",type="int(11)")
@ColumnInfo(comment="健身课程介绍",type="longtext") private Integer jianshenkechengTypes;
private String jianshenkechengContent; /**
*
*/
@ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)")
private String jianshenkechengValue;
/**
*
*/
@ColumnInfo(comment="健身课程热度",type="int(11)")
private Integer jianshenkechengClicknum;
/**
*
*/
@ColumnInfo(comment="健身课程介绍",type="longtext")
private String jianshenkechengContent;
//级联表 用户 //级联表 用户
/**
*
*/
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
/**
*
*/
@ColumnInfo(comment="用户手机号",type="varchar(200)")
private String yonghuPhone;
/**
*
*/
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
private String yonghuIdNumber;
/**
*
*/
@ColumnInfo(comment="用户头像",type="varchar(200)")
private String yonghuPhoto;
/**
*
*/
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
private String yonghuEmail;
/**
*
*/
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
//用户名称
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
//用户手机号
@ColumnInfo(comment="用户手机号",type="varchar(200)")
private String yonghuPhone;
//用户身份证号
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
private String yonghuIdNumber;
//用户头像
@ColumnInfo(comment="用户头像",type="varchar(200)")
private String yonghuPhoto;
//用户邮箱
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
private String yonghuEmail;
//现有余额
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
// 无参构造方法
public JianshenkechengLiuyanView() { public JianshenkechengLiuyanView() {
} }
// 带参构造方法通过BeanUtils.copyProperties复制属性
public JianshenkechengLiuyanView(JianshenkechengLiuyanEntity jianshenkechengLiuyanEntity) { public JianshenkechengLiuyanView(JianshenkechengLiuyanEntity jianshenkechengLiuyanEntity) {
try { try {
BeanUtils.copyProperties(this, jianshenkechengLiuyanEntity); BeanUtils.copyProperties(this, jianshenkechengLiuyanEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//级联表的get和set 健身课程
//获取:健身课程 的 教练
public Integer getJianshenkechengJiaolianId() {
return jianshenkechengJiaolianId;
}
//设置:健身课程 的 教练
public void setJianshenkechengJiaolianId(Integer jianshenkechengJiaolianId) {
this.jianshenkechengJiaolianId = jianshenkechengJiaolianId;
}
//获取: 健身课程名称
public String getJianshenkechengName() {
return jianshenkechengName;
}
//设置: 健身课程名称
public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName;
}
//获取: 健身课程照片
public String getJianshenkechengPhoto() {
return jianshenkechengPhoto;
}
//设置: 健身课程照片 //级联表的get和set 健身课程
public void setJianshenkechengPhoto(String jianshenkechengPhoto) { /**
this.jianshenkechengPhoto = jianshenkechengPhoto; *
} */
public Integer getJianshenkechengJiaolianId() {
return jianshenkechengJiaolianId;
//获取: 课程视频 }
public String getJianshenkechengVideo() { /**
return jianshenkechengVideo; *
} */
public void setJianshenkechengJiaolianId(Integer jianshenkechengJiaolianId) {
//设置: 课程视频 this.jianshenkechengJiaolianId = jianshenkechengJiaolianId;
public void setJianshenkechengVideo(String jianshenkechengVideo) { }
this.jianshenkechengVideo = jianshenkechengVideo;
}
//获取: 赞
public Integer getZanNumber() {
return zanNumber;
}
//设置: 赞
public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber;
}
//获取: 踩
public Integer getCaiNumber() {
return caiNumber;
}
//设置: 踩 /**
public void setCaiNumber(Integer caiNumber) { *
this.caiNumber = caiNumber; */
} public String getJianshenkechengName() {
return jianshenkechengName;
}
/**
*
*/
public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName;
}
//获取: 健身课程类型 /**
public Integer getJianshenkechengTypes() { *
return jianshenkechengTypes; */
} public String getJianshenkechengPhoto() {
//设置: 健身课程类型 return jianshenkechengPhoto;
public void setJianshenkechengTypes(Integer jianshenkechengTypes) { }
this.jianshenkechengTypes = jianshenkechengTypes; /**
} *
*/
public void setJianshenkechengPhoto(String jianshenkechengPhoto) {
this.jianshenkechengPhoto = jianshenkechengPhoto;
}
/**
*
*/
public String getJianshenkechengVideo() {
return jianshenkechengVideo;
}
/**
*
*/
public void setJianshenkechengVideo(String jianshenkechengVideo) {
this.jianshenkechengVideo = jianshenkechengVideo;
}
//获取: 健身课程类型的值 /**
public String getJianshenkechengValue() { *
return jianshenkechengValue; */
} public Integer getZanNumber() {
return zanNumber;
}
/**
*
*/
public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber;
}
// 设置: 健身课程类型的值 /**
public void setJianshenkechengValue(String jianshenkechengValue) { *
this.jianshenkechengValue = jianshenkechengValue; */
} public Integer getCaiNumber() {
return caiNumber;
}
/**
*
*/
public void setCaiNumber(Integer caiNumber) {
this.caiNumber = caiNumber;
}
/**
*
*/
public Integer getJianshenkechengTypes() {
return jianshenkechengTypes;
}
/**
*
*/
public void setJianshenkechengTypes(Integer jianshenkechengTypes) {
this.jianshenkechengTypes = jianshenkechengTypes;
}
//获取: 健身课程热度 /**
public Integer getJianshenkechengClicknum() { *
return jianshenkechengClicknum; */
} public String getJianshenkechengValue() {
//设置: 健身课程热度 return jianshenkechengValue;
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) { }
this.jianshenkechengClicknum = jianshenkechengClicknum; /**
} *
*/
public void setJianshenkechengValue(String jianshenkechengValue) {
this.jianshenkechengValue = jianshenkechengValue;
}
/**
*
*/
public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum;
}
/**
*
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum;
}
//获取: 健身课程介绍 /**
public String getJianshenkechengContent() { *
return jianshenkechengContent; */
} public String getJianshenkechengContent() {
//设置: 健身课程介绍 return jianshenkechengContent;
public void setJianshenkechengContent(String jianshenkechengContent) { }
this.jianshenkechengContent = jianshenkechengContent; /**
} *
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
//级联表的get和set 用户 //级联表的get和set 用户
//获取: 用户名称 /**
public String getYonghuName() { *
return yonghuName; */
} public String getYonghuName() {
//设置: 用户名称 return yonghuName;
public void setYonghuName(String yonghuName) { }
this.yonghuName = yonghuName; /**
} *
*/
public void setYonghuName(String yonghuName) {
//获取: 用户手机号 this.yonghuName = yonghuName;
public String getYonghuPhone() { }
return yonghuPhone;
}
//设置: 用户手机号
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//获取: 用户身份证号
public String getYonghuIdNumber() {
return yonghuIdNumber;
}
//设置: 用户身份证号
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//获取: 用户头像
public String getYonghuPhoto() {
return yonghuPhoto;
}
//设置: 用户头像
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
*
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//获取: 用户邮箱 /**
public String getYonghuEmail() { *
return yonghuEmail; */
} public String getYonghuIdNumber() {
return yonghuIdNumber;
}
/**
*
*/
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//设置: 用户邮箱 /**
public void setYonghuEmail(String yonghuEmail) { *
this.yonghuEmail = yonghuEmail; */
} public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
//获取: 现有余额 /**
public Double getNewMoney() { *
return newMoney; */
} public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
//设置: 现有余额
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "JianshenkechengLiuyanView{" + return "JianshenkechengLiuyanView{" +
", jianshenkechengName=" + jianshenkechengName + ", jianshenkechengName=" + jianshenkechengName +
", jianshenkechengPhoto=" + jianshenkechengPhoto + ", jianshenkechengPhoto=" + jianshenkechengPhoto +
", jianshenkechengVideo=" + jianshenkechengVideo + ", jianshenkechengVideo=" + jianshenkechengVideo +
", zanNumber=" + zanNumber + ", zanNumber=" + zanNumber +
", caiNumber=" + caiNumber + ", caiNumber=" + caiNumber +
", jianshenkechengClicknum=" + jianshenkechengClicknum + ", jianshenkechengClicknum=" + jianshenkechengClicknum +
", jianshenkechengContent=" + jianshenkechengContent + ", jianshenkechengContent=" + jianshenkechengContent +
", yonghuName=" + yonghuName + ", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone + ", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber + ", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto + ", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail + ", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney + ", newMoney=" + newMoney +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,163 +1,174 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入健身课程实体类
import com.entity.JianshenkechengEntity; import com.entity.JianshenkechengEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
// 健身课程 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
*/
// 使用MyBatis Plus的TableName注解指定数据库表名
@TableName("jianshenkecheng") @TableName("jianshenkecheng")
// 继承健身课程实体类并实现序列化接口
public class JianshenkechengView extends JianshenkechengEntity implements Serializable { public class JianshenkechengView extends JianshenkechengEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
// 健身课程类型的值 *
// 使用ColumnInfo注解标注字段的注释和类型 */
@ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)") @ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)")
private String jianshenkechengValue; private String jianshenkechengValue;
//级联表 教练 //级联表 教练
/**
*
*/
@ColumnInfo(comment="教练名称",type="varchar(200)")
private String jiaolianName;
/**
*
*/
@ColumnInfo(comment="教练手机号",type="varchar(200)")
private String jiaolianPhone;
/**
*
*/
//教练名称 @ColumnInfo(comment="教练头像",type="varchar(200)")
@ColumnInfo(comment="教练名称",type="varchar(200)") private String jiaolianPhoto;
private String jiaolianName; /**
*
*/
//教练手机号 @ColumnInfo(comment="教练邮箱",type="varchar(200)")
@ColumnInfo(comment="教练手机号",type="varchar(200)") private String jiaolianEmail;
private String jiaolianPhone; /**
*
*/
//教练头像 @ColumnInfo(comment="教练简介",type="longtext")
@ColumnInfo(comment="教练头像",type="varchar(200)") private String jiaolianContent;
private String jiaolianPhoto;
//教练邮箱
@ColumnInfo(comment="教练邮箱",type="varchar(200)")
private String jiaolianEmail;
//教练简介
@ColumnInfo(comment="教练简介",type="longtext")
private String jiaolianContent;
// 无参构造方法
public JianshenkechengView() { public JianshenkechengView() {
} }
// 带参构造方法通过BeanUtils.copyProperties复制属性
public JianshenkechengView(JianshenkechengEntity jianshenkechengEntity) { public JianshenkechengView(JianshenkechengEntity jianshenkechengEntity) {
try { try {
BeanUtils.copyProperties(this, jianshenkechengEntity); BeanUtils.copyProperties(this, jianshenkechengEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的get和set方法
//获取: 健身课程类型的
//当前表的
/**
*
*/
public String getJianshenkechengValue() { public String getJianshenkechengValue() {
return jianshenkechengValue; return jianshenkechengValue;
} }
/**
//设置: 健身课程类型的值 *
*/
public void setJianshenkechengValue(String jianshenkechengValue) { public void setJianshenkechengValue(String jianshenkechengValue) {
this.jianshenkechengValue = jianshenkechengValue; this.jianshenkechengValue = jianshenkechengValue;
} }
//级联表的get和set 教练
//获取: 教练名称
public String getJiaolianName() {
return jiaolianName;
}
//设置: 教练名称
public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName;
}
//获取: 教练手机号
public String getJiaolianPhone() {
return jiaolianPhone;
}
//设置: 教练手机号
public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone;
}
//获取: 教练头像 //级联表的get和set 教练
public String getJiaolianPhoto() {
return jiaolianPhoto;
}
//设置: 教练头像
public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto;
}
/**
*
*/
public String getJiaolianName() {
return jiaolianName;
}
/**
*
*/
public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName;
}
//获取: 教练邮 /**
public String getJiaolianEmail() { *
return jiaolianEmail; */
} public String getJiaolianPhone() {
return jiaolianPhone;
}
/**
*
*/
public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone;
}
//设置: 教练邮箱 /**
public void setJiaolianEmail(String jiaolianEmail) { *
this.jiaolianEmail = jiaolianEmail; */
} public String getJiaolianPhoto() {
return jiaolianPhoto;
}
/**
*
*/
public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto;
}
/**
*
*/
public String getJiaolianEmail() {
return jiaolianEmail;
}
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail;
}
//获取: 教练简介 /**
public String getJiaolianContent() { *
return jiaolianContent; */
} public String getJiaolianContent() {
return jiaolianContent;
}
/**
*
*/
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
//设置: 教练简介
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "JianshenkechengView{" + return "JianshenkechengView{" +
", jianshenkechengValue=" + jianshenkechengValue + ", jianshenkechengValue=" + jianshenkechengValue +
", jiaolianName=" + jiaolianName + ", jiaolianName=" + jiaolianName +
", jiaolianPhone=" + jiaolianPhone + ", jiaolianPhone=" + jiaolianPhone +
", jiaolianPhoto=" + jiaolianPhoto + ", jiaolianPhoto=" + jiaolianPhoto +
", jiaolianEmail=" + jiaolianEmail + ", jiaolianEmail=" + jiaolianEmail +
", jiaolianContent=" + jiaolianContent + ", jiaolianContent=" + jiaolianContent +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,84 +1,72 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant的日期工具类用于日期处理
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解,用于数据库字段的元数据描述
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入教练实体类,表示数据库中的教练表
import com.entity.JiaolianEntity; import com.entity.JiaolianEntity;
// 导入MyBatis Plus的注解用于指定数据库表名
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类用于JavaBean的属性复制
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring的日期格式化注解用于定义日期格式
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson的日期格式化注解用于JSON序列化时的日期格式
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//教练视图类 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的注解指定数据库表名 */
@TableName("jiaolian") @TableName("jiaolian")
// 继承教练实体类并实现序列化接口
public class JiaolianView extends JiaolianEntity implements Serializable { public class JiaolianView extends JiaolianEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
//性别的值 *
// 使用自定义注解描述字段信息,包括备注和数据库类型 */
@ColumnInfo(comment="性别的字典表值",type="varchar(200)") @ColumnInfo(comment="性别的字典表值",type="varchar(200)")
// 性别值字段,存储性别的字典表值
private String sexValue; private String sexValue;
// 无参构造方法
public JiaolianView() { public JiaolianView() {
} }
// 带参构造方法,通过教练实体对象初始化视图对象
public JiaolianView(JiaolianEntity jiaolianEntity) { public JiaolianView(JiaolianEntity jiaolianEntity) {
try { try {
// 使用BeanUtils复制属性值
BeanUtils.copyProperties(this, jiaolianEntity); BeanUtils.copyProperties(this, jiaolianEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
// 打印异常堆栈信息
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的
//获取: 性别的值
// 获取性别值的方法 //当前表的
/**
*
*/
public String getSexValue() { public String getSexValue() {
return sexValue; return sexValue;
} }
/**
//设置: 性别的值 *
// 设置性别值的方法 */
public void setSexValue(String sexValue) { public void setSexValue(String sexValue) {
this.sexValue = sexValue; this.sexValue = sexValue;
} }
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "JiaolianView{" + return "JiaolianView{" +
", sexValue=" + sexValue + ", sexValue=" + sexValue +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,179 +1,193 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant工具包中的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入教练预约实体类
import com.entity.JiaolianYuyueEntity; import com.entity.JiaolianYuyueEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson库的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//教练预约申请 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的TableName注解指定数据库表名 */
@TableName("jiaolian_yuyue") @TableName("jiaolian_yuyue")
// 继承教练预约实体类并实现序列化接口
public class JiaolianYuyueView extends JiaolianYuyueEntity implements Serializable { public class JiaolianYuyueView extends JiaolianYuyueEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
//预约状态的值 *
// 使用ColumnInfo注解标注字段的注释和类型 */
@ColumnInfo(comment="预约状态的字典表值",type="varchar(200)") @ColumnInfo(comment="预约状态的字典表值",type="varchar(200)")
private String jiaolianYuyueYesnoValue; private String jiaolianYuyueYesnoValue;
//级联表 用户 //级联表 用户
/**
*
*/
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
/**
*
*/
@ColumnInfo(comment="用户手机号",type="varchar(200)")
private String yonghuPhone;
/**
*
*/
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
private String yonghuIdNumber;
/**
*
*/
@ColumnInfo(comment="用户头像",type="varchar(200)")
private String yonghuPhoto;
/**
*
*/
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
private String yonghuEmail;
/**
*
*/
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
//用户名称
@ColumnInfo(comment="用户名称",type="varchar(200)")
private String yonghuName;
//用户手机号
@ColumnInfo(comment="用户手机号",type="varchar(200)")
private String yonghuPhone;
//用户身份证号
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
private String yonghuIdNumber;
//用户头像
@ColumnInfo(comment="用户头像",type="varchar(200)")
private String yonghuPhoto;
//用户邮箱
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
private String yonghuEmail;
//现有余额
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
private Double newMoney;
// 无参构造方法
public JiaolianYuyueView() { public JiaolianYuyueView() {
} }
// 带参构造方法通过BeanUtils.copyProperties复制属性
public JiaolianYuyueView(JiaolianYuyueEntity jiaolianYuyueEntity) { public JiaolianYuyueView(JiaolianYuyueEntity jiaolianYuyueEntity) {
try { try {
// 使用BeanUtils复制属性值
BeanUtils.copyProperties(this, jiaolianYuyueEntity); BeanUtils.copyProperties(this, jiaolianYuyueEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的get和set方法
//获取: 预约状态的值
//当前表的
/**
*
*/
public String getJiaolianYuyueYesnoValue() { public String getJiaolianYuyueYesnoValue() {
return jiaolianYuyueYesnoValue; return jiaolianYuyueYesnoValue;
} }
/**
//设置: 预约状态的值 *
*/
public void setJiaolianYuyueYesnoValue(String jiaolianYuyueYesnoValue) { public void setJiaolianYuyueYesnoValue(String jiaolianYuyueYesnoValue) {
this.jiaolianYuyueYesnoValue = jiaolianYuyueYesnoValue; this.jiaolianYuyueYesnoValue = jiaolianYuyueYesnoValue;
} }
//级联表的get和set 用户
//获取: 用户名称
public String getYonghuName() {
return yonghuName;
}
//设置: 用户名称
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
//获取: 用户手机号
public String getYonghuPhone() {
return yonghuPhone;
}
//设置: 用户手机号
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//获取: 用户身份证号
public String getYonghuIdNumber() {
return yonghuIdNumber;
}
//设置: 用户身份证号
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//获取: 用户头像 //级联表的get和set 用户
public String getYonghuPhoto() {
return yonghuPhoto;
}
//设置: 用户头像 /**
public void setYonghuPhoto(String yonghuPhoto) { *
this.yonghuPhoto = yonghuPhoto; */
} public String getYonghuName() {
return yonghuName;
}
/**
*
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
*
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
*
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
//获取: 用户邮箱 /**
public String getYonghuEmail() { *
return yonghuEmail; */
} public String getYonghuIdNumber() {
return yonghuIdNumber;
}
/**
*
*/
public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber;
}
//设置: 用户邮箱 /**
public void setYonghuEmail(String yonghuEmail) { *
this.yonghuEmail = yonghuEmail; */
} public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
//获取: 现有余额 /**
public Double getNewMoney() { *
return newMoney; */
} public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
//设置: 现有余额
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "JiaolianYuyueView{" + return "JiaolianYuyueView{" +
", jiaolianYuyueYesnoValue=" + jiaolianYuyueYesnoValue + ", jiaolianYuyueYesnoValue=" + jiaolianYuyueYesnoValue +
", yonghuName=" + yonghuName + ", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone + ", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber + ", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto + ", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail + ", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney + ", newMoney=" + newMoney +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,80 +1,72 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant工具包中的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入资讯实体类
import com.entity.NewsEntity; import com.entity.NewsEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson库的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//健身资讯 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的TableName注解指定数据库表名 */
@TableName("news") @TableName("news")
// 继承资讯实体类并实现序列化接口
public class NewsView extends NewsEntity implements Serializable { public class NewsView extends NewsEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
//资讯类型的值 *
// 使用ColumnInfo注解标注字段的注释和类型 */
@ColumnInfo(comment="资讯类型的字典表值",type="varchar(200)") @ColumnInfo(comment="资讯类型的字典表值",type="varchar(200)")
private String newsValue; private String newsValue;
// 无参构造方法
public NewsView() { public NewsView() {
} }
// 带参构造方法通过BeanUtils.copyProperties复制属性
public NewsView(NewsEntity newsEntity) { public NewsView(NewsEntity newsEntity) {
try { try {
// 使用BeanUtils复制属性值
BeanUtils.copyProperties(this, newsEntity); BeanUtils.copyProperties(this, newsEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的get和set方法
//获取: 资讯类型的值
//当前表的
/**
*
*/
public String getNewsValue() { public String getNewsValue() {
return newsValue; return newsValue;
} }
/**
//设置: 资讯类型的值 *
*/
public void setNewsValue(String newsValue) { public void setNewsValue(String newsValue) {
this.newsValue = newsValue; this.newsValue = newsValue;
} }
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "NewsView{" + return "NewsView{" +
", newsValue=" + newsValue + ", newsValue=" + newsValue +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,83 +1,72 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant工具包中的日期工具类
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入单页数据实体类
import com.entity.SingleSeachEntity; import com.entity.SingleSeachEntity;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson库的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
/**
//单页数据 *
//后端返回视图实体辅助类 *
//(通常后端关联的表或者自定义的字段需要返回使用) * 使
// 使用MyBatis Plus的TableName注解指定数据库表名 */
@TableName("single_seach") @TableName("single_seach")
// 继承单页数据实体类并实现序列化接口
public class SingleSeachView extends SingleSeachEntity implements Serializable { public class SingleSeachView extends SingleSeachEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//当前表 //当前表
/**
//数据类型的值 *
// 使用ColumnInfo注解标注字段的注释和类型 */
@ColumnInfo(comment="数据类型的字典表值",type="varchar(200)") @ColumnInfo(comment="数据类型的字典表值",type="varchar(200)")
private String singleSeachValue; private String singleSeachValue;
// 无参构造方法
public SingleSeachView() { public SingleSeachView() {
// 空构造方法
} }
// 带参构造方法通过BeanUtils.copyProperties复制属性
public SingleSeachView(SingleSeachEntity singleSeachEntity) { public SingleSeachView(SingleSeachEntity singleSeachEntity) {
try { try {
// 使用BeanUtils复制属性值
BeanUtils.copyProperties(this, singleSeachEntity); BeanUtils.copyProperties(this, singleSeachEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
//当前表的get和set方法
//获取:数据类型的值
//@return 数据类型的值 //当前表的
/**
*
*/
public String getSingleSeachValue() { public String getSingleSeachValue() {
return singleSeachValue; return singleSeachValue;
} }
/**
*
//设置:数据类型的值 */
//@param singleSeachValue 要设置的数据类型的值
public void setSingleSeachValue(String singleSeachValue) { public void setSingleSeachValue(String singleSeachValue) {
this.singleSeachValue = singleSeachValue; this.singleSeachValue = singleSeachValue;
} }
// 重写toString方法返回对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "SingleSeachView{" + return "SingleSeachView{" +
", singleSeachValue=" + singleSeachValue + ", singleSeachValue=" + singleSeachValue +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,88 +1,72 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.view; package com.entity.view;
// 导入Apache Ant工具包中的日期工具类用于日期处理
import org.apache.tools.ant.util.DateUtils; import org.apache.tools.ant.util.DateUtils;
// 导入自定义的列信息注解,用于数据库字段映射
import com.annotation.ColumnInfo; import com.annotation.ColumnInfo;
// 导入用户实体类,作为基类继承
import com.entity.YonghuEntity; import com.entity.YonghuEntity;
// 导入MyBatis Plus的表名注解用于指定数据库表
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Apache Commons BeanUtils工具类用于对象属性复制
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
// 导入反射相关的异常类
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入Jackson库的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入自定义的日期工具类
import com.utils.DateUtil; import com.utils.DateUtil;
//用户视图类 /**
//后端返回视图实体辅助类 *
//(通常用于后端关联表或自定义字段的返回) *
// 使用MyBatis Plus的TableName注解指定数据库表名 * 使
*/
@TableName("yonghu") @TableName("yonghu")
// 继承用户实体类并实现序列化接口
public class YonghuView extends YonghuEntity implements Serializable { public class YonghuView extends YonghuEntity implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 当前表字段 //当前表
/**
//性别的字典值 *
//用于存储性别类型的字典表对应值 */
// 使用ColumnInfo注解标注字段的注释和数据库类型
@ColumnInfo(comment="性别的字典表值",type="varchar(200)") @ColumnInfo(comment="性别的字典表值",type="varchar(200)")
private String sexValue; private String sexValue;
// 无参构造方法
public YonghuView() { public YonghuView() {
// 空构造方法
}
// 带参构造方法 }
//通过用户实体对象构造视图对象
//@param yonghuEntity 用户实体对象
public YonghuView(YonghuEntity yonghuEntity) { public YonghuView(YonghuEntity yonghuEntity) {
try { try {
// 使用BeanUtils复制属性值
BeanUtils.copyProperties(this, yonghuEntity); BeanUtils.copyProperties(this, yonghuEntity);
} catch (IllegalAccessException | InvocationTargetException e) { } catch (IllegalAccessException | InvocationTargetException e) {
// 打印异常堆栈信息 // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
} }
// getter和setter方法
//获取性别字典值
//@return 性别字典值 //当前表的
/**
*
*/
public String getSexValue() { public String getSexValue() {
return sexValue; return sexValue;
} }
/**
//设置性别字典值 *
//@param sexValue 要设置的性别字典值 */
public void setSexValue(String sexValue) { public void setSexValue(String sexValue) {
this.sexValue = sexValue; this.sexValue = sexValue;
} }
// 重写toString方法
//返回对象的字符串表示
//@return 对象的字符串表示
@Override @Override
public String toString() { public String toString() {
return "YonghuView{" + return "YonghuView{" +
", sexValue=" + sexValue + ", sexValue=" + sexValue +
"} " + super.toString(); "} " + super.toString();
} }
} }

@ -1,190 +1,209 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.vo; package com.entity.vo;
// 导入字典实体类
import com.entity.DictionaryEntity; import com.entity.DictionaryEntity;
// 导入MyBatis Plus的表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入序列化接口
import java.io.Serializable;
import java.io.Serializable;
//字典VO类 /**
//手机端接口返回实体辅助类 *
//(主要作用去除一些不必要的字段,简化返回数据) *
// 使用MyBatis Plus的TableName注解指定数据库表名 *
*/
@TableName("dictionary") @TableName("dictionary")
// 实现序列化接口
public class DictionaryVO implements Serializable { public class DictionaryVO implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//主键ID
// 使用TableField注解映射数据库字段 /**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Long id; private Long id;
//字典编码 /**
//表示字典类型的唯一标识 *
*/
@TableField(value = "dic_code") @TableField(value = "dic_code")
private String dicCode; private String dicCode;
//字典名称 /**
//表示字典类型的显示名称 *
*/
@TableField(value = "dic_name") @TableField(value = "dic_name")
private String dicName; private String dicName;
//编码索引 /**
//表示字典项的数字编码 *
*/
@TableField(value = "code_index") @TableField(value = "code_index")
private Integer codeIndex; private Integer codeIndex;
//编码名称 /**
//表示字典项的显示名称 *
*/
@TableField(value = "index_name") @TableField(value = "index_name")
private String indexName; private String indexName;
//父级ID /**
//表示父级字典项的ID * id
*/
@TableField(value = "super_id") @TableField(value = "super_id")
private Integer superId; private Integer superId;
//备注信息
//存储额外的描述信息 /**
*
*/
@TableField(value = "beizhu") @TableField(value = "beizhu")
private String beizhu; private String beizhu;
//创建时间 /**
//记录数据创建时间 *
// 使用Jackson和Spring的日期格式化注解 */
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
//获取主键ID /**
//@return 主键ID *
*/
public Long getId() { public Long getId() {
return id; return id;
} }
//设置主键ID /**
//@param id 要设置的主键ID *
*/
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
/**
*
//获取字典编码 */
//@return 字典编码
public String getDicCode() { public String getDicCode() {
return dicCode; return dicCode;
} }
//设置字典编码 /**
//@param dicCode 要设置的字典编码 *
*/
public void setDicCode(String dicCode) { public void setDicCode(String dicCode) {
this.dicCode = dicCode; this.dicCode = dicCode;
} }
/**
*
//获取字典名称 */
//@return 字典名称
public String getDicName() { public String getDicName() {
return dicName; return dicName;
} }
//设置字典名称 /**
//@param dicName 要设置的字典名称 *
*/
public void setDicName(String dicName) { public void setDicName(String dicName) {
this.dicName = dicName; this.dicName = dicName;
} }
/**
*
//获取编码索引 */
//@return 编码索引
public Integer getCodeIndex() { public Integer getCodeIndex() {
return codeIndex; return codeIndex;
} }
//设置编码索引 /**
//@param codeIndex 要设置的编码索引 *
*/
public void setCodeIndex(Integer codeIndex) { public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex; this.codeIndex = codeIndex;
} }
/**
*
//获取编码名称 */
//@return 编码名称
public String getIndexName() { public String getIndexName() {
return indexName; return indexName;
} }
//设置编码名称 /**
//@param indexName 要设置的编码名称 *
*/
public void setIndexName(String indexName) { public void setIndexName(String indexName) {
this.indexName = indexName; this.indexName = indexName;
} }
/**
* id
//获取父级ID */
//@return 父级ID
public Integer getSuperId() { public Integer getSuperId() {
return superId; return superId;
} }
//设置父级ID /**
//@param superId 要设置的父级ID * id
*/
public void setSuperId(Integer superId) { public void setSuperId(Integer superId) {
this.superId = superId; this.superId = superId;
} }
/**
*
//获取备注信息 */
//@return 备注信息
public String getBeizhu() { public String getBeizhu() {
return beizhu; return beizhu;
} }
//设置备注信息 /**
//@param beizhu 要设置的备注信息 *
*/
public void setBeizhu(String beizhu) { public void setBeizhu(String beizhu) {
this.beizhu = beizhu; this.beizhu = beizhu;
} }
/**
*
//获取创建时间 */
//@return 创建时间
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
//设置创建时间 /**
//@param createTime 要设置的创建时间 *
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,189 +1,282 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.vo; package com.entity.vo;
// 导入健身论坛实体类
import com.entity.ForumEntity; import com.entity.ForumEntity;
// 导入MyBatis Plus的表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入序列化接口
import java.io.Serializable;
import java.io.Serializable;
//健身论坛VO类 /**
//手机端接口返回实体辅助类 *
//主要用于去除一些不必要的字段,简化返回数据 *
// 使用MyBatis Plus的TableName注解指定数据库表名 *
*/
@TableName("forum") @TableName("forum")
// 实现序列化接口
public class ForumVO implements Serializable { public class ForumVO implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 帖子标题
/**
*
*/
@TableField(value = "forum_name") @TableField(value = "forum_name")
private String forumName; private String forumName;
// 关联用户ID
/**
*
*/
@TableField(value = "yonghu_id") @TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 关联教练ID
/**
*
*/
@TableField(value = "jiaolian_id") @TableField(value = "jiaolian_id")
private Integer jiaolianId; private Integer jiaolianId;
// 关联管理员ID
/**
*
*/
@TableField(value = "users_id") @TableField(value = "users_id")
private Integer usersId; private Integer usersId;
// 帖子内容
/**
*
*/
@TableField(value = "forum_content") @TableField(value = "forum_content")
private String forumContent; private String forumContent;
// 父级帖子ID
/**
* id
*/
@TableField(value = "super_ids") @TableField(value = "super_ids")
private Integer superIds; private Integer superIds;
// 帖子状态
/**
*
*/
@TableField(value = "forum_state_types") @TableField(value = "forum_state_types")
private Integer forumStateTypes; private Integer forumStateTypes;
// 发帖时间
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 修改时间
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "update_time") @TableField(value = "update_time")
private Date updateTime; private Date updateTime;
// 创建时间show2
/**
* show2
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取帖子标题 *
*/
public String getForumName() { public String getForumName() {
return forumName; return forumName;
} }
// 设置帖子标题
/**
*
*/
public void setForumName(String forumName) { public void setForumName(String forumName) {
this.forumName = forumName; this.forumName = forumName;
} }
/**
// 获取关联用户ID *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
// 设置关联用户ID
/**
*
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 获取关联教练ID *
*/
public Integer getJiaolianId() { public Integer getJiaolianId() {
return jiaolianId; return jiaolianId;
} }
// 设置关联教练ID
/**
*
*/
public void setJiaolianId(Integer jiaolianId) { public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId; this.jiaolianId = jiaolianId;
} }
/**
// 获取关联管理员ID *
*/
public Integer getUsersId() { public Integer getUsersId() {
return usersId; return usersId;
} }
// 设置关联管理员ID
/**
*
*/
public void setUsersId(Integer usersId) { public void setUsersId(Integer usersId) {
this.usersId = usersId; this.usersId = usersId;
} }
/**
// 获取帖子内容 *
*/
public String getForumContent() { public String getForumContent() {
return forumContent; return forumContent;
} }
// 设置帖子内容
/**
*
*/
public void setForumContent(String forumContent) { public void setForumContent(String forumContent) {
this.forumContent = forumContent; this.forumContent = forumContent;
} }
/**
// 获取父级帖子ID * id
*/
public Integer getSuperIds() { public Integer getSuperIds() {
return superIds; return superIds;
} }
// 设置父级帖子ID
/**
* id
*/
public void setSuperIds(Integer superIds) { public void setSuperIds(Integer superIds) {
this.superIds = superIds; this.superIds = superIds;
} }
/**
// 获取帖子状态 *
*/
public Integer getForumStateTypes() { public Integer getForumStateTypes() {
return forumStateTypes; return forumStateTypes;
} }
// 设置帖子状态
/**
*
*/
public void setForumStateTypes(Integer forumStateTypes) { public void setForumStateTypes(Integer forumStateTypes) {
this.forumStateTypes = forumStateTypes; this.forumStateTypes = forumStateTypes;
} }
/**
// 获取发帖时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置发帖时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取修改时间 *
*/
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
// 设置修改时间
/**
*
*/
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
// 获取创建时间show2 * show2
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间show2
/**
* show2
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,116 +1,165 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.vo; package com.entity.vo;
// 导入课程收藏实体类
import com.entity.JianshenkechengCollectionEntity; import com.entity.JianshenkechengCollectionEntity;
// 导入MyBatis Plus的表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 课程收藏VO类 /**
// 手机端接口返回实体辅助类 *
// 主要用于去除一些不必要的字段,简化返回数据 *
// 使用MyBatis Plus的TableName注解指定数据库表名 *
*/
@TableName("jianshenkecheng_collection") @TableName("jianshenkecheng_collection")
// 实现序列化接口
public class JianshenkechengCollectionVO implements Serializable { public class JianshenkechengCollectionVO implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 关联的健身课程ID
/**
*
*/
@TableField(value = "jianshenkecheng_id") @TableField(value = "jianshenkecheng_id")
private Integer jianshenkechengId; private Integer jianshenkechengId;
// 关联的用户ID
/**
*
*/
@TableField(value = "yonghu_id") @TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 收藏类型
/**
*
*/
@TableField(value = "jianshenkecheng_collection_types") @TableField(value = "jianshenkecheng_collection_types")
private Integer jianshenkechengCollectionTypes; private Integer jianshenkechengCollectionTypes;
// 收藏时间
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 创建时间show3 photoShow
/**
* show3 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取关联的健身课程ID *
*/
public Integer getJianshenkechengId() { public Integer getJianshenkechengId() {
return jianshenkechengId; return jianshenkechengId;
} }
// 设置关联的健身课程ID
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) { public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId; this.jianshenkechengId = jianshenkechengId;
} }
/**
// 获取关联的用户ID *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
// 设置关联的用户ID
/**
*
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 获取收藏类型 *
*/
public Integer getJianshenkechengCollectionTypes() { public Integer getJianshenkechengCollectionTypes() {
return jianshenkechengCollectionTypes; return jianshenkechengCollectionTypes;
} }
// 设置收藏类型
/**
*
*/
public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) { public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) {
this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes; this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes;
} }
/**
// 获取收藏时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置收藏时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取创建时间show3 photoShow * show3 photoShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间show3 photoShow
/**
* show3 photoShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,146 +1,213 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.vo; package com.entity.vo;
// 导入课程留言实体类
import com.entity.JianshenkechengLiuyanEntity; import com.entity.JianshenkechengLiuyanEntity;
// 导入MyBatis Plus的表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 课程留言VO类 /**
// 手机端接口返回实体辅助类 *
// 主要用于去除一些不必要的字段,简化返回数据 *
// 使用MyBatis Plus的TableName注解指定数据库表名 *
*/
@TableName("jianshenkecheng_liuyan") @TableName("jianshenkecheng_liuyan")
// 实现序列化接口
public class JianshenkechengLiuyanVO implements Serializable { public class JianshenkechengLiuyanVO implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 关联的健身课程ID
/**
*
*/
@TableField(value = "jianshenkecheng_id") @TableField(value = "jianshenkecheng_id")
private Integer jianshenkechengId; private Integer jianshenkechengId;
// 关联的用户ID
/**
*
*/
@TableField(value = "yonghu_id") @TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 留言内容
/**
*
*/
@TableField(value = "jianshenkecheng_liuyan_text") @TableField(value = "jianshenkecheng_liuyan_text")
private String jianshenkechengLiuyanText; private String jianshenkechengLiuyanText;
// 留言时间
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 回复内容
/**
*
*/
@TableField(value = "reply_text") @TableField(value = "reply_text")
private String replyText; private String replyText;
// 回复时间
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "update_time") @TableField(value = "update_time")
private Date updateTime; private Date updateTime;
// 创建时间show3 listShow
/**
* show3 listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取关联的健身课程ID *
*/
public Integer getJianshenkechengId() { public Integer getJianshenkechengId() {
return jianshenkechengId; return jianshenkechengId;
} }
// 设置关联的健身课程ID
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) { public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId; this.jianshenkechengId = jianshenkechengId;
} }
/**
// 获取关联的用户ID *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
// 设置关联的用户ID
/**
*
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 获取留言内容 *
*/
public String getJianshenkechengLiuyanText() { public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText; return jianshenkechengLiuyanText;
} }
// 设置留言内容
/**
*
*/
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) { public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText; this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
} }
/**
// 获取留言时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置留言时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取回复内容 *
*/
public String getReplyText() { public String getReplyText() {
return replyText; return replyText;
} }
// 设置回复内容
/**
*
*/
public void setReplyText(String replyText) { public void setReplyText(String replyText) {
this.replyText = replyText; this.replyText = replyText;
} }
/**
// 获取回复时间 *
*/
public Date getUpdateTime() { public Date getUpdateTime() {
return updateTime; return updateTime;
} }
// 设置回复时间
/**
*
*/
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/**
// 获取创建时间show3 listShow * show3 listShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间show3 listShow
/**
* show3 listShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,214 +1,326 @@
// 定义包路径,表示该文件所在的目录结构
package com.entity.vo; package com.entity.vo;
// 导入健身课程实体类
import com.entity.JianshenkechengEntity; import com.entity.JianshenkechengEntity;
// 导入MyBatis Plus的表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
// 导入MyBatis Plus的表名注解
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson的日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入日期类
import java.util.Date; import java.util.Date;
// 导入Spring框架的日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 导入序列化接口
import java.io.Serializable; import java.io.Serializable;
// 健身课程VO类 /**
// 手机端接口返回实体辅助类 *
// 主要用于去除一些不必要的字段,简化返回数据 *
// 使用MyBatis Plus的TableName注解指定数据库表名 *
*/
@TableName("jianshenkecheng") @TableName("jianshenkecheng")
// 实现序列化接口
public class JianshenkechengVO implements Serializable { public class JianshenkechengVO implements Serializable {
// 序列化版本UID用于版本控制
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键ID
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 关联的教练ID
/**
*
*/
@TableField(value = "jiaolian_id") @TableField(value = "jiaolian_id")
private Integer jiaolianId; private Integer jiaolianId;
// 健身课程名称
/**
*
*/
@TableField(value = "jianshenkecheng_name") @TableField(value = "jianshenkecheng_name")
private String jianshenkechengName; private String jianshenkechengName;
// 健身课程封面照片URL
/**
*
*/
@TableField(value = "jianshenkecheng_photo") @TableField(value = "jianshenkecheng_photo")
private String jianshenkechengPhoto; private String jianshenkechengPhoto;
// 课程视频URL
/**
*
*/
@TableField(value = "jianshenkecheng_video") @TableField(value = "jianshenkecheng_video")
private String jianshenkechengVideo; private String jianshenkechengVideo;
// 点赞数量
/**
*
*/
@TableField(value = "zan_number") @TableField(value = "zan_number")
private Integer zanNumber; private Integer zanNumber;
// 踩数量
/**
*
*/
@TableField(value = "cai_number") @TableField(value = "cai_number")
private Integer caiNumber; private Integer caiNumber;
// 健身课程类型(关联字典表)
/**
*
*/
@TableField(value = "jianshenkecheng_types") @TableField(value = "jianshenkecheng_types")
private Integer jianshenkechengTypes; private Integer jianshenkechengTypes;
// 课程点击量/热度
/**
*
*/
@TableField(value = "jianshenkecheng_clicknum") @TableField(value = "jianshenkecheng_clicknum")
private Integer jianshenkechengClicknum; private Integer jianshenkechengClicknum;
// 课程详细介绍内容
/**
*
*/
@TableField(value = "jianshenkecheng_content") @TableField(value = "jianshenkecheng_content")
private String jianshenkechengContent; private String jianshenkechengContent;
// 逻辑删除标志1表示已删除
/**
*
*/
@TableField(value = "data_delete") @TableField(value = "data_delete")
private Integer dataDelete; private Integer dataDelete;
// 课程录入时间
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 创建时间用于show1 show2 photoShow homeMain等多个展示场景
/**
* show1 show2 photoShow homeMain
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat @DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取关联的教练ID *
*/
public Integer getJiaolianId() { public Integer getJiaolianId() {
return jiaolianId; return jiaolianId;
} }
// 设置关联的教练ID
/**
*
*/
public void setJiaolianId(Integer jiaolianId) { public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId; this.jiaolianId = jiaolianId;
} }
/**
// 获取健身课程名称 *
*/
public String getJianshenkechengName() { public String getJianshenkechengName() {
return jianshenkechengName; return jianshenkechengName;
} }
// 设置健身课程名称
/**
*
*/
public void setJianshenkechengName(String jianshenkechengName) { public void setJianshenkechengName(String jianshenkechengName) {
this.jianshenkechengName = jianshenkechengName; this.jianshenkechengName = jianshenkechengName;
} }
/**
// 获取健身课程封面照片URL *
*/
public String getJianshenkechengPhoto() { public String getJianshenkechengPhoto() {
return jianshenkechengPhoto; return jianshenkechengPhoto;
} }
// 设置健身课程封面照片URL
/**
*
*/
public void setJianshenkechengPhoto(String jianshenkechengPhoto) { public void setJianshenkechengPhoto(String jianshenkechengPhoto) {
this.jianshenkechengPhoto = jianshenkechengPhoto; this.jianshenkechengPhoto = jianshenkechengPhoto;
} }
/**
// 获取课程视频URL *
*/
public String getJianshenkechengVideo() { public String getJianshenkechengVideo() {
return jianshenkechengVideo; return jianshenkechengVideo;
} }
// 设置课程视频URL
/**
*
*/
public void setJianshenkechengVideo(String jianshenkechengVideo) { public void setJianshenkechengVideo(String jianshenkechengVideo) {
this.jianshenkechengVideo = jianshenkechengVideo; this.jianshenkechengVideo = jianshenkechengVideo;
} }
/**
// 获取点赞数量 *
*/
public Integer getZanNumber() { public Integer getZanNumber() {
return zanNumber; return zanNumber;
} }
// 设置点赞数量
/**
*
*/
public void setZanNumber(Integer zanNumber) { public void setZanNumber(Integer zanNumber) {
this.zanNumber = zanNumber; this.zanNumber = zanNumber;
} }
/**
// 获取踩数量 *
*/
public Integer getCaiNumber() { public Integer getCaiNumber() {
return caiNumber; return caiNumber;
} }
// 设置踩数量
/**
*
*/
public void setCaiNumber(Integer caiNumber) { public void setCaiNumber(Integer caiNumber) {
this.caiNumber = caiNumber; this.caiNumber = caiNumber;
} }
/**
// 获取健身课程类型 *
*/
public Integer getJianshenkechengTypes() { public Integer getJianshenkechengTypes() {
return jianshenkechengTypes; return jianshenkechengTypes;
} }
// 设置健身课程类型
/**
*
*/
public void setJianshenkechengTypes(Integer jianshenkechengTypes) { public void setJianshenkechengTypes(Integer jianshenkechengTypes) {
this.jianshenkechengTypes = jianshenkechengTypes; this.jianshenkechengTypes = jianshenkechengTypes;
} }
/**
// 获取课程点击量/热度 *
*/
public Integer getJianshenkechengClicknum() { public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum; return jianshenkechengClicknum;
} }
// 设置课程点击量/热度
/**
*
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) { public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum; this.jianshenkechengClicknum = jianshenkechengClicknum;
} }
/**
// 获取课程详细介绍内容 *
*/
public String getJianshenkechengContent() { public String getJianshenkechengContent() {
return jianshenkechengContent; return jianshenkechengContent;
} }
// 设置课程详细介绍内容
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) { public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent; this.jianshenkechengContent = jianshenkechengContent;
} }
/**
// 获取逻辑删除标志 *
*/
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
// 设置逻辑删除标志
/**
*
*/
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
// 获取课程录入时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置课程录入时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取创建时间(用于多个展示场景) * show1 show2 photoShow homeMain
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间(用于多个展示场景)
/**
* show1 show2 photoShow homeMain
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,198 +1,303 @@
// 包声明
package com.entity.vo; package com.entity.vo;
// 导入原教练实体类
import com.entity.JiaolianEntity; import com.entity.JiaolianEntity;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java核心库
import java.io.Serializable;
import java.util.Date; import java.util.Date;
// 导入Spring日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 教练手机端接口返回实体辅助类(精简字段) import java.io.Serializable;
/**
*
*
*
*/
@TableName("jiaolian") @TableName("jiaolian")
public class JiaolianVO implements Serializable { public class JiaolianVO implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键字段(自增)
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 登录账户(唯一标识)
/**
*
*/
@TableField(value = "username") @TableField(value = "username")
private String username; private String username;
// 登录密码(加密存储)
/**
*
*/
@TableField(value = "password") @TableField(value = "password")
private String password; private String password;
// 教练真实姓名
/**
*
*/
@TableField(value = "jiaolian_name") @TableField(value = "jiaolian_name")
private String jiaolianName; private String jiaolianName;
// 教练联系电话
/**
*
*/
@TableField(value = "jiaolian_phone") @TableField(value = "jiaolian_phone")
private String jiaolianPhone; private String jiaolianPhone;
// 教练头像存储路径
/**
*
*/
@TableField(value = "jiaolian_photo") @TableField(value = "jiaolian_photo")
private String jiaolianPhoto; private String jiaolianPhoto;
// 性别类型0=未知,1=男,2=女)
/**
*
*/
@TableField(value = "sex_types") @TableField(value = "sex_types")
private Integer sexTypes; private Integer sexTypes;
// 教练联系邮箱
/**
*
*/
@TableField(value = "jiaolian_email") @TableField(value = "jiaolian_email")
private String jiaolianEmail; private String jiaolianEmail;
// 教练详细介绍(支持富文本)
/**
*
*/
@TableField(value = "jiaolian_content") @TableField(value = "jiaolian_content")
private String jiaolianContent; private String jiaolianContent;
// 逻辑删除标记0=正常,1=删除)
/**
*
*/
@TableField(value = "data_delete") @TableField(value = "data_delete")
private Integer dataDelete; private Integer dataDelete;
// 数据入库时间(带中文时区格式化)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 记录创建时间(支持多种展示模式)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat * show1 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取登录账户 *
*/
public String getUsername() { public String getUsername() {
return username; return username;
} }
// 设置登录账户
/**
*
*/
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
/**
// 获取登录密码 *
*/
public String getPassword() { public String getPassword() {
return password; return password;
} }
// 设置登录密码
/**
*
*/
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
// 获取教练姓名 *
*/
public String getJiaolianName() { public String getJiaolianName() {
return jiaolianName; return jiaolianName;
} }
// 设置教练姓名
/**
*
*/
public void setJiaolianName(String jiaolianName) { public void setJiaolianName(String jiaolianName) {
this.jiaolianName = jiaolianName; this.jiaolianName = jiaolianName;
} }
/**
// 获取联系电话 *
*/
public String getJiaolianPhone() { public String getJiaolianPhone() {
return jiaolianPhone; return jiaolianPhone;
} }
// 设置联系电话
/**
*
*/
public void setJiaolianPhone(String jiaolianPhone) { public void setJiaolianPhone(String jiaolianPhone) {
this.jiaolianPhone = jiaolianPhone; this.jiaolianPhone = jiaolianPhone;
} }
/**
// 获取头像路径 *
*/
public String getJiaolianPhoto() { public String getJiaolianPhoto() {
return jiaolianPhoto; return jiaolianPhoto;
} }
// 设置头像路径
/**
*
*/
public void setJiaolianPhoto(String jiaolianPhoto) { public void setJiaolianPhoto(String jiaolianPhoto) {
this.jiaolianPhoto = jiaolianPhoto; this.jiaolianPhoto = jiaolianPhoto;
} }
/**
// 获取性别类型 *
*/
public Integer getSexTypes() { public Integer getSexTypes() {
return sexTypes; return sexTypes;
} }
// 设置性别类型
/**
*
*/
public void setSexTypes(Integer sexTypes) { public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes; this.sexTypes = sexTypes;
} }
/**
// 获取联系邮箱 *
*/
public String getJiaolianEmail() { public String getJiaolianEmail() {
return jiaolianEmail; return jiaolianEmail;
} }
// 设置联系邮箱
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) { public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail; this.jiaolianEmail = jiaolianEmail;
} }
/**
// 获取详细介绍 *
*/
public String getJiaolianContent() { public String getJiaolianContent() {
return jiaolianContent; return jiaolianContent;
} }
// 设置详细介绍
/**
*
*/
public void setJiaolianContent(String jiaolianContent) { public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent; this.jiaolianContent = jiaolianContent;
} }
/**
// 获取逻辑删除状态 *
*/
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
// 设置逻辑删除状态
/**
*
*/
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
// 获取数据入库时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置数据入库时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取记录创建时间(支持列表/详情/头像展示模式) * show1 show2 photoShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置记录创建时间
/**
* show1 show2 photoShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,158 +1,236 @@
// 包声明
package com.entity.vo; package com.entity.vo;
// 导入原教练预约实体类
import com.entity.JiaolianYuyueEntity; import com.entity.JiaolianYuyueEntity;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java核心库
import java.io.Serializable;
import java.util.Date; import java.util.Date;
// 导入Spring日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 教练预约申请手机端接口返回实体辅助类(精简字段) import java.io.Serializable;
/**
*
*
*
*/
@TableName("jiaolian_yuyue") @TableName("jiaolian_yuyue")
public class JiaolianYuyueVO implements Serializable { public class JiaolianYuyueVO implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键字段
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 预约唯一标识编号UUID生成
/**
*
*/
@TableField(value = "jiaolian_yuyue_uuid_number") @TableField(value = "jiaolian_yuyue_uuid_number")
private String jiaolianYuyueUuidNumber; private String jiaolianYuyueUuidNumber;
// 关联用户表主键(外键)
/**
*
*/
@TableField(value = "yonghu_id") @TableField(value = "yonghu_id")
private Integer yonghuId; private Integer yonghuId;
// 用户填写的预约备注信息
/**
*
*/
@TableField(value = "jiaolian_yuyue_text") @TableField(value = "jiaolian_yuyue_text")
private String jiaolianYuyueText; private String jiaolianYuyueText;
// 预约的具体时间(带中文时区格式化)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "jiaolian_yuyue_time") @TableField(value = "jiaolian_yuyue_time")
private Date jiaolianYuyueTime; private Date jiaolianYuyueTime;
// 预约审核状态0=待处理,1=通过,2=拒绝)
/**
*
*/
@TableField(value = "jiaolian_yuyue_yesno_types") @TableField(value = "jiaolian_yuyue_yesno_types")
private Integer jiaolianYuyueYesnoTypes; private Integer jiaolianYuyueYesnoTypes;
// 管理员审核后的回复内容
/**
*
*/
@TableField(value = "jiaolian_yuyue_yesno_text") @TableField(value = "jiaolian_yuyue_yesno_text")
private String jiaolianYuyueYesnoText; private String jiaolianYuyueYesnoText;
// 用户提交申请的时间
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 记录创建时间(带格式化注解,支持多种显示模式)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat * show3 listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取预约唯一编号 *
*/
public String getJiaolianYuyueUuidNumber() { public String getJiaolianYuyueUuidNumber() {
return jiaolianYuyueUuidNumber; return jiaolianYuyueUuidNumber;
} }
// 设置预约唯一编号
/**
*
*/
public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) { public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) {
this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber; this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber;
} }
/**
// 获取关联用户ID *
*/
public Integer getYonghuId() { public Integer getYonghuId() {
return yonghuId; return yonghuId;
} }
// 设置关联用户ID
/**
*
*/
public void setYonghuId(Integer yonghuId) { public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId; this.yonghuId = yonghuId;
} }
/**
// 获取预约备注内容 *
*/
public String getJiaolianYuyueText() { public String getJiaolianYuyueText() {
return jiaolianYuyueText; return jiaolianYuyueText;
} }
// 设置预约备注内容
/**
*
*/
public void setJiaolianYuyueText(String jiaolianYuyueText) { public void setJiaolianYuyueText(String jiaolianYuyueText) {
this.jiaolianYuyueText = jiaolianYuyueText; this.jiaolianYuyueText = jiaolianYuyueText;
} }
/**
// 获取预约具体时间 *
*/
public Date getJiaolianYuyueTime() { public Date getJiaolianYuyueTime() {
return jiaolianYuyueTime; return jiaolianYuyueTime;
} }
// 设置预约具体时间
/**
*
*/
public void setJiaolianYuyueTime(Date jiaolianYuyueTime) { public void setJiaolianYuyueTime(Date jiaolianYuyueTime) {
this.jiaolianYuyueTime = jiaolianYuyueTime; this.jiaolianYuyueTime = jiaolianYuyueTime;
} }
/**
// 获取审核状态标识 *
*/
public Integer getJiaolianYuyueYesnoTypes() { public Integer getJiaolianYuyueYesnoTypes() {
return jiaolianYuyueYesnoTypes; return jiaolianYuyueYesnoTypes;
} }
// 设置审核状态标识
/**
*
*/
public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) { public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) {
this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes; this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes;
} }
/**
// 获取审核回复内容 *
*/
public String getJiaolianYuyueYesnoText() { public String getJiaolianYuyueYesnoText() {
return jiaolianYuyueYesnoText; return jiaolianYuyueYesnoText;
} }
// 设置审核回复内容
/**
*
*/
public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) { public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) {
this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText; this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText;
} }
/**
// 获取申请提交时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置申请提交时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取记录创建时间(支持列表和详情展示格式) * show3 listShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置记录创建时间
/**
* show3 listShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,128 +1,188 @@
// 包声明
package com.entity.vo; package com.entity.vo;
// 导入原资讯实体类
import com.entity.NewsEntity; import com.entity.NewsEntity;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java核心库
import java.io.Serializable;
import java.util.Date; import java.util.Date;
// 导入Spring日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 健身资讯手机端接口返回实体辅助类(精简字段) import java.io.Serializable;
/**
*
*
*
*/
@TableName("news") @TableName("news")
public class NewsVO implements Serializable { public class NewsVO implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键字段
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 资讯标题最大长度200
/**
*
*/
@TableField(value = "news_name") @TableField(value = "news_name")
private String newsName; private String newsName;
// 资讯类型标识(通过数字表示不同类型)
/**
*
*/
@TableField(value = "news_types") @TableField(value = "news_types")
private Integer newsTypes; private Integer newsTypes;
// 资讯封面图存储路径
/**
*
*/
@TableField(value = "news_photo") @TableField(value = "news_photo")
private String newsPhoto; private String newsPhoto;
// 数据添加时间(带中文时区格式化)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 资讯详细内容HTML格式文本
/**
*
*/
@TableField(value = "news_content") @TableField(value = "news_content")
private String newsContent; private String newsContent;
// 记录创建时间(带格式化注解)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat * show1 show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取资讯标题 *
*/
public String getNewsName() { public String getNewsName() {
return newsName; return newsName;
} }
// 设置资讯标题
/**
*
*/
public void setNewsName(String newsName) { public void setNewsName(String newsName) {
this.newsName = newsName; this.newsName = newsName;
} }
/**
// 获取资讯类型标识 *
*/
public Integer getNewsTypes() { public Integer getNewsTypes() {
return newsTypes; return newsTypes;
} }
// 设置资讯类型标识
/**
*
*/
public void setNewsTypes(Integer newsTypes) { public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes; this.newsTypes = newsTypes;
} }
/**
// 获取封面图路径 *
*/
public String getNewsPhoto() { public String getNewsPhoto() {
return newsPhoto; return newsPhoto;
} }
// 设置封面图路径
/**
*
*/
public void setNewsPhoto(String newsPhoto) { public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto; this.newsPhoto = newsPhoto;
} }
/**
// 获取数据添加时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置数据添加时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取资讯详细内容 *
*/
public String getNewsContent() { public String getNewsContent() {
return newsContent; return newsContent;
} }
// 设置资讯详细内容
/**
*
*/
public void setNewsContent(String newsContent) { public void setNewsContent(String newsContent) {
this.newsContent = newsContent; this.newsContent = newsContent;
} }
/**
// 获取记录创建时间(支持多种显示格式) * show1 show2 nameShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置记录创建时间
/**
* show1 show2 nameShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,112 +1,163 @@
// 包声明
package com.entity.vo; package com.entity.vo;
// 导入原实体类
import com.entity.SingleSeachEntity; import com.entity.SingleSeachEntity;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java核心库
import java.io.Serializable;
import java.util.Date; import java.util.Date;
// 导入Spring日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 单页数据手机端接口返回实体辅助类(精简字段) import java.io.Serializable;
/**
*
*
*
*/
@TableName("single_seach") @TableName("single_seach")
public class SingleSeachVO implements Serializable { public class SingleSeachVO implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键字段
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 数据项名称
/**
*
*/
@TableField(value = "single_seach_name") @TableField(value = "single_seach_name")
private String singleSeachName; private String singleSeachName;
// 数据类型标识(通过数字表示不同类型)
/**
*
*/
@TableField(value = "single_seach_types") @TableField(value = "single_seach_types")
private Integer singleSeachTypes; private Integer singleSeachTypes;
// 关联图片存储路径
/**
*
*/
@TableField(value = "single_seach_photo") @TableField(value = "single_seach_photo")
private String singleSeachPhoto; private String singleSeachPhoto;
// 数据内容(长文本)
/**
*
*/
@TableField(value = "single_seach_content") @TableField(value = "single_seach_content")
private String singleSeachContent; private String singleSeachContent;
// 记录创建时间(带格式化注解)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat * show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取数据项名称 *
*/
public String getSingleSeachName() { public String getSingleSeachName() {
return singleSeachName; return singleSeachName;
} }
// 设置数据项名称
/**
*
*/
public void setSingleSeachName(String singleSeachName) { public void setSingleSeachName(String singleSeachName) {
this.singleSeachName = singleSeachName; this.singleSeachName = singleSeachName;
} }
/**
// 获取数据类型标识 *
*/
public Integer getSingleSeachTypes() { public Integer getSingleSeachTypes() {
return singleSeachTypes; return singleSeachTypes;
} }
// 设置数据类型标识
/**
*
*/
public void setSingleSeachTypes(Integer singleSeachTypes) { public void setSingleSeachTypes(Integer singleSeachTypes) {
this.singleSeachTypes = singleSeachTypes; this.singleSeachTypes = singleSeachTypes;
} }
/**
// 获取图片路径 *
*/
public String getSingleSeachPhoto() { public String getSingleSeachPhoto() {
return singleSeachPhoto; return singleSeachPhoto;
} }
// 设置图片路径
/**
*
*/
public void setSingleSeachPhoto(String singleSeachPhoto) { public void setSingleSeachPhoto(String singleSeachPhoto) {
this.singleSeachPhoto = singleSeachPhoto; this.singleSeachPhoto = singleSeachPhoto;
} }
/**
// 获取数据内容 *
*/
public String getSingleSeachContent() { public String getSingleSeachContent() {
return singleSeachContent; return singleSeachContent;
} }
// 设置数据内容
/**
*
*/
public void setSingleSeachContent(String singleSeachContent) { public void setSingleSeachContent(String singleSeachContent) {
this.singleSeachContent = singleSeachContent; this.singleSeachContent = singleSeachContent;
} }
/**
// 获取创建时间(带中文时区格式化) * show2 nameShow
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置创建时间
/**
* show2 nameShow
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,212 +1,326 @@
// 包声明
package com.entity.vo; package com.entity.vo;
// 导入原用户实体类
import com.entity.YonghuEntity; import com.entity.YonghuEntity;
// 导入MyBatis Plus表字段注解
import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableName;
// 导入Jackson日期格式化注解
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
// 导入Java核心库
import java.io.Serializable;
import java.util.Date; import java.util.Date;
// 导入Spring日期格式化注解
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
// 用户手机端接口返回实体辅助类(精简字段) import java.io.Serializable;
/**
*
*
*
*/
@TableName("yonghu") @TableName("yonghu")
public class YonghuVO implements Serializable { public class YonghuVO implements Serializable {
// 序列化版本UID
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
// 主键字段
/**
*
*/
@TableField(value = "id") @TableField(value = "id")
private Integer id; private Integer id;
// 用户登录账户
/**
*
*/
@TableField(value = "username") @TableField(value = "username")
private String username; private String username;
// 用户登录密码
/**
*
*/
@TableField(value = "password") @TableField(value = "password")
private String password; private String password;
// 用户真实姓名
/**
*
*/
@TableField(value = "yonghu_name") @TableField(value = "yonghu_name")
private String yonghuName; private String yonghuName;
// 用户手机号码
/**
*
*/
@TableField(value = "yonghu_phone") @TableField(value = "yonghu_phone")
private String yonghuPhone; private String yonghuPhone;
// 用户身份证号码
/**
*
*/
@TableField(value = "yonghu_id_number") @TableField(value = "yonghu_id_number")
private String yonghuIdNumber; private String yonghuIdNumber;
// 用户头像存储路径
/**
*
*/
@TableField(value = "yonghu_photo") @TableField(value = "yonghu_photo")
private String yonghuPhoto; private String yonghuPhoto;
// 性别类型0=未知,1=男,2=女)
/**
*
*/
@TableField(value = "sex_types") @TableField(value = "sex_types")
private Integer sexTypes; private Integer sexTypes;
// 用户电子邮箱
/**
*
*/
@TableField(value = "yonghu_email") @TableField(value = "yonghu_email")
private String yonghuEmail; private String yonghuEmail;
// 用户账户余额
/**
*
*/
@TableField(value = "new_money") @TableField(value = "new_money")
private Double newMoney; private Double newMoney;
// 逻辑删除标记0=正常,1=删除)
/**
*
*/
@TableField(value = "data_delete") @TableField(value = "data_delete")
private Integer dataDelete; private Integer dataDelete;
// 数据插入时间(带格式化注解)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time") @TableField(value = "insert_time")
private Date insertTime; private Date insertTime;
// 记录创建时间(带格式化注解)
@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") /**
@DateTimeFormat *
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time") @TableField(value = "create_time")
private Date createTime; private Date createTime;
// 获取主键ID
/**
*
*/
public Integer getId() { public Integer getId() {
return id; return id;
} }
// 设置主键ID
/**
*
*/
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
} }
/**
// 获取登录账户 *
*/
public String getUsername() { public String getUsername() {
return username; return username;
} }
// 设置登录账户
/**
*
*/
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
/**
// 获取登录密码 *
*/
public String getPassword() { public String getPassword() {
return password; return password;
} }
// 设置登录密码
/**
*
*/
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
/**
// 获取用户真实姓名 *
*/
public String getYonghuName() { public String getYonghuName() {
return yonghuName; return yonghuName;
} }
// 设置用户真实姓名
/**
*
*/
public void setYonghuName(String yonghuName) { public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName; this.yonghuName = yonghuName;
} }
/**
// 获取手机号码 *
*/
public String getYonghuPhone() { public String getYonghuPhone() {
return yonghuPhone; return yonghuPhone;
} }
// 设置手机号码
/**
*
*/
public void setYonghuPhone(String yonghuPhone) { public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone; this.yonghuPhone = yonghuPhone;
} }
/**
// 获取身份证号码 *
*/
public String getYonghuIdNumber() { public String getYonghuIdNumber() {
return yonghuIdNumber; return yonghuIdNumber;
} }
// 设置身份证号码
/**
*
*/
public void setYonghuIdNumber(String yonghuIdNumber) { public void setYonghuIdNumber(String yonghuIdNumber) {
this.yonghuIdNumber = yonghuIdNumber; this.yonghuIdNumber = yonghuIdNumber;
} }
/**
// 获取头像路径 *
*/
public String getYonghuPhoto() { public String getYonghuPhoto() {
return yonghuPhoto; return yonghuPhoto;
} }
// 设置头像路径
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) { public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto; this.yonghuPhoto = yonghuPhoto;
} }
/**
// 获取性别类型 *
*/
public Integer getSexTypes() { public Integer getSexTypes() {
return sexTypes; return sexTypes;
} }
// 设置性别类型
/**
*
*/
public void setSexTypes(Integer sexTypes) { public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes; this.sexTypes = sexTypes;
} }
/**
// 获取电子邮箱 *
*/
public String getYonghuEmail() { public String getYonghuEmail() {
return yonghuEmail; return yonghuEmail;
} }
// 设置电子邮箱
/**
*
*/
public void setYonghuEmail(String yonghuEmail) { public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail; this.yonghuEmail = yonghuEmail;
} }
/**
// 获取账户余额 *
*/
public Double getNewMoney() { public Double getNewMoney() {
return newMoney; return newMoney;
} }
// 设置账户余额
/**
*
*/
public void setNewMoney(Double newMoney) { public void setNewMoney(Double newMoney) {
this.newMoney = newMoney; this.newMoney = newMoney;
} }
/**
// 获取逻辑删除状态 *
*/
public Integer getDataDelete() { public Integer getDataDelete() {
return dataDelete; return dataDelete;
} }
// 设置逻辑删除状态
/**
*
*/
public void setDataDelete(Integer dataDelete) { public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete; this.dataDelete = dataDelete;
} }
/**
// 获取数据插入时间 *
*/
public Date getInsertTime() { public Date getInsertTime() {
return insertTime; return insertTime;
} }
// 设置数据插入时间
/**
*
*/
public void setInsertTime(Date insertTime) { public void setInsertTime(Date insertTime) {
this.insertTime = insertTime; this.insertTime = insertTime;
} }
/**
// 获取记录创建时间 *
*/
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
// 设置记录创建时间
/**
*
*/
public void setCreateTime(Date createTime) { public void setCreateTime(Date createTime) {
this.createTime = createTime; this.createTime = createTime;
} }
}
}

@ -1,126 +1,94 @@
// 包声明,定义当前类所在的包路径
package com.interceptor; package com.interceptor;
// 导入Java IO包中的IOException类用于处理输入输出异常
import java.io.IOException; import java.io.IOException;
// 导入Java IO包中的PrintWriter类用于向客户端输出数据
import java.io.PrintWriter; import java.io.PrintWriter;
// 导入Java util包中的HashMap类用于存储键值对数据
import java.util.HashMap; import java.util.HashMap;
// 导入Java util包中的Map接口用于定义键值对集合
import java.util.Map; import java.util.Map;
// 导入FastJSON的JSONObject类用于处理JSON数据
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
// 导入Servlet包中的HttpServletRequest类用于处理HTTP请求
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
// 导入Servlet包中的HttpServletResponse类用于处理HTTP响应
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
// 导入Apache Commons Lang库中的StringUtils类用于字符串处理
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
// 导入Spring框架的Autowired注解用于自动装配依赖
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
// 导入Spring框架的Component注解标识该类为Spring组件
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
// 导入Spring Web包中的HandlerMethod类用于处理方法级别的处理器
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
// 导入Spring Web MVC包中的HandlerInterceptor接口用于定义拦截器
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
// 导入自定义的IgnoreAuth注解用于标记不需要认证的方法
import com.annotation.IgnoreAuth; import com.annotation.IgnoreAuth;
// 导入自定义的EIException异常类用于处理业务异常
import com.entity.EIException; import com.entity.EIException;
// 导入自定义的TokenEntity实体类用于表示令牌信息
import com.entity.TokenEntity; import com.entity.TokenEntity;
// 导入自定义的TokenService服务类用于处理令牌相关逻辑
import com.service.TokenService; import com.service.TokenService;
// 导入自定义的R工具类用于封装统一响应格式
import com.utils.R; import com.utils.R;
/**
// 权限(Token)验证拦截器 * (Token)
*/
@Component @Component
public class AuthorizationInterceptor implements HandlerInterceptor { public class AuthorizationInterceptor implements HandlerInterceptor {
// 登录Token的键名
public static final String LOGIN_TOKEN_KEY = "Token"; public static final String LOGIN_TOKEN_KEY = "Token";
@Autowired @Autowired
private TokenService tokenService; // 自动注入Token服务 private TokenService tokenService;
@Override @Override
//在请求处理之前进行拦截
// @param request HTTP请求对象
// @param response HTTP响应对象
//@param handler 处理器对象
// @return 如果返回true则继续处理请求如果返回false则中断请求处理
// @throws Exception 处理过程中可能抛出的异常
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
// 获取请求路径
String servletPath = request.getServletPath(); String servletPath = request.getServletPath();
// 如果是字典表或文件上传或用户注册接口,直接放行 if("/dictionary/page".equals(request.getServletPath()) || "/file/upload".equals(request.getServletPath()) || "/yonghu/register".equals(request.getServletPath()) ){//请求路径是字典表或者文件上传 直接放行
if("/dictionary/page".equals(request.getServletPath()) || "/file/upload".equals(request.getServletPath()) || "/yonghu/register".equals(request.getServletPath()) ){
return true; return true;
} }
//支持跨域请求
// 支持跨域请求 response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600"); response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Credentials", "true"); response.setHeader("Access-Control-Allow-Credentials", "true");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization"); response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization");
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
IgnoreAuth annotation; IgnoreAuth annotation;
// 如果handler是方法处理器则尝试获取IgnoreAuth注解
if (handler instanceof HandlerMethod) { if (handler instanceof HandlerMethod) {
annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class); annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
} else { } else {
return true; // 如果不是方法处理器,直接放行 return true;
} }
//从header中获取token //从header中获取token
String token = request.getHeader(LOGIN_TOKEN_KEY); String token = request.getHeader(LOGIN_TOKEN_KEY);
/** /**
* *
*/ */
if(annotation!=null) { if(annotation!=null) {
return true; // 如果存在IgnoreAuth注解直接放行 return true;
} }
TokenEntity tokenEntity = null; TokenEntity tokenEntity = null;
// 如果token不为空验证token
if(StringUtils.isNotBlank(token)) { if(StringUtils.isNotBlank(token)) {
tokenEntity = tokenService.getTokenEntity(token); tokenEntity = tokenService.getTokenEntity(token);
} }
// 如果token有效设置session属性并放行
if(tokenEntity != null) { if(tokenEntity != null) {
request.getSession().setAttribute("userId", tokenEntity.getUserid()); request.getSession().setAttribute("userId", tokenEntity.getUserid());
request.getSession().setAttribute("role", tokenEntity.getRole()); request.getSession().setAttribute("role", tokenEntity.getRole());
request.getSession().setAttribute("tableName", tokenEntity.getTablename()); request.getSession().setAttribute("tableName", tokenEntity.getTablename());
request.getSession().setAttribute("username", tokenEntity.getUsername()); request.getSession().setAttribute("username", tokenEntity.getUsername());
return true; return true;
}
PrintWriter writer = null;
response.setCharacterEncoding("UTF-8"); // 设置响应字符编码为UTF-8
response.setContentType("application/json; charset=utf-8"); // 设置响应内容类型为JSON
try {
writer = response.getWriter(); // 获取响应输出流
writer.print(JSONObject.toJSONString(R.error(401, "请先登录"))); // 返回错误信息
} finally {
if(writer != null){
writer.close(); // 关闭响应输出流
}
} }
// throw new EIException("请先登录", 401); // 抛出未登录异常,已注释掉
return false; // 返回false中断请求处理 PrintWriter writer = null;
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
try {
writer = response.getWriter();
writer.print(JSONObject.toJSONString(R.error(401, "请先登录")));
} finally {
if(writer != null){
writer.close();
}
}
// throw new EIException("请先登录", 401);
return false;
} }
} }

@ -1,6 +1,8 @@
package com; // 定义包名为com表示该文件位于com包下 package com; // 定义包名为com表示该文件位于com包下
// 导入Spring Boot和MyBatis相关的注解和类 // 导入Spring Boot和MyBatis相关的注解和类
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -23,4 +25,6 @@ public class jianshenfangglApplication extends SpringBootServletInitializer { /
// 重写configure方法用于配置Spring Boot应用程序的启动源支持外部容器如Tomcat部署 // 重写configure方法用于配置Spring Boot应用程序的启动源支持外部容器如Tomcat部署
return applicationBuilder.sources(jianshenfangglApplication.class); return applicationBuilder.sources(jianshenfangglApplication.class);
} }
} }

@ -1,50 +1,30 @@
// 包声明,定义当前文件所在的包路径
package com.model.enums; package com.model.enums;
// 导入Java的序列化接口用于标记类的实例可以被序列化
import java.io.Serializable; import java.io.Serializable;
// 导入MyBatis-Plus的枚举接口用于支持枚举类型的数据库映射
import com.baomidou.mybatisplus.enums.IEnum; import com.baomidou.mybatisplus.enums.IEnum;
/**
//类型枚举类继承自MyBatis-Plus的IEnum接口用于定义不同的状态类型。 * IEnum spring-mybatis.xml typeEnumsPackage
// 必须在IEnum中配置该包扫描自动注入查看文件spring-mybatis.xml中的参数typeEnumsPackage。 */
public enum TypeEnum implements IEnum { public enum TypeEnum implements IEnum {
// 定义枚举值DISABLED表示禁用状态值为0描述为"禁用"
DISABLED(0, "禁用"), DISABLED(0, "禁用"),
// 定义枚举值NORMAL表示正常状态值为1描述为"正常"
NORMAL(1, "正常"); NORMAL(1, "正常");
// 枚举值对应的整数值
private final int value; private final int value;
// 枚举值对应的描述信息
private final String desc; private final String desc;
//构造方法,初始化枚举值的整数和描述信息
//@param value 枚举值对应的整数
// @param desc 枚举值对应的描述信息
TypeEnum(final int value, final String desc) { TypeEnum(final int value, final String desc) {
this.value = value; this.value = value;
this.desc = desc; this.desc = desc;
} }
//获取枚举值对应的整数值
// @return 枚举值对应的整数值
@Override @Override
public Serializable getValue() { public Serializable getValue() {
return this.value; return this.value;
} }
// Jackson 注解为 JsonValue 返回中文 json 描述
//获取枚举值对应的描述信息
//@return 枚举值对应的描述信息
public String getDesc() { public String getDesc() {
return this.desc; return this.desc;
} }

@ -1,110 +1,46 @@
package com.service; // 定义包路径为com.service表示该接口属于服务层 package com.service;
import java.util.List; // 导入List接口用于返回数据集合 import java.util.List;
import java.util.Map; // 导入Map接口用于参数传递和返回数据 import java.util.Map;
// 通用统计服务接口
//提供各类数据统计和分析方法
public interface CommonService { public interface CommonService {
// 饼图求和统计
//@param params 查询参数Map包含统计条件和分组字段
//@return 饼图数据列表每个元素包含name和value字段
List<Map<String, Object>> pieSum(Map<String, Object> params); List<Map<String, Object>> pieSum(Map<String, Object> params);
//饼图计数统计
// @param params 查询参数Map包含统计条件和分组字段
//@return 饼图数据列表每个元素包含name和value字段
List<Map<String, Object>> pieCount(Map<String, Object> params); List<Map<String, Object>> pieCount(Map<String, Object> params);
// 单维度柱状图求和统计
//@param params 查询参数Map包含
// - xAxisX轴字段
// - yAxisY轴计算字段
// - 其他查询条件
//@return 柱状图数据列表每个元素包含x轴值和y轴求和值
List<Map<String, Object>> barSumOne(Map<String, Object> params); List<Map<String, Object>> barSumOne(Map<String, Object> params);
//单维度柱状图计数统计
//@param params 查询参数Map包含
// - xAxisX轴字段
// - 其他查询条件
//@return 柱状图数据列表每个元素包含x轴值和计数结果
List<Map<String, Object>> barCountOne(Map<String, Object> params); List<Map<String, Object>> barCountOne(Map<String, Object> params);
// 双维度柱状图求和统计
//@param params 查询参数Map包含
// - xAxisX轴字段
// - series系列字段
// - yAxisY轴计算字段
// - 其他查询条件
//@return 柱状图数据列表,包含多系列数据
List<Map<String, Object>> barSumTwo(Map<String, Object> params); List<Map<String, Object>> barSumTwo(Map<String, Object> params);
//双维度柱状图计数统计
//@param params 查询参数Map包含
// - xAxisX轴字段
// - series系列字段
// - 其他查询条件
//@return 柱状图数据列表,包含多系列数据
List<Map<String, Object>> barCountTwo(Map<String, Object> params); List<Map<String, Object>> barCountTwo(Map<String, Object> params);
/**
// 查询评分数据 tableName
//@param params 查询参数Map包含 condition1 1
// - tableName查询表名 condition1Value 1
// - condition1条件字段 average
// - condition1Value条件值 * */
// - average是否计算平均评分
//@return 包含评分统计结果的Map
// - total总评分
// - count评分次数
// - average平均分
Map<String, Object> queryScore(Map<String, Object> params); Map<String, Object> queryScore(Map<String, Object> params);
/**
*
// 新的级联字典表分组求和统计 * @param params
//@param params 查询参数Map包含 * @return
// - groupField分组字段 */
// - sumField求和字段
// - 其他查询条件
//@return 分组求和结果列表
//
List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params); List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params);
/**
*
// 新的级联字典表分组计数统计 * @param params
//@param params 查询参数Map包含 * @return
// - groupField分组字段 */
// - 其他查询条件
// @return 分组计数结果列表
List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params); List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params);
/**
*
// 通用柱状图求和统计 * @param params
//@param params 查询参数Map包含0 * @return
// - xAxisX轴字段 */
// - yAxisY轴计算字段
// - 其他查询条件
//@return 柱状图数据列表
List<Map<String, Object>> barSum(Map<String, Object> params); List<Map<String, Object>> barSum(Map<String, Object> params);
/**
*
// 通用柱状图计数统计 * @param params
//@param params 查询参数Map包含 * @return
// - xAxisX轴字段 */
// - 其他查询条件
//0@return 柱状图数据列表
List<Map<String, Object>> barCount(Map<String, Object> params); List<Map<String, Object>> barCount(Map<String, Object> params);
}
}

@ -1,40 +1,18 @@
package com.service; // 定义包路径为com.service表示该接口属于服务层
import java.util.Map; // 导入Map接口用于参数传递 package com.service;
import com.baomidou.mybatisplus.service.IService; // 导入MyBatis-Plus服务接口
import com.entity.ConfigEntity; // 导入系统配置实体类
import com.utils.PageUtils; // 导入分页工具类
import java.util.Map;
// 系统配置服务接口 import com.baomidou.mybatisplus.service.IService;
//继承MyBatis-Plus的IService接口提供系统配置相关业务方法 import com.entity.ConfigEntity;
import com.utils.PageUtils;
// @author yangliyuan
//@date 2019年10月10日 上午9:18:20
/**
*
* @author yangliyuan
* @date 20191010 9:18:20
*/
public interface ConfigService extends IService<ConfigEntity> { public interface ConfigService extends IService<ConfigEntity> {
// 分页查询系统配置信息
//@param params 查询参数Map包含以下常用键值
// - page当前页码从1开始
// - limit每页记录数
// - paramKey配置键模糊查询
// - paramValue配置值模糊查询
// - configType配置类型
// - status状态1-启用0-禁用)
//@return PageUtils分页对象包含
// - list当前页配置数据列表
// - totalCount总记录数
// - pageSize每页条数
// - totalPage总页数
// - currPage当前页码
PageUtils queryPage(Map<String, Object> params); PageUtils queryPage(Map<String, Object> params);
}
// 可扩展的业务方法示例:
// String getConfigValueByKey(String paramKey); // 根据配置键获取配置值
// boolean updateConfigByKey(String paramKey, String paramValue); // 根据配置键更新配置值
// Map<String, String> getAllEnabledConfigs(); // 获取所有启用的配置项
// boolean refreshConfigCache(); // 刷新配置缓存
}

@ -1,45 +1,27 @@
package com.service; // 定义包路径为com.service表示该接口属于服务层 package com.service;
import com.baomidou.mybatisplus.service.IService; // 导入MyBatis-Plus服务接口 import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils; // 导入分页工具类 import com.utils.PageUtils;
import com.entity.DictionaryEntity; // 导入字典实体类 import com.entity.DictionaryEntity;
import java.util.Map; // 导入Map接口用于参数传递 import java.util.Map;
import javax.servlet.http.HttpServletRequest; // 导入HTTP请求类 import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable; // 导入Spring的Nullable注解 import org.springframework.lang.Nullable;
import java.util.List; // 导入List接口 import java.util.List;
/**
// 字典服务接口 *
//继承MyBatis-Plus的IService接口提供字典相关业务方法 */
public interface DictionaryService extends IService<DictionaryEntity> { public interface DictionaryService extends IService<DictionaryEntity> {
/**
* @param params
* @return
*/
PageUtils queryPage(Map<String, Object> params);
/**
*
* @param obj
*/
void dictionaryConvert(Object obj, HttpServletRequest request);
// 分页查询字典数据
//@param params 查询参数Map包含以下常用键值
// - page当前页码从1开始
// - limit每页记录数
// - dicCode字典编码模糊查询
// - dicName字典名称模糊查询
// - codeIndex字典项编码精确查询
// - indexName字典项名称模糊查询
//@return PageUtils分页对象包含
// - list当前页字典数据列表
// - totalCount总记录数
// - pageSize每页条数
// - totalPage总页数
// - currPage当前页码
PageUtils queryPage(Map<String, Object> params);
// 字典数据转换方法
//将对象中的字典编码转换为对应的字典值
//@param obj 需要转换的对象可以是实体对象或Map
//@param request HTTP请求对象可用于获取上下文信息
void dictionaryConvert(Object obj, HttpServletRequest request);
// 可扩展的业务方法示例:
// Map<String, String> getDictionaryByCode(String dicCode); // 根据字典编码获取字典项
// String getDictionaryName(String dicCode, Integer codeIndex); // 获取指定字典项名称
// boolean refreshCache(); // 刷新字典缓存
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save