parent
12e1402355
commit
eb93ff623b
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/webapp"/>
|
||||
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
|
||||
<attributes>
|
||||
<attribute name="hide" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
|
||||
<classpathentry kind="output" path=""/>
|
||||
</classpath>
|
@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
@ -0,0 +1,9 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="spring-schema">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<property name="java-output-path" value="/mybatisplus-spring-mvc/target/classes"/>
|
||||
<property name="context-root" value="spring-schema"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
</faceted-project>
|
@ -0,0 +1 @@
|
||||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
@ -0,0 +1 @@
|
||||
Window
|
@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
@ -0,0 +1,267 @@
|
||||
-- MySQL dump 10.13 Distrib 5.7.31, for Linux (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: jspmi4017
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.7.31
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Current Database: `jspmi4017`
|
||||
--
|
||||
|
||||
/*!40000 DROP DATABASE IF EXISTS `jspmi4017`*/;
|
||||
|
||||
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `jspmi4017` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
|
||||
|
||||
USE `jspmi4017`;
|
||||
|
||||
--
|
||||
-- Table structure for table `config`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `config`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `config` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`name` varchar(100) NOT NULL COMMENT '配置参数名称',
|
||||
`value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `config`
|
||||
--
|
||||
|
||||
LOCK TABLES `config` WRITE;
|
||||
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
|
||||
INSERT INTO `config` VALUES (1,'picture1','upload/picture1.jpg'),(2,'picture2','upload/picture2.jpg'),(3,'picture3','upload/picture3.jpg');
|
||||
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `feiyongxinxi`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `feiyongxinxi`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `feiyongxinxi` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`xueshengzhanghao` varchar(200) DEFAULT NULL COMMENT '学生账号',
|
||||
`xueshengxingming` varchar(200) DEFAULT NULL COMMENT '学生姓名',
|
||||
`leixing` varchar(200) DEFAULT NULL COMMENT '类型',
|
||||
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
|
||||
`zhuanye` varchar(200) DEFAULT NULL COMMENT '专业',
|
||||
`yuanxi` varchar(200) DEFAULT NULL COMMENT '院系',
|
||||
`feiyong` varchar(200) DEFAULT NULL COMMENT '费用',
|
||||
`jiezhishijian` date DEFAULT NULL COMMENT '截止时间',
|
||||
`ispay` varchar(200) DEFAULT '未支付' COMMENT '是否支付',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='费用信息';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `feiyongxinxi`
|
||||
--
|
||||
|
||||
LOCK TABLES `feiyongxinxi` WRITE;
|
||||
/*!40000 ALTER TABLE `feiyongxinxi` DISABLE KEYS */;
|
||||
INSERT INTO `feiyongxinxi` VALUES (41,'2023-05-01 08:57:05','学生账号1','学生姓名1','类型1','联系电话1','专业1','院系1','费用1','2023-05-01','未支付'),(42,'2023-05-01 08:57:05','学生账号2','学生姓名2','类型2','联系电话2','专业2','院系2','费用2','2023-05-01','未支付'),(43,'2023-05-01 08:57:05','学生账号3','学生姓名3','类型3','联系电话3','专业3','院系3','费用3','2023-05-01','未支付'),(44,'2023-05-01 08:57:05','学生账号4','学生姓名4','类型4','联系电话4','专业4','院系4','费用4','2023-05-01','未支付'),(45,'2023-05-01 08:57:05','学生账号5','学生姓名5','类型5','联系电话5','专业5','院系5','费用5','2023-05-01','未支付'),(46,'2023-05-01 08:57:05','学生账号6','学生姓名6','类型6','联系电话6','专业6','院系6','费用6','2023-05-01','未支付'),(47,'2023-05-01 08:57:05','学生账号7','学生姓名7','类型7','联系电话7','专业7','院系7','费用7','2023-05-01','未支付'),(48,'2023-05-01 08:57:05','学生账号8','学生姓名8','类型8','联系电话8','专业8','院系8','费用8','2023-05-01','未支付');
|
||||
/*!40000 ALTER TABLE `feiyongxinxi` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `gonggaoxinxi`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `gonggaoxinxi`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `gonggaoxinxi` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`biaoti` varchar(200) DEFAULT NULL COMMENT '标题',
|
||||
`fabushijian` date DEFAULT NULL COMMENT '发布时间',
|
||||
`neirong` longtext COMMENT '内容',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='公告信息';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `gonggaoxinxi`
|
||||
--
|
||||
|
||||
LOCK TABLES `gonggaoxinxi` WRITE;
|
||||
/*!40000 ALTER TABLE `gonggaoxinxi` DISABLE KEYS */;
|
||||
INSERT INTO `gonggaoxinxi` VALUES (51,'2023-05-01 08:57:05','标题1','2023-05-01','内容1'),(52,'2023-05-01 08:57:05','标题2','2023-05-01','内容2'),(53,'2023-05-01 08:57:05','标题3','2023-05-01','内容3'),(54,'2023-05-01 08:57:05','标题4','2023-05-01','内容4'),(55,'2023-05-01 08:57:05','标题5','2023-05-01','内容5'),(56,'2023-05-01 08:57:05','标题6','2023-05-01','内容6'),(57,'2023-05-01 08:57:05','标题7','2023-05-01','内容7'),(58,'2023-05-01 08:57:05','标题8','2023-05-01','内容8');
|
||||
/*!40000 ALTER TABLE `gonggaoxinxi` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `jiaoshi`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `jiaoshi`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `jiaoshi` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`jiaoshigonghao` varchar(200) NOT NULL COMMENT '教师工号',
|
||||
`mima` varchar(200) NOT NULL COMMENT '密码',
|
||||
`jiaoshixingming` varchar(200) NOT NULL COMMENT '教师姓名',
|
||||
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
|
||||
`zhicheng` varchar(200) DEFAULT NULL COMMENT '职称',
|
||||
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `jiaoshigonghao` (`jiaoshigonghao`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='教师';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `jiaoshi`
|
||||
--
|
||||
|
||||
LOCK TABLES `jiaoshi` WRITE;
|
||||
/*!40000 ALTER TABLE `jiaoshi` DISABLE KEYS */;
|
||||
INSERT INTO `jiaoshi` VALUES (21,'2023-05-01 08:57:05','教师工号1','123456','教师姓名1','男','职称1','13823888881'),(22,'2023-05-01 08:57:05','教师工号2','123456','教师姓名2','男','职称2','13823888882'),(23,'2023-05-01 08:57:05','教师工号3','123456','教师姓名3','男','职称3','13823888883'),(24,'2023-05-01 08:57:05','教师工号4','123456','教师姓名4','男','职称4','13823888884'),(25,'2023-05-01 08:57:05','教师工号5','123456','教师姓名5','男','职称5','13823888885'),(26,'2023-05-01 08:57:05','教师工号6','123456','教师姓名6','男','职称6','13823888886'),(27,'2023-05-01 08:57:05','教师工号7','123456','教师姓名7','男','职称7','13823888887'),(28,'2023-05-01 08:57:05','教师工号8','123456','教师姓名8','男','职称8','13823888888');
|
||||
/*!40000 ALTER TABLE `jiaoshi` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `leixing`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `leixing`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `leixing` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`leixing` varchar(200) NOT NULL COMMENT '类型',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `leixing` (`leixing`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8 COMMENT='类型';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `leixing`
|
||||
--
|
||||
|
||||
LOCK TABLES `leixing` WRITE;
|
||||
/*!40000 ALTER TABLE `leixing` DISABLE KEYS */;
|
||||
INSERT INTO `leixing` VALUES (31,'2023-05-01 08:57:05','类型1'),(32,'2023-05-01 08:57:05','类型2'),(33,'2023-05-01 08:57:05','类型3'),(34,'2023-05-01 08:57:05','类型4'),(35,'2023-05-01 08:57:05','类型5'),(36,'2023-05-01 08:57:05','类型6'),(37,'2023-05-01 08:57:05','类型7'),(38,'2023-05-01 08:57:05','类型8');
|
||||
/*!40000 ALTER TABLE `leixing` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `token`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `token`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `token` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`userid` bigint(20) NOT NULL COMMENT '用户id',
|
||||
`username` varchar(100) NOT NULL COMMENT '用户名',
|
||||
`tablename` varchar(100) DEFAULT NULL COMMENT '表名',
|
||||
`role` varchar(100) DEFAULT NULL COMMENT '角色',
|
||||
`token` varchar(200) NOT NULL COMMENT '密码',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
|
||||
`expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='token表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `token`
|
||||
--
|
||||
|
||||
LOCK TABLES `token` WRITE;
|
||||
/*!40000 ALTER TABLE `token` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `token` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `users`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `users`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `users` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`username` varchar(100) NOT NULL COMMENT '用户名',
|
||||
`password` varchar(100) NOT NULL COMMENT '密码',
|
||||
`role` varchar(100) DEFAULT '管理员' COMMENT '角色',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `users`
|
||||
--
|
||||
|
||||
LOCK TABLES `users` WRITE;
|
||||
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
||||
INSERT INTO `users` VALUES (1,'admin','admin','管理员','2023-05-01 08:57:05');
|
||||
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
--
|
||||
-- Table structure for table `xuesheng`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `xuesheng`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `xuesheng` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`xueshengzhanghao` varchar(200) DEFAULT NULL COMMENT '学生账号',
|
||||
`xueshengxingming` varchar(200) DEFAULT NULL COMMENT '学生姓名',
|
||||
`mima` varchar(200) DEFAULT NULL COMMENT '密码',
|
||||
`xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
|
||||
`lianxidianhua` varchar(200) DEFAULT NULL COMMENT '联系电话',
|
||||
`zhuanye` varchar(200) DEFAULT NULL COMMENT '专业',
|
||||
`yuanxi` varchar(200) DEFAULT NULL COMMENT '院系',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `xueshengzhanghao` (`xueshengzhanghao`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='学生';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `xuesheng`
|
||||
--
|
||||
|
||||
LOCK TABLES `xuesheng` WRITE;
|
||||
/*!40000 ALTER TABLE `xuesheng` DISABLE KEYS */;
|
||||
INSERT INTO `xuesheng` VALUES (11,'2023-05-01 08:57:05','学生账号1','学生姓名1','123456','男','13823888881','专业1','院系1'),(12,'2023-05-01 08:57:05','学生账号2','学生姓名2','123456','男','13823888882','专业2','院系2'),(13,'2023-05-01 08:57:05','学生账号3','学生姓名3','123456','男','13823888883','专业3','院系3'),(14,'2023-05-01 08:57:05','学生账号4','学生姓名4','123456','男','13823888884','专业4','院系4'),(15,'2023-05-01 08:57:05','学生账号5','学生姓名5','123456','男','13823888885','专业5','院系5'),(16,'2023-05-01 08:57:05','学生账号6','学生姓名6','123456','男','13823888886','专业6','院系6'),(17,'2023-05-01 08:57:05','学生账号7','学生姓名7','123456','男','13823888887','专业7','院系7'),(18,'2023-05-01 08:57:05','学生账号8','学生姓名8','123456','男','13823888888','专业8','院系8');
|
||||
/*!40000 ALTER TABLE `xuesheng` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2023-05-01 16:58:23
|
@ -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.*;
|
||||
|
||||
/**
|
||||
* 忽略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,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,112 @@
|
||||
|
||||
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.MPUtil;
|
||||
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, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), 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, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), 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,193 @@
|
||||
package com.controller;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
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.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.FeiyongxinxiEntity;
|
||||
import com.entity.view.FeiyongxinxiView;
|
||||
|
||||
import com.service.FeiyongxinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
/**
|
||||
* 费用信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/feiyongxinxi")
|
||||
public class FeiyongxinxiController {
|
||||
@Autowired
|
||||
private FeiyongxinxiService feiyongxinxiService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,FeiyongxinxiEntity feiyongxinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
String tableName = request.getSession().getAttribute("tableName").toString();
|
||||
if(tableName.equals("xuesheng")) {
|
||||
feiyongxinxi.setXueshengzhanghao((String)request.getSession().getAttribute("username"));
|
||||
}
|
||||
EntityWrapper<FeiyongxinxiEntity> ew = new EntityWrapper<FeiyongxinxiEntity>();
|
||||
|
||||
PageUtils page = feiyongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, feiyongxinxi), params), params));
|
||||
request.setAttribute("data", page);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,FeiyongxinxiEntity feiyongxinxi,
|
||||
HttpServletRequest request){
|
||||
EntityWrapper<FeiyongxinxiEntity> ew = new EntityWrapper<FeiyongxinxiEntity>();
|
||||
|
||||
PageUtils page = feiyongxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, feiyongxinxi), params), params));
|
||||
request.setAttribute("data", page);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( FeiyongxinxiEntity feiyongxinxi){
|
||||
EntityWrapper<FeiyongxinxiEntity> ew = new EntityWrapper<FeiyongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( feiyongxinxi, "feiyongxinxi"));
|
||||
return R.ok().put("data", feiyongxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(FeiyongxinxiEntity feiyongxinxi){
|
||||
EntityWrapper< FeiyongxinxiEntity> ew = new EntityWrapper< FeiyongxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( feiyongxinxi, "feiyongxinxi"));
|
||||
FeiyongxinxiView feiyongxinxiView = feiyongxinxiService.selectView(ew);
|
||||
return R.ok("查询费用信息成功").put("data", feiyongxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
FeiyongxinxiEntity feiyongxinxi = feiyongxinxiService.selectById(id);
|
||||
return R.ok().put("data", feiyongxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
FeiyongxinxiEntity feiyongxinxi = feiyongxinxiService.selectById(id);
|
||||
return R.ok().put("data", feiyongxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody FeiyongxinxiEntity feiyongxinxi, HttpServletRequest request){
|
||||
feiyongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(feiyongxinxi);
|
||||
|
||||
feiyongxinxiService.insert(feiyongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody FeiyongxinxiEntity feiyongxinxi, HttpServletRequest request){
|
||||
feiyongxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(feiyongxinxi);
|
||||
|
||||
feiyongxinxiService.insert(feiyongxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
@Transactional
|
||||
public R update(@RequestBody FeiyongxinxiEntity feiyongxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(feiyongxinxi);
|
||||
feiyongxinxiService.updateById(feiyongxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
feiyongxinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,189 @@
|
||||
package com.controller;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
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.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.GonggaoxinxiEntity;
|
||||
import com.entity.view.GonggaoxinxiView;
|
||||
|
||||
import com.service.GonggaoxinxiService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
/**
|
||||
* 公告信息
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/gonggaoxinxi")
|
||||
public class GonggaoxinxiController {
|
||||
@Autowired
|
||||
private GonggaoxinxiService gonggaoxinxiService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,GonggaoxinxiEntity gonggaoxinxi,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<GonggaoxinxiEntity> ew = new EntityWrapper<GonggaoxinxiEntity>();
|
||||
|
||||
PageUtils page = gonggaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gonggaoxinxi), params), params));
|
||||
request.setAttribute("data", page);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,GonggaoxinxiEntity gonggaoxinxi,
|
||||
HttpServletRequest request){
|
||||
EntityWrapper<GonggaoxinxiEntity> ew = new EntityWrapper<GonggaoxinxiEntity>();
|
||||
|
||||
PageUtils page = gonggaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gonggaoxinxi), params), params));
|
||||
request.setAttribute("data", page);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( GonggaoxinxiEntity gonggaoxinxi){
|
||||
EntityWrapper<GonggaoxinxiEntity> ew = new EntityWrapper<GonggaoxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( gonggaoxinxi, "gonggaoxinxi"));
|
||||
return R.ok().put("data", gonggaoxinxiService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(GonggaoxinxiEntity gonggaoxinxi){
|
||||
EntityWrapper< GonggaoxinxiEntity> ew = new EntityWrapper< GonggaoxinxiEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( gonggaoxinxi, "gonggaoxinxi"));
|
||||
GonggaoxinxiView gonggaoxinxiView = gonggaoxinxiService.selectView(ew);
|
||||
return R.ok("查询公告信息成功").put("data", gonggaoxinxiView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
GonggaoxinxiEntity gonggaoxinxi = gonggaoxinxiService.selectById(id);
|
||||
return R.ok().put("data", gonggaoxinxi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
GonggaoxinxiEntity gonggaoxinxi = gonggaoxinxiService.selectById(id);
|
||||
return R.ok().put("data", gonggaoxinxi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody GonggaoxinxiEntity gonggaoxinxi, HttpServletRequest request){
|
||||
gonggaoxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(gonggaoxinxi);
|
||||
|
||||
gonggaoxinxiService.insert(gonggaoxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody GonggaoxinxiEntity gonggaoxinxi, HttpServletRequest request){
|
||||
gonggaoxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(gonggaoxinxi);
|
||||
|
||||
gonggaoxinxiService.insert(gonggaoxinxi);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
@Transactional
|
||||
public R update(@RequestBody GonggaoxinxiEntity gonggaoxinxi, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(gonggaoxinxi);
|
||||
gonggaoxinxiService.updateById(gonggaoxinxi);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
gonggaoxinxiService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,189 @@
|
||||
package com.controller;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.utils.ValidatorUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
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.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.annotation.IgnoreAuth;
|
||||
|
||||
import com.entity.LeixingEntity;
|
||||
import com.entity.view.LeixingView;
|
||||
|
||||
import com.service.LeixingService;
|
||||
import com.service.TokenService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.R;
|
||||
import com.utils.MD5Util;
|
||||
import com.utils.MPUtil;
|
||||
import com.utils.CommonUtil;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
* 后端接口
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/leixing")
|
||||
public class LeixingController {
|
||||
@Autowired
|
||||
private LeixingService leixingService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端列表
|
||||
*/
|
||||
@RequestMapping("/page")
|
||||
public R page(@RequestParam Map<String, Object> params,LeixingEntity leixing,
|
||||
HttpServletRequest request){
|
||||
|
||||
EntityWrapper<LeixingEntity> ew = new EntityWrapper<LeixingEntity>();
|
||||
|
||||
PageUtils page = leixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, leixing), params), params));
|
||||
request.setAttribute("data", page);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端列表
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params,LeixingEntity leixing,
|
||||
HttpServletRequest request){
|
||||
EntityWrapper<LeixingEntity> ew = new EntityWrapper<LeixingEntity>();
|
||||
|
||||
PageUtils page = leixingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, leixing), params), params));
|
||||
request.setAttribute("data", page);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/lists")
|
||||
public R list( LeixingEntity leixing){
|
||||
EntityWrapper<LeixingEntity> ew = new EntityWrapper<LeixingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( leixing, "leixing"));
|
||||
return R.ok().put("data", leixingService.selectListView(ew));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
@RequestMapping("/query")
|
||||
public R query(LeixingEntity leixing){
|
||||
EntityWrapper< LeixingEntity> ew = new EntityWrapper< LeixingEntity>();
|
||||
ew.allEq(MPUtil.allEQMapPre( leixing, "leixing"));
|
||||
LeixingView leixingView = leixingService.selectView(ew);
|
||||
return R.ok("查询类型成功").put("data", leixingView);
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端详情
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
LeixingEntity leixing = leixingService.selectById(id);
|
||||
return R.ok().put("data", leixing);
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端详情
|
||||
*/
|
||||
@IgnoreAuth
|
||||
@RequestMapping("/detail/{id}")
|
||||
public R detail(@PathVariable("id") Long id){
|
||||
LeixingEntity leixing = leixingService.selectById(id);
|
||||
return R.ok().put("data", leixing);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 后端保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody LeixingEntity leixing, HttpServletRequest request){
|
||||
leixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(leixing);
|
||||
|
||||
leixingService.insert(leixing);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 前端保存
|
||||
*/
|
||||
@RequestMapping("/add")
|
||||
public R add(@RequestBody LeixingEntity leixing, HttpServletRequest request){
|
||||
leixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
||||
//ValidatorUtils.validateEntity(leixing);
|
||||
|
||||
leixingService.insert(leixing);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
@Transactional
|
||||
public R update(@RequestBody LeixingEntity leixing, HttpServletRequest request){
|
||||
//ValidatorUtils.validateEntity(leixing);
|
||||
leixingService.updateById(leixing);//全部更新
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
leixingService.deleteBatchIds(Arrays.asList(ids));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
|
||||
package com.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通用接口
|
||||
*/
|
||||
public interface CommonDao{
|
||||
List<String> getOption(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> getFollowByOption(Map<String, Object> params);
|
||||
|
||||
List<String> getFollowByOption2(Map<String, Object> params);
|
||||
|
||||
void sh(Map<String, Object> params);
|
||||
|
||||
int remindCount(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> selectCal(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectGroup(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectValue(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectTimeStatValue(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,35 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.FeiyongxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.FeiyongxinxiVO;
|
||||
import com.entity.view.FeiyongxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 费用信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface FeiyongxinxiDao extends BaseMapper<FeiyongxinxiEntity> {
|
||||
|
||||
List<FeiyongxinxiVO> selectListVO(@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
FeiyongxinxiVO selectVO(@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
List<FeiyongxinxiView> selectListView(@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
List<FeiyongxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
FeiyongxinxiView selectView(@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.GonggaoxinxiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.GonggaoxinxiVO;
|
||||
import com.entity.view.GonggaoxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 公告信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface GonggaoxinxiDao extends BaseMapper<GonggaoxinxiEntity> {
|
||||
|
||||
List<GonggaoxinxiVO> selectListVO(@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
GonggaoxinxiVO selectVO(@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
List<GonggaoxinxiView> selectListView(@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
List<GonggaoxinxiView> selectListView(Pagination page,@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
GonggaoxinxiView selectView(@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.JiaoshiEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.JiaoshiVO;
|
||||
import com.entity.view.JiaoshiView;
|
||||
|
||||
|
||||
/**
|
||||
* 教师
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface JiaoshiDao extends BaseMapper<JiaoshiEntity> {
|
||||
|
||||
List<JiaoshiVO> selectListVO(@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
JiaoshiVO selectVO(@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
List<JiaoshiView> selectListView(@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
List<JiaoshiView> selectListView(Pagination page,@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
JiaoshiView selectView(@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.LeixingEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.LeixingVO;
|
||||
import com.entity.view.LeixingView;
|
||||
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface LeixingDao extends BaseMapper<LeixingEntity> {
|
||||
|
||||
List<LeixingVO> selectListVO(@Param("ew") Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
LeixingVO selectVO(@Param("ew") Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
List<LeixingView> selectListView(@Param("ew") Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
List<LeixingView> selectListView(Pagination page,@Param("ew") Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
LeixingView selectView(@Param("ew") Wrapper<LeixingEntity> 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.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,35 @@
|
||||
package com.dao;
|
||||
|
||||
import com.entity.XueshengEntity;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.vo.XueshengVO;
|
||||
import com.entity.view.XueshengView;
|
||||
|
||||
|
||||
/**
|
||||
* 学生
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface XueshengDao extends BaseMapper<XueshengEntity> {
|
||||
|
||||
List<XueshengVO> selectListVO(@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
XueshengVO selectVO(@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
List<XueshengView> selectListView(@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
List<XueshengView> selectListView(Pagination page,@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
XueshengView selectView(@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 类说明 :
|
||||
*/
|
||||
@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,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,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 Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userid;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tablename;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
private String token;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
private Date expiratedtime;
|
||||
|
||||
/**
|
||||
* 新增时间
|
||||
*/
|
||||
private Date addtime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(Long 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(Long 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 Long 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 Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
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 {
|
||||
|
||||
//支持跨域请求
|
||||
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,22 @@
|
||||
package com.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CommonService {
|
||||
List<String> getOption(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> getFollowByOption(Map<String, Object> params);
|
||||
|
||||
void sh(Map<String, Object> params);
|
||||
|
||||
int remindCount(Map<String, Object> params);
|
||||
|
||||
Map<String, Object> selectCal(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectGroup(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectValue(Map<String, Object> params);
|
||||
|
||||
List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
|
||||
package com.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.utils.PageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
public interface ConfigService extends IService<ConfigEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<ConfigEntity> wrapper);
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.FeiyongxinxiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.FeiyongxinxiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.FeiyongxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 费用信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface FeiyongxinxiService extends IService<FeiyongxinxiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<FeiyongxinxiVO> selectListVO(Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
FeiyongxinxiVO selectVO(@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
List<FeiyongxinxiView> selectListView(Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
FeiyongxinxiView selectView(@Param("ew") Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<FeiyongxinxiEntity> wrapper);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.GonggaoxinxiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.GonggaoxinxiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.GonggaoxinxiView;
|
||||
|
||||
|
||||
/**
|
||||
* 公告信息
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface GonggaoxinxiService extends IService<GonggaoxinxiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<GonggaoxinxiVO> selectListVO(Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
GonggaoxinxiVO selectVO(@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
List<GonggaoxinxiView> selectListView(Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
GonggaoxinxiView selectView(@Param("ew") Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<GonggaoxinxiEntity> wrapper);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.JiaoshiEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.JiaoshiVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.JiaoshiView;
|
||||
|
||||
|
||||
/**
|
||||
* 教师
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface JiaoshiService extends IService<JiaoshiEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<JiaoshiVO> selectListVO(Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
JiaoshiVO selectVO(@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
List<JiaoshiView> selectListView(Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
JiaoshiView selectView(@Param("ew") Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<JiaoshiEntity> wrapper);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.LeixingEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.LeixingVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.LeixingView;
|
||||
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface LeixingService extends IService<LeixingEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<LeixingVO> selectListVO(Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
LeixingVO selectVO(@Param("ew") Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
List<LeixingView> selectListView(Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
LeixingView selectView(@Param("ew") Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<LeixingEntity> wrapper);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
|
||||
package com.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.TokenEntity;
|
||||
import com.utils.PageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
public interface TokenService extends IService<TokenEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<TokenEntity> wrapper);
|
||||
|
||||
String generateToken(Long userid,String username,String tableName, String role);
|
||||
|
||||
TokenEntity getTokenEntity(String token);
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
|
||||
package com.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.entity.UsersEntity;
|
||||
import com.utils.PageUtils;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
public interface UsersService extends IService<UsersEntity> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<UsersEntity> wrapper);
|
||||
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.service.IService;
|
||||
import com.utils.PageUtils;
|
||||
import com.entity.XueshengEntity;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.entity.vo.XueshengVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.entity.view.XueshengView;
|
||||
|
||||
|
||||
/**
|
||||
* 学生
|
||||
*
|
||||
* @author
|
||||
* @email
|
||||
* @date 2023-05-01 16:56:28
|
||||
*/
|
||||
public interface XueshengService extends IService<XueshengEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
List<XueshengVO> selectListVO(Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
XueshengVO selectVO(@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
List<XueshengView> selectListView(Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
XueshengView selectView(@Param("ew") Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params,Wrapper<XueshengEntity> wrapper);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,64 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.dao.CommonDao;
|
||||
import com.service.CommonService;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
@Service("commonService")
|
||||
public class CommonServiceImpl implements CommonService {
|
||||
|
||||
@Autowired
|
||||
private CommonDao commonDao;
|
||||
|
||||
@Override
|
||||
public List<String> getOption(Map<String, Object> params) {
|
||||
return commonDao.getOption(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getFollowByOption(Map<String, Object> params) {
|
||||
return commonDao.getFollowByOption(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sh(Map<String, Object> params) {
|
||||
commonDao.sh(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remindCount(Map<String, Object> params) {
|
||||
return commonDao.remindCount(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectCal(Map<String, Object> params) {
|
||||
return commonDao.selectCal(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectGroup(Map<String, Object> params) {
|
||||
return commonDao.selectGroup(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectValue(Map<String, Object> params) {
|
||||
return commonDao.selectValue(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectTimeStatValue(Map<String, Object> params) {
|
||||
return commonDao.selectTimeStatValue(params);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.ConfigDao;
|
||||
import com.entity.ConfigEntity;
|
||||
import com.service.ConfigService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
@Service("configService")
|
||||
public class ConfigServiceImpl extends ServiceImpl<ConfigDao, ConfigEntity> implements ConfigService {
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<ConfigEntity> wrapper) {
|
||||
Page<ConfigEntity> page = this.selectPage(
|
||||
new Query<ConfigEntity>(params).getPage(),
|
||||
wrapper
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.FeiyongxinxiDao;
|
||||
import com.entity.FeiyongxinxiEntity;
|
||||
import com.service.FeiyongxinxiService;
|
||||
import com.entity.vo.FeiyongxinxiVO;
|
||||
import com.entity.view.FeiyongxinxiView;
|
||||
|
||||
@Service("feiyongxinxiService")
|
||||
public class FeiyongxinxiServiceImpl extends ServiceImpl<FeiyongxinxiDao, FeiyongxinxiEntity> implements FeiyongxinxiService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<FeiyongxinxiEntity> page = this.selectPage(
|
||||
new Query<FeiyongxinxiEntity>(params).getPage(),
|
||||
new EntityWrapper<FeiyongxinxiEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<FeiyongxinxiEntity> wrapper) {
|
||||
Page<FeiyongxinxiView> page =new Query<FeiyongxinxiView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FeiyongxinxiVO> selectListVO(Wrapper<FeiyongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeiyongxinxiVO selectVO(Wrapper<FeiyongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FeiyongxinxiView> selectListView(Wrapper<FeiyongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeiyongxinxiView selectView(Wrapper<FeiyongxinxiEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.GonggaoxinxiDao;
|
||||
import com.entity.GonggaoxinxiEntity;
|
||||
import com.service.GonggaoxinxiService;
|
||||
import com.entity.vo.GonggaoxinxiVO;
|
||||
import com.entity.view.GonggaoxinxiView;
|
||||
|
||||
@Service("gonggaoxinxiService")
|
||||
public class GonggaoxinxiServiceImpl extends ServiceImpl<GonggaoxinxiDao, GonggaoxinxiEntity> implements GonggaoxinxiService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<GonggaoxinxiEntity> page = this.selectPage(
|
||||
new Query<GonggaoxinxiEntity>(params).getPage(),
|
||||
new EntityWrapper<GonggaoxinxiEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<GonggaoxinxiEntity> wrapper) {
|
||||
Page<GonggaoxinxiView> page =new Query<GonggaoxinxiView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GonggaoxinxiVO> selectListVO(Wrapper<GonggaoxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GonggaoxinxiVO selectVO(Wrapper<GonggaoxinxiEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GonggaoxinxiView> selectListView(Wrapper<GonggaoxinxiEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GonggaoxinxiView selectView(Wrapper<GonggaoxinxiEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.JiaoshiDao;
|
||||
import com.entity.JiaoshiEntity;
|
||||
import com.service.JiaoshiService;
|
||||
import com.entity.vo.JiaoshiVO;
|
||||
import com.entity.view.JiaoshiView;
|
||||
|
||||
@Service("jiaoshiService")
|
||||
public class JiaoshiServiceImpl extends ServiceImpl<JiaoshiDao, JiaoshiEntity> implements JiaoshiService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<JiaoshiEntity> page = this.selectPage(
|
||||
new Query<JiaoshiEntity>(params).getPage(),
|
||||
new EntityWrapper<JiaoshiEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<JiaoshiEntity> wrapper) {
|
||||
Page<JiaoshiView> page =new Query<JiaoshiView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JiaoshiVO> selectListVO(Wrapper<JiaoshiEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JiaoshiVO selectVO(Wrapper<JiaoshiEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JiaoshiView> selectListView(Wrapper<JiaoshiEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JiaoshiView selectView(Wrapper<JiaoshiEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.LeixingDao;
|
||||
import com.entity.LeixingEntity;
|
||||
import com.service.LeixingService;
|
||||
import com.entity.vo.LeixingVO;
|
||||
import com.entity.view.LeixingView;
|
||||
|
||||
@Service("leixingService")
|
||||
public class LeixingServiceImpl extends ServiceImpl<LeixingDao, LeixingEntity> implements LeixingService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<LeixingEntity> page = this.selectPage(
|
||||
new Query<LeixingEntity>(params).getPage(),
|
||||
new EntityWrapper<LeixingEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<LeixingEntity> wrapper) {
|
||||
Page<LeixingView> page =new Query<LeixingView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LeixingVO> selectListVO(Wrapper<LeixingEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeixingVO selectVO(Wrapper<LeixingEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LeixingView> selectListView(Wrapper<LeixingEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeixingView selectView(Wrapper<LeixingEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.TokenDao;
|
||||
import com.entity.TokenEntity;
|
||||
import com.entity.TokenEntity;
|
||||
import com.service.TokenService;
|
||||
import com.utils.CommonUtil;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
/**
|
||||
* token
|
||||
*/
|
||||
@Service("tokenService")
|
||||
public class TokenServiceImpl extends ServiceImpl<TokenDao, TokenEntity> implements TokenService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<TokenEntity> page = this.selectPage(
|
||||
new Query<TokenEntity>(params).getPage(),
|
||||
new EntityWrapper<TokenEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params,
|
||||
Wrapper<TokenEntity> wrapper) {
|
||||
Page<TokenEntity> page =new Query<TokenEntity>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateToken(Long userid,String username, String tableName, String role) {
|
||||
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("userid", userid).eq("role", role));
|
||||
String token = CommonUtil.getRandomString(32);
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(new Date());
|
||||
cal.add(Calendar.HOUR_OF_DAY, 1);
|
||||
if(tokenEntity!=null) {
|
||||
tokenEntity.setToken(token);
|
||||
tokenEntity.setExpiratedtime(cal.getTime());
|
||||
this.updateById(tokenEntity);
|
||||
} else {
|
||||
this.insert(new TokenEntity(userid,username, tableName, role, token, cal.getTime()));
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TokenEntity getTokenEntity(String token) {
|
||||
TokenEntity tokenEntity = this.selectOne(new EntityWrapper<TokenEntity>().eq("token", token));
|
||||
if(tokenEntity == null || tokenEntity.getExpiratedtime().getTime()<new Date().getTime()) {
|
||||
return null;
|
||||
}
|
||||
return tokenEntity;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
|
||||
package com.service.impl;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.dao.UsersDao;
|
||||
import com.entity.UsersEntity;
|
||||
import com.service.UsersService;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
/**
|
||||
* 系统用户
|
||||
*/
|
||||
@Service("usersService")
|
||||
public class UsersServiceImpl extends ServiceImpl<UsersDao, UsersEntity> implements UsersService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<UsersEntity> page = this.selectPage(
|
||||
new Query<UsersEntity>(params).getPage(),
|
||||
new EntityWrapper<UsersEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params,
|
||||
Wrapper<UsersEntity> wrapper) {
|
||||
Page<UsersEntity> page =new Query<UsersEntity>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.utils.PageUtils;
|
||||
import com.utils.Query;
|
||||
|
||||
|
||||
import com.dao.XueshengDao;
|
||||
import com.entity.XueshengEntity;
|
||||
import com.service.XueshengService;
|
||||
import com.entity.vo.XueshengVO;
|
||||
import com.entity.view.XueshengView;
|
||||
|
||||
@Service("xueshengService")
|
||||
public class XueshengServiceImpl extends ServiceImpl<XueshengDao, XueshengEntity> implements XueshengService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
Page<XueshengEntity> page = this.selectPage(
|
||||
new Query<XueshengEntity>(params).getPage(),
|
||||
new EntityWrapper<XueshengEntity>()
|
||||
);
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params, Wrapper<XueshengEntity> wrapper) {
|
||||
Page<XueshengView> page =new Query<XueshengView>(params).getPage();
|
||||
page.setRecords(baseMapper.selectListView(page,wrapper));
|
||||
PageUtils pageUtil = new PageUtils(page);
|
||||
return pageUtil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XueshengVO> selectListVO(Wrapper<XueshengEntity> wrapper) {
|
||||
return baseMapper.selectListVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XueshengVO selectVO(Wrapper<XueshengEntity> wrapper) {
|
||||
return baseMapper.selectVO(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<XueshengView> selectListView(Wrapper<XueshengEntity> wrapper) {
|
||||
return baseMapper.selectListView(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public XueshengView selectView(Wrapper<XueshengEntity> wrapper) {
|
||||
return baseMapper.selectView(wrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
package com.utils;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.ArrayList;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import org.apache.poi.ss.usermodel.DateUtil;
|
||||
import java.util.Objects;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@Component
|
||||
public class CommonUtil {
|
||||
|
||||
/**
|
||||
* 获取随机字符串
|
||||
*
|
||||
* @param num
|
||||
* @return
|
||||
*/
|
||||
public static String getRandomString(Integer num) {
|
||||
String base = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
Random random = new Random();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < num; i++) {
|
||||
int number = random.nextInt(base.length());
|
||||
sb.append(base.charAt(number));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取随机验证码
|
||||
*
|
||||
* @param num
|
||||
* @return
|
||||
*/
|
||||
public static String getRandomNumber(Integer num) {
|
||||
String base = "0123456789";
|
||||
Random random = new Random();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < num; i++) {
|
||||
int number = random.nextInt(base.length());
|
||||
sb.append(base.charAt(number));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String getCellValue(Cell cell) {
|
||||
String resultValue = "";
|
||||
// 判空
|
||||
if (Objects.isNull(cell)) {
|
||||
return resultValue;
|
||||
}
|
||||
|
||||
// 拿到单元格类型
|
||||
int cellType = cell.getCellType();
|
||||
switch (cellType) {
|
||||
// 字符串类型
|
||||
case Cell.CELL_TYPE_STRING:
|
||||
resultValue = StringUtils.isEmpty(cell.getStringCellValue()) ? "" : cell.getStringCellValue().trim();
|
||||
break;
|
||||
// 布尔类型
|
||||
case Cell.CELL_TYPE_BOOLEAN:
|
||||
resultValue = String.valueOf(cell.getBooleanCellValue());
|
||||
break;
|
||||
// 数值类型
|
||||
case Cell.CELL_TYPE_NUMERIC:
|
||||
/**
|
||||
* format 的值可能为以下这些 yyyyMMddHHmmss
|
||||
* yyyy-MM-dd----- 14
|
||||
* yyyy年m月d日----- 31
|
||||
* yyyy年m月--------57
|
||||
* m月d日 -----------58
|
||||
* HH:mm-----------20
|
||||
* h时mm分 --------- 32
|
||||
*/
|
||||
Object val = cell.getNumericCellValue();
|
||||
// POI Excel 日期格式转换
|
||||
String formatDate = "";
|
||||
switch (cell.getCellStyle().getDataFormat()){
|
||||
case 14:
|
||||
formatDate = "yyyy-MM-dd";
|
||||
break;
|
||||
case 20:
|
||||
formatDate = "HH:mm";
|
||||
break;
|
||||
case 21:
|
||||
formatDate = "HH:mm:ss";
|
||||
break;
|
||||
case 31:
|
||||
formatDate = "yyyy年MM月dd日";
|
||||
break;
|
||||
case 32:
|
||||
formatDate = "HH时mm分";
|
||||
break;
|
||||
case 33:
|
||||
formatDate = "HH时mm分mm秒";
|
||||
break;
|
||||
case 57:
|
||||
formatDate = "yyyy年MM月";
|
||||
break;
|
||||
case 58:
|
||||
formatDate = "MM月dd日";
|
||||
break;
|
||||
case 176:
|
||||
formatDate = "yyyy-MM-dd HH:mm:ss";
|
||||
break;
|
||||
}
|
||||
if(!"".equals(formatDate)){
|
||||
resultValue = new SimpleDateFormat(formatDate).format(DateUtil.getJavaDate((Double) val));
|
||||
}else{
|
||||
resultValue = new DecimalFormat("#.######").format(cell.getNumericCellValue());
|
||||
}
|
||||
break;
|
||||
// 取空串
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return resultValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.utils;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* 类说明 :
|
||||
*/
|
||||
|
||||
public class FileUtil {
|
||||
public static byte[] FileToByte(File file) throws IOException {
|
||||
// 将数据转为流
|
||||
@SuppressWarnings("resource")
|
||||
InputStream content = new FileInputStream(file);
|
||||
ByteArrayOutputStream swapStream = new ByteArrayOutputStream();
|
||||
byte[] buff = new byte[100];
|
||||
int rc = 0;
|
||||
while ((rc = content.read(buff, 0, 100)) > 0) {
|
||||
swapStream.write(buff, 0, rc);
|
||||
}
|
||||
// 获得二进制数组
|
||||
return swapStream.toByteArray();
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
|
||||
/**
|
||||
* HttpClient工具类
|
||||
*/
|
||||
public class HttpClientUtils {
|
||||
|
||||
/**
|
||||
* @param uri
|
||||
* @return String
|
||||
* @description get请求方式
|
||||
* @author: long.he01
|
||||
*/
|
||||
public static String doGet(String uri) {
|
||||
|
||||
StringBuilder result = new StringBuilder();
|
||||
try {
|
||||
String res = "";
|
||||
URL url = new URL(uri);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
res += line+"\n";
|
||||
}
|
||||
in.close();
|
||||
return res;
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.utils;
|
||||
|
||||
public class JQPageInfo{
|
||||
private Integer page;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private String sidx;
|
||||
|
||||
private String order;
|
||||
|
||||
private Integer offset;
|
||||
|
||||
public Integer getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Integer getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(Integer limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public String getSidx() {
|
||||
return sidx;
|
||||
}
|
||||
|
||||
public void setSidx(String sidx) {
|
||||
this.sidx = sidx;
|
||||
}
|
||||
|
||||
public String getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public void setOrder(String order) {
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public Integer getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
public void setOffset(Integer offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.utils;
|
||||
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
|
||||
public class MD5Util {
|
||||
|
||||
/**
|
||||
* @param text明文
|
||||
* @param key密钥
|
||||
* @return 密文
|
||||
*/
|
||||
// 带秘钥加密
|
||||
public static String md5(String text) {
|
||||
// 加密后的字符串
|
||||
String md5str = DigestUtil.md5Hex(text);
|
||||
return md5str;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,184 @@
|
||||
package com.utils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Wrapper;
|
||||
|
||||
/**
|
||||
* Mybatis-Plus工具类
|
||||
*/
|
||||
public class MPUtil {
|
||||
public static final char UNDERLINE = '_';
|
||||
|
||||
|
||||
//mybatis plus allEQ 表达式转换
|
||||
public static Map allEQMapPre(Object bean,String pre) {
|
||||
Map<String, Object> map =BeanUtil.beanToMap(bean);
|
||||
return camelToUnderlineMap(map,pre);
|
||||
}
|
||||
|
||||
//mybatis plus allEQ 表达式转换
|
||||
public static Map allEQMap(Object bean) {
|
||||
Map<String, Object> map =BeanUtil.beanToMap(bean);
|
||||
return camelToUnderlineMap(map,"");
|
||||
}
|
||||
|
||||
public static Wrapper allLikePre(Wrapper wrapper,Object bean,String pre) {
|
||||
Map<String, Object> map =BeanUtil.beanToMap(bean);
|
||||
Map result = camelToUnderlineMap(map,pre);
|
||||
|
||||
return genLike(wrapper,result);
|
||||
}
|
||||
|
||||
public static Wrapper allLike(Wrapper wrapper,Object bean) {
|
||||
Map result = BeanUtil.beanToMap(bean, true, true);
|
||||
return genLike(wrapper,result);
|
||||
}
|
||||
|
||||
|
||||
public static Wrapper genLike( Wrapper wrapper,Map param) {
|
||||
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
|
||||
int i=0;
|
||||
while (it.hasNext()) {
|
||||
if(i>0) wrapper.and();
|
||||
Map.Entry<String, Object> entry = it.next();
|
||||
String key = entry.getKey();
|
||||
String value = (String) entry.getValue();
|
||||
wrapper.like(key, value);
|
||||
i++;
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
public static Wrapper likeOrEq(Wrapper wrapper,Object bean) {
|
||||
Map result = BeanUtil.beanToMap(bean, true, true);
|
||||
return genLikeOrEq(wrapper,result);
|
||||
}
|
||||
|
||||
public static Wrapper genLikeOrEq( Wrapper wrapper,Map param) {
|
||||
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
|
||||
int i=0;
|
||||
while (it.hasNext()) {
|
||||
if(i>0) wrapper.and();
|
||||
Map.Entry<String, Object> entry = it.next();
|
||||
String key = entry.getKey();
|
||||
if(entry.getValue().toString().contains("%")) {
|
||||
wrapper.like(key, entry.getValue().toString().replace("%", ""));
|
||||
} else {
|
||||
wrapper.eq(key, entry.getValue());
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
public static Wrapper allEq(Wrapper wrapper,Object bean) {
|
||||
Map result = BeanUtil.beanToMap(bean, true, true);
|
||||
return genEq(wrapper,result);
|
||||
}
|
||||
|
||||
|
||||
public static Wrapper genEq( Wrapper wrapper,Map param) {
|
||||
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
|
||||
int i=0;
|
||||
while (it.hasNext()) {
|
||||
if(i>0) wrapper.and();
|
||||
Map.Entry<String, Object> entry = it.next();
|
||||
String key = entry.getKey();
|
||||
wrapper.eq(key, entry.getValue());
|
||||
i++;
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
||||
public static Wrapper between(Wrapper wrapper,Map<String, Object> params) {
|
||||
for(String key : params.keySet()) {
|
||||
String columnName = "";
|
||||
if(key.endsWith("_start")) {
|
||||
columnName = key.substring(0, key.indexOf("_start"));
|
||||
if(StringUtils.isNotBlank(params.get(key).toString())) {
|
||||
wrapper.ge(columnName, params.get(key));
|
||||
}
|
||||
}
|
||||
if(key.endsWith("_end")) {
|
||||
columnName = key.substring(0, key.indexOf("_end"));
|
||||
if(StringUtils.isNotBlank(params.get(key).toString())) {
|
||||
wrapper.le(columnName, params.get(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
public static Wrapper sort(Wrapper wrapper,Map<String, Object> params) {
|
||||
String order = "";
|
||||
if(params.get("order") != null && StringUtils.isNotBlank(params.get("order").toString())) {
|
||||
order = params.get("order").toString();
|
||||
}
|
||||
if(params.get("sort") != null && StringUtils.isNotBlank(params.get("sort").toString())) {
|
||||
if(order.equalsIgnoreCase("desc")) {
|
||||
wrapper.orderDesc(Arrays.asList(params.get("sort")));
|
||||
} else {
|
||||
wrapper.orderAsc(Arrays.asList(params.get("sort")));
|
||||
}
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 驼峰格式字符串转换为下划线格式字符串
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public static String camelToUnderline(String param) {
|
||||
if (param == null || "".equals(param.trim())) {
|
||||
return "";
|
||||
}
|
||||
int len = param.length();
|
||||
StringBuilder sb = new StringBuilder(len);
|
||||
for (int i = 0; i < len; i++) {
|
||||
char c = param.charAt(i);
|
||||
if (Character.isUpperCase(c)) {
|
||||
sb.append(UNDERLINE);
|
||||
sb.append(Character.toLowerCase(c));
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] ages) {
|
||||
System.out.println(camelToUnderline("ABCddfANM"));
|
||||
}
|
||||
|
||||
public static Map camelToUnderlineMap(Map param, String pre) {
|
||||
|
||||
Map<String, Object> newMap = new HashMap<String, Object>();
|
||||
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, Object> entry = it.next();
|
||||
String key = entry.getKey();
|
||||
String newKey = camelToUnderline(key);
|
||||
if (pre.endsWith(".")) {
|
||||
newMap.put(pre + newKey, entry.getValue());
|
||||
} else if (StringUtils.isEmpty(pre)) {
|
||||
newMap.put(newKey, entry.getValue());
|
||||
} else {
|
||||
|
||||
newMap.put(pre + "." + newKey, entry.getValue());
|
||||
}
|
||||
}
|
||||
return newMap;
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
|
||||
package com.utils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.baomidou.mybatisplus.plugins.Page;
|
||||
|
||||
/**
|
||||
* 分页工具类
|
||||
*/
|
||||
public class PageUtils implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
//总记录数
|
||||
private long total;
|
||||
//每页记录数
|
||||
private int pageSize;
|
||||
//总页数
|
||||
private long totalPage;
|
||||
//当前页数
|
||||
private int currPage;
|
||||
//列表数据
|
||||
private List<?> list;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
* @param list 列表数据
|
||||
* @param totalCount 总记录数
|
||||
* @param pageSize 每页记录数
|
||||
* @param currPage 当前页数
|
||||
*/
|
||||
public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {
|
||||
this.list = list;
|
||||
this.total = totalCount;
|
||||
this.pageSize = pageSize;
|
||||
this.currPage = currPage;
|
||||
this.totalPage = (int)Math.ceil((double)totalCount/pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
public PageUtils(Page<?> page) {
|
||||
this.list = page.getRecords();
|
||||
this.total = page.getTotal();
|
||||
this.pageSize = page.getSize();
|
||||
this.currPage = page.getCurrent();
|
||||
this.totalPage = page.getPages();
|
||||
}
|
||||
|
||||
/*
|
||||
* 空数据的分页
|
||||
*/
|
||||
public PageUtils(Map<String, Object> params) {
|
||||
Page page =new Query(params).getPage();
|
||||
new PageUtils(page);
|
||||
}
|
||||
|
||||
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getCurrPage() {
|
||||
return currPage;
|
||||
}
|
||||
|
||||
public void setCurrPage(int currPage) {
|
||||
this.currPage = currPage;
|
||||
}
|
||||
|
||||
public List<?> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<?> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public long getTotalPage() {
|
||||
return totalPage;
|
||||
}
|
||||
|
||||
public void setTotalPage(long totalPage) {
|
||||
this.totalPage = totalPage;
|
||||
}
|
||||
|
||||
public long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.utils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 返回数据
|
||||
*/
|
||||
public class R extends HashMap<String, Object> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public R() {
|
||||
put("code", 0);
|
||||
}
|
||||
|
||||
public static R error() {
|
||||
return error(500, "未知异常,请联系管理员");
|
||||
}
|
||||
|
||||
public static R error(String msg) {
|
||||
return error(500, msg);
|
||||
}
|
||||
|
||||
public static R error(int code, String msg) {
|
||||
R r = new R();
|
||||
r.put("code", code);
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static R ok(String msg) {
|
||||
R r = new R();
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static R ok(Map<String, Object> map) {
|
||||
R r = new R();
|
||||
r.putAll(map);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static R ok() {
|
||||
return new R();
|
||||
}
|
||||
|
||||
public R put(String key, Object value) {
|
||||
super.put(key, value);
|
||||
return this;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
|
||||
package com.utils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.entity.EIException;
|
||||
|
||||
/**
|
||||
* SQL过滤
|
||||
*/
|
||||
public class SQLFilter {
|
||||
|
||||
/**
|
||||
* SQL注入过滤
|
||||
* @param str 待验证的字符串
|
||||
*/
|
||||
public static String sqlInject(String str){
|
||||
if(StringUtils.isBlank(str)){
|
||||
return null;
|
||||
}
|
||||
//去掉'|"|;|\字符
|
||||
str = StringUtils.replace(str, "'", "");
|
||||
str = StringUtils.replace(str, "\"", "");
|
||||
str = StringUtils.replace(str, ";", "");
|
||||
str = StringUtils.replace(str, "\\", "");
|
||||
|
||||
//转换成小写
|
||||
str = str.toLowerCase();
|
||||
|
||||
//非法字符
|
||||
String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"};
|
||||
|
||||
//判断是否包含非法字符
|
||||
for(String keyword : keywords){
|
||||
if(str.indexOf(keyword) != -1){
|
||||
throw new EIException("包含非法字符");
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
|
||||
package com.utils;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* Spring Context 工具类
|
||||
*/
|
||||
@Component
|
||||
public class SpringContextUtils implements ApplicationContextAware {
|
||||
public static ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext)
|
||||
throws BeansException {
|
||||
SpringContextUtils.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
public static Object getBean(String name) {
|
||||
return applicationContext.getBean(name);
|
||||
}
|
||||
|
||||
public static <T> T getBean(String name, Class<T> requiredType) {
|
||||
return applicationContext.getBean(name, requiredType);
|
||||
}
|
||||
|
||||
public static boolean containsBean(String name) {
|
||||
return applicationContext.containsBean(name);
|
||||
}
|
||||
|
||||
public static boolean isSingleton(String name) {
|
||||
return applicationContext.isSingleton(name);
|
||||
}
|
||||
|
||||
public static Class<? extends Object> getType(String name) {
|
||||
return applicationContext.getType(name);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
validationQuery=SELECT 1
|
||||
|
||||
jdbc_url=jdbc:mysql://127.0.0.1:3306/jspmi4017?useUnicode=true&characterEncoding=UTF-8&tinyInt1isBit=false
|
||||
jdbc_username=root
|
||||
jdbc_password=123456
|
||||
|
||||
#jdbc_url=jdbc:sqlserver://127.0.0.1:1433;DatabaseName=jspmi4017
|
||||
#jdbc_username=sa
|
||||
#jdbc_password=123456
|
||||
|
@ -0,0 +1,19 @@
|
||||
log4j.rootLogger=DEBUG,CONSOLE,A
|
||||
log4j.addivity.org.apache=false
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.Threshold=DEBUG
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss} -%-4r [%t] %-5p %x - %m%n
|
||||
log4j.appender.CONSOLE.Target=System.out
|
||||
#log4j.appender.CONSOLE.charset=utf-8
|
||||
log4j.appender.CONSOLE.encoding=utf-8
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.A=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.A.File=${catalina.home}/logs/yo_log/PurePro_
|
||||
log4j.appender.A.DatePattern=yyyy-MM-dd'.log'
|
||||
log4j.appender.A.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.A.layout.ConversionPattern=[FH_sys] %d{yyyy-MM-dd HH\:mm\:ss} %5p %c{1}\:%L \: %m%n
|
||||
log4j.logger.java.sql.ResultSet=INFO
|
||||
log4j.logger.org.apache=DEBUG
|
||||
log4j.logger.java.sql.Connection=DEBUG
|
||||
log4j.logger.java.sql.Statement=DEBUG
|
||||
log4j.logger.java.sql.PreparedStatement=DEBUG
|
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.CommonDao">
|
||||
<select id="getOption" resultType="String" >
|
||||
SELECT distinct ${column} FROM ${table}
|
||||
where ${column} is not null and ${column} !=''
|
||||
<if test = "conditionColumn != null and conditionValue != null">
|
||||
and ${conditionColumn}=#{conditionValue}
|
||||
</if>
|
||||
<if test = "level != null">
|
||||
and level=#{level}
|
||||
</if>
|
||||
<if test = "parent != null">
|
||||
and parent=#{parent}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getFollowByOption" resultType="map" >
|
||||
SELECT * FROM ${table} where ${column}=#{columnValue}
|
||||
</select>
|
||||
|
||||
<update id="sh">
|
||||
UPDATE ${table} set sfsh=#{sfsh} where id=#{id}
|
||||
</update>
|
||||
|
||||
<select id="remindCount" resultType="int" >
|
||||
SELECT count(1) FROM ${table}
|
||||
where 1=1
|
||||
<if test = "type == 1 ">
|
||||
<if test = " remindstart != null ">
|
||||
and ${column} >= #{remindstart}
|
||||
</if>
|
||||
<if test = " remindend != null ">
|
||||
and ${column} <= #{remindend}
|
||||
</if>
|
||||
</if>
|
||||
<if test = "type == 2 ">
|
||||
<if test = " remindstart != null ">
|
||||
and ${column} >= str_to_date(#{remindstart},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test = " remindend != null ">
|
||||
and ${column} <= str_to_date(#{remindend},'%Y-%m-%d')
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCal" resultType="map" >
|
||||
SELECT sum(${column}) sum,max(${column}) max,min(${column}) min,avg(${column}) avg FROM ${table}
|
||||
</select>
|
||||
|
||||
<select id="selectGroup" resultType="map" >
|
||||
SELECT ${column} , count(1) total FROM ${table} group by ${column}
|
||||
</select>
|
||||
|
||||
<select id="selectValue" resultType="map" >
|
||||
SELECT ${xColumn}, sum(${yColumn}) total FROM ${table} group by ${xColumn}
|
||||
</select>
|
||||
|
||||
<select id="selectTimeStatValue" resultType="map" >
|
||||
<if test = 'timeStatType == "日"'>
|
||||
SELECT DATE_FORMAT(${xColumn},'%Y-%m-%d') ${xColumn}, sum(${yColumn}) total FROM ${table} group by DATE_FORMAT(${xColumn},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test = 'timeStatType == "月"'>
|
||||
SELECT DATE_FORMAT(${xColumn},'%Y-%m') ${xColumn}, sum(${yColumn}) total FROM ${table} group by DATE_FORMAT(${xColumn},'%Y-%m')
|
||||
</if>
|
||||
<if test = 'timeStatType == "年"'>
|
||||
SELECT DATE_FORMAT(${xColumn},'%Y') ${xColumn}, sum(${yColumn}) total FROM ${table} group by DATE_FORMAT(${xColumn},'%Y')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.ConfigDao">
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.FeiyongxinxiDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.entity.FeiyongxinxiEntity" id="feiyongxinxiMap">
|
||||
<result property="xueshengzhanghao" column="xueshengzhanghao"/>
|
||||
<result property="xueshengxingming" column="xueshengxingming"/>
|
||||
<result property="leixing" column="leixing"/>
|
||||
<result property="lianxidianhua" column="lianxidianhua"/>
|
||||
<result property="zhuanye" column="zhuanye"/>
|
||||
<result property="yuanxi" column="yuanxi"/>
|
||||
<result property="feiyong" column="feiyong"/>
|
||||
<result property="jiezhishijian" column="jiezhishijian"/>
|
||||
<result property="ispay" column="ispay"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectListVO"
|
||||
resultType="com.entity.vo.FeiyongxinxiVO" >
|
||||
SELECT * FROM feiyongxinxi feiyongxinxi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVO"
|
||||
resultType="com.entity.vo.FeiyongxinxiVO" >
|
||||
SELECT feiyongxinxi.* FROM feiyongxinxi feiyongxinxi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListView"
|
||||
resultType="com.entity.view.FeiyongxinxiView" >
|
||||
|
||||
SELECT feiyongxinxi.* FROM feiyongxinxi feiyongxinxi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectView"
|
||||
resultType="com.entity.view.FeiyongxinxiView" >
|
||||
SELECT * FROM feiyongxinxi feiyongxinxi <where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.GonggaoxinxiDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.entity.GonggaoxinxiEntity" id="gonggaoxinxiMap">
|
||||
<result property="biaoti" column="biaoti"/>
|
||||
<result property="fabushijian" column="fabushijian"/>
|
||||
<result property="neirong" column="neirong"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectListVO"
|
||||
resultType="com.entity.vo.GonggaoxinxiVO" >
|
||||
SELECT * FROM gonggaoxinxi gonggaoxinxi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVO"
|
||||
resultType="com.entity.vo.GonggaoxinxiVO" >
|
||||
SELECT gonggaoxinxi.* FROM gonggaoxinxi gonggaoxinxi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListView"
|
||||
resultType="com.entity.view.GonggaoxinxiView" >
|
||||
|
||||
SELECT gonggaoxinxi.* FROM gonggaoxinxi gonggaoxinxi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectView"
|
||||
resultType="com.entity.view.GonggaoxinxiView" >
|
||||
SELECT * FROM gonggaoxinxi gonggaoxinxi <where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.JiaoshiDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.entity.JiaoshiEntity" id="jiaoshiMap">
|
||||
<result property="jiaoshigonghao" column="jiaoshigonghao"/>
|
||||
<result property="mima" column="mima"/>
|
||||
<result property="jiaoshixingming" column="jiaoshixingming"/>
|
||||
<result property="xingbie" column="xingbie"/>
|
||||
<result property="zhicheng" column="zhicheng"/>
|
||||
<result property="lianxidianhua" column="lianxidianhua"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectListVO"
|
||||
resultType="com.entity.vo.JiaoshiVO" >
|
||||
SELECT * FROM jiaoshi jiaoshi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVO"
|
||||
resultType="com.entity.vo.JiaoshiVO" >
|
||||
SELECT jiaoshi.* FROM jiaoshi jiaoshi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListView"
|
||||
resultType="com.entity.view.JiaoshiView" >
|
||||
|
||||
SELECT jiaoshi.* FROM jiaoshi jiaoshi
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectView"
|
||||
resultType="com.entity.view.JiaoshiView" >
|
||||
SELECT * FROM jiaoshi jiaoshi <where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.LeixingDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.entity.LeixingEntity" id="leixingMap">
|
||||
<result property="leixing" column="leixing"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectListVO"
|
||||
resultType="com.entity.vo.LeixingVO" >
|
||||
SELECT * FROM leixing leixing
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectVO"
|
||||
resultType="com.entity.vo.LeixingVO" >
|
||||
SELECT leixing.* FROM leixing leixing
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListView"
|
||||
resultType="com.entity.view.LeixingView" >
|
||||
|
||||
SELECT leixing.* FROM leixing leixing
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
<select id="selectView"
|
||||
resultType="com.entity.view.LeixingView" >
|
||||
SELECT * FROM leixing leixing <where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.dao.TokenDao">
|
||||
|
||||
<select id="selectListView"
|
||||
resultType="com.entity.TokenEntity" >
|
||||
|
||||
SELECT t.* FROM token t
|
||||
<where> 1=1 ${ew.sqlSegment}</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue