Your commit message

pull/5/head
dw 4 months ago
parent 9353a2a6bb
commit 8c8cf7a868

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 数据源本地存储已忽略文件
/../../../../../../:\Users\33424\Desktop\jianshenfanggl没有注释\.idea/dataSources/
/dataSources.local.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/

@ -0,0 +1 @@
jianshenfanggl

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="jianshenfanggl" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="jianshenfanggl" options="-parameters" />
</option>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
</component>
</project>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/jianshenfanggl.iml" filepath="$PROJECT_DIR$/jianshenfanggl.iml" />
</modules>
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/gym" vcs="Git" />
</component>
</project>

1
gym

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

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

@ -0,0 +1,187 @@
<?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>

@ -0,0 +1,61 @@
package com.ServletContextListener;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.DictionaryEntity;
import com.service.DictionaryService;
import com.thread.MyThreadMethod;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* ,,
*/
@WebListener
public class DictionaryServletContextListener implements ServletContextListener {
private static final Logger logger = LoggerFactory.getLogger(DictionaryServletContextListener.class);
private MyThreadMethod myThreadMethod;
@Override
public void contextDestroyed(ServletContextEvent sce) {
logger.info("----------服务器停止----------");
}
@Override
public void contextInitialized(ServletContextEvent sce) {
ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());
logger.info("----------字典表初始化开始----------");
DictionaryService dictionaryService = (DictionaryService)appContext.getBean("dictionaryService");
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode());
if(m ==null || m.isEmpty()){
m = new HashMap<>();
}
m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(),m);
}
sce.getServletContext().setAttribute("dictionaryMap", map);
logger.info("----------字典表初始化完成----------");
logger.info("----------线程执行开始----------");
if (myThreadMethod == null) {
myThreadMethod = new MyThreadMethod();
myThreadMethod.start(); // servlet 上下文初始化时启动线程myThreadMethod
}
logger.info("----------线程执行结束----------");
}
}

@ -0,0 +1,15 @@
package com.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface APPLoginUser {
}

@ -0,0 +1,13 @@
package com.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ColumnInfo {
String comment();
String type();
}

@ -0,0 +1,13 @@
package com.annotation;
import java.lang.annotation.*;
/**
* Token
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface IgnoreAuth {
}

@ -0,0 +1,15 @@
package com.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
*
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface LoginUser {
}

@ -0,0 +1,39 @@
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);
}
}

@ -0,0 +1,28 @@
package com.config;
import java.util.Date;
import org.apache.ibatis.reflection.MetaObject;
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
/**
*
*/
public class MyMetaObjectHandler extends MetaObjectHandler {
@Override
public void insertFill(MetaObject metaObject) {
this.setFieldValByName("ctime", new Date(), metaObject);
}
@Override
public boolean openUpdateFill() {
return false;
}
@Override
public void updateFill(MetaObject metaObject) {
// 关闭更新填充、这里不执行
}
}

@ -0,0 +1,24 @@
package com.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
/**
* mybatis-plus
*/
@Configuration
public class MybatisPlusConfig {
/**
*
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}

@ -0,0 +1,685 @@
package com.controller;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSON;
import com.utils.StringUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import com.baidu.aip.util.Base64Util;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.ConfigEntity;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.BaiduUtil;
import com.utils.FileUtil;
import com.utils.R;
/**
*
*/
@RestController
public class CommonController {
private static final Logger logger = LoggerFactory.getLogger(CommonController.class);
@Autowired
private CommonService commonService;
/**
* JavaMySQL
*
* @param mysqlUrl MySQL
* @param hostIP MySQLIP
* @param userName
* @param hostPort
* @param password
* @param savePath
* @param fileName
* @param databaseName
* @return truefalse
*/
@IgnoreAuth
@RequestMapping("/beifen")
public R beifen(String mysqlUrl, String hostIP, String userName, String hostPort, String password, String savePath, String fileName, String databaseName) {
File saveFile = new File(savePath);
if (!saveFile.exists()) {// 如果目录不存在 
saveFile.mkdirs();// 创建文件夹 
}
if (!savePath.endsWith(File.separator)) {
savePath = savePath + File.separator;
}
PrintWriter printWriter = null;
BufferedReader bufferedReader = null;
try {
Runtime runtime = Runtime.getRuntime();
String cmd = mysqlUrl + "mysqldump -h" + hostIP + " -u" + userName + " -P" + hostPort + " -p" + password + " " + databaseName;
runtime.exec(cmd);
Process process = runtime.exec(cmd);
InputStreamReader inputStreamReader = new InputStreamReader(process.getInputStream(), "utf8");
bufferedReader = new BufferedReader(inputStreamReader);
printWriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(savePath + fileName), "utf8"));
String line;
while ((line = bufferedReader.readLine()) != null) {
printWriter.println(line);
}
printWriter.flush();
} catch (Exception e) {
e.printStackTrace();
return R.error("备份数据出错");
} finally {
try {
if (bufferedReader != null) {
bufferedReader.close();
}
if (printWriter != null) {
printWriter.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return R.ok();
}
/**
* JavaMySQL
*
* @param mysqlUrl MySQL
* @param hostIP MySQLIP
* @param userName
* @param hostPort
* @param password
* @param savePath
* @param fileName
* @param databaseName
*/
@IgnoreAuth
@RequestMapping("/huanyuan")
public R huanyuan(String mysqlUrl, String hostIP, String userName, String hostPort, String password, String savePath, String fileName, String databaseName) {
try {
Runtime rt = Runtime.getRuntime();
Process child1 = rt.exec(mysqlUrl+"mysql.exe -h" + hostIP + " -u" + userName + " -P" + hostPort + " -p" + password + " " + databaseName);
OutputStream out = child1.getOutputStream();//控制台的输入信息作为输出流
String inStr;
StringBuffer sb = new StringBuffer("");
String outStr;
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(savePath+"/"+fileName), "utf-8"));
while ((inStr = br.readLine()) != null) {
sb.append(inStr + "\r\n");
}
outStr = sb.toString();
OutputStreamWriter writer = new OutputStreamWriter(out, "utf8");
writer.write(outStr);
// 注这里如果用缓冲方式写入文件的话会导致中文乱码用flush()方法则可以避免
writer.flush();
out.close();
br.close();
writer.close();
} catch (Exception e) {
e.printStackTrace();
return R.error("数据导入出错");
}
return R.ok();
}
/**
*
* @return
*/
@RequestMapping("/pieSum")
public R pieSum(@RequestParam Map<String,Object> params) {
logger.debug("饼状图求和:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.pieSum(params);
return R.ok().put("data", result);
}
/**
*
* @return
*/
@RequestMapping("/pieCount")
public R pieCount(@RequestParam Map<String,Object> params) {
logger.debug("饼状图统计:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.pieCount(params);
return R.ok().put("data", result);
}
/**
*
* @return
*/
@RequestMapping("/barSumOne")
public R barSumOne(@RequestParam Map<String,Object> params) {
logger.debug("柱状图求和单列:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.barSumOne(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
List<String> yAxis0 = new ArrayList<>();
yAxis.add(yAxis0);
legend.add("");
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get("name"));
String value = String.valueOf(map.get("value"));
xAxis.add(oneValue);
yAxis0.add(value);
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
/**
*
* @return
*/
@RequestMapping("/barCountOne")
public R barCountOne(@RequestParam Map<String,Object> params) {
logger.debug("柱状图统计单列:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.barCountOne(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
List<String> yAxis0 = new ArrayList<>();
yAxis.add(yAxis0);
legend.add("");
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get("name"));
String value = String.valueOf(map.get("value"));
xAxis.add(oneValue);
yAxis0.add(value);
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
/**
*
* @return
*/
@RequestMapping("/barSumTwo")
public R barSumTwo(@RequestParam Map<String,Object> params) {
logger.debug("柱状图统计双列:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.barSumTwo(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();
for(Map<String, Object> map :result){
String name1Value = String.valueOf(map.get("name1"));
String name2Value = String.valueOf(map.get("name2"));
String value = String.valueOf(map.get("value"));
if(!legend.contains(name2Value)){
legend.add(name2Value);//添加完成后 就是最全的第二列的类型
}
if(dataMap.containsKey(name1Value)){
dataMap.get(name1Value).put(name2Value,value);
}else{
HashMap<String, String> name1Data = new HashMap<>();
name1Data.put(name2Value,value);
dataMap.put(name1Value,name1Data);
}
}
for(int i =0; i<legend.size(); i++){
yAxis.add(new ArrayList<String>());
}
Set<String> keys = dataMap.keySet();
for(String key:keys){
xAxis.add(key);
HashMap<String, String> map = dataMap.get(key);
for(int i =0; i<legend.size(); i++){
List<String> data = yAxis.get(i);
if(StringUtil.isNotEmpty(map.get(legend.get(i)))){
data.add(map.get(legend.get(i)));
}else{
data.add("0");
}
}
}
System.out.println();
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
/**
*
* @return
*/
@RequestMapping("/barCountTwo")
public R barCountTwo(@RequestParam Map<String,Object> params) {
logger.debug("柱状图统计双列:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.barCountTwo(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();
for(Map<String, Object> map :result){
String name1Value = String.valueOf(map.get("name1"));
String name2Value = String.valueOf(map.get("name2"));
String value = String.valueOf(map.get("value"));
if(!legend.contains(name2Value)){
legend.add(name2Value);//添加完成后 就是最全的第二列的类型
}
if(dataMap.containsKey(name1Value)){
dataMap.get(name1Value).put(name2Value,value);
}else{
HashMap<String, String> name1Data = new HashMap<>();
name1Data.put(name2Value,value);
dataMap.put(name1Value,name1Data);
}
}
for(int i =0; i<legend.size(); i++){
yAxis.add(new ArrayList<String>());
}
Set<String> keys = dataMap.keySet();
for(String key:keys){
xAxis.add(key);
HashMap<String, String> map = dataMap.get(key);
for(int i =0; i<legend.size(); i++){
List<String> data = yAxis.get(i);
if(StringUtil.isNotEmpty(map.get(legend.get(i)))){
data.add(map.get(legend.get(i)));
}else{
data.add("0");
}
}
}
System.out.println();
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
/**
tableName
condition1 1
condition1Value 1
average
Number(res.data.value.toFixed(1))
if(res.data){}
* */
@IgnoreAuth
@RequestMapping("/queryScore")
public R queryScore(@RequestParam Map<String, Object> params) {
logger.debug("queryScore:,,Controller:{},,params:{}",this.getClass().getName(),params);
Map<String, Object> queryScore = commonService.queryScore(params);
return R.ok().put("data", queryScore);
}
/**
*
* tableName
* groupColumn
* @return
*/
@RequestMapping("/newSelectGroupCount")
public R newSelectGroupCount(@RequestParam Map<String,Object> params) {
logger.debug("newSelectGroupCount:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.newSelectGroupCount(params);
return R.ok().put("data", result);
}
/**
*
* tableName
* groupColumn
* sumCloum
* @return
*/
@RequestMapping("/newSelectGroupSum")
public R newSelectGroupSum(@RequestParam Map<String,Object> params) {
logger.debug("newSelectGroupSum:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.newSelectGroupSum(params);
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/barSum")
public R barSum(@RequestParam Map<String,Object> params) {
logger.debug("barSum方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));
Boolean isJoinTableFlag = false;//是否有级联表相关
String one = "";//第一优先
String two = "";//第二优先
//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组
//当前表
Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);
params.put("thisTable",thisTable);
//级联表
String joinTableString = String.valueOf(params.get("joinTable"));
if(StringUtil.isNotEmpty(joinTableString)) {
Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);
params.put("joinTable", joinTable);
isJoinTableFlag = true;
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期
thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));
one = "thisDate0";
}
if(isJoinTableFlag){//级联表日期
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){
joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinDate0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinDate0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串
thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisString0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisString0";
}
}
}
if(isJoinTableFlag){//级联表字符串
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){
joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinString0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinString0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型
thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisTypes0";
}
}
}
if(isJoinTableFlag){//级联表类型
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){
joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinTypes0";
}
}
}
}
List<Map<String, Object>> result = commonService.barSum(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
if(StringUtil.isEmpty(two)){//不包含第二列
List<String> yAxis0 = new ArrayList<>();
yAxis.add(yAxis0);
legend.add("");
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String value = String.valueOf(map.get("value"));
xAxis.add(oneValue);
yAxis0.add(value);
}
}else{//包含第二列
Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();
if(StringUtil.isNotEmpty(two)){
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String twoValue = String.valueOf(map.get(two));
String value = String.valueOf(map.get("value"));
if(!legend.contains(twoValue)){
legend.add(twoValue);//添加完成后 就是最全的第二列的类型
}
if(dataMap.containsKey(oneValue)){
dataMap.get(oneValue).put(twoValue,value);
}else{
HashMap<String, String> oneData = new HashMap<>();
oneData.put(twoValue,value);
dataMap.put(oneValue,oneData);
}
}
}
for(int i =0; i<legend.size(); i++){
yAxis.add(new ArrayList<String>());
}
Set<String> keys = dataMap.keySet();
for(String key:keys){
xAxis.add(key);
HashMap<String, String> map = dataMap.get(key);
for(int i =0; i<legend.size(); i++){
List<String> data = yAxis.get(i);
if(StringUtil.isNotEmpty(map.get(legend.get(i)))){
data.add(map.get(legend.get(i)));
}else{
data.add("0");
}
}
}
System.out.println();
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
/**
*
*/
@RequestMapping("/barCount")
public R barCount(@RequestParam Map<String,Object> params) {
logger.debug("barCount方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));
Boolean isJoinTableFlag = false;//是否有级联表相关
String one = "";//第一优先
String two = "";//第二优先
//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组
//当前表
Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);
params.put("thisTable",thisTable);
//级联表
String joinTableString = String.valueOf(params.get("joinTable"));
if(StringUtil.isNotEmpty(joinTableString)) {
Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);
params.put("joinTable", joinTable);
isJoinTableFlag = true;
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期
thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));
one = "thisDate0";
}
if(isJoinTableFlag){//级联表日期
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){
joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinDate0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinDate0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串
thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisString0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisString0";
}
}
}
if(isJoinTableFlag){//级联表字符串
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){
joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinString0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinString0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型
thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisTypes0";
}
}
}
if(isJoinTableFlag){//级联表类型
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){
joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinTypes0";
}
}
}
}
List<Map<String, Object>> result = commonService.barCount(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
if(StringUtil.isEmpty(two)){//不包含第二列
List<String> yAxis0 = new ArrayList<>();
yAxis.add(yAxis0);
legend.add("");
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String value = String.valueOf(map.get("value"));
xAxis.add(oneValue);
yAxis0.add(value);
}
}else{//包含第二列
Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();
if(StringUtil.isNotEmpty(two)){
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String twoValue = String.valueOf(map.get(two));
String value = String.valueOf(map.get("value"));
if(!legend.contains(twoValue)){
legend.add(twoValue);//添加完成后 就是最全的第二列的类型
}
if(dataMap.containsKey(oneValue)){
dataMap.get(oneValue).put(twoValue,value);
}else{
HashMap<String, String> oneData = new HashMap<>();
oneData.put(twoValue,value);
dataMap.put(oneValue,oneData);
}
}
}
for(int i =0; i<legend.size(); i++){
yAxis.add(new ArrayList<String>());
}
Set<String> keys = dataMap.keySet();
for(String key:keys){
xAxis.add(key);
HashMap<String, String> map = dataMap.get(key);
for(int i =0; i<legend.size(); i++){
List<String> data = yAxis.get(i);
if(StringUtil.isNotEmpty(map.get(legend.get(i)))){
data.add(map.get(legend.get(i)));
}else{
data.add("0");
}
}
}
System.out.println();
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
}

@ -0,0 +1,111 @@
package com.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;
/**
*
*/
@RequestMapping("config")
@RestController
public class ConfigController{
@Autowired
private ConfigService configService;
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* name
*/
@RequestMapping("/info")
public R infoByName(@RequestParam String name){
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
return R.ok().put("data", config);
}
/**
*
*/
@PostMapping("/save")
public R save(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.insert(config);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.updateById(config);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
configService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}

@ -0,0 +1,283 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/dictionary")
public class DictionaryController {
private static final Logger logger = LoggerFactory.getLogger(DictionaryController.class);
private static final String TABLE_NAME = "dictionary";
@Autowired
private DictionaryService dictionaryService;
@Autowired
private TokenService tokenService;
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
@IgnoreAuth
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = dictionaryService.queryPage(params);
//字典表数据转换
List<DictionaryView> list =(List<DictionaryView>)page.getList();
for(DictionaryView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
DictionaryEntity dictionary = dictionaryService.selectById(id);
if(dictionary !=null){
//entity转view
DictionaryView view = new DictionaryView();
BeanUtils.copyProperties( dictionary , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
.eq("dic_code", dictionary.getDicCode())
.eq("index_name", dictionary.getIndexName())
;
if(dictionary.getDicCode().contains("_erji_types")){
queryWrapper.eq("super_id",dictionary.getSuperId());
}
logger.info("sql语句:"+queryWrapper.getSqlSegment());
DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);
if(dictionaryEntity==null){
dictionary.setCreateTime(new Date());
dictionaryService.insert(dictionary);
//字典表新增数据,把数据再重新查出,放入监听器中
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
ServletContext servletContext = request.getServletContext();
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode());
if(m ==null || m.isEmpty()){
m = new HashMap<>();
}
m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(),m);
}
servletContext.setAttribute("dictionaryMap",map);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
DictionaryEntity oldDictionaryEntity = dictionaryService.selectById(dictionary.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
dictionaryService.updateById(dictionary);//根据id更新
//如果字典表修改数据的话,把数据再重新查出,放入监听器中
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
ServletContext servletContext = request.getServletContext();
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode());
if(m ==null || m.isEmpty()){
m = new HashMap<>();
}
m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(),m);
}
servletContext.setAttribute("dictionaryMap",map);
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<DictionaryEntity> oldDictionaryList =dictionaryService.selectBatchIds(Arrays.asList(ids));//要删除的数据
dictionaryService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/maxCodeIndex")
public R maxCodeIndex(@RequestBody DictionaryEntity dictionary){
logger.debug("maxCodeIndex:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
List<String> descs = new ArrayList<>();
descs.add("code_index");
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
.eq("dic_code", dictionary.getDicCode())
.orderDesc(descs);
logger.info("sql语句:"+queryWrapper.getSqlSegment());
List<DictionaryEntity> dictionaryEntityList = dictionaryService.selectList(queryWrapper);
if(dictionaryEntityList.size()>0 ){
return R.ok().put("maxCodeIndex",dictionaryEntityList.get(0).getCodeIndex()+1);
}else{
return R.ok().put("maxCodeIndex",1);
}
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<DictionaryEntity> dictionaryList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
DictionaryEntity dictionaryEntity = new DictionaryEntity();
// dictionaryEntity.setDicCode(data.get(0)); //字段 要改的
// dictionaryEntity.setDicName(data.get(0)); //字段名 要改的
// dictionaryEntity.setCodeIndex(Integer.valueOf(data.get(0))); //编码 要改的
// dictionaryEntity.setIndexName(data.get(0)); //编码名字 要改的
// dictionaryEntity.setSuperId(Integer.valueOf(data.get(0))); //父字段id 要改的
// dictionaryEntity.setBeizhu(data.get(0)); //备注 要改的
// dictionaryEntity.setCreateTime(date);//时间
dictionaryList.add(dictionaryEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
dictionaryService.insertBatch(dictionaryList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

@ -0,0 +1,110 @@
package com.controller;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
/**
*
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
*
*/
@RequestMapping("/upload")
public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
if(!path.exists()) {
path = new File("");
}
File upload = new File(path.getAbsolutePath(),"/upload/");
if(!upload.exists()) {
upload.mkdirs();
}
String fileName = new Date().getTime()+"."+fileExt;
File dest = new File(upload.getAbsolutePath()+"/"+fileName);
file.transferTo(dest);
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
if(configEntity==null) {
configEntity = new ConfigEntity();
configEntity.setName("faceFile");
configEntity.setValue(fileName);
} else {
configEntity.setValue(fileName);
}
configService.insertOrUpdate(configEntity);
}
return R.ok().put("file", fileName);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/download")
public ResponseEntity<byte[]> download(@RequestParam String fileName) {
try {
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
if(!path.exists()) {
path = new File("");
}
File upload = new File(path.getAbsolutePath(),"/upload/");
if(!upload.exists()) {
upload.mkdirs();
}
File file = new File(upload.getAbsolutePath()+"/"+fileName);
if(file.exists()){
/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
getResponse().sendError(403);
}*/
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
headers.setContentDispositionFormData("attachment", fileName);
return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
}
} catch (IOException e) {
e.printStackTrace();
}
return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}

@ -0,0 +1,380 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/forum")
public class ForumController {
private static final Logger logger = LoggerFactory.getLogger(ForumController.class);
private static final String TABLE_NAME = "forum";
@Autowired
private ForumService forumService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = forumService.queryPage(params);
//字典表数据转换
List<ForumView> list =(List<ForumView>)page.getList();
for(ForumView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ForumEntity forum = forumService.selectById(id);
if(forum !=null){
//entity转view
ForumView view = new ForumView();
BeanUtils.copyProperties( forum , view );//把实体数据重构到view中
//级联表 用户
//级联表
YonghuEntity yonghu = yonghuService.selectById(forum.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"
, "jiaolianId"
, "usersId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setYonghuId(yonghu.getId());
}
//级联表 教练
//级联表
JiaolianEntity jiaolian = jiaolianService.selectById(forum.getJiaolianId());
if(jiaolian != null){
BeanUtils.copyProperties( jiaolian , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"
, "jiaolianId"
, "usersId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setJiaolianId(jiaolian.getId());
}
//级联表 管理员
//管理员表做额外的处理
UsersEntity users = usersService.selectById(forum.getUsersId());
if(users != null){
view.setUsersId(users.getId());
view.setUusername(users.getUsername());
view.setUpassword(users.getPassword());
view.setUrole(users.getRole());
view.setUaddtime(users.getAddtime());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody ForumEntity forum, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("用户".equals(role))
forum.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
else if("教练".equals(role))
forum.setJiaolianId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
else if("管理员".equals(role))
forum.setUsersId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
Wrapper<ForumEntity> queryWrapper = new EntityWrapper<ForumEntity>()
.eq("forum_name", forum.getForumName())
.eq("yonghu_id", forum.getYonghuId())
.eq("jiaolian_id", forum.getJiaolianId())
.eq("users_id", forum.getUsersId())
.eq("super_ids", forum.getSuperIds())
.eq("forum_state_types", forum.getForumStateTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ForumEntity forumEntity = forumService.selectOne(queryWrapper);
if(forumEntity==null){
forum.setInsertTime(new Date());
forum.setCreateTime(new Date());
forumService.insert(forum);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody ForumEntity forum, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());
ForumEntity oldForumEntity = forumService.selectById(forum.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("用户".equals(role))
// forum.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
// else if("教练".equals(role))
// forum.setJiaolianId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
// else if("管理员".equals(role))
// forum.setUsersId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
if("".equals(forum.getForumContent()) || "null".equals(forum.getForumContent())){
forum.setForumContent(null);
}
forum.setUpdateTime(new Date());
forumService.updateById(forum);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<ForumEntity> oldForumList =forumService.selectBatchIds(Arrays.asList(ids));//要删除的数据
forumService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<ForumEntity> forumList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
ForumEntity forumEntity = new ForumEntity();
// forumEntity.setForumName(data.get(0)); //帖子标题 要改的
// forumEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的
// forumEntity.setJiaolianId(Integer.valueOf(data.get(0))); //教练 要改的
// forumEntity.setUsersId(Integer.valueOf(data.get(0))); //管理员 要改的
// forumEntity.setForumContent("");//详情和图片
// forumEntity.setSuperIds(Integer.valueOf(data.get(0))); //父id 要改的
// forumEntity.setForumStateTypes(Integer.valueOf(data.get(0))); //帖子状态 要改的
// forumEntity.setInsertTime(date);//时间
// forumEntity.setUpdateTime(sdf.parse(data.get(0))); //修改时间 要改的
// forumEntity.setCreateTime(date);//时间
forumList.add(forumEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
forumService.insertBatch(forumList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = forumService.queryPage(params);
//字典表数据转换
List<ForumView> list =(List<ForumView>)page.getList();
for(ForumView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ForumEntity forum = forumService.selectById(id);
if(forum !=null){
//entity转view
ForumView view = new ForumView();
BeanUtils.copyProperties( forum , view );//把实体数据重构到view中
//级联表
YonghuEntity yonghu = yonghuService.selectById(forum.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"
, "jiaolianId"
, "usersId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//级联表
JiaolianEntity jiaolian = jiaolianService.selectById(forum.getJiaolianId());
if(jiaolian != null){
BeanUtils.copyProperties( jiaolian , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"
, "jiaolianId"
, "usersId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setJiaolianId(jiaolian.getId());
}
UsersEntity users = usersService.selectById(forum.getUsersId());
if(users != null){
view.setUsersId(users.getId());
view.setUusername(users.getUsername());
view.setUpassword(users.getPassword());
view.setUrole(users.getRole());
view.setUaddtime(users.getAddtime());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody ForumEntity forum, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,forum:{}",this.getClass().getName(),forum.toString());
Wrapper<ForumEntity> queryWrapper = new EntityWrapper<ForumEntity>()
.eq("forum_name", forum.getForumName())
.eq("yonghu_id", forum.getYonghuId())
.eq("jiaolian_id", forum.getJiaolianId())
.eq("users_id", forum.getUsersId())
.eq("super_ids", forum.getSuperIds())
.eq("forum_state_types", forum.getForumStateTypes())
// .notIn("forum_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ForumEntity forumEntity = forumService.selectOne(queryWrapper);
if(forumEntity==null){
forum.setInsertTime(new Date());
forum.setCreateTime(new Date());
forumService.insert(forum);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
}

@ -0,0 +1,338 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/jianshenkechengCollection")
public class JianshenkechengCollectionController {
private static final Logger logger = LoggerFactory.getLogger(JianshenkechengCollectionController.class);
private static final String TABLE_NAME = "jianshenkechengCollection";
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = jianshenkechengCollectionService.queryPage(params);
//字典表数据转换
List<JianshenkechengCollectionView> list =(List<JianshenkechengCollectionView>)page.getList();
for(JianshenkechengCollectionView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JianshenkechengCollectionEntity jianshenkechengCollection = jianshenkechengCollectionService.selectById(id);
if(jianshenkechengCollection !=null){
//entity转view
JianshenkechengCollectionView view = new JianshenkechengCollectionView();
BeanUtils.copyProperties( jianshenkechengCollection , view );//把实体数据重构到view中
//级联表 健身课程
//级联表
JianshenkechengEntity jianshenkecheng = jianshenkechengService.selectById(jianshenkechengCollection.getJianshenkechengId());
if(jianshenkecheng != null){
BeanUtils.copyProperties( jianshenkecheng , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setJianshenkechengId(jianshenkecheng.getId());
}
//级联表 用户
//级联表
YonghuEntity yonghu = yonghuService.selectById(jianshenkechengCollection.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("用户".equals(role))
jianshenkechengCollection.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
Wrapper<JianshenkechengCollectionEntity> queryWrapper = new EntityWrapper<JianshenkechengCollectionEntity>()
.eq("jianshenkecheng_id", jianshenkechengCollection.getJianshenkechengId())
.eq("yonghu_id", jianshenkechengCollection.getYonghuId())
.eq("jianshenkecheng_collection_types", jianshenkechengCollection.getJianshenkechengCollectionTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JianshenkechengCollectionEntity jianshenkechengCollectionEntity = jianshenkechengCollectionService.selectOne(queryWrapper);
if(jianshenkechengCollectionEntity==null){
jianshenkechengCollection.setInsertTime(new Date());
jianshenkechengCollection.setCreateTime(new Date());
jianshenkechengCollectionService.insert(jianshenkechengCollection);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString());
JianshenkechengCollectionEntity oldJianshenkechengCollectionEntity = jianshenkechengCollectionService.selectById(jianshenkechengCollection.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("用户".equals(role))
// jianshenkechengCollection.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
jianshenkechengCollectionService.updateById(jianshenkechengCollection);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<JianshenkechengCollectionEntity> oldJianshenkechengCollectionList =jianshenkechengCollectionService.selectBatchIds(Arrays.asList(ids));//要删除的数据
jianshenkechengCollectionService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<JianshenkechengCollectionEntity> jianshenkechengCollectionList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
JianshenkechengCollectionEntity jianshenkechengCollectionEntity = new JianshenkechengCollectionEntity();
// jianshenkechengCollectionEntity.setJianshenkechengId(Integer.valueOf(data.get(0))); //健身课程 要改的
// jianshenkechengCollectionEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的
// jianshenkechengCollectionEntity.setJianshenkechengCollectionTypes(Integer.valueOf(data.get(0))); //类型 要改的
// jianshenkechengCollectionEntity.setInsertTime(date);//时间
// jianshenkechengCollectionEntity.setCreateTime(date);//时间
jianshenkechengCollectionList.add(jianshenkechengCollectionEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
jianshenkechengCollectionService.insertBatch(jianshenkechengCollectionList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = jianshenkechengCollectionService.queryPage(params);
//字典表数据转换
List<JianshenkechengCollectionView> list =(List<JianshenkechengCollectionView>)page.getList();
for(JianshenkechengCollectionView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JianshenkechengCollectionEntity jianshenkechengCollection = jianshenkechengCollectionService.selectById(id);
if(jianshenkechengCollection !=null){
//entity转view
JianshenkechengCollectionView view = new JianshenkechengCollectionView();
BeanUtils.copyProperties( jianshenkechengCollection , view );//把实体数据重构到view中
//级联表
JianshenkechengEntity jianshenkecheng = jianshenkechengService.selectById(jianshenkechengCollection.getJianshenkechengId());
if(jianshenkecheng != null){
BeanUtils.copyProperties( jianshenkecheng , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setJianshenkechengId(jianshenkecheng.getId());
}
//级联表
YonghuEntity yonghu = yonghuService.selectById(jianshenkechengCollection.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody JianshenkechengCollectionEntity jianshenkechengCollection, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jianshenkechengCollection:{}",this.getClass().getName(),jianshenkechengCollection.toString());
Wrapper<JianshenkechengCollectionEntity> queryWrapper = new EntityWrapper<JianshenkechengCollectionEntity>()
.eq("jianshenkecheng_id", jianshenkechengCollection.getJianshenkechengId())
.eq("yonghu_id", jianshenkechengCollection.getYonghuId())
.eq("jianshenkecheng_collection_types", jianshenkechengCollection.getJianshenkechengCollectionTypes())
// .notIn("jianshenkecheng_collection_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JianshenkechengCollectionEntity jianshenkechengCollectionEntity = jianshenkechengCollectionService.selectOne(queryWrapper);
if(jianshenkechengCollectionEntity==null){
jianshenkechengCollection.setInsertTime(new Date());
jianshenkechengCollection.setCreateTime(new Date());
jianshenkechengCollectionService.insert(jianshenkechengCollection);
return R.ok();
}else {
return R.error(511,"您已经收藏过了");
}
}
}

@ -0,0 +1,435 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/jianshenkecheng")
public class JianshenkechengController {
private static final Logger logger = LoggerFactory.getLogger(JianshenkechengController.class);
private static final String TABLE_NAME = "jianshenkecheng";
@Autowired
private JianshenkechengService jianshenkechengService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
params.put("dataDeleteStart",1);params.put("dataDeleteEnd",1);
CommonUtil.checkMap(params);
PageUtils page = jianshenkechengService.queryPage(params);
//字典表数据转换
List<JianshenkechengView> list =(List<JianshenkechengView>)page.getList();
for(JianshenkechengView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JianshenkechengEntity jianshenkecheng = jianshenkechengService.selectById(id);
if(jianshenkecheng !=null){
//entity转view
JianshenkechengView view = new JianshenkechengView();
BeanUtils.copyProperties( jianshenkecheng , view );//把实体数据重构到view中
//级联表 教练
//级联表
JiaolianEntity jiaolian = jiaolianService.selectById(jianshenkecheng.getJiaolianId());
if(jiaolian != null){
BeanUtils.copyProperties( jiaolian , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "jiaolianId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setJiaolianId(jiaolian.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("教练".equals(role))
jianshenkecheng.setJiaolianId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
Wrapper<JianshenkechengEntity> queryWrapper = new EntityWrapper<JianshenkechengEntity>()
.eq("jiaolian_id", jianshenkecheng.getJiaolianId())
.eq("jianshenkecheng_name", jianshenkecheng.getJianshenkechengName())
.eq("jianshenkecheng_video", jianshenkecheng.getJianshenkechengVideo())
.eq("zan_number", jianshenkecheng.getZanNumber())
.eq("cai_number", jianshenkecheng.getCaiNumber())
.eq("jianshenkecheng_types", jianshenkecheng.getJianshenkechengTypes())
.eq("data_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JianshenkechengEntity jianshenkechengEntity = jianshenkechengService.selectOne(queryWrapper);
if(jianshenkechengEntity==null){
jianshenkecheng.setZanNumber(1);
jianshenkecheng.setCaiNumber(1);
jianshenkecheng.setJianshenkechengClicknum(1);
jianshenkecheng.setDataDelete(1);
jianshenkecheng.setInsertTime(new Date());
jianshenkecheng.setCreateTime(new Date());
jianshenkechengService.insert(jianshenkecheng);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString());
JianshenkechengEntity oldJianshenkechengEntity = jianshenkechengService.selectById(jianshenkecheng.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("教练".equals(role))
// jianshenkecheng.setJiaolianId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
if("".equals(jianshenkecheng.getJianshenkechengPhoto()) || "null".equals(jianshenkecheng.getJianshenkechengPhoto())){
jianshenkecheng.setJianshenkechengPhoto(null);
}
if("".equals(jianshenkecheng.getJianshenkechengVideo()) || "null".equals(jianshenkecheng.getJianshenkechengVideo())){
jianshenkecheng.setJianshenkechengVideo(null);
}
if("".equals(jianshenkecheng.getJianshenkechengContent()) || "null".equals(jianshenkecheng.getJianshenkechengContent())){
jianshenkecheng.setJianshenkechengContent(null);
}
jianshenkechengService.updateById(jianshenkecheng);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<JianshenkechengEntity> oldJianshenkechengList =jianshenkechengService.selectBatchIds(Arrays.asList(ids));//要删除的数据
ArrayList<JianshenkechengEntity> list = new ArrayList<>();
for(Integer id:ids){
JianshenkechengEntity jianshenkechengEntity = new JianshenkechengEntity();
jianshenkechengEntity.setId(id);
jianshenkechengEntity.setDataDelete(2);
list.add(jianshenkechengEntity);
}
if(list != null && list.size() >0){
jianshenkechengService.updateBatchById(list);
}
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<JianshenkechengEntity> jianshenkechengList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
JianshenkechengEntity jianshenkechengEntity = new JianshenkechengEntity();
// jianshenkechengEntity.setJiaolianId(Integer.valueOf(data.get(0))); //教练 要改的
// jianshenkechengEntity.setJianshenkechengName(data.get(0)); //健身课程名称 要改的
// jianshenkechengEntity.setJianshenkechengPhoto("");//详情和图片
// jianshenkechengEntity.setJianshenkechengVideo(data.get(0)); //课程视频 要改的
// jianshenkechengEntity.setZanNumber(Integer.valueOf(data.get(0))); //赞 要改的
// jianshenkechengEntity.setCaiNumber(Integer.valueOf(data.get(0))); //踩 要改的
// jianshenkechengEntity.setJianshenkechengTypes(Integer.valueOf(data.get(0))); //健身课程类型 要改的
// jianshenkechengEntity.setJianshenkechengClicknum(Integer.valueOf(data.get(0))); //健身课程热度 要改的
// jianshenkechengEntity.setJianshenkechengContent("");//详情和图片
// jianshenkechengEntity.setDataDelete(1);//逻辑删除字段
// jianshenkechengEntity.setInsertTime(date);//时间
// jianshenkechengEntity.setCreateTime(date);//时间
jianshenkechengList.add(jianshenkechengEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
jianshenkechengService.insertBatch(jianshenkechengList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/gexingtuijian")
public R gexingtuijian(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("gexingtuijian方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
List<JianshenkechengView> returnJianshenkechengViewList = new ArrayList<>();
//查看收藏
Map<String, Object> params1 = new HashMap<>(params);params1.put("sort","id");params1.put("yonghuId",request.getSession().getAttribute("userId"));
params1.put("shangxiaTypes",1);
params1.put("jianshenkechengYesnoTypes",2);
PageUtils pageUtils = jianshenkechengCollectionService.queryPage(params1);
List<JianshenkechengCollectionView> collectionViewsList =(List<JianshenkechengCollectionView>)pageUtils.getList();
Map<Integer,Integer> typeMap=new HashMap<>();//购买的类型list
for(JianshenkechengCollectionView collectionView:collectionViewsList){
Integer jianshenkechengTypes = collectionView.getJianshenkechengTypes();
if(typeMap.containsKey(jianshenkechengTypes)){
typeMap.put(jianshenkechengTypes,typeMap.get(jianshenkechengTypes)+1);
}else{
typeMap.put(jianshenkechengTypes,1);
}
}
List<Integer> typeList = new ArrayList<>();//排序后的有序的类型 按最多到最少
typeMap.entrySet().stream().sorted((o1, o2) -> o2.getValue() - o1.getValue()).forEach(e -> typeList.add(e.getKey()));//排序
Integer limit = Integer.valueOf(String.valueOf(params.get("limit")));
for(Integer type:typeList){
Map<String, Object> params2 = new HashMap<>(params);params2.put("jianshenkechengTypes",type);
params2.put("shangxiaTypes",1);
params2.put("jianshenkechengYesnoTypes",2);
PageUtils pageUtils1 = jianshenkechengService.queryPage(params2);
List<JianshenkechengView> jianshenkechengViewList =(List<JianshenkechengView>)pageUtils1.getList();
returnJianshenkechengViewList.addAll(jianshenkechengViewList);
if(returnJianshenkechengViewList.size()>= limit) break;//返回的推荐数量大于要的数量 跳出循环
}
params.put("shangxiaTypes",1);
params.put("jianshenkechengYesnoTypes",2);
//正常查询出来商品,用于补全推荐缺少的数据
PageUtils page = jianshenkechengService.queryPage(params);
if(returnJianshenkechengViewList.size()<limit){//返回数量还是小于要求数量
int toAddNum = limit - returnJianshenkechengViewList.size();//要添加的数量
List<JianshenkechengView> jianshenkechengViewList =(List<JianshenkechengView>)page.getList();
for(JianshenkechengView jianshenkechengView:jianshenkechengViewList){
Boolean addFlag = true;
for(JianshenkechengView returnJianshenkechengView:returnJianshenkechengViewList){
if(returnJianshenkechengView.getId().intValue() ==jianshenkechengView.getId().intValue()) addFlag=false;//返回的数据中已存在此商品
}
if(addFlag){
toAddNum=toAddNum-1;
returnJianshenkechengViewList.add(jianshenkechengView);
if(toAddNum==0) break;//够数量了
}
}
}else {
returnJianshenkechengViewList = returnJianshenkechengViewList.subList(0, limit);
}
for(JianshenkechengView c:returnJianshenkechengViewList)
dictionaryService.dictionaryConvert(c, request);
page.setList(returnJianshenkechengViewList);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = jianshenkechengService.queryPage(params);
//字典表数据转换
List<JianshenkechengView> list =(List<JianshenkechengView>)page.getList();
for(JianshenkechengView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JianshenkechengEntity jianshenkecheng = jianshenkechengService.selectById(id);
if(jianshenkecheng !=null){
//点击数量加1
jianshenkecheng.setJianshenkechengClicknum(jianshenkecheng.getJianshenkechengClicknum()+1);
jianshenkechengService.updateById(jianshenkecheng);
//entity转view
JianshenkechengView view = new JianshenkechengView();
BeanUtils.copyProperties( jianshenkecheng , view );//把实体数据重构到view中
//级联表
JiaolianEntity jiaolian = jiaolianService.selectById(jianshenkecheng.getJiaolianId());
if(jiaolian != null){
BeanUtils.copyProperties( jiaolian , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "jiaolianId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setJiaolianId(jiaolian.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody JianshenkechengEntity jianshenkecheng, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jianshenkecheng:{}",this.getClass().getName(),jianshenkecheng.toString());
Wrapper<JianshenkechengEntity> queryWrapper = new EntityWrapper<JianshenkechengEntity>()
.eq("jiaolian_id", jianshenkecheng.getJiaolianId())
.eq("jianshenkecheng_name", jianshenkecheng.getJianshenkechengName())
.eq("jianshenkecheng_video", jianshenkecheng.getJianshenkechengVideo())
.eq("zan_number", jianshenkecheng.getZanNumber())
.eq("cai_number", jianshenkecheng.getCaiNumber())
.eq("jianshenkecheng_types", jianshenkecheng.getJianshenkechengTypes())
.eq("jianshenkecheng_clicknum", jianshenkecheng.getJianshenkechengClicknum())
.eq("data_delete", jianshenkecheng.getDataDelete())
// .notIn("jianshenkecheng_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JianshenkechengEntity jianshenkechengEntity = jianshenkechengService.selectOne(queryWrapper);
if(jianshenkechengEntity==null){
jianshenkecheng.setZanNumber(1);
jianshenkecheng.setCaiNumber(1);
jianshenkecheng.setJianshenkechengClicknum(1);
jianshenkecheng.setDataDelete(1);
jianshenkecheng.setInsertTime(new Date());
jianshenkecheng.setCreateTime(new Date());
jianshenkechengService.insert(jianshenkecheng);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
}

@ -0,0 +1,324 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/jianshenkechengLiuyan")
public class JianshenkechengLiuyanController {
private static final Logger logger = LoggerFactory.getLogger(JianshenkechengLiuyanController.class);
private static final String TABLE_NAME = "jianshenkechengLiuyan";
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = jianshenkechengLiuyanService.queryPage(params);
//字典表数据转换
List<JianshenkechengLiuyanView> list =(List<JianshenkechengLiuyanView>)page.getList();
for(JianshenkechengLiuyanView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JianshenkechengLiuyanEntity jianshenkechengLiuyan = jianshenkechengLiuyanService.selectById(id);
if(jianshenkechengLiuyan !=null){
//entity转view
JianshenkechengLiuyanView view = new JianshenkechengLiuyanView();
BeanUtils.copyProperties( jianshenkechengLiuyan , view );//把实体数据重构到view中
//级联表 健身课程
//级联表
JianshenkechengEntity jianshenkecheng = jianshenkechengService.selectById(jianshenkechengLiuyan.getJianshenkechengId());
if(jianshenkecheng != null){
BeanUtils.copyProperties( jianshenkecheng , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setJianshenkechengId(jianshenkecheng.getId());
}
//级联表 用户
//级联表
YonghuEntity yonghu = yonghuService.selectById(jianshenkechengLiuyan.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("用户".equals(role))
jianshenkechengLiuyan.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
jianshenkechengLiuyan.setCreateTime(new Date());
jianshenkechengLiuyan.setInsertTime(new Date());
jianshenkechengLiuyanService.insert(jianshenkechengLiuyan);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString());
JianshenkechengLiuyanEntity oldJianshenkechengLiuyanEntity = jianshenkechengLiuyanService.selectById(jianshenkechengLiuyan.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("用户".equals(role))
// jianshenkechengLiuyan.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
if("".equals(jianshenkechengLiuyan.getJianshenkechengLiuyanText()) || "null".equals(jianshenkechengLiuyan.getJianshenkechengLiuyanText())){
jianshenkechengLiuyan.setJianshenkechengLiuyanText(null);
}
if("".equals(jianshenkechengLiuyan.getReplyText()) || "null".equals(jianshenkechengLiuyan.getReplyText())){
jianshenkechengLiuyan.setReplyText(null);
}
jianshenkechengLiuyan.setUpdateTime(new Date());
jianshenkechengLiuyanService.updateById(jianshenkechengLiuyan);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<JianshenkechengLiuyanEntity> oldJianshenkechengLiuyanList =jianshenkechengLiuyanService.selectBatchIds(Arrays.asList(ids));//要删除的数据
jianshenkechengLiuyanService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<JianshenkechengLiuyanEntity> jianshenkechengLiuyanList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
JianshenkechengLiuyanEntity jianshenkechengLiuyanEntity = new JianshenkechengLiuyanEntity();
// jianshenkechengLiuyanEntity.setJianshenkechengId(Integer.valueOf(data.get(0))); //健身课程 要改的
// jianshenkechengLiuyanEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的
// jianshenkechengLiuyanEntity.setJianshenkechengLiuyanText(data.get(0)); //留言内容 要改的
// jianshenkechengLiuyanEntity.setInsertTime(date);//时间
// jianshenkechengLiuyanEntity.setReplyText(data.get(0)); //回复内容 要改的
// jianshenkechengLiuyanEntity.setUpdateTime(sdf.parse(data.get(0))); //回复时间 要改的
// jianshenkechengLiuyanEntity.setCreateTime(date);//时间
jianshenkechengLiuyanList.add(jianshenkechengLiuyanEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
jianshenkechengLiuyanService.insertBatch(jianshenkechengLiuyanList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = jianshenkechengLiuyanService.queryPage(params);
//字典表数据转换
List<JianshenkechengLiuyanView> list =(List<JianshenkechengLiuyanView>)page.getList();
for(JianshenkechengLiuyanView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JianshenkechengLiuyanEntity jianshenkechengLiuyan = jianshenkechengLiuyanService.selectById(id);
if(jianshenkechengLiuyan !=null){
//entity转view
JianshenkechengLiuyanView view = new JianshenkechengLiuyanView();
BeanUtils.copyProperties( jianshenkechengLiuyan , view );//把实体数据重构到view中
//级联表
JianshenkechengEntity jianshenkecheng = jianshenkechengService.selectById(jianshenkechengLiuyan.getJianshenkechengId());
if(jianshenkecheng != null){
BeanUtils.copyProperties( jianshenkecheng , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setJianshenkechengId(jianshenkecheng.getId());
}
//级联表
YonghuEntity yonghu = yonghuService.selectById(jianshenkechengLiuyan.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody JianshenkechengLiuyanEntity jianshenkechengLiuyan, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jianshenkechengLiuyan:{}",this.getClass().getName(),jianshenkechengLiuyan.toString());
jianshenkechengLiuyan.setCreateTime(new Date());
jianshenkechengLiuyan.setInsertTime(new Date());
jianshenkechengLiuyanService.insert(jianshenkechengLiuyan);
return R.ok();
}
}

@ -0,0 +1,498 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/jiaolian")
public class JiaolianController {
private static final Logger logger = LoggerFactory.getLogger(JiaolianController.class);
private static final String TABLE_NAME = "jiaolian";
@Autowired
private JiaolianService jiaolianService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
params.put("dataDeleteStart",1);params.put("dataDeleteEnd",1);
CommonUtil.checkMap(params);
PageUtils page = jiaolianService.queryPage(params);
//字典表数据转换
List<JiaolianView> list =(List<JiaolianView>)page.getList();
for(JiaolianView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JiaolianEntity jiaolian = jiaolianService.selectById(id);
if(jiaolian !=null){
//entity转view
JiaolianView view = new JiaolianView();
BeanUtils.copyProperties( jiaolian , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jiaolian:{}",this.getClass().getName(),jiaolian.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>()
.eq("username", jiaolian.getUsername())
.or()
.eq("jiaolian_phone", jiaolian.getJiaolianPhone())
.eq("data_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper);
if(jiaolianEntity==null){
jiaolian.setDataDelete(1);
jiaolian.setInsertTime(new Date());
jiaolian.setCreateTime(new Date());
jiaolian.setPassword("123456");
jiaolianService.insert(jiaolian);
return R.ok();
}else {
return R.error(511,"账户或者教练手机号已经被使用");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jiaolian:{}",this.getClass().getName(),jiaolian.toString());
JiaolianEntity oldJiaolianEntity = jiaolianService.selectById(jiaolian.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
if("".equals(jiaolian.getJiaolianPhoto()) || "null".equals(jiaolian.getJiaolianPhoto())){
jiaolian.setJiaolianPhoto(null);
}
if("".equals(jiaolian.getJiaolianContent()) || "null".equals(jiaolian.getJiaolianContent())){
jiaolian.setJiaolianContent(null);
}
jiaolianService.updateById(jiaolian);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<JiaolianEntity> oldJiaolianList =jiaolianService.selectBatchIds(Arrays.asList(ids));//要删除的数据
ArrayList<JiaolianEntity> list = new ArrayList<>();
for(Integer id:ids){
JiaolianEntity jiaolianEntity = new JiaolianEntity();
jiaolianEntity.setId(id);
jiaolianEntity.setDataDelete(2);
list.add(jiaolianEntity);
}
if(list != null && list.size() >0){
jiaolianService.updateBatchById(list);
}
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<JiaolianEntity> jiaolianList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
JiaolianEntity jiaolianEntity = new JiaolianEntity();
// jiaolianEntity.setUsername(data.get(0)); //账户 要改的
// jiaolianEntity.setPassword("123456");//密码
// jiaolianEntity.setJiaolianName(data.get(0)); //教练名称 要改的
// jiaolianEntity.setJiaolianPhone(data.get(0)); //教练手机号 要改的
// jiaolianEntity.setJiaolianPhoto("");//详情和图片
// jiaolianEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的
// jiaolianEntity.setJiaolianEmail(data.get(0)); //教练邮箱 要改的
// jiaolianEntity.setJiaolianContent("");//详情和图片
// jiaolianEntity.setDataDelete(1);//逻辑删除字段
// jiaolianEntity.setInsertTime(date);//时间
// jiaolianEntity.setCreateTime(date);//时间
jiaolianList.add(jiaolianEntity);
//把要查询是否重复的字段放入map中
//账户
if(seachFields.containsKey("username")){
List<String> username = seachFields.get("username");
username.add(data.get(0));//要改的
}else{
List<String> username = new ArrayList<>();
username.add(data.get(0));//要改的
seachFields.put("username",username);
}
//教练手机号
if(seachFields.containsKey("jiaolianPhone")){
List<String> jiaolianPhone = seachFields.get("jiaolianPhone");
jiaolianPhone.add(data.get(0));//要改的
}else{
List<String> jiaolianPhone = new ArrayList<>();
jiaolianPhone.add(data.get(0));//要改的
seachFields.put("jiaolianPhone",jiaolianPhone);
}
}
//查询是否重复
//账户
List<JiaolianEntity> jiaolianEntities_username = jiaolianService.selectList(new EntityWrapper<JiaolianEntity>().in("username", seachFields.get("username")).eq("data_delete", 1));
if(jiaolianEntities_username.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(JiaolianEntity s:jiaolianEntities_username){
repeatFields.add(s.getUsername());
}
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));
if(jiaolianEntities_jiaolianPhone.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(JiaolianEntity s:jiaolianEntities_jiaolianPhone){
repeatFields.add(s.getJiaolianPhone());
}
return R.error(511,"数据库的该表中的 [教练手机号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
jiaolianService.insertBatch(jiaolianList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
JiaolianEntity jiaolian = jiaolianService.selectOne(new EntityWrapper<JiaolianEntity>().eq("username", username));
if(jiaolian==null || !jiaolian.getPassword().equals(password))
return R.error("账号或密码不正确");
else if(jiaolian.getDataDelete() != 1)
return R.error("账户已被删除");
String token = tokenService.generateToken(jiaolian.getId(),username, "jiaolian", "教练");
R r = R.ok();
r.put("token", token);
r.put("role","教练");
r.put("username",jiaolian.getJiaolianName());
r.put("tableName","jiaolian");
r.put("userId",jiaolian.getId());
return r;
}
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request) {
// ValidatorUtils.validateEntity(user);
Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>()
.eq("username", jiaolian.getUsername())
.or()
.eq("jiaolian_phone", jiaolian.getJiaolianPhone())
.andNew()
.eq("data_delete", 1)
;
JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper);
if(jiaolianEntity != null)
return R.error("账户或者教练手机号已经被使用");
jiaolian.setDataDelete(1);
jiaolian.setInsertTime(new Date());
jiaolian.setCreateTime(new Date());
jiaolianService.insert(jiaolian);
return R.ok();
}
/**
*
*/
@GetMapping(value = "/resetPassword")
public R resetPassword(Integer id, HttpServletRequest request) {
JiaolianEntity jiaolian = jiaolianService.selectById(id);
jiaolian.setPassword("123456");
jiaolianService.updateById(jiaolian);
return R.ok();
}
/**
*
*/
@GetMapping(value = "/updatePassword")
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
JiaolianEntity jiaolian = jiaolianService.selectById((Integer)request.getSession().getAttribute("userId"));
if(newPassword == null){
return R.error("新密码不能为空") ;
}
if(!oldPassword.equals(jiaolian.getPassword())){
return R.error("原密码输入错误");
}
if(newPassword.equals(jiaolian.getPassword())){
return R.error("新密码不能和原密码一致") ;
}
jiaolian.setPassword(newPassword);
jiaolianService.updateById(jiaolian);
return R.ok();
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request) {
JiaolianEntity jiaolian = jiaolianService.selectOne(new EntityWrapper<JiaolianEntity>().eq("username", username));
if(jiaolian!=null){
jiaolian.setPassword("123456");
jiaolianService.updateById(jiaolian);
return R.ok();
}else{
return R.error("账号不存在");
}
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrJiaolian(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
JiaolianEntity jiaolian = jiaolianService.selectById(id);
if(jiaolian !=null){
//entity转view
JiaolianView view = new JiaolianView();
BeanUtils.copyProperties( jiaolian , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 退
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = jiaolianService.queryPage(params);
//字典表数据转换
List<JiaolianView> list =(List<JiaolianView>)page.getList();
for(JiaolianView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JiaolianEntity jiaolian = jiaolianService.selectById(id);
if(jiaolian !=null){
//entity转view
JiaolianView view = new JiaolianView();
BeanUtils.copyProperties( jiaolian , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody JiaolianEntity jiaolian, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jiaolian:{}",this.getClass().getName(),jiaolian.toString());
Wrapper<JiaolianEntity> queryWrapper = new EntityWrapper<JiaolianEntity>()
.eq("username", jiaolian.getUsername())
.or()
.eq("jiaolian_phone", jiaolian.getJiaolianPhone())
.andNew()
.eq("data_delete", 1)
// .notIn("jiaolian_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JiaolianEntity jiaolianEntity = jiaolianService.selectOne(queryWrapper);
if(jiaolianEntity==null){
jiaolian.setDataDelete(1);
jiaolian.setInsertTime(new Date());
jiaolian.setCreateTime(new Date());
jiaolian.setPassword("123456");
jiaolianService.insert(jiaolian);
return R.ok();
}else {
return R.error(511,"账户或者教练手机号已经被使用");
}
}
}

@ -0,0 +1,383 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/jiaolianYuyue")
public class JiaolianYuyueController {
private static final Logger logger = LoggerFactory.getLogger(JiaolianYuyueController.class);
private static final String TABLE_NAME = "jiaolianYuyue";
@Autowired
private JiaolianYuyueService jiaolianYuyueService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = jiaolianYuyueService.queryPage(params);
//字典表数据转换
List<JiaolianYuyueView> list =(List<JiaolianYuyueView>)page.getList();
for(JiaolianYuyueView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JiaolianYuyueEntity jiaolianYuyue = jiaolianYuyueService.selectById(id);
if(jiaolianYuyue !=null){
//entity转view
JiaolianYuyueView view = new JiaolianYuyueView();
BeanUtils.copyProperties( jiaolianYuyue , view );//把实体数据重构到view中
//级联表 用户
//级联表
YonghuEntity yonghu = yonghuService.selectById(jiaolianYuyue.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("用户".equals(role))
jiaolianYuyue.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
Wrapper<JiaolianYuyueEntity> queryWrapper = new EntityWrapper<JiaolianYuyueEntity>()
.eq("yonghu_id", jiaolianYuyue.getYonghuId())
.in("jiaolian_yuyue_yesno_types", new Integer[]{1,2})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JiaolianYuyueEntity jiaolianYuyueEntity = jiaolianYuyueService.selectOne(queryWrapper);
if(jiaolianYuyueEntity==null){
jiaolianYuyue.setJiaolianYuyueYesnoTypes(1);
jiaolianYuyue.setInsertTime(new Date());
jiaolianYuyue.setCreateTime(new Date());
jiaolianYuyueService.insert(jiaolianYuyue);
return R.ok();
}else {
if(jiaolianYuyueEntity.getJiaolianYuyueYesnoTypes()==1)
return R.error(511,"有相同的待审核的数据");
else if(jiaolianYuyueEntity.getJiaolianYuyueYesnoTypes()==2)
return R.error(511,"有相同的审核通过的数据");
else
return R.error(511,"表中有相同数据");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString());
JiaolianYuyueEntity oldJiaolianYuyueEntity = jiaolianYuyueService.selectById(jiaolianYuyue.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("用户".equals(role))
// jiaolianYuyue.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
if("".equals(jiaolianYuyue.getJiaolianYuyueText()) || "null".equals(jiaolianYuyue.getJiaolianYuyueText())){
jiaolianYuyue.setJiaolianYuyueText(null);
}
if("".equals(jiaolianYuyue.getJiaolianYuyueYesnoText()) || "null".equals(jiaolianYuyue.getJiaolianYuyueYesnoText())){
jiaolianYuyue.setJiaolianYuyueYesnoText(null);
}
jiaolianYuyueService.updateById(jiaolianYuyue);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/shenhe")
public R shenhe(@RequestBody JiaolianYuyueEntity jiaolianYuyueEntity, HttpServletRequest request){
logger.debug("shenhe方法:,,Controller:{},,jiaolianYuyueEntity:{}",this.getClass().getName(),jiaolianYuyueEntity.toString());
JiaolianYuyueEntity oldJiaolianYuyue = jiaolianYuyueService.selectById(jiaolianYuyueEntity.getId());//查询原先数据
// if(jiaolianYuyueEntity.getJiaolianYuyueYesnoTypes() == 2){//通过
// jiaolianYuyueEntity.setJiaolianYuyueTypes();
// }else if(jiaolianYuyueEntity.getJiaolianYuyueYesnoTypes() == 3){//拒绝
// jiaolianYuyueEntity.setJiaolianYuyueTypes();
// }
jiaolianYuyueService.updateById(jiaolianYuyueEntity);//审核
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<JiaolianYuyueEntity> oldJiaolianYuyueList =jiaolianYuyueService.selectBatchIds(Arrays.asList(ids));//要删除的数据
jiaolianYuyueService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<JiaolianYuyueEntity> jiaolianYuyueList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
JiaolianYuyueEntity jiaolianYuyueEntity = new JiaolianYuyueEntity();
// jiaolianYuyueEntity.setJiaolianYuyueUuidNumber(data.get(0)); //预约编号 要改的
// jiaolianYuyueEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的
// jiaolianYuyueEntity.setJiaolianYuyueText(data.get(0)); //预约备注 要改的
// jiaolianYuyueEntity.setJiaolianYuyueTime(sdf.parse(data.get(0))); //预约时间 要改的
// jiaolianYuyueEntity.setJiaolianYuyueYesnoTypes(Integer.valueOf(data.get(0))); //预约状态 要改的
// jiaolianYuyueEntity.setJiaolianYuyueYesnoText(data.get(0)); //审核回复 要改的
// jiaolianYuyueEntity.setInsertTime(date);//时间
// jiaolianYuyueEntity.setCreateTime(date);//时间
jiaolianYuyueList.add(jiaolianYuyueEntity);
//把要查询是否重复的字段放入map中
//预约编号
if(seachFields.containsKey("jiaolianYuyueUuidNumber")){
List<String> jiaolianYuyueUuidNumber = seachFields.get("jiaolianYuyueUuidNumber");
jiaolianYuyueUuidNumber.add(data.get(0));//要改的
}else{
List<String> jiaolianYuyueUuidNumber = new ArrayList<>();
jiaolianYuyueUuidNumber.add(data.get(0));//要改的
seachFields.put("jiaolianYuyueUuidNumber",jiaolianYuyueUuidNumber);
}
}
//查询是否重复
//预约编号
List<JiaolianYuyueEntity> jiaolianYuyueEntities_jiaolianYuyueUuidNumber = jiaolianYuyueService.selectList(new EntityWrapper<JiaolianYuyueEntity>().in("jiaolian_yuyue_uuid_number", seachFields.get("jiaolianYuyueUuidNumber")));
if(jiaolianYuyueEntities_jiaolianYuyueUuidNumber.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(JiaolianYuyueEntity s:jiaolianYuyueEntities_jiaolianYuyueUuidNumber){
repeatFields.add(s.getJiaolianYuyueUuidNumber());
}
return R.error(511,"数据库的该表中的 [预约编号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
jiaolianYuyueService.insertBatch(jiaolianYuyueList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = jiaolianYuyueService.queryPage(params);
//字典表数据转换
List<JiaolianYuyueView> list =(List<JiaolianYuyueView>)page.getList();
for(JiaolianYuyueView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
JiaolianYuyueEntity jiaolianYuyue = jiaolianYuyueService.selectById(id);
if(jiaolianYuyue !=null){
//entity转view
JiaolianYuyueView view = new JiaolianYuyueView();
BeanUtils.copyProperties( jiaolianYuyue , view );//把实体数据重构到view中
//级联表
YonghuEntity yonghu = yonghuService.selectById(jiaolianYuyue.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "username", "password", "newMoney", "yonghuId"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody JiaolianYuyueEntity jiaolianYuyue, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,jiaolianYuyue:{}",this.getClass().getName(),jiaolianYuyue.toString());
Wrapper<JiaolianYuyueEntity> queryWrapper = new EntityWrapper<JiaolianYuyueEntity>()
.eq("jiaolian_yuyue_uuid_number", jiaolianYuyue.getJiaolianYuyueUuidNumber())
.eq("yonghu_id", jiaolianYuyue.getYonghuId())
.eq("jiaolian_yuyue_text", jiaolianYuyue.getJiaolianYuyueText())
.in("jiaolian_yuyue_yesno_types", new Integer[]{1,2})
.eq("jiaolian_yuyue_yesno_text", jiaolianYuyue.getJiaolianYuyueYesnoText())
// .notIn("jiaolian_yuyue_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
JiaolianYuyueEntity jiaolianYuyueEntity = jiaolianYuyueService.selectOne(queryWrapper);
if(jiaolianYuyueEntity==null){
jiaolianYuyue.setJiaolianYuyueYesnoTypes(1);
jiaolianYuyue.setInsertTime(new Date());
jiaolianYuyue.setCreateTime(new Date());
jiaolianYuyueService.insert(jiaolianYuyue);
return R.ok();
}else {
if(jiaolianYuyueEntity.getJiaolianYuyueYesnoTypes()==1)
return R.error(511,"有相同的待审核的数据");
else if(jiaolianYuyueEntity.getJiaolianYuyueYesnoTypes()==2)
return R.error(511,"有相同的审核通过的数据");
else
return R.error(511,"表中有相同数据");
}
}
}

@ -0,0 +1,313 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/news")
public class NewsController {
private static final Logger logger = LoggerFactory.getLogger(NewsController.class);
private static final String TABLE_NAME = "news";
@Autowired
private NewsService newsService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = newsService.queryPage(params);
//字典表数据转换
List<NewsView> list =(List<NewsView>)page.getList();
for(NewsView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
NewsEntity news = newsService.selectById(id);
if(news !=null){
//entity转view
NewsView view = new NewsView();
BeanUtils.copyProperties( news , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody NewsEntity news, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<NewsEntity> queryWrapper = new EntityWrapper<NewsEntity>()
.eq("news_name", news.getNewsName())
.eq("news_types", news.getNewsTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
NewsEntity newsEntity = newsService.selectOne(queryWrapper);
if(newsEntity==null){
news.setInsertTime(new Date());
news.setCreateTime(new Date());
newsService.insert(news);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody NewsEntity news, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
NewsEntity oldNewsEntity = newsService.selectById(news.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
if("".equals(news.getNewsPhoto()) || "null".equals(news.getNewsPhoto())){
news.setNewsPhoto(null);
}
if("".equals(news.getNewsContent()) || "null".equals(news.getNewsContent())){
news.setNewsContent(null);
}
newsService.updateById(news);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<NewsEntity> oldNewsList =newsService.selectBatchIds(Arrays.asList(ids));//要删除的数据
newsService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<NewsEntity> newsList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
NewsEntity newsEntity = new NewsEntity();
// newsEntity.setNewsName(data.get(0)); //资讯标题 要改的
// newsEntity.setNewsTypes(Integer.valueOf(data.get(0))); //资讯类型 要改的
// newsEntity.setNewsPhoto("");//详情和图片
// newsEntity.setInsertTime(date);//时间
// newsEntity.setNewsContent("");//详情和图片
// newsEntity.setCreateTime(date);//时间
newsList.add(newsEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
newsService.insertBatch(newsList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = newsService.queryPage(params);
//字典表数据转换
List<NewsView> list =(List<NewsView>)page.getList();
for(NewsView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
NewsEntity news = newsService.selectById(id);
if(news !=null){
//entity转view
NewsView view = new NewsView();
BeanUtils.copyProperties( news , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody NewsEntity news, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
Wrapper<NewsEntity> queryWrapper = new EntityWrapper<NewsEntity>()
.eq("news_name", news.getNewsName())
.eq("news_types", news.getNewsTypes())
// .notIn("news_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
NewsEntity newsEntity = newsService.selectOne(queryWrapper);
if(newsEntity==null){
news.setInsertTime(new Date());
news.setCreateTime(new Date());
newsService.insert(news);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
}

@ -0,0 +1,300 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/singleSeach")
public class SingleSeachController {
private static final Logger logger = LoggerFactory.getLogger(SingleSeachController.class);
private static final String TABLE_NAME = "singleSeach";
@Autowired
private SingleSeachService singleSeachService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = singleSeachService.queryPage(params);
//字典表数据转换
List<SingleSeachView> list =(List<SingleSeachView>)page.getList();
for(SingleSeachView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
SingleSeachEntity singleSeach = singleSeachService.selectById(id);
if(singleSeach !=null){
//entity转view
SingleSeachView view = new SingleSeachView();
BeanUtils.copyProperties( singleSeach , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<SingleSeachEntity> queryWrapper = new EntityWrapper<SingleSeachEntity>()
.eq("single_seach_types",singleSeach.getSingleSeachTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
SingleSeachEntity singleSeachEntity = singleSeachService.selectOne(queryWrapper);
if(singleSeachEntity==null){
singleSeach.setCreateTime(new Date());
singleSeachService.insert(singleSeach);
return R.ok();
}else {
return R.error(511,"该类型已经有存在的,请删除后重新新增");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString());
SingleSeachEntity oldSingleSeachEntity = singleSeachService.selectById(singleSeach.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
if("".equals(singleSeach.getSingleSeachPhoto()) || "null".equals(singleSeach.getSingleSeachPhoto())){
singleSeach.setSingleSeachPhoto(null);
}
if("".equals(singleSeach.getSingleSeachContent()) || "null".equals(singleSeach.getSingleSeachContent())){
singleSeach.setSingleSeachContent(null);
}
singleSeachService.updateById(singleSeach);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<SingleSeachEntity> oldSingleSeachList =singleSeachService.selectBatchIds(Arrays.asList(ids));//要删除的数据
singleSeachService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<SingleSeachEntity> singleSeachList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
SingleSeachEntity singleSeachEntity = new SingleSeachEntity();
// singleSeachEntity.setSingleSeachName(data.get(0)); //名字 要改的
// singleSeachEntity.setSingleSeachTypes(Integer.valueOf(data.get(0))); //数据类型 要改的
// singleSeachEntity.setSingleSeachPhoto("");//详情和图片
// singleSeachEntity.setSingleSeachContent("");//详情和图片
// singleSeachEntity.setCreateTime(date);//时间
singleSeachList.add(singleSeachEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
singleSeachService.insertBatch(singleSeachList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = singleSeachService.queryPage(params);
//字典表数据转换
List<SingleSeachView> list =(List<SingleSeachView>)page.getList();
for(SingleSeachView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
SingleSeachEntity singleSeach = singleSeachService.selectOne(new EntityWrapper<SingleSeachEntity>().eq("single_seach_types", id));
if(singleSeach != null)
return R.ok().put("data", singleSeach);
else
return R.error(511,"查不到数据");
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody SingleSeachEntity singleSeach, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,singleSeach:{}",this.getClass().getName(),singleSeach.toString());
Wrapper<SingleSeachEntity> queryWrapper = new EntityWrapper<SingleSeachEntity>()
.eq("single_seach_types",singleSeach.getSingleSeachTypes())
// .notIn("single_seach_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
SingleSeachEntity singleSeachEntity = singleSeachService.selectOne(queryWrapper);
if(singleSeachEntity==null){
singleSeach.setCreateTime(new Date());
singleSeachService.insert(singleSeach);
return R.ok();
}else {
return R.error(511,"该类型已经有存在的,请删除后重新新增");
}
}
}

@ -0,0 +1,192 @@
package com.controller;
import java.util.List;
import java.util.Arrays;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
/**
*
*/
@RequestMapping("users")
@RestController
public class UsersController {
@Autowired
private UsersService usersService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null || !user.getPassword().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
R r = R.ok();
r.put("token", token);
r.put("role",user.getRole());
r.put("userId",user.getId());
return r;
}
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
usersService.insert(user);
return R.ok();
}
/**
* 退
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
*
*/
@GetMapping(value = "/updatePassword")
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
UsersEntity users = usersService.selectById((Integer)request.getSession().getAttribute("userId"));
if(newPassword == null){
return R.error("新密码不能为空") ;
}
if(!oldPassword.equals(users.getPassword())){
return R.error("原密码输入错误");
}
if(newPassword.equals(users.getPassword())){
return R.error("新密码不能和原密码一致") ;
}
users.setPassword(newPassword);
usersService.updateById(users);
return R.ok();
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
usersService.update(user,null);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
PageUtils page = usersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list( UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
ew.allEq(MPUtil.allEQMapPre( user, "user"));
return R.ok().put("data", usersService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
/**
*
*/
@PostMapping("/save")
public R save(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
usersService.insert(user);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
usersService.updateById(user);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
List<UsersEntity> user = usersService.selectList(null);
if(user.size() > 1){
usersService.deleteBatchIds(Arrays.asList(ids));
}else{
return R.error("管理员最少保留一个");
}
return R.ok();
}
}

@ -0,0 +1,521 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
*
*
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/yonghu")
public class YonghuController {
private static final Logger logger = LoggerFactory.getLogger(YonghuController.class);
private static final String TABLE_NAME = "yonghu";
@Autowired
private YonghuService yonghuService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典
@Autowired
private ForumService forumService;//健身论坛
@Autowired
private JianshenkechengService jianshenkechengService;//健身课程
@Autowired
private JianshenkechengCollectionService jianshenkechengCollectionService;//课程收藏
@Autowired
private JianshenkechengLiuyanService jianshenkechengLiuyanService;//课程留言
@Autowired
private JiaolianService jiaolianService;//教练
@Autowired
private JiaolianYuyueService jiaolianYuyueService;//教练预约申请
@Autowired
private NewsService newsService;//健身资讯
@Autowired
private SingleSeachService singleSeachService;//单页数据
@Autowired
private UsersService usersService;//管理员
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("教练".equals(role))
params.put("jiaolianId",request.getSession().getAttribute("userId"));
params.put("dataDeleteStart",1);params.put("dataDeleteEnd",1);
CommonUtil.checkMap(params);
PageUtils page = yonghuService.queryPage(params);
//字典表数据转换
List<YonghuView> list =(List<YonghuView>)page.getList();
for(YonghuView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
YonghuEntity yonghu = yonghuService.selectById(id);
if(yonghu !=null){
//entity转view
YonghuView view = new YonghuView();
BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.or()
.eq("yonghu_id_number", yonghu.getYonghuIdNumber())
.eq("data_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if(yonghuEntity==null){
yonghu.setDataDelete(1);
yonghu.setInsertTime(new Date());
yonghu.setCreateTime(new Date());
yonghu.setPassword("123456");
yonghuService.insert(yonghu);
return R.ok();
}else {
return R.error(511,"账户或者用户手机号或者用户身份证号已经被使用");
}
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
YonghuEntity oldYonghuEntity = yonghuService.selectById(yonghu.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
if("".equals(yonghu.getYonghuPhoto()) || "null".equals(yonghu.getYonghuPhoto())){
yonghu.setYonghuPhoto(null);
}
yonghuService.updateById(yonghu);//根据id更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<YonghuEntity> oldYonghuList =yonghuService.selectBatchIds(Arrays.asList(ids));//要删除的数据
ArrayList<YonghuEntity> list = new ArrayList<>();
for(Integer id:ids){
YonghuEntity yonghuEntity = new YonghuEntity();
yonghuEntity.setId(id);
yonghuEntity.setDataDelete(2);
list.add(yonghuEntity);
}
if(list != null && list.size() >0){
yonghuService.updateBatchById(list);
}
return R.ok();
}
/**
*
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
try {
List<YonghuEntity> yonghuList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
YonghuEntity yonghuEntity = new YonghuEntity();
// yonghuEntity.setUsername(data.get(0)); //账户 要改的
// yonghuEntity.setPassword("123456");//密码
// yonghuEntity.setYonghuName(data.get(0)); //用户名称 要改的
// yonghuEntity.setYonghuPhone(data.get(0)); //用户手机号 要改的
// yonghuEntity.setYonghuIdNumber(data.get(0)); //用户身份证号 要改的
// yonghuEntity.setYonghuPhoto("");//详情和图片
// yonghuEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的
// yonghuEntity.setYonghuEmail(data.get(0)); //用户邮箱 要改的
// yonghuEntity.setNewMoney(data.get(0)); //现有余额 要改的
// yonghuEntity.setDataDelete(1);//逻辑删除字段
// yonghuEntity.setInsertTime(date);//时间
// yonghuEntity.setCreateTime(date);//时间
yonghuList.add(yonghuEntity);
//把要查询是否重复的字段放入map中
//账户
if(seachFields.containsKey("username")){
List<String> username = seachFields.get("username");
username.add(data.get(0));//要改的
}else{
List<String> username = new ArrayList<>();
username.add(data.get(0));//要改的
seachFields.put("username",username);
}
//用户手机号
if(seachFields.containsKey("yonghuPhone")){
List<String> yonghuPhone = seachFields.get("yonghuPhone");
yonghuPhone.add(data.get(0));//要改的
}else{
List<String> yonghuPhone = new ArrayList<>();
yonghuPhone.add(data.get(0));//要改的
seachFields.put("yonghuPhone",yonghuPhone);
}
//用户身份证号
if(seachFields.containsKey("yonghuIdNumber")){
List<String> yonghuIdNumber = seachFields.get("yonghuIdNumber");
yonghuIdNumber.add(data.get(0));//要改的
}else{
List<String> yonghuIdNumber = new ArrayList<>();
yonghuIdNumber.add(data.get(0));//要改的
seachFields.put("yonghuIdNumber",yonghuIdNumber);
}
}
//查询是否重复
//账户
List<YonghuEntity> yonghuEntities_username = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("username", seachFields.get("username")).eq("data_delete", 1));
if(yonghuEntities_username.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YonghuEntity s:yonghuEntities_username){
repeatFields.add(s.getUsername());
}
return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());
}
//用户手机号
List<YonghuEntity> yonghuEntities_yonghuPhone = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("yonghu_phone", seachFields.get("yonghuPhone")).eq("data_delete", 1));
if(yonghuEntities_yonghuPhone.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YonghuEntity s:yonghuEntities_yonghuPhone){
repeatFields.add(s.getYonghuPhone());
}
return R.error(511,"数据库的该表中的 [用户手机号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
//用户身份证号
List<YonghuEntity> yonghuEntities_yonghuIdNumber = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("yonghu_id_number", seachFields.get("yonghuIdNumber")).eq("data_delete", 1));
if(yonghuEntities_yonghuIdNumber.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YonghuEntity s:yonghuEntities_yonghuIdNumber){
repeatFields.add(s.getYonghuIdNumber());
}
return R.error(511,"数据库的该表中的 [用户身份证号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
yonghuService.insertBatch(yonghuList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));
if(yonghu==null || !yonghu.getPassword().equals(password))
return R.error("账号或密码不正确");
else if(yonghu.getDataDelete() != 1)
return R.error("账户已被删除");
String token = tokenService.generateToken(yonghu.getId(),username, "yonghu", "用户");
R r = R.ok();
r.put("token", token);
r.put("role","用户");
r.put("username",yonghu.getYonghuName());
r.put("tableName","yonghu");
r.put("userId",yonghu.getId());
return r;
}
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody YonghuEntity yonghu, HttpServletRequest request) {
// ValidatorUtils.validateEntity(user);
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.or()
.eq("yonghu_id_number", yonghu.getYonghuIdNumber())
.andNew()
.eq("data_delete", 1)
;
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if(yonghuEntity != null)
return R.error("账户或者用户手机号或者用户身份证号已经被使用");
yonghu.setNewMoney(0.0);
yonghu.setDataDelete(1);
yonghu.setInsertTime(new Date());
yonghu.setCreateTime(new Date());
yonghuService.insert(yonghu);
return R.ok();
}
/**
*
*/
@GetMapping(value = "/resetPassword")
public R resetPassword(Integer id, HttpServletRequest request) {
YonghuEntity yonghu = yonghuService.selectById(id);
yonghu.setPassword("123456");
yonghuService.updateById(yonghu);
return R.ok();
}
/**
*
*/
@GetMapping(value = "/updatePassword")
public R updatePassword(String oldPassword, String newPassword, HttpServletRequest request) {
YonghuEntity yonghu = yonghuService.selectById((Integer)request.getSession().getAttribute("userId"));
if(newPassword == null){
return R.error("新密码不能为空") ;
}
if(!oldPassword.equals(yonghu.getPassword())){
return R.error("原密码输入错误");
}
if(newPassword.equals(yonghu.getPassword())){
return R.error("新密码不能和原密码一致") ;
}
yonghu.setPassword(newPassword);
yonghuService.updateById(yonghu);
return R.ok();
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request) {
YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));
if(yonghu!=null){
yonghu.setPassword("123456");
yonghuService.updateById(yonghu);
return R.ok();
}else{
return R.error("账号不存在");
}
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrYonghu(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
YonghuEntity yonghu = yonghuService.selectById(id);
if(yonghu !=null){
//entity转view
YonghuView view = new YonghuView();
BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 退
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = yonghuService.queryPage(params);
//字典表数据转换
List<YonghuView> list =(List<YonghuView>)page.getList();
for(YonghuView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Integer id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
YonghuEntity yonghu = yonghuService.selectById(id);
if(yonghu !=null){
//entity转view
YonghuView view = new YonghuView();
BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.or()
.eq("yonghu_id_number", yonghu.getYonghuIdNumber())
.andNew()
.eq("data_delete", 1)
// .notIn("yonghu_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if(yonghuEntity==null){
yonghu.setDataDelete(1);
yonghu.setInsertTime(new Date());
yonghu.setCreateTime(new Date());
yonghu.setPassword("123456");
yonghuService.insert(yonghu);
return R.ok();
}else {
return R.error(511,"账户或者用户手机号或者用户身份证号已经被使用");
}
}
}

@ -0,0 +1,43 @@
package com.dao;
import java.util.List;
import java.util.Map;
/**
*
*/
public interface CommonDao{
List<Map<String, Object>> pieSum(Map<String, Object> params);
List<Map<String, Object>> pieCount(Map<String, Object> params);
List<Map<String, Object>> barSumOne(Map<String, Object> params);
List<Map<String, Object>> barCountOne(Map<String, Object> params);
List<Map<String, Object>> barSumTwo(Map<String, Object> params);
List<Map<String, Object>> barCountTwo(Map<String, Object> params);
Map<String, Object> queryScore(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> barSum(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> barCount(Map<String, Object> params);
}

@ -0,0 +1,12 @@
package com.dao;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.entity.ConfigEntity;
/**
*
*/
public interface ConfigDao extends BaseMapper<ConfigEntity> {
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.DictionaryView;
/**
* Dao
*
* @author
*/
public interface DictionaryDao extends BaseMapper<DictionaryEntity> {
List<DictionaryView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.ForumView;
/**
* Dao
*
* @author
*/
public interface ForumDao extends BaseMapper<ForumEntity> {
List<ForumView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.JianshenkechengCollectionEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.JianshenkechengCollectionView;
/**
* Dao
*
* @author
*/
public interface JianshenkechengCollectionDao extends BaseMapper<JianshenkechengCollectionEntity> {
List<JianshenkechengCollectionView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.JianshenkechengEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.JianshenkechengView;
/**
* Dao
*
* @author
*/
public interface JianshenkechengDao extends BaseMapper<JianshenkechengEntity> {
List<JianshenkechengView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.JianshenkechengLiuyanEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.JianshenkechengLiuyanView;
/**
* Dao
*
* @author
*/
public interface JianshenkechengLiuyanDao extends BaseMapper<JianshenkechengLiuyanEntity> {
List<JianshenkechengLiuyanView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.JiaolianEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.JiaolianView;
/**
* Dao
*
* @author
*/
public interface JiaolianDao extends BaseMapper<JiaolianEntity> {
List<JiaolianView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.JiaolianYuyueEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.JiaolianYuyueView;
/**
* Dao
*
* @author
*/
public interface JiaolianYuyueDao extends BaseMapper<JiaolianYuyueEntity> {
List<JiaolianYuyueView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.NewsView;
/**
* Dao
*
* @author
*/
public interface NewsDao extends BaseMapper<NewsEntity> {
List<NewsView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.SingleSeachEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.SingleSeachView;
/**
* Dao
*
* @author
*/
public interface SingleSeachDao extends BaseMapper<SingleSeachEntity> {
List<SingleSeachView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,22 @@
package com.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.TokenEntity;
/**
* token
*/
public interface TokenDao extends BaseMapper<TokenEntity> {
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
List<TokenEntity> selectListView(Pagination page,@Param("ew") Wrapper<TokenEntity> wrapper);
}

@ -0,0 +1,22 @@
package com.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.UsersEntity;
/**
*
*/
public interface UsersDao extends BaseMapper<UsersEntity> {
List<UsersEntity> selectListView(@Param("ew") Wrapper<UsersEntity> wrapper);
List<UsersEntity> selectListView(Pagination page, @Param("ew") Wrapper<UsersEntity> wrapper);
}

@ -0,0 +1,21 @@
package com.dao;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.view.YonghuView;
/**
* Dao
*
* @author
*/
public interface YonghuDao extends BaseMapper<YonghuEntity> {
List<YonghuView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

@ -0,0 +1,55 @@
package com.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* @author yangliyuan
* @version 202027 8:36:05
* :
*/
@TableName("config")
public class ConfigEntity implements Serializable{
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/**
* key
*/
private String name;
/**
* value
*/
private String value;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

@ -0,0 +1,239 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("dictionary")
public class DictionaryEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public DictionaryEntity() {
}
public DictionaryEntity(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="bigint(20)")
@TableField(value = "id")
private Long id;
/**
*
*/
@ColumnInfo(comment="字段",type="varchar(200)")
@TableField(value = "dic_code")
private String dicCode;
/**
*
*/
@ColumnInfo(comment="字段名",type="varchar(200)")
@TableField(value = "dic_name")
private String dicName;
/**
*
*/
@ColumnInfo(comment="编码",type="int(11)")
@TableField(value = "code_index")
private Integer codeIndex;
/**
*
*/
@ColumnInfo(comment="编码名字",type="varchar(200)")
@TableField(value = "index_name")
private String indexName;
/**
* id
*/
@ColumnInfo(comment="父字段id",type="int(11)")
@TableField(value = "super_id")
private Integer superId;
/**
*
*/
@ColumnInfo(comment="备注",type="varchar(200)")
@TableField(value = "beizhu")
private String beizhu;
/**
*
*/
@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;
/**
*
*/
public Long getId() {
return id;
}
/**
*
*/
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public String getDicCode() {
return dicCode;
}
/**
*
*/
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
*
*/
public String getDicName() {
return dicName;
}
/**
*
*/
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
*
*/
public Integer getCodeIndex() {
return codeIndex;
}
/**
*
*/
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
*
*/
public String getIndexName() {
return indexName;
}
/**
*
*/
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* id
*/
public Integer getSuperId() {
return superId;
}
/**
* id
*/
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
*
*/
public String getBeizhu() {
return beizhu;
}
/**
*
*/
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Dictionary{" +
", id=" + id +
", dicCode=" + dicCode +
", dicName=" + dicName +
", codeIndex=" + codeIndex +
", indexName=" + indexName +
", superId=" + superId +
", beizhu=" + beizhu +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,52 @@
package com.entity;
/**
*
*/
public class EIException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String msg;
private int code = 500;
public EIException(String msg) {
super(msg);
this.msg = msg;
}
public EIException(String msg, Throwable e) {
super(msg, e);
this.msg = msg;
}
public EIException(String msg, int code) {
super(msg);
this.msg = msg;
this.code = code;
}
public EIException(String msg, int code, Throwable e) {
super(msg, e);
this.msg = msg;
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}

@ -0,0 +1,312 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("forum")
public class ForumEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public ForumEntity() {
}
public ForumEntity(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 = "forum_name")
private String forumName;
/**
*
*/
@ColumnInfo(comment="用户",type="int(11)")
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
*
*/
@ColumnInfo(comment="教练",type="int(11)")
@TableField(value = "jiaolian_id")
private Integer jiaolianId;
/**
*
*/
@ColumnInfo(comment="管理员",type="int(11)")
@TableField(value = "users_id")
private Integer usersId;
/**
*
*/
@ColumnInfo(comment="发布内容",type="longtext")
@TableField(value = "forum_content")
private String forumContent;
/**
* id
*/
@ColumnInfo(comment="父id",type="int(11)")
@TableField(value = "super_ids")
private Integer superIds;
/**
*
*/
@ColumnInfo(comment="帖子状态",type="int(11)")
@TableField(value = "forum_state_types")
private Integer forumStateTypes;
/**
*
*/
@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")
@DateTimeFormat
@ColumnInfo(comment="修改时间",type="timestamp")
@TableField(value = "update_time",fill = FieldFill.UPDATE)
private Date updateTime;
/**
*
*/
@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;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getForumName() {
return forumName;
}
/**
*
*/
public void setForumName(String forumName) {
this.forumName = forumName;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public Integer getJiaolianId() {
return jiaolianId;
}
/**
*
*/
public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId;
}
/**
*
*/
public Integer getUsersId() {
return usersId;
}
/**
*
*/
public void setUsersId(Integer usersId) {
this.usersId = usersId;
}
/**
*
*/
public String getForumContent() {
return forumContent;
}
/**
*
*/
public void setForumContent(String forumContent) {
this.forumContent = forumContent;
}
/**
* id
*/
public Integer getSuperIds() {
return superIds;
}
/**
* id
*/
public void setSuperIds(Integer superIds) {
this.superIds = superIds;
}
/**
*
*/
public Integer getForumStateTypes() {
return forumStateTypes;
}
/**
*
*/
public void setForumStateTypes(Integer forumStateTypes) {
this.forumStateTypes = forumStateTypes;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Forum{" +
", id=" + id +
", forumName=" + forumName +
", yonghuId=" + yonghuId +
", jiaolianId=" + jiaolianId +
", usersId=" + usersId +
", forumContent=" + forumContent +
", superIds=" + superIds +
", forumStateTypes=" + forumStateTypes +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,195 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("jianshenkecheng_collection")
public class JianshenkechengCollectionEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public JianshenkechengCollectionEntity() {
}
public JianshenkechengCollectionEntity(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;
/**
*
*/
@ColumnInfo(comment="类型",type="int(11)")
@TableField(value = "jianshenkecheng_collection_types")
private Integer jianshenkechengCollectionTypes;
/**
*
*/
@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")
@DateTimeFormat
@ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public Integer getJianshenkechengCollectionTypes() {
return jianshenkechengCollectionTypes;
}
/**
*
*/
public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) {
this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "JianshenkechengCollection{" +
", id=" + id +
", jianshenkechengId=" + jianshenkechengId +
", yonghuId=" + yonghuId +
", jianshenkechengCollectionTypes=" + jianshenkechengCollectionTypes +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,356 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("jianshenkecheng")
public class JianshenkechengEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public JianshenkechengEntity() {
}
public JianshenkechengEntity(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 = "jiaolian_id")
private Integer jiaolianId;
/**
*
*/
@ColumnInfo(comment="健身课程名称",type="varchar(200)")
@TableField(value = "jianshenkecheng_name")
private String jianshenkechengName;
/**
*
*/
@ColumnInfo(comment="健身课程照片",type="varchar(200)")
@TableField(value = "jianshenkecheng_photo")
private String jianshenkechengPhoto;
/**
*
*/
@ColumnInfo(comment="课程视频",type="varchar(200)")
@TableField(value = "jianshenkecheng_video")
private String jianshenkechengVideo;
/**
*
*/
@ColumnInfo(comment="赞",type="int(11)")
@TableField(value = "zan_number")
private Integer zanNumber;
/**
*
*/
@ColumnInfo(comment="踩",type="int(11)")
@TableField(value = "cai_number")
private Integer caiNumber;
/**
*
*/
@ColumnInfo(comment="健身课程类型",type="int(11)")
@TableField(value = "jianshenkecheng_types")
private Integer jianshenkechengTypes;
/**
*
*/
@ColumnInfo(comment="健身课程热度",type="int(11)")
@TableField(value = "jianshenkecheng_clicknum")
private Integer jianshenkechengClicknum;
/**
*
*/
@ColumnInfo(comment="健身课程介绍",type="longtext")
@TableField(value = "jianshenkecheng_content")
private String jianshenkechengContent;
/**
*
*/
@ColumnInfo(comment="逻辑删除",type="int(11)")
@TableField(value = "data_delete")
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)
private Date insertTime;
/**
* homeMain
*/
@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;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJiaolianId() {
return jiaolianId;
}
/**
*
*/
public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId;
}
/**
*
*/
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;
}
/**
*
*/
public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum;
}
/**
*
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum;
}
/**
*
*/
public String getJianshenkechengContent() {
return jianshenkechengContent;
}
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* homeMain
*/
public Date getCreateTime() {
return createTime;
}
/**
* homeMain
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Jianshenkecheng{" +
", id=" + id +
", jiaolianId=" + jiaolianId +
", jianshenkechengName=" + jianshenkechengName +
", jianshenkechengPhoto=" + jianshenkechengPhoto +
", jianshenkechengVideo=" + jianshenkechengVideo +
", zanNumber=" + zanNumber +
", caiNumber=" + caiNumber +
", jianshenkechengTypes=" + jianshenkechengTypes +
", jianshenkechengClicknum=" + jianshenkechengClicknum +
", jianshenkechengContent=" + jianshenkechengContent +
", dataDelete=" + dataDelete +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,243 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("jianshenkecheng_liuyan")
public class JianshenkechengLiuyanEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
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;
/**
*
*/
@ColumnInfo(comment="留言内容",type="longtext")
@TableField(value = "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;
/**
*
*/
@ColumnInfo(comment="回复内容",type="longtext")
@TableField(value = "reply_text")
private String replyText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="回复时间",type="timestamp")
@TableField(value = "update_time",fill = FieldFill.UPDATE)
private Date updateTime;
/**
* listShow
*/
@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;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText;
}
/**
*
*/
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getReplyText() {
return replyText;
}
/**
*
*/
public void setReplyText(String replyText) {
this.replyText = replyText;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "JianshenkechengLiuyan{" +
", id=" + id +
", jianshenkechengId=" + jianshenkechengId +
", yonghuId=" + yonghuId +
", jianshenkechengLiuyanText=" + jianshenkechengLiuyanText +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", replyText=" + replyText +
", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,333 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("jiaolian")
public class JiaolianEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public JiaolianEntity() {
}
public JiaolianEntity(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 = "username")
private String username;
/**
*
*/
@ColumnInfo(comment="密码",type="varchar(200)")
@TableField(value = "password")
private String password;
/**
*
*/
@ColumnInfo(comment="教练名称",type="varchar(200)")
@TableField(value = "jiaolian_name")
private String jiaolianName;
/**
*
*/
@ColumnInfo(comment="教练手机号",type="varchar(200)")
@TableField(value = "jiaolian_phone")
private String jiaolianPhone;
/**
*
*/
@ColumnInfo(comment="教练头像",type="varchar(200)")
@TableField(value = "jiaolian_photo")
private String jiaolianPhoto;
/**
*
*/
@ColumnInfo(comment="性别",type="int(11)")
@TableField(value = "sex_types")
private Integer sexTypes;
/**
*
*/
@ColumnInfo(comment="教练邮箱",type="varchar(200)")
@TableField(value = "jiaolian_email")
private String jiaolianEmail;
/**
*
*/
@ColumnInfo(comment="教练简介",type="longtext")
@TableField(value = "jiaolian_content")
private String jiaolianContent;
/**
*
*/
@ColumnInfo(comment="逻辑删除",type="int(11)")
@TableField(value = "data_delete")
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)
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)
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getPassword() {
return password;
}
/**
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
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;
}
/**
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
public String getJiaolianEmail() {
return jiaolianEmail;
}
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail;
}
/**
*
*/
public String getJiaolianContent() {
return jiaolianContent;
}
/**
*
*/
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Jiaolian{" +
", id=" + id +
", username=" + username +
", password=" + password +
", jiaolianName=" + jiaolianName +
", jiaolianPhone=" + jiaolianPhone +
", jiaolianPhoto=" + jiaolianPhoto +
", sexTypes=" + sexTypes +
", jiaolianEmail=" + jiaolianEmail +
", jiaolianContent=" + jiaolianContent +
", dataDelete=" + dataDelete +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,266 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("jiaolian_yuyue")
public class JiaolianYuyueEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public JiaolianYuyueEntity() {
}
public JiaolianYuyueEntity(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 = "jiaolian_yuyue_uuid_number")
private String jiaolianYuyueUuidNumber;
/**
*
*/
@ColumnInfo(comment="用户",type="int(11)")
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
*
*/
@ColumnInfo(comment="预约备注",type="longtext")
@TableField(value = "jiaolian_yuyue_text")
private String jiaolianYuyueText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@ColumnInfo(comment="预约时间",type="timestamp")
@TableField(value = "jiaolian_yuyue_time")
private Date jiaolianYuyueTime;
/**
*
*/
@ColumnInfo(comment="预约状态",type="int(11)")
@TableField(value = "jiaolian_yuyue_yesno_types")
private Integer jiaolianYuyueYesnoTypes;
/**
*
*/
@ColumnInfo(comment="审核回复",type="longtext")
@TableField(value = "jiaolian_yuyue_yesno_text")
private String jiaolianYuyueYesnoText;
/**
*
*/
@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;
/**
* listShow
*/
@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;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getJiaolianYuyueUuidNumber() {
return jiaolianYuyueUuidNumber;
}
/**
*
*/
public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) {
this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJiaolianYuyueText() {
return jiaolianYuyueText;
}
/**
*
*/
public void setJiaolianYuyueText(String jiaolianYuyueText) {
this.jiaolianYuyueText = jiaolianYuyueText;
}
/**
*
*/
public Date getJiaolianYuyueTime() {
return jiaolianYuyueTime;
}
/**
*
*/
public void setJiaolianYuyueTime(Date jiaolianYuyueTime) {
this.jiaolianYuyueTime = jiaolianYuyueTime;
}
/**
*
*/
public Integer getJiaolianYuyueYesnoTypes() {
return jiaolianYuyueYesnoTypes;
}
/**
*
*/
public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) {
this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes;
}
/**
*
*/
public String getJiaolianYuyueYesnoText() {
return jiaolianYuyueYesnoText;
}
/**
*
*/
public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) {
this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "JiaolianYuyue{" +
", id=" + id +
", jiaolianYuyueUuidNumber=" + jiaolianYuyueUuidNumber +
", yonghuId=" + yonghuId +
", jiaolianYuyueText=" + jiaolianYuyueText +
", 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") +
"}";
}
}

@ -0,0 +1,218 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
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")
@DateTimeFormat
@ColumnInfo(comment="添加时间",type="timestamp")
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime;
/**
*
*/
@ColumnInfo(comment="资讯详情",type="longtext")
@TableField(value = "news_content")
private String newsContent;
/**
*
*/
@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;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getNewsName() {
return newsName;
}
/**
*
*/
public void setNewsName(String newsName) {
this.newsName = newsName;
}
/**
*
*/
public Integer getNewsTypes() {
return newsTypes;
}
/**
*
*/
public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
}
/**
*
*/
public String getNewsPhoto() {
return newsPhoto;
}
/**
*
*/
public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getNewsContent() {
return newsContent;
}
/**
*
*/
public void setNewsContent(String newsContent) {
this.newsContent = newsContent;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@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") +
"}";
}
}

@ -0,0 +1,193 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("single_seach")
public class SingleSeachEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public SingleSeachEntity() {
}
public SingleSeachEntity(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 = "single_seach_name")
private String singleSeachName;
/**
*
*/
@ColumnInfo(comment="数据类型",type="int(11)")
@TableField(value = "single_seach_types")
private Integer singleSeachTypes;
/**
*
*/
@ColumnInfo(comment="图片",type="varchar(200)")
@TableField(value = "single_seach_photo")
private String singleSeachPhoto;
/**
*
*/
@ColumnInfo(comment="内容",type="longtext")
@TableField(value = "single_seach_content")
private String singleSeachContent;
/**
*
*/
@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;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getSingleSeachName() {
return singleSeachName;
}
/**
*
*/
public void setSingleSeachName(String singleSeachName) {
this.singleSeachName = singleSeachName;
}
/**
*
*/
public Integer getSingleSeachTypes() {
return singleSeachTypes;
}
/**
*
*/
public void setSingleSeachTypes(Integer singleSeachTypes) {
this.singleSeachTypes = singleSeachTypes;
}
/**
*
*/
public String getSingleSeachPhoto() {
return singleSeachPhoto;
}
/**
*
*/
public void setSingleSeachPhoto(String singleSeachPhoto) {
this.singleSeachPhoto = singleSeachPhoto;
}
/**
*
*/
public String getSingleSeachContent() {
return singleSeachContent;
}
/**
*
*/
public void setSingleSeachContent(String singleSeachContent) {
this.singleSeachContent = singleSeachContent;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "SingleSeach{" +
", id=" + id +
", singleSeachName=" + singleSeachName +
", singleSeachTypes=" + singleSeachTypes +
", singleSeachPhoto=" + singleSeachPhoto +
", singleSeachContent=" + singleSeachContent +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,132 @@
package com.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* token
*/
@TableName("token")
public class TokenEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Integer id;
/**
* id
*/
private Integer userid;
/**
*
*/
private String username;
/**
*
*/
private String tablename;
/**
*
*/
private String role;
/**
* token
*/
private String token;
/**
*
*/
private Date expiratedtime;
/**
*
*/
private Date addtime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserid() {
return userid;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getToken() {
return token;
}
public String getTablename() {
return tablename;
}
public void setTablename(String tablename) {
this.tablename = tablename;
}
public void setToken(String token) {
this.token = token;
}
public Date getExpiratedtime() {
return expiratedtime;
}
public void setExpiratedtime(Date expiratedtime) {
this.expiratedtime = expiratedtime;
}
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public TokenEntity(Integer userid, String username, String tablename,String role, String token, Date expiratedtime) {
super();
this.userid = userid;
this.username = username;
this.tablename = tablename;
this.role = role;
this.token = token;
this.expiratedtime = expiratedtime;
}
public TokenEntity() {
}
}

@ -0,0 +1,77 @@
package com.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*/
@TableName("users")
public class UsersEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Integer id;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
*
*/
private String role;
private Date addtime;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}

@ -0,0 +1,356 @@
package com.entity;
import com.annotation.ColumnInfo;
import javax.validation.constraints.*;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.*;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.utils.DateUtil;
/**
*
*
* @author
* @email
*/
@TableName("yonghu")
public class YonghuEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YonghuEntity() {
}
public YonghuEntity(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 = "username")
private String username;
/**
*
*/
@ColumnInfo(comment="密码",type="varchar(200)")
@TableField(value = "password")
private String password;
/**
*
*/
@ColumnInfo(comment="用户名称",type="varchar(200)")
@TableField(value = "yonghu_name")
private String yonghuName;
/**
*
*/
@ColumnInfo(comment="用户手机号",type="varchar(200)")
@TableField(value = "yonghu_phone")
private String yonghuPhone;
/**
*
*/
@ColumnInfo(comment="用户身份证号",type="varchar(200)")
@TableField(value = "yonghu_id_number")
private String yonghuIdNumber;
/**
*
*/
@ColumnInfo(comment="用户头像",type="varchar(200)")
@TableField(value = "yonghu_photo")
private String yonghuPhoto;
/**
*
*/
@ColumnInfo(comment="性别",type="int(11)")
@TableField(value = "sex_types")
private Integer sexTypes;
/**
*
*/
@ColumnInfo(comment="用户邮箱",type="varchar(200)")
@TableField(value = "yonghu_email")
private String yonghuEmail;
/**
*
*/
@ColumnInfo(comment="现有余额",type="decimal(10,2)")
@TableField(value = "new_money")
private Double newMoney;
/**
*
*/
@ColumnInfo(comment="逻辑删除",type="int(11)")
@TableField(value = "data_delete")
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)
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)
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getPassword() {
return password;
}
/**
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
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;
}
/**
*
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
*
*/
public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Yonghu{" +
", id=" + id +
", username=" + username +
", password=" + password +
", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto +
", sexTypes=" + sexTypes +
", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney +
", dataDelete=" + dataDelete +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}

@ -0,0 +1,187 @@
package com.entity.model;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class DictionaryModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long id;
/**
*
*/
private String dicCode;
/**
*
*/
private String dicName;
/**
*
*/
private Integer codeIndex;
/**
*
*/
private String indexName;
/**
* id
*/
private Integer superId;
/**
*
*/
private String beizhu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Long getId() {
return id;
}
/**
*
*/
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public String getDicCode() {
return dicCode;
}
/**
*
*/
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
*
*/
public String getDicName() {
return dicName;
}
/**
*
*/
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
*
*/
public Integer getCodeIndex() {
return codeIndex;
}
/**
*
*/
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
*
*/
public String getIndexName() {
return indexName;
}
/**
*
*/
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* id
*/
public Integer getSuperId() {
return superId;
}
/**
* id
*/
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
*
*/
public String getBeizhu() {
return beizhu;
}
/**
*
*/
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,251 @@
package com.entity.model;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class ForumModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String forumName;
/**
*
*/
private Integer yonghuId;
/**
*
*/
private Integer jiaolianId;
/**
*
*/
private Integer usersId;
/**
*
*/
private String forumContent;
/**
* id
*/
private Integer superIds;
/**
*
*/
private Integer forumStateTypes;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date updateTime;
/**
* show2
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getForumName() {
return forumName;
}
/**
*
*/
public void setForumName(String forumName) {
this.forumName = forumName;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public Integer getJiaolianId() {
return jiaolianId;
}
/**
*
*/
public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId;
}
/**
*
*/
public Integer getUsersId() {
return usersId;
}
/**
*
*/
public void setUsersId(Integer usersId) {
this.usersId = usersId;
}
/**
*
*/
public String getForumContent() {
return forumContent;
}
/**
*
*/
public void setForumContent(String forumContent) {
this.forumContent = forumContent;
}
/**
* id
*/
public Integer getSuperIds() {
return superIds;
}
/**
* id
*/
public void setSuperIds(Integer superIds) {
this.superIds = superIds;
}
/**
*
*/
public Integer getForumStateTypes() {
return forumStateTypes;
}
/**
*
*/
public void setForumStateTypes(Integer forumStateTypes) {
this.forumStateTypes = forumStateTypes;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* show2
*/
public Date getCreateTime() {
return createTime;
}
/**
* show2
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,149 @@
package com.entity.model;
import com.entity.JianshenkechengCollectionEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class JianshenkechengCollectionModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private Integer jianshenkechengId;
/**
*
*/
private Integer yonghuId;
/**
*
*/
private Integer jianshenkechengCollectionTypes;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* show3 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public Integer getJianshenkechengCollectionTypes() {
return jianshenkechengCollectionTypes;
}
/**
*
*/
public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) {
this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show3 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show3 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,191 @@
package com.entity.model;
import com.entity.JianshenkechengLiuyanEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class JianshenkechengLiuyanModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private Integer jianshenkechengId;
/**
*
*/
private Integer yonghuId;
/**
*
*/
private String jianshenkechengLiuyanText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
*
*/
private String replyText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date updateTime;
/**
* show3 listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText;
}
/**
*
*/
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getReplyText() {
return replyText;
}
/**
*
*/
public void setReplyText(String replyText) {
this.replyText = replyText;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* show3 listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show3 listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,289 @@
package com.entity.model;
import com.entity.JianshenkechengEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class JianshenkechengModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private Integer jiaolianId;
/**
*
*/
private String jianshenkechengName;
/**
*
*/
private String jianshenkechengPhoto;
/**
*
*/
private String jianshenkechengVideo;
/**
*
*/
private Integer zanNumber;
/**
*
*/
private Integer caiNumber;
/**
*
*/
private Integer jianshenkechengTypes;
/**
*
*/
private Integer jianshenkechengClicknum;
/**
*
*/
private String jianshenkechengContent;
/**
*
*/
private Integer dataDelete;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* show1 show2 photoShow homeMain
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJiaolianId() {
return jiaolianId;
}
/**
*
*/
public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId;
}
/**
*
*/
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;
}
/**
*
*/
public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum;
}
/**
*
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum;
}
/**
*
*/
public String getJianshenkechengContent() {
return jianshenkechengContent;
}
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show1 show2 photoShow homeMain
*/
public Date getCreateTime() {
return createTime;
}
/**
* show1 show2 photoShow homeMain
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,269 @@
package com.entity.model;
import com.entity.JiaolianEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class JiaolianModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
*
*/
private String jiaolianName;
/**
*
*/
private String jiaolianPhone;
/**
*
*/
private String jiaolianPhoto;
/**
*
*/
private Integer sexTypes;
/**
*
*/
private String jiaolianEmail;
/**
*
*/
private String jiaolianContent;
/**
*
*/
private Integer dataDelete;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* show1 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getPassword() {
return password;
}
/**
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
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;
}
/**
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
public String getJiaolianEmail() {
return jiaolianEmail;
}
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail;
}
/**
*
*/
public String getJiaolianContent() {
return jiaolianContent;
}
/**
*
*/
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show1 show2 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show1 show2 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,211 @@
package com.entity.model;
import com.entity.JiaolianYuyueEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class JiaolianYuyueModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String jiaolianYuyueUuidNumber;
/**
*
*/
private Integer yonghuId;
/**
*
*/
private String jiaolianYuyueText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date jiaolianYuyueTime;
/**
*
*/
private Integer jiaolianYuyueYesnoTypes;
/**
*
*/
private String jiaolianYuyueYesnoText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* show3 listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getJiaolianYuyueUuidNumber() {
return jiaolianYuyueUuidNumber;
}
/**
*
*/
public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) {
this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJiaolianYuyueText() {
return jiaolianYuyueText;
}
/**
*
*/
public void setJiaolianYuyueText(String jiaolianYuyueText) {
this.jiaolianYuyueText = jiaolianYuyueText;
}
/**
*
*/
public Date getJiaolianYuyueTime() {
return jiaolianYuyueTime;
}
/**
*
*/
public void setJiaolianYuyueTime(Date jiaolianYuyueTime) {
this.jiaolianYuyueTime = jiaolianYuyueTime;
}
/**
*
*/
public Integer getJiaolianYuyueYesnoTypes() {
return jiaolianYuyueYesnoTypes;
}
/**
*
*/
public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) {
this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes;
}
/**
*
*/
public String getJiaolianYuyueYesnoText() {
return jiaolianYuyueYesnoText;
}
/**
*
*/
public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) {
this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show3 listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show3 listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,169 @@
package com.entity.model;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class NewsModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String newsName;
/**
*
*/
private Integer newsTypes;
/**
*
*/
private String newsPhoto;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
*
*/
private String newsContent;
/**
* show1 show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getNewsName() {
return newsName;
}
/**
*
*/
public void setNewsName(String newsName) {
this.newsName = newsName;
}
/**
*
*/
public Integer getNewsTypes() {
return newsTypes;
}
/**
*
*/
public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
}
/**
*
*/
public String getNewsPhoto() {
return newsPhoto;
}
/**
*
*/
public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getNewsContent() {
return newsContent;
}
/**
*
*/
public void setNewsContent(String newsContent) {
this.newsContent = newsContent;
}
/**
* show1 show2 nameShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show1 show2 nameShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,147 @@
package com.entity.model;
import com.entity.SingleSeachEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class SingleSeachModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String singleSeachName;
/**
*
*/
private Integer singleSeachTypes;
/**
*
*/
private String singleSeachPhoto;
/**
*
*/
private String singleSeachContent;
/**
* show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getSingleSeachName() {
return singleSeachName;
}
/**
*
*/
public void setSingleSeachName(String singleSeachName) {
this.singleSeachName = singleSeachName;
}
/**
*
*/
public Integer getSingleSeachTypes() {
return singleSeachTypes;
}
/**
*
*/
public void setSingleSeachTypes(Integer singleSeachTypes) {
this.singleSeachTypes = singleSeachTypes;
}
/**
*
*/
public String getSingleSeachPhoto() {
return singleSeachPhoto;
}
/**
*
*/
public void setSingleSeachPhoto(String singleSeachPhoto) {
this.singleSeachPhoto = singleSeachPhoto;
}
/**
*
*/
public String getSingleSeachContent() {
return singleSeachContent;
}
/**
*
*/
public void setSingleSeachContent(String singleSeachContent) {
this.singleSeachContent = singleSeachContent;
}
/**
* show2 nameShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show2 nameShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,289 @@
package com.entity.model;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
*/
public class YonghuModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private Integer id;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
*
*/
private String yonghuName;
/**
*
*/
private String yonghuPhone;
/**
*
*/
private String yonghuIdNumber;
/**
*
*/
private String yonghuPhoto;
/**
*
*/
private Integer sexTypes;
/**
*
*/
private String yonghuEmail;
/**
*
*/
private Double newMoney;
/**
*
*/
private Integer dataDelete;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getPassword() {
return password;
}
/**
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
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;
}
/**
*
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
*
*/
public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,53 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("dictionary")
public class DictionaryView extends DictionaryEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
public DictionaryView() {
}
public DictionaryView(DictionaryEntity dictionaryEntity) {
try {
BeanUtils.copyProperties(this, dictionaryEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public String toString() {
return "DictionaryView{" +
"} " + super.toString();
}
}

@ -0,0 +1,392 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("forum")
public class ForumView extends ForumEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="帖子状态的字典表值",type="varchar(200)")
private String forumStateValue;
//级联表 教练
/**
*
*/
@ColumnInfo(comment="教练名称",type="varchar(200)")
private String jiaolianName;
/**
*
*/
@ColumnInfo(comment="教练手机号",type="varchar(200)")
private String jiaolianPhone;
/**
*
*/
@ColumnInfo(comment="教练头像",type="varchar(200)")
private String jiaolianPhoto;
/**
*
*/
@ColumnInfo(comment="教练邮箱",type="varchar(200)")
private String jiaolianEmail;
/**
*
*/
@ColumnInfo(comment="教练简介",type="longtext")
private String jiaolianContent;
//级联表 用户
/**
*
*/
@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(100)")
private String uusername;
/**
*
*/
@ColumnInfo(comment="密码",type="varchar(100)")
private String upassword;
/**
*
*/
@ColumnInfo(comment="角色",type="varchar(100)")
private String urole;
/**
*
*/
@ColumnInfo(comment="新增时间",type="timestamp")
private Date uaddtime;
//重复字段
/**
* types
*/
@ColumnInfo(comment="重复字段 的types",type="Integer")
private Integer sexTypes;
@ColumnInfo(comment="重复字段 的值",type="varchar(200)")
private String sexValue;
public ForumView() {
}
public ForumView(ForumEntity forumEntity) {
try {
BeanUtils.copyProperties(this, forumEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getForumStateValue() {
return forumStateValue;
}
/**
*
*/
public void setForumStateValue(String 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;
}
/**
*
*/
public String getJiaolianEmail() {
return jiaolianEmail;
}
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail;
}
/**
*
*/
public String getJiaolianContent() {
return jiaolianContent;
}
/**
*
*/
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
//级联表的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;
}
/**
*
*/
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 void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
//级联表的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;
}
//重复字段
/**
* 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;
}
@Override
public String toString() {
return "ForumView{" +
", forumStateValue=" + forumStateValue +
", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney +
", jiaolianName=" + jiaolianName +
", jiaolianPhone=" + jiaolianPhone +
", jiaolianPhoto=" + jiaolianPhoto +
", jiaolianEmail=" + jiaolianEmail +
", jiaolianContent=" + jiaolianContent +
"} " + super.toString();
}
}

@ -0,0 +1,389 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.JianshenkechengCollectionEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("jianshenkecheng_collection")
public class JianshenkechengCollectionView extends JianshenkechengCollectionEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="类型的字典表值",type="varchar(200)")
private String jianshenkechengCollectionValue;
//级联表 健身课程
/**
*
*/
@ColumnInfo(comment="教练",type="int(11)")
private Integer jianshenkechengJiaolianId;
/**
*
*/
@ColumnInfo(comment="健身课程名称",type="varchar(200)")
private String jianshenkechengName;
/**
*
*/
@ColumnInfo(comment="健身课程照片",type="varchar(200)")
private String jianshenkechengPhoto;
/**
*
*/
@ColumnInfo(comment="课程视频",type="varchar(200)")
private String jianshenkechengVideo;
/**
*
*/
@ColumnInfo(comment="赞",type="int(11)")
private Integer zanNumber;
/**
*
*/
@ColumnInfo(comment="踩",type="int(11)")
private Integer caiNumber;
/**
*
*/
@ColumnInfo(comment="健身课程类型",type="int(11)")
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;
public JianshenkechengCollectionView() {
}
public JianshenkechengCollectionView(JianshenkechengCollectionEntity jianshenkechengCollectionEntity) {
try {
BeanUtils.copyProperties(this, jianshenkechengCollectionEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getJianshenkechengCollectionValue() {
return jianshenkechengCollectionValue;
}
/**
*
*/
public void setJianshenkechengCollectionValue(String 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;
}
/**
*
*/
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 String getJianshenkechengContent() {
return jianshenkechengContent;
}
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
//级联表的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;
}
/**
*
*/
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 void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
@Override
public String toString() {
return "JianshenkechengCollectionView{" +
", jianshenkechengCollectionValue=" + jianshenkechengCollectionValue +
", jianshenkechengName=" + jianshenkechengName +
", jianshenkechengPhoto=" + jianshenkechengPhoto +
", jianshenkechengVideo=" + jianshenkechengVideo +
", zanNumber=" + zanNumber +
", caiNumber=" + caiNumber +
", jianshenkechengClicknum=" + jianshenkechengClicknum +
", jianshenkechengContent=" + jianshenkechengContent +
", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney +
"} " + super.toString();
}
}

@ -0,0 +1,370 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.JianshenkechengLiuyanEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("jianshenkecheng_liuyan")
public class JianshenkechengLiuyanView extends JianshenkechengLiuyanEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
//级联表 健身课程
/**
*
*/
@ColumnInfo(comment="教练",type="int(11)")
private Integer jianshenkechengJiaolianId;
/**
*
*/
@ColumnInfo(comment="健身课程名称",type="varchar(200)")
private String jianshenkechengName;
/**
*
*/
@ColumnInfo(comment="健身课程照片",type="varchar(200)")
private String jianshenkechengPhoto;
/**
*
*/
@ColumnInfo(comment="课程视频",type="varchar(200)")
private String jianshenkechengVideo;
/**
*
*/
@ColumnInfo(comment="赞",type="int(11)")
private Integer zanNumber;
/**
*
*/
@ColumnInfo(comment="踩",type="int(11)")
private Integer caiNumber;
/**
*
*/
@ColumnInfo(comment="健身课程类型",type="int(11)")
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;
public JianshenkechengLiuyanView() {
}
public JianshenkechengLiuyanView(JianshenkechengLiuyanEntity jianshenkechengLiuyanEntity) {
try {
BeanUtils.copyProperties(this, jianshenkechengLiuyanEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
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;
}
/**
*
*/
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;
}
/**
*
*/
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 String getJianshenkechengContent() {
return jianshenkechengContent;
}
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
//级联表的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;
}
/**
*
*/
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 void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
@Override
public String toString() {
return "JianshenkechengLiuyanView{" +
", jianshenkechengName=" + jianshenkechengName +
", jianshenkechengPhoto=" + jianshenkechengPhoto +
", jianshenkechengVideo=" + jianshenkechengVideo +
", zanNumber=" + zanNumber +
", caiNumber=" + caiNumber +
", jianshenkechengClicknum=" + jianshenkechengClicknum +
", jianshenkechengContent=" + jianshenkechengContent +
", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney +
"} " + super.toString();
}
}

@ -0,0 +1,174 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.JianshenkechengEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("jianshenkecheng")
public class JianshenkechengView extends JianshenkechengEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="健身课程类型的字典表值",type="varchar(200)")
private String jianshenkechengValue;
//级联表 教练
/**
*
*/
@ColumnInfo(comment="教练名称",type="varchar(200)")
private String jiaolianName;
/**
*
*/
@ColumnInfo(comment="教练手机号",type="varchar(200)")
private String jiaolianPhone;
/**
*
*/
@ColumnInfo(comment="教练头像",type="varchar(200)")
private String jiaolianPhoto;
/**
*
*/
@ColumnInfo(comment="教练邮箱",type="varchar(200)")
private String jiaolianEmail;
/**
*
*/
@ColumnInfo(comment="教练简介",type="longtext")
private String jiaolianContent;
public JianshenkechengView() {
}
public JianshenkechengView(JianshenkechengEntity jianshenkechengEntity) {
try {
BeanUtils.copyProperties(this, jianshenkechengEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getJianshenkechengValue() {
return jianshenkechengValue;
}
/**
*
*/
public void setJianshenkechengValue(String 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;
}
/**
*
*/
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 void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
@Override
public String toString() {
return "JianshenkechengView{" +
", jianshenkechengValue=" + jianshenkechengValue +
", jiaolianName=" + jiaolianName +
", jiaolianPhone=" + jiaolianPhone +
", jiaolianPhoto=" + jiaolianPhoto +
", jiaolianEmail=" + jiaolianEmail +
", jiaolianContent=" + jiaolianContent +
"} " + super.toString();
}
}

@ -0,0 +1,72 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.JiaolianEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("jiaolian")
public class JiaolianView extends JiaolianEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="性别的字典表值",type="varchar(200)")
private String sexValue;
public JiaolianView() {
}
public JiaolianView(JiaolianEntity jiaolianEntity) {
try {
BeanUtils.copyProperties(this, jiaolianEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getSexValue() {
return sexValue;
}
/**
*
*/
public void setSexValue(String sexValue) {
this.sexValue = sexValue;
}
@Override
public String toString() {
return "JiaolianView{" +
", sexValue=" + sexValue +
"} " + super.toString();
}
}

@ -0,0 +1,193 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.JiaolianYuyueEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("jiaolian_yuyue")
public class JiaolianYuyueView extends JiaolianYuyueEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="预约状态的字典表值",type="varchar(200)")
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;
public JiaolianYuyueView() {
}
public JiaolianYuyueView(JiaolianYuyueEntity jiaolianYuyueEntity) {
try {
BeanUtils.copyProperties(this, jiaolianYuyueEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getJiaolianYuyueYesnoValue() {
return jiaolianYuyueYesnoValue;
}
/**
*
*/
public void setJiaolianYuyueYesnoValue(String 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;
}
/**
*
*/
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 void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
@Override
public String toString() {
return "JiaolianYuyueView{" +
", jiaolianYuyueYesnoValue=" + jiaolianYuyueYesnoValue +
", yonghuName=" + yonghuName +
", yonghuPhone=" + yonghuPhone +
", yonghuIdNumber=" + yonghuIdNumber +
", yonghuPhoto=" + yonghuPhoto +
", yonghuEmail=" + yonghuEmail +
", newMoney=" + newMoney +
"} " + super.toString();
}
}

@ -0,0 +1,72 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("news")
public class NewsView extends NewsEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="资讯类型的字典表值",type="varchar(200)")
private String newsValue;
public NewsView() {
}
public NewsView(NewsEntity newsEntity) {
try {
BeanUtils.copyProperties(this, newsEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getNewsValue() {
return newsValue;
}
/**
*
*/
public void setNewsValue(String newsValue) {
this.newsValue = newsValue;
}
@Override
public String toString() {
return "NewsView{" +
", newsValue=" + newsValue +
"} " + super.toString();
}
}

@ -0,0 +1,72 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.SingleSeachEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("single_seach")
public class SingleSeachView extends SingleSeachEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="数据类型的字典表值",type="varchar(200)")
private String singleSeachValue;
public SingleSeachView() {
}
public SingleSeachView(SingleSeachEntity singleSeachEntity) {
try {
BeanUtils.copyProperties(this, singleSeachEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getSingleSeachValue() {
return singleSeachValue;
}
/**
*
*/
public void setSingleSeachValue(String singleSeachValue) {
this.singleSeachValue = singleSeachValue;
}
@Override
public String toString() {
return "SingleSeachView{" +
", singleSeachValue=" + singleSeachValue +
"} " + super.toString();
}
}

@ -0,0 +1,72 @@
package com.entity.view;
import org.apache.tools.ant.util.DateUtils;
import com.annotation.ColumnInfo;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import com.utils.DateUtil;
/**
*
*
* 使
*/
@TableName("yonghu")
public class YonghuView extends YonghuEntity implements Serializable {
private static final long serialVersionUID = 1L;
//当前表
/**
*
*/
@ColumnInfo(comment="性别的字典表值",type="varchar(200)")
private String sexValue;
public YonghuView() {
}
public YonghuView(YonghuEntity yonghuEntity) {
try {
BeanUtils.copyProperties(this, yonghuEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//当前表的
/**
*
*/
public String getSexValue() {
return sexValue;
}
/**
*
*/
public void setSexValue(String sexValue) {
this.sexValue = sexValue;
}
@Override
public String toString() {
return "YonghuView{" +
", sexValue=" + sexValue +
"} " + super.toString();
}
}

@ -0,0 +1,209 @@
package com.entity.vo;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("dictionary")
public class DictionaryVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Long id;
/**
*
*/
@TableField(value = "dic_code")
private String dicCode;
/**
*
*/
@TableField(value = "dic_name")
private String dicName;
/**
*
*/
@TableField(value = "code_index")
private Integer codeIndex;
/**
*
*/
@TableField(value = "index_name")
private String indexName;
/**
* id
*/
@TableField(value = "super_id")
private Integer superId;
/**
*
*/
@TableField(value = "beizhu")
private String beizhu;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Long getId() {
return id;
}
/**
*
*/
public void setId(Long id) {
this.id = id;
}
/**
*
*/
public String getDicCode() {
return dicCode;
}
/**
*
*/
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
*
*/
public String getDicName() {
return dicName;
}
/**
*
*/
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
*
*/
public Integer getCodeIndex() {
return codeIndex;
}
/**
*
*/
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
*
*/
public String getIndexName() {
return indexName;
}
/**
*
*/
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* id
*/
public Integer getSuperId() {
return superId;
}
/**
* id
*/
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
*
*/
public String getBeizhu() {
return beizhu;
}
/**
*
*/
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,282 @@
package com.entity.vo;
import com.entity.ForumEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("forum")
public class ForumVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "forum_name")
private String forumName;
/**
*
*/
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
*
*/
@TableField(value = "jiaolian_id")
private Integer jiaolianId;
/**
*
*/
@TableField(value = "users_id")
private Integer usersId;
/**
*
*/
@TableField(value = "forum_content")
private String forumContent;
/**
* id
*/
@TableField(value = "super_ids")
private Integer superIds;
/**
*
*/
@TableField(value = "forum_state_types")
private Integer forumStateTypes;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "update_time")
private Date updateTime;
/**
* show2
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getForumName() {
return forumName;
}
/**
*
*/
public void setForumName(String forumName) {
this.forumName = forumName;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public Integer getJiaolianId() {
return jiaolianId;
}
/**
*
*/
public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId;
}
/**
*
*/
public Integer getUsersId() {
return usersId;
}
/**
*
*/
public void setUsersId(Integer usersId) {
this.usersId = usersId;
}
/**
*
*/
public String getForumContent() {
return forumContent;
}
/**
*
*/
public void setForumContent(String forumContent) {
this.forumContent = forumContent;
}
/**
* id
*/
public Integer getSuperIds() {
return superIds;
}
/**
* id
*/
public void setSuperIds(Integer superIds) {
this.superIds = superIds;
}
/**
*
*/
public Integer getForumStateTypes() {
return forumStateTypes;
}
/**
*
*/
public void setForumStateTypes(Integer forumStateTypes) {
this.forumStateTypes = forumStateTypes;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* show2
*/
public Date getCreateTime() {
return createTime;
}
/**
* show2
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,165 @@
package com.entity.vo;
import com.entity.JianshenkechengCollectionEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("jianshenkecheng_collection")
public class JianshenkechengCollectionVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "jianshenkecheng_id")
private Integer jianshenkechengId;
/**
*
*/
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
*
*/
@TableField(value = "jianshenkecheng_collection_types")
private Integer jianshenkechengCollectionTypes;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* show3 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public Integer getJianshenkechengCollectionTypes() {
return jianshenkechengCollectionTypes;
}
/**
*
*/
public void setJianshenkechengCollectionTypes(Integer jianshenkechengCollectionTypes) {
this.jianshenkechengCollectionTypes = jianshenkechengCollectionTypes;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show3 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show3 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,213 @@
package com.entity.vo;
import com.entity.JianshenkechengLiuyanEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("jianshenkecheng_liuyan")
public class JianshenkechengLiuyanVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "jianshenkecheng_id")
private Integer jianshenkechengId;
/**
*
*/
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
*
*/
@TableField(value = "jianshenkecheng_liuyan_text")
private String jianshenkechengLiuyanText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
*
*/
@TableField(value = "reply_text")
private String replyText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "update_time")
private Date updateTime;
/**
* show3 listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText;
}
/**
*
*/
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getReplyText() {
return replyText;
}
/**
*
*/
public void setReplyText(String replyText) {
this.replyText = replyText;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* show3 listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show3 listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,326 @@
package com.entity.vo;
import com.entity.JianshenkechengEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("jianshenkecheng")
public class JianshenkechengVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "jiaolian_id")
private Integer jiaolianId;
/**
*
*/
@TableField(value = "jianshenkecheng_name")
private String jianshenkechengName;
/**
*
*/
@TableField(value = "jianshenkecheng_photo")
private String jianshenkechengPhoto;
/**
*
*/
@TableField(value = "jianshenkecheng_video")
private String jianshenkechengVideo;
/**
*
*/
@TableField(value = "zan_number")
private Integer zanNumber;
/**
*
*/
@TableField(value = "cai_number")
private Integer caiNumber;
/**
*
*/
@TableField(value = "jianshenkecheng_types")
private Integer jianshenkechengTypes;
/**
*
*/
@TableField(value = "jianshenkecheng_clicknum")
private Integer jianshenkechengClicknum;
/**
*
*/
@TableField(value = "jianshenkecheng_content")
private String jianshenkechengContent;
/**
*
*/
@TableField(value = "data_delete")
private Integer dataDelete;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* show1 show2 photoShow homeMain
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJiaolianId() {
return jiaolianId;
}
/**
*
*/
public void setJiaolianId(Integer jiaolianId) {
this.jiaolianId = jiaolianId;
}
/**
*
*/
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;
}
/**
*
*/
public Integer getJianshenkechengClicknum() {
return jianshenkechengClicknum;
}
/**
*
*/
public void setJianshenkechengClicknum(Integer jianshenkechengClicknum) {
this.jianshenkechengClicknum = jianshenkechengClicknum;
}
/**
*
*/
public String getJianshenkechengContent() {
return jianshenkechengContent;
}
/**
*
*/
public void setJianshenkechengContent(String jianshenkechengContent) {
this.jianshenkechengContent = jianshenkechengContent;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show1 show2 photoShow homeMain
*/
public Date getCreateTime() {
return createTime;
}
/**
* show1 show2 photoShow homeMain
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,303 @@
package com.entity.vo;
import com.entity.JiaolianEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("jiaolian")
public class JiaolianVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "username")
private String username;
/**
*
*/
@TableField(value = "password")
private String password;
/**
*
*/
@TableField(value = "jiaolian_name")
private String jiaolianName;
/**
*
*/
@TableField(value = "jiaolian_phone")
private String jiaolianPhone;
/**
*
*/
@TableField(value = "jiaolian_photo")
private String jiaolianPhoto;
/**
*
*/
@TableField(value = "sex_types")
private Integer sexTypes;
/**
*
*/
@TableField(value = "jiaolian_email")
private String jiaolianEmail;
/**
*
*/
@TableField(value = "jiaolian_content")
private String jiaolianContent;
/**
*
*/
@TableField(value = "data_delete")
private Integer dataDelete;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* show1 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getPassword() {
return password;
}
/**
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
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;
}
/**
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
public String getJiaolianEmail() {
return jiaolianEmail;
}
/**
*
*/
public void setJiaolianEmail(String jiaolianEmail) {
this.jiaolianEmail = jiaolianEmail;
}
/**
*
*/
public String getJiaolianContent() {
return jiaolianContent;
}
/**
*
*/
public void setJiaolianContent(String jiaolianContent) {
this.jiaolianContent = jiaolianContent;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show1 show2 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show1 show2 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,236 @@
package com.entity.vo;
import com.entity.JiaolianYuyueEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("jiaolian_yuyue")
public class JiaolianYuyueVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "jiaolian_yuyue_uuid_number")
private String jiaolianYuyueUuidNumber;
/**
*
*/
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
*
*/
@TableField(value = "jiaolian_yuyue_text")
private String jiaolianYuyueText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "jiaolian_yuyue_time")
private Date jiaolianYuyueTime;
/**
*
*/
@TableField(value = "jiaolian_yuyue_yesno_types")
private Integer jiaolianYuyueYesnoTypes;
/**
*
*/
@TableField(value = "jiaolian_yuyue_yesno_text")
private String jiaolianYuyueYesnoText;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* show3 listShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getJiaolianYuyueUuidNumber() {
return jiaolianYuyueUuidNumber;
}
/**
*
*/
public void setJiaolianYuyueUuidNumber(String jiaolianYuyueUuidNumber) {
this.jiaolianYuyueUuidNumber = jiaolianYuyueUuidNumber;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJiaolianYuyueText() {
return jiaolianYuyueText;
}
/**
*
*/
public void setJiaolianYuyueText(String jiaolianYuyueText) {
this.jiaolianYuyueText = jiaolianYuyueText;
}
/**
*
*/
public Date getJiaolianYuyueTime() {
return jiaolianYuyueTime;
}
/**
*
*/
public void setJiaolianYuyueTime(Date jiaolianYuyueTime) {
this.jiaolianYuyueTime = jiaolianYuyueTime;
}
/**
*
*/
public Integer getJiaolianYuyueYesnoTypes() {
return jiaolianYuyueYesnoTypes;
}
/**
*
*/
public void setJiaolianYuyueYesnoTypes(Integer jiaolianYuyueYesnoTypes) {
this.jiaolianYuyueYesnoTypes = jiaolianYuyueYesnoTypes;
}
/**
*
*/
public String getJiaolianYuyueYesnoText() {
return jiaolianYuyueYesnoText;
}
/**
*
*/
public void setJiaolianYuyueYesnoText(String jiaolianYuyueYesnoText) {
this.jiaolianYuyueYesnoText = jiaolianYuyueYesnoText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* show3 listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show3 listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,188 @@
package com.entity.vo;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("news")
public class NewsVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "news_name")
private String newsName;
/**
*
*/
@TableField(value = "news_types")
private Integer newsTypes;
/**
*
*/
@TableField(value = "news_photo")
private String newsPhoto;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
*
*/
@TableField(value = "news_content")
private String newsContent;
/**
* show1 show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getNewsName() {
return newsName;
}
/**
*
*/
public void setNewsName(String newsName) {
this.newsName = newsName;
}
/**
*
*/
public Integer getNewsTypes() {
return newsTypes;
}
/**
*
*/
public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
}
/**
*
*/
public String getNewsPhoto() {
return newsPhoto;
}
/**
*
*/
public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getNewsContent() {
return newsContent;
}
/**
*
*/
public void setNewsContent(String newsContent) {
this.newsContent = newsContent;
}
/**
* show1 show2 nameShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show1 show2 nameShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,163 @@
package com.entity.vo;
import com.entity.SingleSeachEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("single_seach")
public class SingleSeachVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "single_seach_name")
private String singleSeachName;
/**
*
*/
@TableField(value = "single_seach_types")
private Integer singleSeachTypes;
/**
*
*/
@TableField(value = "single_seach_photo")
private String singleSeachPhoto;
/**
*
*/
@TableField(value = "single_seach_content")
private String singleSeachContent;
/**
* show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getSingleSeachName() {
return singleSeachName;
}
/**
*
*/
public void setSingleSeachName(String singleSeachName) {
this.singleSeachName = singleSeachName;
}
/**
*
*/
public Integer getSingleSeachTypes() {
return singleSeachTypes;
}
/**
*
*/
public void setSingleSeachTypes(Integer singleSeachTypes) {
this.singleSeachTypes = singleSeachTypes;
}
/**
*
*/
public String getSingleSeachPhoto() {
return singleSeachPhoto;
}
/**
*
*/
public void setSingleSeachPhoto(String singleSeachPhoto) {
this.singleSeachPhoto = singleSeachPhoto;
}
/**
*
*/
public String getSingleSeachContent() {
return singleSeachContent;
}
/**
*
*/
public void setSingleSeachContent(String singleSeachContent) {
this.singleSeachContent = singleSeachContent;
}
/**
* show2 nameShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* show2 nameShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,326 @@
package com.entity.vo;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
*/
@TableName("yonghu")
public class YonghuVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField(value = "id")
private Integer id;
/**
*
*/
@TableField(value = "username")
private String username;
/**
*
*/
@TableField(value = "password")
private String password;
/**
*
*/
@TableField(value = "yonghu_name")
private String yonghuName;
/**
*
*/
@TableField(value = "yonghu_phone")
private String yonghuPhone;
/**
*
*/
@TableField(value = "yonghu_id_number")
private String yonghuIdNumber;
/**
*
*/
@TableField(value = "yonghu_photo")
private String yonghuPhoto;
/**
*
*/
@TableField(value = "sex_types")
private Integer sexTypes;
/**
*
*/
@TableField(value = "yonghu_email")
private String yonghuEmail;
/**
*
*/
@TableField(value = "new_money")
private Double newMoney;
/**
*
*/
@TableField(value = "data_delete")
private Integer dataDelete;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public String getUsername() {
return username;
}
/**
*
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
*/
public String getPassword() {
return password;
}
/**
*
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
*/
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;
}
/**
*
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
*
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
*
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
*
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
*
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
*
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
*
*/
public Double getNewMoney() {
return newMoney;
}
/**
*
*/
public void setNewMoney(Double newMoney) {
this.newMoney = newMoney;
}
/**
*
*/
public Integer getDataDelete() {
return dataDelete;
}
/**
*
*/
public void setDataDelete(Integer dataDelete) {
this.dataDelete = dataDelete;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

@ -0,0 +1,94 @@
package com.interceptor;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import com.annotation.IgnoreAuth;
import com.entity.EIException;
import com.entity.TokenEntity;
import com.service.TokenService;
import com.utils.R;
/**
* (Token)
*/
@Component
public class AuthorizationInterceptor implements HandlerInterceptor {
public static final String LOGIN_TOKEN_KEY = "Token";
@Autowired
private TokenService tokenService;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String servletPath = request.getServletPath();
if("/dictionary/page".equals(request.getServletPath()) || "/file/upload".equals(request.getServletPath()) || "/yonghu/register".equals(request.getServletPath()) ){//请求路径是字典表或者文件上传 直接放行
return true;
}
//支持跨域请求
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
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-Origin", request.getHeader("Origin"));
IgnoreAuth annotation;
if (handler instanceof HandlerMethod) {
annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
} else {
return true;
}
//从header中获取token
String token = request.getHeader(LOGIN_TOKEN_KEY);
/**
*
*/
if(annotation!=null) {
return true;
}
TokenEntity tokenEntity = null;
if(StringUtils.isNotBlank(token)) {
tokenEntity = tokenService.getTokenEntity(token);
}
if(tokenEntity != null) {
request.getSession().setAttribute("userId", tokenEntity.getUserid());
request.getSession().setAttribute("role", tokenEntity.getRole());
request.getSession().setAttribute("tableName", tokenEntity.getTablename());
request.getSession().setAttribute("username", tokenEntity.getUsername());
return true;
}
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;
}
}

@ -0,0 +1,23 @@
package com;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication
@ServletComponentScan(value = "com.ServletContextListener")
@MapperScan(basePackages = {"com.dao"})
public class jianshenfangglApplication extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(jianshenfangglApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder) {
return applicationBuilder.sources(jianshenfangglApplication.class);
}
}

@ -0,0 +1,31 @@
package com.model.enums;
import java.io.Serializable;
import com.baomidou.mybatisplus.enums.IEnum;
/**
* IEnum spring-mybatis.xml typeEnumsPackage
*/
public enum TypeEnum implements IEnum {
DISABLED(0, "禁用"),
NORMAL(1, "正常");
private final int value;
private final String desc;
TypeEnum(final int value, final String desc) {
this.value = value;
this.desc = desc;
}
@Override
public Serializable getValue() {
return this.value;
}
// Jackson 注解为 JsonValue 返回中文 json 描述
public String getDesc() {
return this.desc;
}
}

@ -0,0 +1,46 @@
package com.service;
import java.util.List;
import java.util.Map;
public interface CommonService {
List<Map<String, Object>> pieSum(Map<String, Object> params);
List<Map<String, Object>> pieCount(Map<String, Object> params);
List<Map<String, Object>> barSumOne(Map<String, Object> params);
List<Map<String, Object>> barCountOne(Map<String, Object> params);
List<Map<String, Object>> barSumTwo(Map<String, Object> params);
List<Map<String, Object>> barCountTwo(Map<String, Object> params);
/**
tableName
condition1 1
condition1Value 1
average
* */
Map<String, Object> queryScore(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> barSum(Map<String, Object> params);
/**
*
* @param params
* @return
*/
List<Map<String, Object>> barCount(Map<String, Object> params);
}

@ -0,0 +1,18 @@
package com.service;
import java.util.Map;
import com.baomidou.mybatisplus.service.IService;
import com.entity.ConfigEntity;
import com.utils.PageUtils;
/**
*
* @author yangliyuan
* @date 20191010 9:18:20
*/
public interface ConfigService extends IService<ConfigEntity> {
PageUtils queryPage(Map<String, Object> params);
}

@ -0,0 +1,27 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.DictionaryEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;
/**
*
*/
public interface DictionaryService extends IService<DictionaryEntity> {
/**
* @param params
* @return
*/
PageUtils queryPage(Map<String, Object> params);
/**
*
* @param obj
*/
void dictionaryConvert(Object obj, HttpServletRequest request);
}

@ -0,0 +1,22 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.ForumEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;
/**
*
*/
public interface ForumService extends IService<ForumEntity> {
/**
* @param params
* @return
*/
PageUtils queryPage(Map<String, Object> params);
}

@ -0,0 +1,22 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.JianshenkechengCollectionEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;
/**
*
*/
public interface JianshenkechengCollectionService extends IService<JianshenkechengCollectionEntity> {
/**
* @param params
* @return
*/
PageUtils queryPage(Map<String, Object> params);
}

@ -0,0 +1,22 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.JianshenkechengLiuyanEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;
/**
*
*/
public interface JianshenkechengLiuyanService extends IService<JianshenkechengLiuyanEntity> {
/**
* @param params
* @return
*/
PageUtils queryPage(Map<String, Object> params);
}

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

Loading…
Cancel
Save