wumos 4 months ago
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,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,18 @@
package com.config;
import java.io.FileWriter;
import java.io.IOException;
/* *
*AlipayConfig
*
*
*2017-04-05
*
*便,使
*使
*/
public class AlipayConfig {
}

@ -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,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;
/**
* tablecolumn()
* @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<String, Object> params = new HashMap<String, Object>();
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<String> data = commonService.getOption(params);
return R.ok().put("data", data);
}
/**
* tablecolumn
* @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<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
params.put("columnValue", columnValue);
Map<String, Object> result = commonService.getFollowByOption(params);
return R.ok().put("data", result);
}
/**
* tablesfsh
* @param table
* @param map
* @return
*/
@RequestMapping("/sh/{tableName}")
public R sh(@PathVariable("tableName") String tableName, @RequestBody Map<String, Object> 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<String, Object> 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<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
Map<String, Object> 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<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
List<Map<String, Object>> result = commonService.selectGroup(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
@IgnoreAuth
public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
List<Map<String, Object>> result = commonService.selectValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
List<Map<String, Object>> result = commonService.selectTimeStatValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
}

@ -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,94 @@
package com.controller;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
/**
*
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
*
*/
@RequestMapping("/upload")
@IgnoreAuth
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
String fileName = new Date().getTime()+"."+fileExt;
if(StringUtils.isNotBlank(type) && type.contains("_template")) {
fileName = type + "."+fileExt;
new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName).deleteOnExit();
}
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
file.transferTo(dest);
/**
* 使ideaeclipse
* "D:\\ssmpiv99\\src\\main\\webapp\\upload"upload
*
*/
//FileUtils.copyFile(dest, new File("D:\\ssmpiv99\\src\\main\\webapp\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
if(configEntity==null) {
configEntity = new ConfigEntity();
configEntity.setName("faceFile");
configEntity.setValue(fileName);
} else {
configEntity.setValue(fileName);
}
configService.insertOrUpdate(configEntity);
}
return R.ok().put("file", fileName);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/download")
public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
try {
File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
if (file.exists()) {
response.reset();
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setContentType("application/octet-stream; charset=UTF-8");
IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
}
} catch (IOException e) {
e.printStackTrace();
}
}
}

@ -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,268 @@
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.JiaoshiEntity;
import com.entity.view.JiaoshiView;
import com.service.JiaoshiService;
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("/jiaoshi")
public class JiaoshiController {
@Autowired
private JiaoshiService jiaoshiService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
JiaoshiEntity u = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", username));
if(u==null || !u.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(u.getId(), username,"jiaoshi", "教师" );
return R.ok().put("token", token);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody JiaoshiEntity jiaoshi){
//ValidatorUtils.validateEntity(jiaoshi);
JiaoshiEntity u = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", jiaoshi.getJiaoshigonghao()));
if(u!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
jiaoshi.setId(uId);
jiaoshiService.insert(jiaoshi);
return R.ok();
}
/**
* 退
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
JiaoshiEntity u = jiaoshiService.selectById(id);
return R.ok().put("data", u);
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
JiaoshiEntity u = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", username));
if(u==null) {
return R.error("账号不存在");
}
u.setMima("123456");
jiaoshiService.updateById(u);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,JiaoshiEntity jiaoshi,
HttpServletRequest request){
EntityWrapper<JiaoshiEntity> ew = new EntityWrapper<JiaoshiEntity>();
PageUtils page = jiaoshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiaoshi), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,JiaoshiEntity jiaoshi,
HttpServletRequest request){
EntityWrapper<JiaoshiEntity> ew = new EntityWrapper<JiaoshiEntity>();
PageUtils page = jiaoshiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiaoshi), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( JiaoshiEntity jiaoshi){
EntityWrapper<JiaoshiEntity> ew = new EntityWrapper<JiaoshiEntity>();
ew.allEq(MPUtil.allEQMapPre( jiaoshi, "jiaoshi"));
return R.ok().put("data", jiaoshiService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(JiaoshiEntity jiaoshi){
EntityWrapper< JiaoshiEntity> ew = new EntityWrapper< JiaoshiEntity>();
ew.allEq(MPUtil.allEQMapPre( jiaoshi, "jiaoshi"));
JiaoshiView jiaoshiView = jiaoshiService.selectView(ew);
return R.ok("查询教师成功").put("data", jiaoshiView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
JiaoshiEntity jiaoshi = jiaoshiService.selectById(id);
return R.ok().put("data", jiaoshi);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
JiaoshiEntity jiaoshi = jiaoshiService.selectById(id);
return R.ok().put("data", jiaoshi);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody JiaoshiEntity jiaoshi, HttpServletRequest request){
jiaoshi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jiaoshi);
JiaoshiEntity u = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", jiaoshi.getJiaoshigonghao()));
if(u!=null) {
return R.error("用户已存在");
}
jiaoshi.setId(new Date().getTime());
jiaoshiService.insert(jiaoshi);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody JiaoshiEntity jiaoshi, HttpServletRequest request){
jiaoshi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jiaoshi);
JiaoshiEntity u = jiaoshiService.selectOne(new EntityWrapper<JiaoshiEntity>().eq("jiaoshigonghao", jiaoshi.getJiaoshigonghao()));
if(u!=null) {
return R.error("用户已存在");
}
jiaoshi.setId(new Date().getTime());
jiaoshiService.insert(jiaoshi);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody JiaoshiEntity jiaoshi, HttpServletRequest request){
//ValidatorUtils.validateEntity(jiaoshi);
jiaoshiService.updateById(jiaoshi);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
jiaoshiService.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,174 @@
package com.controller;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.service.UsersService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;
/**
*
*/
@RequestMapping("users")
@RestController
public class UsersController{
@Autowired
private UsersService userService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null || !user.getPassword().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
return R.ok().put("token", token);
}
/**
*
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
userService.insert(user);
return R.ok();
}
/**
* 退
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
userService.update(user,null);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/list")
public R list( UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
ew.allEq(MPUtil.allEQMapPre( user, "user"));
return R.ok().put("data", userService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = userService.selectById(id);
return R.ok().put("data", user);
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
UsersEntity user = userService.selectById(id);
return R.ok().put("data", user);
}
/**
*
*/
@PostMapping("/save")
public R save(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
userService.insert(user);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
public R update(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername()));
if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
return R.error("用户名已存在。");
}
userService.updateById(user);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
userService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}

@ -0,0 +1,268 @@
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.XueshengEntity;
import com.entity.view.XueshengView;
import com.service.XueshengService;
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("/xuesheng")
public class XueshengController {
@Autowired
private XueshengService xueshengService;
@Autowired
private TokenService tokenService;
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
XueshengEntity u = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", username));
if(u==null || !u.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(u.getId(), username,"xuesheng", "学生" );
return R.ok().put("token", token);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody XueshengEntity xuesheng){
//ValidatorUtils.validateEntity(xuesheng);
XueshengEntity u = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", xuesheng.getXueshengzhanghao()));
if(u!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
xuesheng.setId(uId);
xueshengService.insert(xuesheng);
return R.ok();
}
/**
* 退
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* session
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
XueshengEntity u = xueshengService.selectById(id);
return R.ok().put("data", u);
}
/**
*
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
XueshengEntity u = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", username));
if(u==null) {
return R.error("账号不存在");
}
u.setMima("123456");
xueshengService.updateById(u);
return R.ok("密码已重置为123456");
}
/**
*
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,XueshengEntity xuesheng,
HttpServletRequest request){
EntityWrapper<XueshengEntity> ew = new EntityWrapper<XueshengEntity>();
PageUtils page = xueshengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuesheng), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,XueshengEntity xuesheng,
HttpServletRequest request){
EntityWrapper<XueshengEntity> ew = new EntityWrapper<XueshengEntity>();
PageUtils page = xueshengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xuesheng), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
*
*/
@RequestMapping("/lists")
public R list( XueshengEntity xuesheng){
EntityWrapper<XueshengEntity> ew = new EntityWrapper<XueshengEntity>();
ew.allEq(MPUtil.allEQMapPre( xuesheng, "xuesheng"));
return R.ok().put("data", xueshengService.selectListView(ew));
}
/**
*
*/
@RequestMapping("/query")
public R query(XueshengEntity xuesheng){
EntityWrapper< XueshengEntity> ew = new EntityWrapper< XueshengEntity>();
ew.allEq(MPUtil.allEQMapPre( xuesheng, "xuesheng"));
XueshengView xueshengView = xueshengService.selectView(ew);
return R.ok("查询学生成功").put("data", xueshengView);
}
/**
*
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
XueshengEntity xuesheng = xueshengService.selectById(id);
return R.ok().put("data", xuesheng);
}
/**
*
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
XueshengEntity xuesheng = xueshengService.selectById(id);
return R.ok().put("data", xuesheng);
}
/**
*
*/
@RequestMapping("/save")
public R save(@RequestBody XueshengEntity xuesheng, HttpServletRequest request){
xuesheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(xuesheng);
XueshengEntity u = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", xuesheng.getXueshengzhanghao()));
if(u!=null) {
return R.error("用户已存在");
}
xuesheng.setId(new Date().getTime());
xueshengService.insert(xuesheng);
return R.ok();
}
/**
*
*/
@RequestMapping("/add")
public R add(@RequestBody XueshengEntity xuesheng, HttpServletRequest request){
xuesheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(xuesheng);
XueshengEntity u = xueshengService.selectOne(new EntityWrapper<XueshengEntity>().eq("xueshengzhanghao", xuesheng.getXueshengzhanghao()));
if(u!=null) {
return R.error("用户已存在");
}
xuesheng.setId(new Date().getTime());
xueshengService.insert(xuesheng);
return R.ok();
}
/**
*
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody XueshengEntity xuesheng, HttpServletRequest request){
//ValidatorUtils.validateEntity(xuesheng);
xueshengService.updateById(xuesheng);//全部更新
return R.ok();
}
/**
*
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
xueshengService.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,238 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("feiyongxinxi")
public class FeiyongxinxiEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public FeiyongxinxiEntity() {
}
public FeiyongxinxiEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String xueshengzhanghao;
/**
*
*/
private String xueshengxingming;
/**
*
*/
private String leixing;
/**
*
*/
private String lianxidianhua;
/**
*
*/
private String zhuanye;
/**
*
*/
private String yuanxi;
/**
*
*/
private String feiyong;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
@DateTimeFormat
private Date jiezhishijian;
/**
*
*/
private String ispay;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setXueshengzhanghao(String xueshengzhanghao) {
this.xueshengzhanghao = xueshengzhanghao;
}
/**
*
*/
public String getXueshengzhanghao() {
return xueshengzhanghao;
}
/**
*
*/
public void setXueshengxingming(String xueshengxingming) {
this.xueshengxingming = xueshengxingming;
}
/**
*
*/
public String getXueshengxingming() {
return xueshengxingming;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
/**
*
*/
public void setZhuanye(String zhuanye) {
this.zhuanye = zhuanye;
}
/**
*
*/
public String getZhuanye() {
return zhuanye;
}
/**
*
*/
public void setYuanxi(String yuanxi) {
this.yuanxi = yuanxi;
}
/**
*
*/
public String getYuanxi() {
return yuanxi;
}
/**
*
*/
public void setFeiyong(String feiyong) {
this.feiyong = feiyong;
}
/**
*
*/
public String getFeiyong() {
return feiyong;
}
/**
*
*/
public void setJiezhishijian(Date jiezhishijian) {
this.jiezhishijian = jiezhishijian;
}
/**
*
*/
public Date getJiezhishijian() {
return jiezhishijian;
}
/**
*
*/
public void setIspay(String ispay) {
this.ispay = ispay;
}
/**
*
*/
public String getIspay() {
return ispay;
}
}

@ -0,0 +1,130 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("gonggaoxinxi")
public class GonggaoxinxiEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public GonggaoxinxiEntity() {
}
public GonggaoxinxiEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String biaoti;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
@DateTimeFormat
private Date fabushijian;
/**
*
*/
private String neirong;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setBiaoti(String biaoti) {
this.biaoti = biaoti;
}
/**
*
*/
public String getBiaoti() {
return biaoti;
}
/**
*
*/
public void setFabushijian(Date fabushijian) {
this.fabushijian = fabushijian;
}
/**
*
*/
public Date getFabushijian() {
return fabushijian;
}
/**
*
*/
public void setNeirong(String neirong) {
this.neirong = neirong;
}
/**
*
*/
public String getNeirong() {
return neirong;
}
}

@ -0,0 +1,182 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("jiaoshi")
public class JiaoshiEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public JiaoshiEntity() {
}
public JiaoshiEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String jiaoshigonghao;
/**
*
*/
private String mima;
/**
*
*/
private String jiaoshixingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String zhicheng;
/**
*
*/
private String lianxidianhua;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setJiaoshigonghao(String jiaoshigonghao) {
this.jiaoshigonghao = jiaoshigonghao;
}
/**
*
*/
public String getJiaoshigonghao() {
return jiaoshigonghao;
}
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setJiaoshixingming(String jiaoshixingming) {
this.jiaoshixingming = jiaoshixingming;
}
/**
*
*/
public String getJiaoshixingming() {
return jiaoshixingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setZhicheng(String zhicheng) {
this.zhicheng = zhicheng;
}
/**
*
*/
public String getZhicheng() {
return zhicheng;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
}

@ -0,0 +1,92 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("leixing")
public class LeixingEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public LeixingEntity() {
}
public LeixingEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String leixing;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
}

@ -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,200 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("xuesheng")
public class XueshengEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public XueshengEntity() {
}
public XueshengEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private String xueshengzhanghao;
/**
*
*/
private String xueshengxingming;
/**
*
*/
private String mima;
/**
*
*/
private String xingbie;
/**
*
*/
private String lianxidianhua;
/**
*
*/
private String zhuanye;
/**
*
*/
private String yuanxi;
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date addtime;
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;
}
/**
*
*/
public void setXueshengzhanghao(String xueshengzhanghao) {
this.xueshengzhanghao = xueshengzhanghao;
}
/**
*
*/
public String getXueshengzhanghao() {
return xueshengzhanghao;
}
/**
*
*/
public void setXueshengxingming(String xueshengxingming) {
this.xueshengxingming = xueshengxingming;
}
/**
*
*/
public String getXueshengxingming() {
return xueshengxingming;
}
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
/**
*
*/
public void setZhuanye(String zhuanye) {
this.zhuanye = zhuanye;
}
/**
*
*/
public String getZhuanye() {
return zhuanye;
}
/**
*
*/
public void setYuanxi(String yuanxi) {
this.yuanxi = yuanxi;
}
/**
*
*/
public String getYuanxi() {
return yuanxi;
}
}

@ -0,0 +1,203 @@
package com.entity.model;
import com.entity.FeiyongxinxiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class FeiyongxinxiModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String xueshengxingming;
/**
*
*/
private String leixing;
/**
*
*/
private String lianxidianhua;
/**
*
*/
private String zhuanye;
/**
*
*/
private String yuanxi;
/**
*
*/
private String feiyong;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date jiezhishijian;
/**
*
*/
private String ispay;
/**
*
*/
public void setXueshengxingming(String xueshengxingming) {
this.xueshengxingming = xueshengxingming;
}
/**
*
*/
public String getXueshengxingming() {
return xueshengxingming;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
/**
*
*/
public void setZhuanye(String zhuanye) {
this.zhuanye = zhuanye;
}
/**
*
*/
public String getZhuanye() {
return zhuanye;
}
/**
*
*/
public void setYuanxi(String yuanxi) {
this.yuanxi = yuanxi;
}
/**
*
*/
public String getYuanxi() {
return yuanxi;
}
/**
*
*/
public void setFeiyong(String feiyong) {
this.feiyong = feiyong;
}
/**
*
*/
public String getFeiyong() {
return feiyong;
}
/**
*
*/
public void setJiezhishijian(Date jiezhishijian) {
this.jiezhishijian = jiezhishijian;
}
/**
*
*/
public Date getJiezhishijian() {
return jiezhishijian;
}
/**
*
*/
public void setIspay(String ispay) {
this.ispay = ispay;
}
/**
*
*/
public String getIspay() {
return ispay;
}
}

@ -0,0 +1,71 @@
package com.entity.model;
import com.entity.GonggaoxinxiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class GonggaoxinxiModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date fabushijian;
/**
*
*/
private String neirong;
/**
*
*/
public void setFabushijian(Date fabushijian) {
this.fabushijian = fabushijian;
}
/**
*
*/
public Date getFabushijian() {
return fabushijian;
}
/**
*
*/
public void setNeirong(String neirong) {
this.neirong = neirong;
}
/**
*
*/
public String getNeirong() {
return neirong;
}
}

@ -0,0 +1,135 @@
package com.entity.model;
import com.entity.JiaoshiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class JiaoshiModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String mima;
/**
*
*/
private String jiaoshixingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String zhicheng;
/**
*
*/
private String lianxidianhua;
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setJiaoshixingming(String jiaoshixingming) {
this.jiaoshixingming = jiaoshixingming;
}
/**
*
*/
public String getJiaoshixingming() {
return jiaoshixingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setZhicheng(String zhicheng) {
this.zhicheng = zhicheng;
}
/**
*
*/
public String getZhicheng() {
return zhicheng;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
}

@ -0,0 +1,25 @@
package com.entity.model;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class LeixingModel implements Serializable {
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,157 @@
package com.entity.model;
import com.entity.XueshengEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
* entity
* ModelAndView model
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class XueshengModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String xueshengxingming;
/**
*
*/
private String mima;
/**
*
*/
private String xingbie;
/**
*
*/
private String lianxidianhua;
/**
*
*/
private String zhuanye;
/**
*
*/
private String yuanxi;
/**
*
*/
public void setXueshengxingming(String xueshengxingming) {
this.xueshengxingming = xueshengxingming;
}
/**
*
*/
public String getXueshengxingming() {
return xueshengxingming;
}
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
/**
*
*/
public void setZhuanye(String zhuanye) {
this.zhuanye = zhuanye;
}
/**
*
*/
public String getZhuanye() {
return zhuanye;
}
/**
*
*/
public void setYuanxi(String yuanxi) {
this.yuanxi = yuanxi;
}
/**
*
*/
public String getYuanxi() {
return yuanxi;
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.FeiyongxinxiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("feiyongxinxi")
public class FeiyongxinxiView extends FeiyongxinxiEntity implements Serializable {
private static final long serialVersionUID = 1L;
public FeiyongxinxiView(){
}
public FeiyongxinxiView(FeiyongxinxiEntity feiyongxinxiEntity){
try {
BeanUtils.copyProperties(this, feiyongxinxiEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.GonggaoxinxiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("gonggaoxinxi")
public class GonggaoxinxiView extends GonggaoxinxiEntity implements Serializable {
private static final long serialVersionUID = 1L;
public GonggaoxinxiView(){
}
public GonggaoxinxiView(GonggaoxinxiEntity gonggaoxinxiEntity){
try {
BeanUtils.copyProperties(this, gonggaoxinxiEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.JiaoshiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("jiaoshi")
public class JiaoshiView extends JiaoshiEntity implements Serializable {
private static final long serialVersionUID = 1L;
public JiaoshiView(){
}
public JiaoshiView(JiaoshiEntity jiaoshiEntity){
try {
BeanUtils.copyProperties(this, jiaoshiEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("leixing")
public class LeixingView extends LeixingEntity implements Serializable {
private static final long serialVersionUID = 1L;
public LeixingView(){
}
public LeixingView(LeixingEntity leixingEntity){
try {
BeanUtils.copyProperties(this, leixingEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
package com.entity.view;
import com.entity.XueshengEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
/**
*
*
* 使
* @author
* @email
* @date 2023-05-01 16:56:28
*/
@TableName("xuesheng")
public class XueshengView extends XueshengEntity implements Serializable {
private static final long serialVersionUID = 1L;
public XueshengView(){
}
public XueshengView(XueshengEntity xueshengEntity){
try {
BeanUtils.copyProperties(this, xueshengEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

@ -0,0 +1,203 @@
package com.entity.vo;
import com.entity.FeiyongxinxiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class FeiyongxinxiVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String xueshengxingming;
/**
*
*/
private String leixing;
/**
*
*/
private String lianxidianhua;
/**
*
*/
private String zhuanye;
/**
*
*/
private String yuanxi;
/**
*
*/
private String feiyong;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date jiezhishijian;
/**
*
*/
private String ispay;
/**
*
*/
public void setXueshengxingming(String xueshengxingming) {
this.xueshengxingming = xueshengxingming;
}
/**
*
*/
public String getXueshengxingming() {
return xueshengxingming;
}
/**
*
*/
public void setLeixing(String leixing) {
this.leixing = leixing;
}
/**
*
*/
public String getLeixing() {
return leixing;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
/**
*
*/
public void setZhuanye(String zhuanye) {
this.zhuanye = zhuanye;
}
/**
*
*/
public String getZhuanye() {
return zhuanye;
}
/**
*
*/
public void setYuanxi(String yuanxi) {
this.yuanxi = yuanxi;
}
/**
*
*/
public String getYuanxi() {
return yuanxi;
}
/**
*
*/
public void setFeiyong(String feiyong) {
this.feiyong = feiyong;
}
/**
*
*/
public String getFeiyong() {
return feiyong;
}
/**
*
*/
public void setJiezhishijian(Date jiezhishijian) {
this.jiezhishijian = jiezhishijian;
}
/**
*
*/
public Date getJiezhishijian() {
return jiezhishijian;
}
/**
*
*/
public void setIspay(String ispay) {
this.ispay = ispay;
}
/**
*
*/
public String getIspay() {
return ispay;
}
}

@ -0,0 +1,71 @@
package com.entity.vo;
import com.entity.GonggaoxinxiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class GonggaoxinxiVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date fabushijian;
/**
*
*/
private String neirong;
/**
*
*/
public void setFabushijian(Date fabushijian) {
this.fabushijian = fabushijian;
}
/**
*
*/
public Date getFabushijian() {
return fabushijian;
}
/**
*
*/
public void setNeirong(String neirong) {
this.neirong = neirong;
}
/**
*
*/
public String getNeirong() {
return neirong;
}
}

@ -0,0 +1,135 @@
package com.entity.vo;
import com.entity.JiaoshiEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class JiaoshiVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String mima;
/**
*
*/
private String jiaoshixingming;
/**
*
*/
private String xingbie;
/**
*
*/
private String zhicheng;
/**
*
*/
private String lianxidianhua;
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setJiaoshixingming(String jiaoshixingming) {
this.jiaoshixingming = jiaoshixingming;
}
/**
*
*/
public String getJiaoshixingming() {
return jiaoshixingming;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setZhicheng(String zhicheng) {
this.zhicheng = zhicheng;
}
/**
*
*/
public String getZhicheng() {
return zhicheng;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
}

@ -0,0 +1,25 @@
package com.entity.vo;
import com.entity.LeixingEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class LeixingVO implements Serializable {
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,157 @@
package com.entity.vo;
import com.entity.XueshengEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
*
*
*
* @author
* @email
* @date 2023-05-01 16:56:28
*/
public class XueshengVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String xueshengxingming;
/**
*
*/
private String mima;
/**
*
*/
private String xingbie;
/**
*
*/
private String lianxidianhua;
/**
*
*/
private String zhuanye;
/**
*
*/
private String yuanxi;
/**
*
*/
public void setXueshengxingming(String xueshengxingming) {
this.xueshengxingming = xueshengxingming;
}
/**
*
*/
public String getXueshengxingming() {
return xueshengxingming;
}
/**
*
*/
public void setMima(String mima) {
this.mima = mima;
}
/**
*
*/
public String getMima() {
return mima;
}
/**
*
*/
public void setXingbie(String xingbie) {
this.xingbie = xingbie;
}
/**
*
*/
public String getXingbie() {
return xingbie;
}
/**
*
*/
public void setLianxidianhua(String lianxidianhua) {
this.lianxidianhua = lianxidianhua;
}
/**
*
*/
public String getLianxidianhua() {
return lianxidianhua;
}
/**
*
*/
public void setZhuanye(String zhuanye) {
this.zhuanye = zhuanye;
}
/**
*
*/
public String getZhuanye() {
return zhuanye;
}
/**
*
*/
public void setYuanxi(String yuanxi) {
this.yuanxi = yuanxi;
}
/**
*
*/
public String getYuanxi() {
return yuanxi;
}
}

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

@ -0,0 +1,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,196 @@
package com.utils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
import com.baidu.aip.ocr.AipOcr;
import com.baidu.aip.imageclassify.AipImageClassify;
/**
* :
*/
public class BaiduUtil {
/**
*
* @param lon
* @param lat
* @param coordtype
* @return
*/
public static Map<String, String> getCityByLonLat(String key, String lng, String lat) {
String location = lat + "," + lng;
try {
//拼装url
String url = "http://api.map.baidu.com/reverse_geocoding/v3/?ak="+key+"&output=json&coordtype=wgs84ll&location="+location;
String result = HttpClientUtils.doGet(url);
JSONObject o = new JSONObject(result);
Map<String, String> area = new HashMap<>();
area.put("province", o.getJSONObject("result").getJSONObject("addressComponent").getString("province"));
area.put("city", o.getJSONObject("result").getJSONObject("addressComponent").getString("city"));
area.put("district", o.getJSONObject("result").getJSONObject("addressComponent").getString("district"));
area.put("street", o.getJSONObject("result").getJSONObject("addressComponent").getString("street"));
return area;
}catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* API访token
* token.
* @param ak - API Key
* @param sk - Securet Key
* @return assess_token
*/
public static String getAuth(String ak, String sk) {
// 获取token地址
String authHost = "https://aip.baidubce.com/oauth/2.0/token?";
String getAccessTokenUrl = authHost
// 1. grant_type为固定参数
+ "grant_type=client_credentials"
// 2. 官网获取的 API Key
+ "&client_id=" + ak
// 3. 官网获取的 Secret Key
+ "&client_secret=" + sk;
try {
URL realUrl = new URL(getAccessTokenUrl);
// 打开和URL之间的连接
HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection();
connection.setRequestMethod("GET");
connection.connect();
// 获取所有响应头字段
Map<String, List<String>> map = connection.getHeaderFields();
// 遍历所有的响应头字段
for (String key : map.keySet()) {
System.err.println(key + "--->" + map.get(key));
}
// 定义 BufferedReader输入流来读取URL的响应
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String result = "";
String line;
while ((line = in.readLine()) != null) {
result += line;
}
/**
*
*/
System.err.println("result:" + result);
org.json.JSONObject jsonObject = new org.json.JSONObject(result);
String access_token = jsonObject.getString("access_token");
return access_token;
} catch (Exception e) {
System.err.printf("获取token失败");
e.printStackTrace(System.err);
}
return null;
}
//设置APPID/AK/SK
public static final String APP_ID = "29917330";
public static final String API_KEY = "yMnHy1guHZRzGhXB7BILdktB";
public static final String SECRET_KEY = "1oHG8X0yizyZmIwj3bZygG470b648iE1";
private static AipOcr ocrClient = null;
/**
*
* @param imagePath
*/
public static String generalString(String imagePath, boolean isNewline){
try{
HashMap<String, String> options = new HashMap<String, String>();
options.put("language_type", "CHN_ENG"); //CHN_ENG:中英文混合, ENG:英文
options.put("detect_direction", "true"); //是否检测图像朝向默认不检测false
options.put("detect_language", "true"); //是否检测语言,默认不检测。
options.put("probability", "false"); //是否返回识别结果中每一行的置信度
//通用文字识别
if(ocrClient==null) {
ocrClient = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
ocrClient.setConnectionTimeoutInMillis(5000);
ocrClient.setSocketTimeoutInMillis(60000);
}
JSONObject jsonObject = ocrClient.basicAccurateGeneral(imagePath, options);
String result = mergeString(jsonObject, isNewline);
return result;
}catch(Exception ex){
ex.printStackTrace();
}
return null;
}
private static String mergeString(JSONObject jsonObject, boolean isNewline){
if(jsonObject == null){
return "";
}
if(jsonObject.has("words_result") && jsonObject.has("words_result_num")){
int wordsResultNum = jsonObject.getInt("words_result_num");
if(wordsResultNum > 0){
StringBuilder sb = new StringBuilder();
JSONArray jsonArray = jsonObject.getJSONArray("words_result");
int len = jsonArray.length();
for(int i=0;i<len;i++) {
JSONObject obj = (JSONObject)jsonArray.get(i);
if(isNewline){
sb.append(obj.get("words") + "\n");
}else{
sb.append(obj.get("words"));
}
}
return sb.toString();
}
}else{
return jsonObject.toString();
}
return null;
}
public static JSONObject animalDetect(String imgPath) {
//初始化
AipImageClassify aic = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);
//返回JSON格式的数据
HashMap<String, String> params = new HashMap<String, String>();
params.put("baike_num", "1");
JSONObject res = aic.animalDetect(imgPath, params);
System.out.println(res.toString(2));
return res;
}
public static JSONObject dishDetect(String imgPath) {
//初始化
AipImageClassify aic = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);
//返回JSON格式的数据
HashMap<String, String> params = new HashMap<String, String>();
params.put("baike_num", "1");
JSONObject res = aic.dishDetect(imgPath, params);
System.out.println(res.toString(2));
return res;
}
public static JSONObject plantDetect(String imgPath) {
//初始化
AipImageClassify aic = new AipImageClassify(APP_ID, API_KEY, SECRET_KEY);
//返回JSON格式的数据
HashMap<String, String> params = new HashMap<String, String>();
params.put("baike_num", "1");
JSONObject res = aic.plantDetect(imgPath, params);
System.out.println(res.toString(2));
return res;
}
}

@ -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
* yyyymd----- 31
* yyyym--------57
* md -----------58
* HH:mm-----------20
* hmm --------- 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,98 @@
package com.utils;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import com.baomidou.mybatisplus.plugins.Page;
/**
*
*/
public class Query<T> extends LinkedHashMap<String, Object> {
private static final long serialVersionUID = 1L;
/**
* mybatis-plus
*/
private Page<T> page;
/**
*
*/
private int currPage = 1;
/**
*
*/
private int limit = 10;
public Query(JQPageInfo pageInfo) {
//分页参数
if(pageInfo.getPage()!= null){
currPage = pageInfo.getPage();
}
if(pageInfo.getLimit()!= null){
limit = pageInfo.getLimit();
}
//防止SQL注入因为sidx、order是通过拼接SQL实现排序的会有SQL注入风险
String sidx = SQLFilter.sqlInject(pageInfo.getSidx());
String order = SQLFilter.sqlInject(pageInfo.getOrder());
//mybatis-plus分页
this.page = new Page<>(currPage, limit);
//排序
if(StringUtils.isNotBlank(sidx) && StringUtils.isNotBlank(order)){
this.page.setOrderByField(sidx);
this.page.setAsc("ASC".equalsIgnoreCase(order));
}
}
public Query(Map<String, Object> params){
this.putAll(params);
//分页参数
if(params.get("page") != null){
currPage = Integer.parseInt((String)params.get("page"));
}
if(params.get("limit") != null){
limit = Integer.parseInt((String)params.get("limit"));
}
this.put("offset", (currPage - 1) * limit);
this.put("page", currPage);
this.put("limit", limit);
//防止SQL注入因为sidx、order是通过拼接SQL实现排序的会有SQL注入风险
String sidx = SQLFilter.sqlInject((String)params.get("sidx"));
String order = SQLFilter.sqlInject((String)params.get("order"));
this.put("sidx", sidx);
this.put("order", order);
//mybatis-plus分页
this.page = new Page<>(currPage, limit);
//排序
if(StringUtils.isNotBlank(sidx) && StringUtils.isNotBlank(order)){
this.page.setOrderByField(sidx);
this.page.setAsc("ASC".equalsIgnoreCase(order));
}
}
public Page<T> getPage() {
return page;
}
public int getCurrPage() {
return currPage;
}
public int getLimit() {
return limit;
}
}

@ -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,39 @@
package com.utils;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import com.entity.EIException;
/**
* hibernate-validator
*/
public class ValidatorUtils {
private static Validator validator;
static {
validator = Validation.buildDefaultValidatorFactory().getValidator();
}
/**
*
* @param object
* @param groups
* @throws EIException EIException
*/
public static void validateEntity(Object object, Class<?>... groups)
throws EIException {
Set<ConstraintViolation<Object>> constraintViolations = validator.validate(object, groups);
if (!constraintViolations.isEmpty()) {
ConstraintViolation<Object> constraint = (ConstraintViolation<Object>)constraintViolations.iterator().next();
throw new EIException(constraint.getMessage());
}
}
}

@ -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,41 @@
/*
Navicat Premium Data Transfer
Source Server : mysql-localhost
Source Server Type : MySQL
Source Server Version : 50616
Source Host : localhost
Source Database : mybatis-plus
Target Server Type : MySQL
Target Server Version : 50616
File Encoding : utf-8
Date: 06/25/2017 20:53:49 PM
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` bigint(20) NOT NULL COMMENT '用户ID',
`name` varchar(50) DEFAULT NULL COMMENT '用户名',
`age` int(3) DEFAULT NULL COMMENT '用户年龄',
`type` int(1) DEFAULT '0' COMMENT '0、禁用 1、正常, 如果使用tinyint(1)mysql连接没加tinyInt1isBit=false默认mysql驱动会把值转成boolean',
`ctime` datetime DEFAULT NULL COMMENT '自定义填充的创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统用户表';
-- ----------------------------
-- Records of `sys_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user`(id,name,age,ctime,type) VALUES ('784972358981328902', 'Tom', '24', '2017-06-25 20:53:33', '1');
INSERT INTO `sys_user`(id,name,age,ctime,type) VALUES ('784972358981328903', 'Jammy', '21', '2017-06-25 20:53:37', '1');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;

@ -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} &gt;= #{remindstart}
</if>
<if test = " remindend != null ">
and ${column} &lt;= #{remindend}
</if>
</if>
<if test = "type == 2 ">
<if test = " remindstart != null ">
and ${column} &gt;= str_to_date(#{remindstart},'%Y-%m-%d')
</if>
<if test = " remindend != null ">
and ${column} &lt;= 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…
Cancel
Save