diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope
new file mode 100644
index 0000000..f179e11
--- /dev/null
+++ b/.settings/.jsdtscope
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..839d647
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -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/=UTF-8
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..8db228c
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -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
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..f98907b
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..c6144e8
--- /dev/null
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/db/jspmi4017.sql b/db/jspmi4017.sql
new file mode 100644
index 0000000..6d15aad
--- /dev/null
+++ b/db/jspmi4017.sql
@@ -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
diff --git a/src/main/java/com/annotation/APPLoginUser.java b/src/main/java/com/annotation/APPLoginUser.java
new file mode 100644
index 0000000..21d41b9
--- /dev/null
+++ b/src/main/java/com/annotation/APPLoginUser.java
@@ -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 {
+
+}
diff --git a/src/main/java/com/annotation/IgnoreAuth.java b/src/main/java/com/annotation/IgnoreAuth.java
new file mode 100644
index 0000000..7c3cc55
--- /dev/null
+++ b/src/main/java/com/annotation/IgnoreAuth.java
@@ -0,0 +1,13 @@
+package com.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 忽略Token验证
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface IgnoreAuth {
+
+}
diff --git a/src/main/java/com/annotation/LoginUser.java b/src/main/java/com/annotation/LoginUser.java
new file mode 100644
index 0000000..3d808d3
--- /dev/null
+++ b/src/main/java/com/annotation/LoginUser.java
@@ -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 {
+
+}
diff --git a/src/main/java/com/config/AlipayConfig.java b/src/main/java/com/config/AlipayConfig.java
new file mode 100644
index 0000000..74965a7
--- /dev/null
+++ b/src/main/java/com/config/AlipayConfig.java
@@ -0,0 +1,18 @@
+package com.config;
+
+import java.io.FileWriter;
+import java.io.IOException;
+
+/* *
+ *类名:AlipayConfig
+ *功能:基础配置类
+ *详细:设置帐户有关信息及返回路径
+ *修改日期:2017-04-05
+ *说明:
+ *以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
+ *该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
+ */
+
+public class AlipayConfig {
+}
+
diff --git a/src/main/java/com/config/MyMetaObjectHandler.java b/src/main/java/com/config/MyMetaObjectHandler.java
new file mode 100644
index 0000000..2f9e793
--- /dev/null
+++ b/src/main/java/com/config/MyMetaObjectHandler.java
@@ -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) {
+ // 关闭更新填充、这里不执行
+ }
+}
diff --git a/src/main/java/com/controller/CommonController.java b/src/main/java/com/controller/CommonController.java
new file mode 100644
index 0000000..3d954b2
--- /dev/null
+++ b/src/main/java/com/controller/CommonController.java
@@ -0,0 +1,229 @@
+package com.controller;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+import org.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.annotation.IgnoreAuth;
+import com.baidu.aip.face.AipFace;
+import com.baidu.aip.face.MatchRequest;
+import com.baidu.aip.util.Base64Util;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.entity.ConfigEntity;
+import com.service.CommonService;
+import com.service.ConfigService;
+import com.utils.BaiduUtil;
+import com.utils.FileUtil;
+import com.utils.R;
+import com.utils.CommonUtil;
+/**
+ * 通用接口
+ */
+@RestController
+public class CommonController{
+ @Autowired
+ private CommonService commonService;
+
+ private static AipFace client = null;
+
+ @Autowired
+ private ConfigService configService;
+ /**
+ * 获取table表中的column列表(联动接口)
+ * @param table
+ * @param column
+ * @return
+ */
+ @RequestMapping("/option/{tableName}/{columnName}")
+ @IgnoreAuth
+ public R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,@RequestParam(required = false) String conditionColumn,@RequestParam(required = false) String conditionValue,String level,String parent) {
+ Map params = new HashMap();
+ params.put("table", tableName);
+ params.put("column", columnName);
+ if(StringUtils.isNotBlank(level)) {
+ params.put("level", level);
+ }
+ if(StringUtils.isNotBlank(parent)) {
+ params.put("parent", parent);
+ }
+ if(StringUtils.isNotBlank(conditionColumn)) {
+ params.put("conditionColumn", conditionColumn);
+ }
+ if(StringUtils.isNotBlank(conditionValue)) {
+ params.put("conditionValue", conditionValue);
+ }
+ List data = commonService.getOption(params);
+ return R.ok().put("data", data);
+ }
+
+ /**
+ * 根据table中的column获取单条记录
+ * @param table
+ * @param column
+ * @return
+ */
+ @RequestMapping("/follow/{tableName}/{columnName}")
+ @IgnoreAuth
+ public R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {
+ Map params = new HashMap();
+ params.put("table", tableName);
+ params.put("column", columnName);
+ params.put("columnValue", columnValue);
+ Map result = commonService.getFollowByOption(params);
+ return R.ok().put("data", result);
+ }
+
+ /**
+ * 修改table表的sfsh状态
+ * @param table
+ * @param map
+ * @return
+ */
+ @RequestMapping("/sh/{tableName}")
+ public R sh(@PathVariable("tableName") String tableName, @RequestBody Map map) {
+ map.put("table", tableName);
+ commonService.sh(map);
+ return R.ok();
+ }
+
+ /**
+ * 获取需要提醒的记录数
+ * @param tableName
+ * @param columnName
+ * @param type 1:数字 2:日期
+ * @param map
+ * @return
+ */
+ @RequestMapping("/remind/{tableName}/{columnName}/{type}")
+ @IgnoreAuth
+ public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,
+ @PathVariable("type") String type,@RequestParam Map map) {
+ map.put("table", tableName);
+ map.put("column", columnName);
+ map.put("type", type);
+
+ if(type.equals("2")) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar c = Calendar.getInstance();
+ Date remindStartDate = null;
+ Date remindEndDate = null;
+ if(map.get("remindstart")!=null) {
+ Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
+ c.setTime(new Date());
+ c.add(Calendar.DAY_OF_MONTH,remindStart);
+ remindStartDate = c.getTime();
+ map.put("remindstart", sdf.format(remindStartDate));
+ }
+ if(map.get("remindend")!=null) {
+ Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
+ c.setTime(new Date());
+ c.add(Calendar.DAY_OF_MONTH,remindEnd);
+ remindEndDate = c.getTime();
+ map.put("remindend", sdf.format(remindEndDate));
+ }
+ }
+
+ int count = commonService.remindCount(map);
+ return R.ok().put("count", count);
+ }
+
+ /**
+ * 单列求和
+ */
+ @RequestMapping("/cal/{tableName}/{columnName}")
+ @IgnoreAuth
+ public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
+ Map params = new HashMap();
+ params.put("table", tableName);
+ params.put("column", columnName);
+ Map result = commonService.selectCal(params);
+ return R.ok().put("data", result);
+ }
+
+ /**
+ * 分组统计
+ */
+ @RequestMapping("/group/{tableName}/{columnName}")
+ @IgnoreAuth
+ public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
+ Map params = new HashMap();
+ params.put("table", tableName);
+ params.put("column", columnName);
+ List