main
parent
612c8f3608
commit
50dd029de9
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
@ -0,0 +1,158 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : localhost_3306
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80028 (8.0.28)
|
||||
Source Host : localhost:3306
|
||||
Source Schema : db
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80028 (8.0.28)
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 05/03/2024 13:45:55
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tb_admin
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tb_admin`;
|
||||
CREATE TABLE `tb_admin` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`gender` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`telephone` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`portrait_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 105 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tb_admin
|
||||
-- ----------------------------
|
||||
INSERT INTO `tb_admin` VALUES (101, 'admin', '女', '21232f297a57a5a743894a0e4a801fc3', '111111@qq.com', '13866666666', '昌平', '/upload/20240305_13290833.jpg');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tb_clazz
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tb_clazz`;
|
||||
CREATE TABLE `tb_clazz` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`number` int NULL DEFAULT NULL,
|
||||
`introducation` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`headmaster` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`telephone` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`grade_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tb_clazz
|
||||
-- ----------------------------
|
||||
INSERT INTO `tb_clazz` VALUES (1, '一年一班', 30, '大圣的一年一班好', '大圣', 'dasheng@163.com', '13866666666', '一年级');
|
||||
INSERT INTO `tb_clazz` VALUES (2, '一年二班', 28, '小张的一年二班好', '小张', 'xiaozhang@163.com', '13866666666', '一年级');
|
||||
INSERT INTO `tb_clazz` VALUES (3, '二年一班', 35, '小韩的二年一班好', '小韩', 'xiaohan@163.com', '13866666666', '二年级');
|
||||
INSERT INTO `tb_clazz` VALUES (4, '二年二班', 30, '小强的二年二班好', '小强', 'xiaoqiang@163.com', '13866666666', '二年级');
|
||||
INSERT INTO `tb_clazz` VALUES (5, '三年一班', 30, '小花的三年一班好', '小花', 'xiaohua@163.com', '13866666666', '三年级');
|
||||
INSERT INTO `tb_clazz` VALUES (6, '三年二班', 30, '小赵的三年二班好', '小赵', 'xiaozhao@163.com', '13866666666', '三年级');
|
||||
INSERT INTO `tb_clazz` VALUES (7, '四年一班', 30, '小赵的三年二班好', '小飞', 'xiaofei@163.com', '13866666666', '四年级');
|
||||
INSERT INTO `tb_clazz` VALUES (11, '六年二班', 70, '6666666666', '李四', '511@163.com', '14785369912', '六年级');
|
||||
INSERT INTO `tb_clazz` VALUES (13, '六年三班', 50, '6666666666666', '李四', '154@163.com', '17752896321', '六年级');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tb_grade
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tb_grade`;
|
||||
CREATE TABLE `tb_grade` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
|
||||
`manager` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`telephone` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`introducation` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`, `name`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tb_grade
|
||||
-- ----------------------------
|
||||
INSERT INTO `tb_grade` VALUES (1, '一年级', '大圣', 'dasheng@163.com', '13866666666', '大学一年级');
|
||||
INSERT INTO `tb_grade` VALUES (2, '二年级', '小魏', 'xiaowei@163.com', '13866666666', '大学二年级');
|
||||
INSERT INTO `tb_grade` VALUES (3, '三年级', '小李', 'xiaoli@163.com', '13666666666', '三年级,这个班级的孩子们很有才艺');
|
||||
INSERT INTO `tb_grade` VALUES (4, '五年级', '小丽', 'li@123.com', '13666666666', '这个年级的同学多才多活力');
|
||||
INSERT INTO `tb_grade` VALUES (5, '六年级', '小明', 'xiaoming@666.com', '13666666666', '这个年级的主任是小明');
|
||||
INSERT INTO `tb_grade` VALUES (6, '四年级', '王五', '154@163.com', '15632145698', '66666666666');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tb_student
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tb_student`;
|
||||
CREATE TABLE `tb_student` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`sno` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`gender` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`telephone` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`introducation` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`portrait_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`clazz_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tb_student
|
||||
-- ----------------------------
|
||||
INSERT INTO `tb_student` VALUES (1, '1001', '张小明', '男', 'e10adc3949ba59abbe56e057f20f883e', 'yinyufei@163.com', '13866666666', '北京天通苑', '这个学生学习好', '/upload/20240305_13255786.jpg', '一年一班');
|
||||
INSERT INTO `tb_student` VALUES (2, '1002', '郭建超', '男', 'e10adc3949ba59abbe56e057f20f883e', 'guojianchao@163.com', '13866666666', '北京昌平', '这个学生会功夫', '/upload/20240305_13260948.jpg', '一年一班');
|
||||
INSERT INTO `tb_student` VALUES (3, '1003', '史汶鑫', '男', 'e10adc3949ba59abbe56e057f20f883e', 'shiwenxin@163.com', '13866666666', '北京昌平', '这个学生酒量好', '/upload/20240305_13261646.jpg', '二年一班');
|
||||
INSERT INTO `tb_student` VALUES (4, '1004', '高建军', '男', 'e10adc3949ba59abbe56e057f20f883e', 'gaojianjun@163.com', '13866666666', '北京昌平', '这个学生会做饭', '/upload/20240305_13262677.jpg', '二年一班');
|
||||
INSERT INTO `tb_student` VALUES (5, '1005', '邹伟斌', '男', 'e10adc3949ba59abbe56e057f20f883e', 'zouweibin@163.com', '13866666666', '北京昌平', '这个学生能吃辣', '/upload/20240305_13263150.jpg', '三年一班');
|
||||
INSERT INTO `tb_student` VALUES (6, '1006', '刘路', '男', 'e10adc3949ba59abbe56e057f20f883e', 'liulu@163.com', '13866666666', '北京昌平', '这个学生是学霸', '/upload/20240305_13263696.jpg', '三年二班');
|
||||
INSERT INTO `tb_student` VALUES (7, '1007', '庞家仨', '女', 'e10adc3949ba59abbe56e057f20f883e', 'pangjiasan@163.com', '13866666666', '北京昌平', '这个学生海拔高', '/upload/20240305_13264443.jpg', '三年二班');
|
||||
INSERT INTO `tb_student` VALUES (8, '1008', '谭帅333', '男', 'e10adc3949ba59abbe56e057f20f883e', 'tanshuai@163.com', '13866666666', '北京昌平', '这个学生想考研', '/upload/20240305_13264977.jpg', '四年一班');
|
||||
INSERT INTO `tb_student` VALUES (11, '1008611', '张三', '男', 'e10adc3949ba59abbe56e057f20f883e', '555@163.com', '17758691236', '北京市海淀区', '这个同学有钱', '/upload/20240305_13315436.jpg', '一年一班');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for tb_teacher
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tb_teacher`;
|
||||
CREATE TABLE `tb_teacher` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`tno` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`gender` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`telephone` varchar(12) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`portrait_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`clazz_name` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of tb_teacher
|
||||
-- ----------------------------
|
||||
INSERT INTO `tb_teacher` VALUES (1, '101', '大圣', '女', 'e10adc3949ba59abbe56e057f20f883e', 'dasheng@163.com', '13866666666', '北京昌平', '/upload/20240305_13272562.jpg', '一年一班');
|
||||
INSERT INTO `tb_teacher` VALUES (2, '102', '小张', '男', 'e10adc3949ba59abbe56e057f20f883e', 'xiaozhang@163.com', '13866666666', '北京海淀', '/upload/20240305_13273255.jpg', '一年二班');
|
||||
INSERT INTO `tb_teacher` VALUES (3, '103', '小韩', '男', 'e10adc3949ba59abbe56e057f20f883e', 'xiaohan@163.com', '13866666666', '北京朝阳', '/upload/20240305_1327379.jpg', '二年一班');
|
||||
INSERT INTO `tb_teacher` VALUES (4, '104', '小强', '男', 'e10adc3949ba59abbe56e057f20f883e', 'xiaoqiang@163.com', '13866666666', '北京通州', '/upload/20240305_13275819.jpg', '二年二班');
|
||||
INSERT INTO `tb_teacher` VALUES (5, '105', '小花', '男', 'e10adc3949ba59abbe56e057f20f883e', 'xiaohua@163.com', '13866666666', '北京顺义', '/upload/20240305_13280246.jpg', '三年一班');
|
||||
INSERT INTO `tb_teacher` VALUES (6, '106', '小赵', '男', 'e10adc3949ba59abbe56e057f20f883e', 'xiaozhao@163.com', '13866666666', '北京东城', '/upload/20240305_1328082.jpg', '三年二班');
|
||||
INSERT INTO `tb_teacher` VALUES (7, '107', '小飞', '男', 'e10adc3949ba59abbe56e057f20f883e', 'xiaofei@163.com', '13866666666', '北京西城', '/upload/20240305_13281450.jpg', '四年一班');
|
||||
INSERT INTO `tb_teacher` VALUES (8, '108', '秀秀2', '男', 'e10adc3949ba59abbe56e057f20f883e', '123456@123.com', '13855555555', '海淀', '/upload/20240305_13281951.jpg', '一年二班');
|
||||
INSERT INTO `tb_teacher` VALUES (9, '1002', '李老师', '男', 'e10adc3949ba59abbe56e057f20f883e', 'test@qq.com', '17638176639', '上海', '/upload/20240305_13282363.jpg', '一年一班');
|
||||
INSERT INTO `tb_teacher` VALUES (10, '1001011', '李四', '男', 'e10adc3949ba59abbe56e057f20f883e', '1587@163.com', '19512365478', '北京市昌平区', '/upload/20240305_13331656.jpg', '四年一班');
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -0,0 +1,316 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Maven Start Up Batch script
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# M2_HOME - location of maven2's installed home dir
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||
. /usr/local/etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||
else
|
||||
export JAVA_HOME="/Library/Java/Home"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=`java-config --jre-home`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$M2_HOME" ] ; then
|
||||
## resolve links - $0 may be a link to maven's home
|
||||
PRG="$0"
|
||||
|
||||
# need this for relative symlinks
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG="`dirname "$PRG"`/$link"
|
||||
fi
|
||||
done
|
||||
|
||||
saveddir=`pwd`
|
||||
|
||||
M2_HOME=`dirname "$PRG"`/..
|
||||
|
||||
# make it fully qualified
|
||||
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||
|
||||
cd "$saveddir"
|
||||
# echo Using m2 at $M2_HOME
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="`which javac`"
|
||||
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=`which readlink`
|
||||
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||
else
|
||||
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||
fi
|
||||
javaHome="`dirname \"$javaExecutable\"`"
|
||||
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="`\\unset -f command; \\command -v java`"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=`cd "$wdir/.."; pwd`
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
echo "${basedir}"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
echo "$(tr -s '\n' ' ' < "$1")"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
##########################################################################################
|
||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||
fi
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||
fi
|
||||
if [ -n "$MVNW_REPOURL" ]; then
|
||||
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
else
|
||||
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
fi
|
||||
while IFS="=" read key value; do
|
||||
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||
esac
|
||||
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Downloading from: $jarUrl"
|
||||
fi
|
||||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
if $cygwin; then
|
||||
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
|
||||
fi
|
||||
|
||||
if command -v wget > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found wget ... using wget"
|
||||
fi
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||
else
|
||||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||
fi
|
||||
elif command -v curl > /dev/null; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Found curl ... using curl"
|
||||
fi
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||
else
|
||||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||
fi
|
||||
|
||||
else
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo "Falling back to using Java to download"
|
||||
fi
|
||||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||
# For Cygwin, switch paths to Windows format before running javac
|
||||
if $cygwin; then
|
||||
javaClass=`cygpath --path --windows "$javaClass"`
|
||||
fi
|
||||
if [ -e "$javaClass" ]; then
|
||||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
# Compiling the Java class
|
||||
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||
fi
|
||||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||
# Running the downloader
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo " - Running MavenWrapperDownloader.java ..."
|
||||
fi
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
##########################################################################################
|
||||
# End of extension
|
||||
##########################################################################################
|
||||
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
echo $MAVEN_PROJECTBASEDIR
|
||||
fi
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$M2_HOME" ] &&
|
||||
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||
fi
|
||||
|
||||
# Provide a "standardized" way to retrieve the CLI args that will
|
||||
# work with both Windows and non-Windows executions.
|
||||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||
export MAVEN_CMD_LINE_ARGS
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
$MAVEN_DEBUG_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.home=${M2_HOME}" \
|
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
@ -0,0 +1,188 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Maven Start Up Batch script
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM M2_HOME - location of maven2's installed home dir
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
|
||||
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||
)
|
||||
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
if exist %WRAPPER_JAR% (
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Found %WRAPPER_JAR%
|
||||
)
|
||||
) else (
|
||||
if not "%MVNW_REPOURL%" == "" (
|
||||
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||
)
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||
echo Downloading from: %DOWNLOAD_URL%
|
||||
)
|
||||
|
||||
powershell -Command "&{"^
|
||||
"$webclient = new-object System.Net.WebClient;"^
|
||||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||
"}"^
|
||||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||
"}"
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Finished downloading %WRAPPER_JAR%
|
||||
)
|
||||
)
|
||||
@REM End of extension
|
||||
|
||||
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||
@REM work with both Windows and non-Windows executions.
|
||||
set MAVEN_CMD_LINE_ARGS=%*
|
||||
|
||||
%MAVEN_JAVA_EXE% ^
|
||||
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||
%MAVEN_OPTS% ^
|
||||
%MAVEN_DEBUG_OPTS% ^
|
||||
-classpath %WRAPPER_JAR% ^
|
||||
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||
|
||||
cmd /C exit /B %ERROR_CODE%
|
@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<!-- 继承方式使用SpringBoot -->
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.2.1.RELEASE</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.zsz</groupId>
|
||||
<artifactId>zhxy</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
|
||||
<name>zhxy</name>
|
||||
<description>zhxy</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!--单元测试启动器-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- thymeleaf支持-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mybatis-plus-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 简化POJO实体类开发 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!--mysql-->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generator</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
<artifactId>freemarker</artifactId>
|
||||
<version>2.3.31</version>
|
||||
</dependency>
|
||||
|
||||
<!--swagger-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
<!--swagger ui-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.7.0</version>
|
||||
</dependency>
|
||||
<!--swagger2 增强版接口文档-->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>2.0.4</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!--开发者工具-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.29</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JWT生成Token-->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.7.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!--spring boot maven插件 , 可以将项目运行依赖的jar包打到我们的项目中-->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
@ -0,0 +1,25 @@
|
||||
package com.zsz;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
@SpringBootApplication
|
||||
@Slf4j
|
||||
public class ZhxyApplication {
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
log.info("服务开始启动~");
|
||||
ConfigurableApplicationContext applicationContext = SpringApplication.run(ZhxyApplication.class, args);
|
||||
ConfigurableEnvironment env = applicationContext.getEnvironment();
|
||||
|
||||
|
||||
log.info("-------服务启动完成:{}-------", InetAddress.getLocalHost().getHostAddress());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.zsz.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* WebMvcConfigurer
|
||||
*
|
||||
* @author Zheng Jie
|
||||
* @date 2018-11-30
|
||||
*/
|
||||
@Configuration
|
||||
//@EnableWebMvc
|
||||
public class ConfigurerAdapter implements WebMvcConfigurer {
|
||||
|
||||
@Resource
|
||||
private SystemUtil systemUtil;
|
||||
|
||||
public static final String PATH_PREFIX = "upload/";
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/" + PATH_PREFIX + "**").addResourceLocations("file:" + systemUtil.getFilePrefix());
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.zsz.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
||||
@Configuration
|
||||
@MapperScan("com.zsz.mapper")
|
||||
public class MpConfig {
|
||||
|
||||
/**
|
||||
* 分页插件
|
||||
*/
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor() {
|
||||
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
|
||||
// paginationInterceptor.setLimit(你的最大单页限制数量,默认 500 条,小于 0 如 -1 不受限制);
|
||||
return paginationInterceptor;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.zsz.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author : Mingxuan_x
|
||||
* @version : 1.0
|
||||
* @Description: 系统工具类
|
||||
* @Telephone : 15135964789
|
||||
* @createDate : 2021/4/11 14:38
|
||||
* @updateUser : Mingxuan_x
|
||||
* @updateDate : 2021/4/11 14:38
|
||||
* @updateRemark : 修改内容
|
||||
**/
|
||||
@Component
|
||||
public class SystemUtil {
|
||||
|
||||
@Value("${file.upload.windows.dir}")
|
||||
private String windowsPath;
|
||||
|
||||
|
||||
@Value("${file.upload.linux.dir}")
|
||||
private String linuxPath;
|
||||
|
||||
@Value("${file.upload.mac.dir}")
|
||||
private String macPath;
|
||||
|
||||
|
||||
private final String LINUX = "linux";
|
||||
private final String WINDOWS = "windows";
|
||||
|
||||
/**
|
||||
* 获取文件存储路径
|
||||
*
|
||||
* @return:
|
||||
* @Author: Mingxuan_X
|
||||
* @Date: 2021/4/11
|
||||
*/
|
||||
|
||||
public String getFilePrefix() {
|
||||
String s = null;
|
||||
//判断操作系统环境
|
||||
String environment = System.getProperty("os.name").toLowerCase();
|
||||
if (environment.contains(LINUX)) {
|
||||
s = linuxPath;
|
||||
} else if (environment.contains(WINDOWS)) {
|
||||
s = windowsPath;
|
||||
} else {
|
||||
s = macPath;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zsz.pojo.Admin;
|
||||
import com.zsz.service.AdminService;
|
||||
import com.zsz.util.MD5;
|
||||
import com.zsz.util.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api("管理员管理器")
|
||||
@RestController
|
||||
@RequestMapping("/sms/adminController")
|
||||
public class AdminController {
|
||||
|
||||
@Autowired
|
||||
AdminService adminService;
|
||||
|
||||
// http://localhost:8080/sms/adminController/getAllAdmin/1/3?adminName=
|
||||
@ApiOperation("根据分页条件查询管理员信息")
|
||||
@GetMapping("/getAllAdmin/{pageNo}/{pageSize}")
|
||||
public Result getAllAdmin(
|
||||
@ApiParam("分页查询的页码数") @PathVariable("pageNo") Integer pageNo,
|
||||
@ApiParam("分页查询的页大小") @PathVariable("pageSize") Integer pageSize,
|
||||
@ApiParam("要查询的管理员姓名") String adminName
|
||||
){
|
||||
Page<Admin> adminPage = new Page<>(pageNo, pageSize);
|
||||
Page<Admin> adminPage1 = adminService.getAllAdminData(adminPage,adminName);
|
||||
return Result.ok(adminPage1);
|
||||
}
|
||||
|
||||
// http://localhost:8080/sms/adminController/saveOrUpdateAdmin
|
||||
@ApiOperation("新增或者修改管理员信息")
|
||||
@PostMapping("/saveOrUpdateAdmin")
|
||||
public Result saveOrUpdateAdmin(
|
||||
@ApiParam("提交的管理员信息") @RequestBody Admin admin
|
||||
){
|
||||
Integer id = admin.getId();
|
||||
if (null == id || 0 == id){
|
||||
String password = admin.getPassword();
|
||||
String encrypt = MD5.encrypt(password);
|
||||
admin.setPassword(encrypt);
|
||||
}
|
||||
adminService.saveOrUpdate(admin);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
// http://localhost:8080/sms/adminController/deleteAdmin
|
||||
@ApiOperation("删除单个或多个管理员信息")
|
||||
@DeleteMapping("/deleteAdmin")
|
||||
public Result deleteAdmin(
|
||||
@ApiParam("要删除的管理员的id列表") @RequestBody List<Integer> ids
|
||||
){
|
||||
adminService.removeByIds(ids);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.zsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zsz.pojo.Clazz;
|
||||
import com.zsz.service.ClazzService;
|
||||
import com.zsz.util.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api("班级控制器")
|
||||
@RestController
|
||||
@RequestMapping("/sms/clazzController")
|
||||
public class ClazzController {
|
||||
|
||||
@Autowired
|
||||
ClazzService clazzService;
|
||||
|
||||
@ApiOperation("获取所有班级信息")
|
||||
@GetMapping("/getClazzs")
|
||||
public Result getClazzs(){
|
||||
List<Clazz> clazzs = clazzService.getClazzs();
|
||||
return Result.ok(clazzs);
|
||||
}
|
||||
|
||||
|
||||
// http://localhost:8080/sms/clazzController/getClazzsByOpr/1/3?gradeName=&name=
|
||||
@ApiOperation("根据年级名称和班级名称获取班级信息,带分页")
|
||||
@GetMapping("/getClazzsByOpr/{pageNo}/{pageSize}")
|
||||
public Result getClazzsByOpr(
|
||||
@ApiParam("分页查询的页码数") @PathVariable("pageNo") Integer pageNo,
|
||||
@ApiParam("分页查询的页大小") @PathVariable("pageSize") Integer pageSize,
|
||||
@ApiParam("班级信息") Clazz clazz
|
||||
){
|
||||
Page<Clazz> clazzPage = new Page<>(pageNo, pageSize);
|
||||
Page<Clazz> page = clazzService.getClazzData(clazzPage,clazz);
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
@ApiOperation("增加或修改班级信息")
|
||||
@PostMapping("/saveOrUpdateClazz")
|
||||
public Result saveOrUpdateClazz(
|
||||
@ApiParam("Json格式的班级信息") @RequestBody Clazz clazz
|
||||
){
|
||||
clazzService.saveOrUpdate(clazz);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("删除班级信息")
|
||||
@DeleteMapping("/deleteClazz")
|
||||
public Result deleteClazz(
|
||||
@ApiParam("数组格式的班级ID") @RequestBody List<Integer> ids
|
||||
){
|
||||
clazzService.removeByIds(ids);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.zsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zsz.pojo.Student;
|
||||
import com.zsz.service.StudentService;
|
||||
import com.zsz.util.MD5;
|
||||
import com.zsz.util.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api("学生控制器")
|
||||
@RestController
|
||||
@RequestMapping("/sms/studentController")
|
||||
public class StudentController {
|
||||
|
||||
@Autowired
|
||||
StudentService studentService;
|
||||
|
||||
// http://localhost:8080/sms/studentController/getStudentByOpr/1/3?clazzName=&name=
|
||||
@ApiOperation("根据分页条件获取学生分页数据")
|
||||
@GetMapping("/getStudentByOpr/{pageNo}/{pageSize}")
|
||||
public Result getStudentByOpr(
|
||||
@ApiParam("分页查询的页码数") @PathVariable("pageNo") Integer pageNo,
|
||||
@ApiParam("分页查询的页大小") @PathVariable("pageSize") Integer pageSize,
|
||||
@ApiParam("学生信息") Student student
|
||||
){
|
||||
Page<Student> studentPage = new Page<>(pageNo,pageSize);
|
||||
Page<Student> studentPage1 = studentService.getStudentData(studentPage,student);
|
||||
return Result.ok(studentPage1);
|
||||
}
|
||||
|
||||
// http://localhost:8080/sms/studentController/addOrUpdateStudent
|
||||
@ApiOperation("新增或更改学生信息")
|
||||
@PostMapping("/addOrUpdateStudent")
|
||||
public Result addOrUpdateStudent(
|
||||
@ApiParam("请求中携带的要修改信息的学生对象") @RequestBody Student student
|
||||
){
|
||||
Integer id = student.getId();
|
||||
if (null == id || 0 == id){
|
||||
String password = student.getPassword();
|
||||
String encrypt = MD5.encrypt(password);
|
||||
student.setPassword(encrypt);
|
||||
}
|
||||
|
||||
studentService.saveOrUpdate(student);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
// http://localhost:8080/sms/studentController/delStudentById
|
||||
@ApiOperation("删除单个或多个学生信息")
|
||||
@DeleteMapping("/delStudentById")
|
||||
public Result delStudentById(
|
||||
@ApiParam("要删除的学生id的集合") @RequestBody List<Integer> ids
|
||||
){
|
||||
studentService.removeByIds(ids);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.zsz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zsz.pojo.Teacher;
|
||||
import com.zsz.service.TeacherService;
|
||||
import com.zsz.util.MD5;
|
||||
import com.zsz.util.Result;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api("教师管理器")
|
||||
@RestController
|
||||
@RequestMapping("/sms/teacherController")
|
||||
public class TeacherController {
|
||||
|
||||
@Autowired
|
||||
TeacherService teacherService;
|
||||
|
||||
// http://localhost:8080/sms/teacherController/getTeachers/1/3?clazzName=&name=
|
||||
@ApiOperation("根据分页条件获取教师信息")
|
||||
@GetMapping("/getTeachers/{pageNo}/{pageSize}")
|
||||
public Result getTeachers(
|
||||
@ApiParam("分页查询的页码数") @PathVariable("pageNo") Integer pageNo,
|
||||
@ApiParam("分页查询的页大小") @PathVariable("pageSize") Integer pageSize,
|
||||
@ApiParam("分页查询的班级名称和教师名称") Teacher teacher
|
||||
){
|
||||
Page<Teacher> teacherPage = new Page<>(pageNo, pageSize);
|
||||
Page<Teacher> teacherPage1 = teacherService.getTeacherData(teacherPage,teacher);
|
||||
return Result.ok(teacherPage1);
|
||||
}
|
||||
|
||||
// http://localhost:8080/sms/teacherController/saveOrUpdateTeacher
|
||||
@ApiOperation("新增或者更改教师信息")
|
||||
@PostMapping("/saveOrUpdateTeacher")
|
||||
public Result saveOrUpdateTeacher(
|
||||
@ApiParam("要提交的教师信息") @RequestBody Teacher teacher
|
||||
){
|
||||
Integer id = teacher.getId();
|
||||
if (null == id || 0 == id){
|
||||
String password = teacher.getPassword();
|
||||
String encrypt = MD5.encrypt(password);
|
||||
teacher.setPassword(encrypt);
|
||||
}
|
||||
teacherService.saveOrUpdate(teacher);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
// http://localhost:8080/sms/teacherController/deleteTeacher
|
||||
@ApiOperation("删除单个或多个老师信息")
|
||||
@DeleteMapping("/deleteTeacher")
|
||||
public Result deleteTeacher(
|
||||
@ApiParam("要删除的教师id列表") @RequestBody List<Integer> ids
|
||||
){
|
||||
|
||||
teacherService.removeByIds(ids);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zsz.pojo.Admin;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface AdminMapper extends BaseMapper<Admin> {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zsz.pojo.Clazz;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface ClazzMapper extends BaseMapper<Clazz> {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zsz.pojo.Grade;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface GradeMapper extends BaseMapper<Grade> {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zsz.pojo.Student;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface StudentMapper extends BaseMapper<Student> {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zsz.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zsz.pojo.Teacher;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface TeacherMapper extends BaseMapper<Teacher> {
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.zsz.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tb_admin")
|
||||
public class Admin {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String name;
|
||||
private char gender;
|
||||
private String password;
|
||||
private String email;
|
||||
private String telephone;
|
||||
private String address;
|
||||
private String portraitPath; //头像的图片路径
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.zsz.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("tb_clazz")
|
||||
public class Clazz {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Integer number;
|
||||
private String introducation;
|
||||
private String headmaster;
|
||||
private String email;
|
||||
private String telephone;
|
||||
private String gradeName;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.zsz.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tb_grade")
|
||||
public class Grade {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String manager;
|
||||
private String email;
|
||||
private String telephone;
|
||||
private String introducation;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.zsz.pojo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 用户登录表单信息
|
||||
*/
|
||||
@Data
|
||||
public class LoginForm {
|
||||
private String username;
|
||||
private String password;
|
||||
private String verifiCode;
|
||||
private Integer userType;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.zsz.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("tb_student")
|
||||
public class Student {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String sno;
|
||||
private String name;
|
||||
private char gender;
|
||||
private String password;
|
||||
private String email;
|
||||
private String telephone;
|
||||
private String address;
|
||||
private String introducation;
|
||||
private String portraitPath;
|
||||
private String clazzName;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.zsz.pojo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("tb_teacher")
|
||||
public class Teacher {
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private String tno;
|
||||
private String name;
|
||||
private char gender;
|
||||
private String password;
|
||||
private String email;
|
||||
private String telephone;
|
||||
private String address;
|
||||
private String portraitPath;
|
||||
private String clazzName;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.zsz.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zsz.pojo.Admin;
|
||||
import com.zsz.pojo.LoginForm;
|
||||
|
||||
public interface AdminService extends IService<Admin> {
|
||||
Admin login(LoginForm loginForm);
|
||||
|
||||
Admin getAdminById(Long userId);
|
||||
|
||||
Page<Admin> getAllAdminData(Page<Admin> adminPage, String adminName);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.zsz.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zsz.pojo.Clazz;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ClazzService extends IService<Clazz> {
|
||||
Page<Clazz> getClazzData(Page<Clazz> clazzPage, Clazz clazz);
|
||||
|
||||
List<Clazz> getClazzs();
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.zsz.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zsz.pojo.Grade;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GradeService extends IService<Grade> {
|
||||
Page<Grade> getGradesData(Page<Grade> gradePage, String gradeName);
|
||||
|
||||
List<Grade> getGrades();
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.zsz.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zsz.pojo.LoginForm;
|
||||
import com.zsz.pojo.Student;
|
||||
|
||||
public interface StudentService extends IService<Student> {
|
||||
Student login(LoginForm loginForm);
|
||||
|
||||
Student getStudentById(Long userId);
|
||||
|
||||
Page<Student> getStudentData(Page<Student> studentPage, Student student);
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.zsz.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zsz.pojo.LoginForm;
|
||||
import com.zsz.pojo.Teacher;
|
||||
|
||||
public interface TeacherService extends IService<Teacher> {
|
||||
Teacher login(LoginForm loginForm);
|
||||
|
||||
Teacher getTeacherById(Long userId);
|
||||
|
||||
Page<Teacher> getTeacherData(Page<Teacher> teacherPage, Teacher teacher);
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.zsz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zsz.mapper.AdminMapper;
|
||||
import com.zsz.pojo.Admin;
|
||||
import com.zsz.pojo.LoginForm;
|
||||
import com.zsz.service.AdminService;
|
||||
import com.zsz.util.MD5;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Service("adminServiceImpl")
|
||||
@Transactional
|
||||
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {
|
||||
@Override
|
||||
public Admin login(LoginForm loginForm) {
|
||||
//创建QueryWrapper对象
|
||||
QueryWrapper<Admin> adminQueryWrapper = new QueryWrapper<>();
|
||||
//拼接查询条件
|
||||
adminQueryWrapper.eq("name",loginForm.getUsername());
|
||||
//将密码转换成密文进行查询
|
||||
adminQueryWrapper.eq("password", MD5.encrypt(loginForm.getPassword()));
|
||||
Admin admin = baseMapper.selectOne(adminQueryWrapper);
|
||||
return admin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Admin getAdminById(Long userId) {
|
||||
QueryWrapper<Admin> adminQueryWrapper = new QueryWrapper<>();
|
||||
adminQueryWrapper.eq("id",userId);
|
||||
return baseMapper.selectOne(adminQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Admin> getAllAdminData(Page<Admin> adminPage, String adminName) {
|
||||
QueryWrapper<Admin> adminQueryWrapper = new QueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(adminName)){
|
||||
adminQueryWrapper.like("name", adminName);
|
||||
}
|
||||
Page<Admin> page = baseMapper.selectPage(adminPage, adminQueryWrapper);
|
||||
return page;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.zsz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zsz.mapper.ClazzMapper;
|
||||
import com.zsz.pojo.Clazz;
|
||||
import com.zsz.service.ClazzService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("clazzServiceImpl")
|
||||
@Transactional
|
||||
public class ClazzServiceImpl extends ServiceImpl<ClazzMapper, Clazz> implements ClazzService {
|
||||
@Override
|
||||
public Page<Clazz> getClazzData(Page<Clazz> clazzPage, Clazz clazz) {
|
||||
QueryWrapper<Clazz> clazzQueryWrapper = new QueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(clazz.getGradeName())){
|
||||
clazzQueryWrapper.like("grade_name",clazz.getGradeName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(clazz.getName())){
|
||||
clazzQueryWrapper.like("name",clazz.getName());
|
||||
}
|
||||
Page<Clazz> selectPage = baseMapper.selectPage(clazzPage, clazzQueryWrapper);
|
||||
return selectPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Clazz> getClazzs() {
|
||||
QueryWrapper<Clazz> clazzQueryWrapper = new QueryWrapper<>();
|
||||
|
||||
return baseMapper.selectList(clazzQueryWrapper);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.zsz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zsz.mapper.GradeMapper;
|
||||
import com.zsz.pojo.Grade;
|
||||
import com.zsz.service.GradeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("gradeServiceImpl")
|
||||
@Transactional
|
||||
public class GradeServiceImpl extends ServiceImpl<GradeMapper, Grade> implements GradeService {
|
||||
@Override
|
||||
public Page<Grade> getGradesData(Page<Grade> gradePage, String gradeName) {
|
||||
QueryWrapper<Grade> gradeQueryWrapper = new QueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(gradeName)){
|
||||
gradeQueryWrapper.like("name",gradeName);
|
||||
}
|
||||
gradeQueryWrapper.orderByDesc("id");
|
||||
Page<Grade> page = baseMapper.selectPage(gradePage, gradeQueryWrapper);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Grade> getGrades() {
|
||||
return baseMapper.selectList(null);
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.zsz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zsz.mapper.StudentMapper;
|
||||
import com.zsz.pojo.Admin;
|
||||
import com.zsz.pojo.LoginForm;
|
||||
import com.zsz.pojo.Student;
|
||||
import com.zsz.service.StudentService;
|
||||
import com.zsz.util.MD5;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Service("studentServiceImpl")
|
||||
@Transactional
|
||||
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {
|
||||
@Override
|
||||
public Student login(LoginForm loginForm) {
|
||||
//创建QueryWapper对象
|
||||
QueryWrapper<Student> studentQueryWrapper = new QueryWrapper<>();
|
||||
//拼接查询条件
|
||||
studentQueryWrapper.eq("name",loginForm.getUsername());
|
||||
studentQueryWrapper.eq("password", MD5.encrypt(loginForm.getPassword()));
|
||||
Student student = baseMapper.selectOne(studentQueryWrapper);
|
||||
return student;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Student getStudentById(Long userId) {
|
||||
QueryWrapper<Student> studentQueryWrapper = new QueryWrapper<>();
|
||||
studentQueryWrapper.eq("id",userId);
|
||||
return baseMapper.selectOne(studentQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Student> getStudentData(Page<Student> studentPage, Student student) {
|
||||
QueryWrapper<Student> studentQueryWrapper = new QueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(student.getClazzName())){
|
||||
studentQueryWrapper.like("clazz_name",student.getClazzName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(student.getName())){
|
||||
studentQueryWrapper.like("name",student.getName());
|
||||
}
|
||||
Page<Student> studentPage1 = baseMapper.selectPage(studentPage, studentQueryWrapper);
|
||||
return studentPage1;
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.zsz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zsz.mapper.TeacherMapper;
|
||||
import com.zsz.pojo.LoginForm;
|
||||
import com.zsz.pojo.Teacher;
|
||||
import com.zsz.service.TeacherService;
|
||||
import com.zsz.util.MD5;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Service("teacherServiceImpl")
|
||||
@Transactional
|
||||
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements TeacherService {
|
||||
@Override
|
||||
public Teacher login(LoginForm loginForm) {
|
||||
QueryWrapper<Teacher> teacherQueryWrapper = new QueryWrapper<>();
|
||||
teacherQueryWrapper.eq("name",loginForm.getUsername());
|
||||
teacherQueryWrapper.eq("password", MD5.encrypt(loginForm.getPassword()));
|
||||
Teacher teacher = baseMapper.selectOne(teacherQueryWrapper);
|
||||
return teacher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Teacher getTeacherById(Long userId) {
|
||||
QueryWrapper<Teacher> teacherQueryWrapper = new QueryWrapper<>();
|
||||
teacherQueryWrapper.eq("id",userId);
|
||||
return baseMapper.selectOne(teacherQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<Teacher> getTeacherData(Page<Teacher> teacherPage, Teacher teacher) {
|
||||
QueryWrapper<Teacher> teacherQueryWrapper = new QueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(teacher.getClazzName())){
|
||||
teacherQueryWrapper.like("clazz_name",teacher.getClazzName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(teacher.getName())){
|
||||
teacherQueryWrapper.like("name",teacher.getName());
|
||||
}
|
||||
Page<Teacher> Page = baseMapper.selectPage(teacherPage, teacherQueryWrapper);
|
||||
return Page;
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.zsz.util;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* @project: ssm_sms
|
||||
* @description: 绘制验证码图片
|
||||
*/
|
||||
public class CreateVerifiCodeImage {
|
||||
|
||||
private static int WIDTH = 90;
|
||||
private static int HEIGHT = 35;
|
||||
private static int FONT_SIZE = 20; //字符大小
|
||||
private static char[] verifiCode; //验证码
|
||||
private static BufferedImage verifiCodeImage; //验证码图片
|
||||
|
||||
/**
|
||||
* @description: 获取验证码图片
|
||||
* @param: no
|
||||
* @return: java.awt.image.BufferedImage
|
||||
*/
|
||||
public static BufferedImage getVerifiCodeImage() {
|
||||
verifiCodeImage = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_BGR);// create a image
|
||||
Graphics graphics = verifiCodeImage.getGraphics();
|
||||
|
||||
verifiCode = generateCheckCode();
|
||||
drawBackground(graphics);
|
||||
drawRands(graphics, verifiCode);
|
||||
|
||||
graphics.dispose();
|
||||
|
||||
return verifiCodeImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 获取验证码
|
||||
* @param: no
|
||||
* @return: char[]
|
||||
*/
|
||||
public static char[] getVerifiCode() {
|
||||
return verifiCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 随机生成验证码
|
||||
* @param: no
|
||||
* @return: char[]
|
||||
*/
|
||||
private static char[] generateCheckCode() {
|
||||
String chars = "0123456789abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
char[] rands = new char[4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
int rand = (int) (Math.random() * (10 + 26 * 2));
|
||||
rands[i] = chars.charAt(rand);
|
||||
}
|
||||
return rands;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 绘制验证码
|
||||
* @param: g
|
||||
* @param: rands
|
||||
* @return: void
|
||||
*/
|
||||
private static void drawRands(Graphics g, char[] rands) {
|
||||
g.setFont(new Font("Console", Font.BOLD, FONT_SIZE));
|
||||
|
||||
for (int i = 0; i < rands.length; i++) {
|
||||
|
||||
g.setColor(getRandomColor());
|
||||
g.drawString("" + rands[i], i * FONT_SIZE + 10, 25);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 绘制验证码图片背景
|
||||
* @param: g
|
||||
* @return: void
|
||||
*/
|
||||
private static void drawBackground(Graphics g) {
|
||||
|
||||
g.setColor(Color.white);
|
||||
g.fillRect(0, 0, WIDTH, HEIGHT);
|
||||
|
||||
// 绘制验证码干扰点
|
||||
for (int i = 0; i < 200; i++) {
|
||||
int x = (int) (Math.random() * WIDTH);
|
||||
int y = (int) (Math.random() * HEIGHT);
|
||||
g.setColor(getRandomColor());
|
||||
g.drawOval(x, y, 1, 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description: 获取随机颜色
|
||||
* @param: no
|
||||
* @return: java.awt.Color
|
||||
*/
|
||||
private static Color getRandomColor() {
|
||||
Random ran = new Random();
|
||||
return new Color(ran.nextInt(220), ran.nextInt(220), ran.nextInt(220));
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.zsz.util;
|
||||
|
||||
import com.zsz.config.SystemUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class LocalUploadUtil {
|
||||
|
||||
public static final String PATH_PREFIX = "/upload/";
|
||||
|
||||
@Resource
|
||||
private SystemUtil systemUtil;
|
||||
|
||||
public String upload(MultipartFile file) {
|
||||
String newFileName = genNewFileName(file);
|
||||
|
||||
// 创建本地文件夹
|
||||
File fileDirectory = new File(systemUtil.getFilePrefix());
|
||||
if (!fileDirectory.exists()) {
|
||||
// 如果不存在,创建文件夹
|
||||
if (!fileDirectory.mkdir()) {
|
||||
throw new RuntimeException("文件夹创建失败,路径为:" + fileDirectory);
|
||||
}
|
||||
}
|
||||
try {
|
||||
//创建文件
|
||||
File destFile = new File(systemUtil.getFilePrefix() + newFileName);
|
||||
// 文件传输到本地
|
||||
file.transferTo(destFile);
|
||||
} catch (IOException e) {
|
||||
log.error("文件创建失败:{}", e.getMessage(), e);
|
||||
throw new RuntimeException("文件创建失败:{}" + e.getMessage());
|
||||
}
|
||||
return PATH_PREFIX + newFileName;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成文件名称
|
||||
*/
|
||||
private static String genNewFileName(MultipartFile file) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
|
||||
StringBuilder fileName = new StringBuilder();
|
||||
fileName.append(sdf.format(new Date())).append(new Random().nextInt(100)).append(getSuffixName(file));
|
||||
return fileName.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件后缀名称
|
||||
*/
|
||||
private static String getSuffixName(MultipartFile file) {
|
||||
String fileName = file.getOriginalFilename();
|
||||
String suffixName = fileName.substring(fileName.lastIndexOf("."));
|
||||
return suffixName;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.zsz.util;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 全局统一返回结果类
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "全局统一返回结果")
|
||||
public class Result<T> {
|
||||
|
||||
@ApiModelProperty(value = "返回码")
|
||||
private Integer code;
|
||||
|
||||
@ApiModelProperty(value = "返回消息")
|
||||
private String message;
|
||||
|
||||
@ApiModelProperty(value = "返回数据")
|
||||
private T data;
|
||||
|
||||
public Result(){}
|
||||
|
||||
// 返回数据
|
||||
protected static <T> Result<T> build(T data) {
|
||||
Result<T> result = new Result<T>();
|
||||
if (data != null)
|
||||
result.setData(data);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static <T> Result<T> build(T body, ResultCodeEnum resultCodeEnum) {
|
||||
Result<T> result = build(body);
|
||||
result.setCode(resultCodeEnum.getCode());
|
||||
result.setMessage(resultCodeEnum.getMessage());
|
||||
return result;
|
||||
}
|
||||
|
||||
public static<T> Result<T> ok(){
|
||||
return Result.ok(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作成功
|
||||
* @param data
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static<T> Result<T> ok(T data){
|
||||
Result<T> result = build(data);
|
||||
return build(data, ResultCodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
public static<T> Result<T> fail(){
|
||||
return Result.fail(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作失败
|
||||
* @param data
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static<T> Result<T> fail(T data){
|
||||
Result<T> result = build(data);
|
||||
return build(data, ResultCodeEnum.FAIL);
|
||||
}
|
||||
|
||||
public Result<T> message(String msg){
|
||||
this.setMessage(msg);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Result<T> code(Integer code){
|
||||
this.setCode(code);
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
if(this.getCode().intValue() == ResultCodeEnum.SUCCESS.getCode().intValue()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.zsz.util;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 统一返回结果状态信息类
|
||||
*
|
||||
*/
|
||||
@Getter
|
||||
public enum ResultCodeEnum {
|
||||
|
||||
SUCCESS(200,"成功"),
|
||||
FAIL(201, "失败"),
|
||||
SERVICE_ERROR(2012, "服务异常"),
|
||||
ILLEGAL_REQUEST( 204, "非法请求"),
|
||||
PAY_RUN(205, "支付中"),
|
||||
ARGUMENT_VALID_ERROR(206, "参数校验错误"),
|
||||
|
||||
LOGIN_ERROR(207, "用户名或密码错误"),
|
||||
LOGIN_AUTH(208, "未登陆"),
|
||||
PERMISSION(209, "没有权限"),
|
||||
SECKILL_NO_START(210, "秒杀还没开始"),
|
||||
SECKILL_RUN(211, "正在排队中"),
|
||||
SECKILL_NO_PAY_ORDER(212, "您有未支付的订单"),
|
||||
SECKILL_FINISH(213, "已售罄"),
|
||||
SECKILL_END(214, "秒杀已结束"),
|
||||
SECKILL_SUCCESS(215, "抢单成功"),
|
||||
SECKILL_FAIL(216, "抢单失败"),
|
||||
SECKILL_ILLEGAL(217, "请求不合法"),
|
||||
SECKILL_ORDER_SUCCESS(218, "下单成功"),
|
||||
COUPON_GET(220, "优惠券已经领取"),
|
||||
COUPON_LIMIT_GET(221, "优惠券已发放完毕"),
|
||||
//2022-02-22
|
||||
LOGIN_CODE(222,"长时间未操作,会话已失效,请刷新页面后重试!"),
|
||||
CODE_ERROR(223,"验证码错误!"),
|
||||
TOKEN_ERROR(224,"Token无效!")
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String message;
|
||||
|
||||
private ResultCodeEnum(Integer code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.zsz.util;
|
||||
|
||||
import org.apache.commons.io.filefilter.SuffixFileFilter;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @project: zhxy
|
||||
* @description: 上传文件的工具类
|
||||
*/
|
||||
public class UploadFile {
|
||||
|
||||
//存储文件上传失败的错误信息
|
||||
private static Map<String, Object> error_result = new HashMap<>();
|
||||
//存储头像的上传结果信息
|
||||
private static Map<String, Object> upload_result = new HashMap<>();
|
||||
|
||||
/**
|
||||
* @description: 效验所上传图片的大小及格式等信息...
|
||||
* @param: photo
|
||||
* @param: path
|
||||
* @return: java.util.Map<java.lang.String, java.lang.Object>
|
||||
*/
|
||||
private static Map<String, Object> uploadPhoto(MultipartFile photo, String path) {
|
||||
//限制头像大小(20M)
|
||||
int MAX_SIZE = 20971520;
|
||||
//获取图片的原始名称
|
||||
String orginalName = photo.getOriginalFilename();
|
||||
//如果保存文件的路径不存在,则创建该目录
|
||||
File filePath = new File(path);
|
||||
if (!filePath.exists()) {
|
||||
filePath.mkdirs();
|
||||
}
|
||||
//限制上传文件的大小
|
||||
if (photo.getSize() > MAX_SIZE) {
|
||||
error_result.put("success", false);
|
||||
error_result.put("msg", "上传的图片大小不能超过20M哟!");
|
||||
return error_result;
|
||||
}
|
||||
// 限制上传的文件类型
|
||||
String[] suffixs = new String[]{".png", ".PNG", ".jpg", ".JPG", ".jpeg", ".JPEG", ".gif", ".GIF", ".bmp", ".BMP"};
|
||||
SuffixFileFilter suffixFileFilter = new SuffixFileFilter(suffixs);
|
||||
if (!suffixFileFilter.accept(new File(path + orginalName))) {
|
||||
error_result.put("success", false);
|
||||
error_result.put("msg", "禁止上传此类型文件! 请上传图片哟!");
|
||||
return error_result;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: (提取公共代码 : 提高代码的可重用性)获取头像的上传结果信息
|
||||
* @param: photo
|
||||
* @param: dirPaht
|
||||
* @param: portraitPath
|
||||
* @return: java.util.Map<java.lang.String, java.lang.Object>
|
||||
*/
|
||||
public static Map<String, Object> getUploadResult(MultipartFile photo, String dirPaht, String portraitPath) {
|
||||
|
||||
if (!photo.isEmpty() && photo.getSize() > 0) {
|
||||
//获取图片的原始名称
|
||||
String orginalName = photo.getOriginalFilename();
|
||||
//上传图片,error_result:存储头像上传失败的错误信息
|
||||
Map<String, Object> error_result = UploadFile.uploadPhoto(photo, dirPaht);
|
||||
if (error_result != null) {
|
||||
return error_result;
|
||||
}
|
||||
//使用UUID重命名图片名称(uuid__原始图片名称)
|
||||
String newPhotoName = UUID.randomUUID() + "__" + orginalName;
|
||||
//将上传的文件保存到目标目录下
|
||||
try {
|
||||
photo.transferTo(new File(dirPaht + newPhotoName));
|
||||
upload_result.put("success", true);
|
||||
upload_result.put("portrait_path", portraitPath + newPhotoName);//将存储头像的项目路径返回给页面
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
upload_result.put("success", false);
|
||||
upload_result.put("msg", "上传文件失败! 服务器端发生异常!");
|
||||
return upload_result;
|
||||
}
|
||||
|
||||
} else {
|
||||
upload_result.put("success", false);
|
||||
upload_result.put("msg", "头像上传失败! 未找到指定图片!");
|
||||
}
|
||||
return upload_result;
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
server:
|
||||
port: 8080
|
||||
spring:
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=UTC
|
||||
username: root
|
||||
password: 123456
|
||||
hikari:
|
||||
connection-test-query: SELECT 1
|
||||
connection-timeout: 60000
|
||||
idle-timeout: 500000
|
||||
max-lifetime: 540000
|
||||
maximum-pool-size: 12
|
||||
minimum-idle: 10
|
||||
pool-name: GuliHikariPool
|
||||
thymeleaf:
|
||||
mode: HTML5
|
||||
encoding: UTF-8
|
||||
cache: false
|
||||
prefix: classpath:/static/
|
||||
jackson:
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 10MB
|
||||
max-request-size: 100MB
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
mapper-locations: classpath*:/mapper/**/*.xml
|
||||
file:
|
||||
upload:
|
||||
windows:
|
||||
dir: D:/upload/ # windows 文件上传目录,不要忘记末尾的/
|
||||
linux:
|
||||
dir: /temp/upload/ # linus或者macos 文件上传目录
|
||||
mac:
|
||||
dir: ~/upload/
|
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 3.4 KiB |
@ -0,0 +1,169 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
|
||||
<meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<link rel=icon href=/favicon.ico>
|
||||
<title>班级信息管理系统</title>
|
||||
<link href=/static/css/app.2a150c78.css rel=preload as=style>
|
||||
<link href=/static/css/chunk-elementUI.751bfb5e.css rel=preload as=style>
|
||||
<link href=/static/css/chunk-libs.3dfb7769.css rel=preload as=style>
|
||||
<link href=/static/js/app.c9219e63.js rel=preload as=script>
|
||||
<link href=/static/js/chunk-elementUI.edb7fc53.js rel=preload as=script>
|
||||
<link href=/static/js/chunk-libs.9892d939.js rel=preload as=script>
|
||||
<link href=/static/css/chunk-elementUI.751bfb5e.css rel=stylesheet>
|
||||
<link href=/static/css/chunk-libs.3dfb7769.css rel=stylesheet>
|
||||
<link href=/static/css/app.2a150c78.css rel=stylesheet>
|
||||
</head>
|
||||
<body>
|
||||
<noscript><strong>We're sorry but 班级信息管理系统 doesn't work properly without JavaScript enabled. Please enable it to
|
||||
continue.</strong></noscript>
|
||||
<div id=app></div>
|
||||
<script>(function (e) {
|
||||
function t(t) {
|
||||
for (var r, c, a = t[0], i = t[1], d = t[2], f = 0, l = []; f < a.length; f++) c = a[f], Object.prototype.hasOwnProperty.call(o, c) && o[c] && l.push(o[c][0]), o[c] = 0;
|
||||
for (r in i) Object.prototype.hasOwnProperty.call(i, r) && (e[r] = i[r]);
|
||||
h && h(t);
|
||||
while (l.length) l.shift()();
|
||||
return u.push.apply(u, d || []), n()
|
||||
}
|
||||
|
||||
function n() {
|
||||
for (var e, t = 0; t < u.length; t++) {
|
||||
for (var n = u[t], r = !0, c = 1; c < n.length; c++) {
|
||||
var a = n[c];
|
||||
0 !== o[a] && (r = !1)
|
||||
}
|
||||
r && (u.splice(t--, 1), e = i(i.s = n[0]))
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
var r = {}, c = {runtime: 0}, o = {runtime: 0}, u = [];
|
||||
|
||||
function a(e) {
|
||||
return i.p + "static/js/" + ({}[e] || e) + "." + {
|
||||
"chunk-01081519": "06d2caa6",
|
||||
"chunk-24890d62": "13705e10",
|
||||
"chunk-299dfd1b": "644f9fcc",
|
||||
"chunk-2c5071da": "266f37e1",
|
||||
"chunk-35d45b48": "4f5531a8",
|
||||
"chunk-417b88dd": "20c43d0c",
|
||||
"chunk-4ce4e6a0": "aa96c8ff",
|
||||
"chunk-62446ae8": "5a21e53b",
|
||||
"chunk-96a4e134": "ba975cc5"
|
||||
}[e] + ".js"
|
||||
}
|
||||
|
||||
function i(t) {
|
||||
if (r[t]) return r[t].exports;
|
||||
var n = r[t] = {i: t, l: !1, exports: {}};
|
||||
return e[t].call(n.exports, n, n.exports, i), n.l = !0, n.exports
|
||||
}
|
||||
|
||||
i.e = function (e) {
|
||||
var t = [], n = {
|
||||
"chunk-01081519": 1,
|
||||
"chunk-299dfd1b": 1,
|
||||
"chunk-2c5071da": 1,
|
||||
"chunk-35d45b48": 1,
|
||||
"chunk-417b88dd": 1,
|
||||
"chunk-4ce4e6a0": 1,
|
||||
"chunk-96a4e134": 1
|
||||
};
|
||||
c[e] ? t.push(c[e]) : 0 !== c[e] && n[e] && t.push(c[e] = new Promise((function (t, n) {
|
||||
for (var r = "static/css/" + ({}[e] || e) + "." + {
|
||||
"chunk-01081519": "6d26ba5b",
|
||||
"chunk-24890d62": "31d6cfe0",
|
||||
"chunk-299dfd1b": "0c55c6b3",
|
||||
"chunk-2c5071da": "97dec6d1",
|
||||
"chunk-35d45b48": "6d26ba5b",
|
||||
"chunk-417b88dd": "6d26ba5b",
|
||||
"chunk-4ce4e6a0": "71911e6b",
|
||||
"chunk-62446ae8": "31d6cfe0",
|
||||
"chunk-96a4e134": "2654d086"
|
||||
}[e] + ".css", o = i.p + r, u = document.getElementsByTagName("link"), a = 0; a < u.length; a++) {
|
||||
var d = u[a], f = d.getAttribute("data-href") || d.getAttribute("href");
|
||||
if ("stylesheet" === d.rel && (f === r || f === o)) return t()
|
||||
}
|
||||
var l = document.getElementsByTagName("style");
|
||||
for (a = 0; a < l.length; a++) {
|
||||
d = l[a], f = d.getAttribute("data-href");
|
||||
if (f === r || f === o) return t()
|
||||
}
|
||||
var h = document.createElement("link");
|
||||
h.rel = "stylesheet", h.type = "text/css", h.onload = t, h.onerror = function (t) {
|
||||
var r = t && t.target && t.target.src || o,
|
||||
u = new Error("Loading CSS chunk " + e + " failed.\n(" + r + ")");
|
||||
u.code = "CSS_CHUNK_LOAD_FAILED", u.request = r, delete c[e], h.parentNode.removeChild(h), n(u)
|
||||
}, h.href = o;
|
||||
var s = document.getElementsByTagName("head")[0];
|
||||
s.appendChild(h)
|
||||
})).then((function () {
|
||||
c[e] = 0
|
||||
})));
|
||||
var r = o[e];
|
||||
if (0 !== r) if (r) t.push(r[2]); else {
|
||||
var u = new Promise((function (t, n) {
|
||||
r = o[e] = [t, n]
|
||||
}));
|
||||
t.push(r[2] = u);
|
||||
var d, f = document.createElement("script");
|
||||
f.charset = "utf-8", f.timeout = 120, i.nc && f.setAttribute("nonce", i.nc), f.src = a(e);
|
||||
var l = new Error;
|
||||
d = function (t) {
|
||||
f.onerror = f.onload = null, clearTimeout(h);
|
||||
var n = o[e];
|
||||
if (0 !== n) {
|
||||
if (n) {
|
||||
var r = t && ("load" === t.type ? "missing" : t.type), c = t && t.target && t.target.src;
|
||||
l.message = "Loading chunk " + e + " failed.\n(" + r + ": " + c + ")", l.name = "ChunkLoadError", l.type = r, l.request = c, n[1](l)
|
||||
}
|
||||
o[e] = void 0
|
||||
}
|
||||
};
|
||||
var h = setTimeout((function () {
|
||||
d({type: "timeout", target: f})
|
||||
}), 12e4);
|
||||
f.onerror = f.onload = d, document.head.appendChild(f)
|
||||
}
|
||||
return Promise.all(t)
|
||||
}, i.m = e, i.c = r, i.d = function (e, t, n) {
|
||||
i.o(e, t) || Object.defineProperty(e, t, {enumerable: !0, get: n})
|
||||
}, i.r = function (e) {
|
||||
"undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
|
||||
}, i.t = function (e, t) {
|
||||
if (1 & t && (e = i(e)), 8 & t) return e;
|
||||
if (4 & t && "object" === typeof e && e && e.__esModule) return e;
|
||||
var n = Object.create(null);
|
||||
if (i.r(n), Object.defineProperty(n, "default", {
|
||||
enumerable: !0,
|
||||
value: e
|
||||
}), 2 & t && "string" != typeof e) for (var r in e) i.d(n, r, function (t) {
|
||||
return e[t]
|
||||
}.bind(null, r));
|
||||
return n
|
||||
}, i.n = function (e) {
|
||||
var t = e && e.__esModule ? function () {
|
||||
return e["default"]
|
||||
} : function () {
|
||||
return e
|
||||
};
|
||||
return i.d(t, "a", t), t
|
||||
}, i.o = function (e, t) {
|
||||
return Object.prototype.hasOwnProperty.call(e, t)
|
||||
}, i.p = "/", i.oe = function (e) {
|
||||
throw console.error(e), e
|
||||
};
|
||||
var d = window["webpackJsonp"] = window["webpackJsonp"] || [], f = d.push.bind(d);
|
||||
d.push = t, d = d.slice();
|
||||
for (var l = 0; l < d.length; l++) t(d[l]);
|
||||
var h = f;
|
||||
n()
|
||||
})([]);</script>
|
||||
<script src=/static/js/chunk-elementUI.edb7fc53.js></script>
|
||||
<script src=/static/js/chunk-libs.9892d939.js></script>
|
||||
<script src=/static/js/app.c9219e63.js></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,61 @@
|
||||
[
|
||||
{
|
||||
"name": "权限管理",
|
||||
"code": "Auth",
|
||||
"children": [
|
||||
{
|
||||
"name": "用户管理",
|
||||
"code": "User",
|
||||
"buttons": [
|
||||
{
|
||||
"name": "添加",
|
||||
"code": "User.btn.add"
|
||||
},
|
||||
{
|
||||
"name": "删除",
|
||||
"code": "User.btn.remove"
|
||||
},
|
||||
{
|
||||
"name": "分配角色",
|
||||
"code": "User.btn.assgin"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "角色管理",
|
||||
"path": "role/list",
|
||||
"code": "Role",
|
||||
"buttons": [
|
||||
{
|
||||
"name": "删除",
|
||||
"code": "Role.btn.remove"
|
||||
},
|
||||
{
|
||||
"name": "分配权限",
|
||||
"code": "Role.btn.assgin",
|
||||
"toCode": "RoleAuth"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "菜单管理",
|
||||
"path": "code/list",
|
||||
"code": "code",
|
||||
"buttons": [
|
||||
{
|
||||
"name": "添加",
|
||||
"code": "code.btn.add"
|
||||
},
|
||||
{
|
||||
"name": "修改",
|
||||
"code": "code.btn.update"
|
||||
},
|
||||
{
|
||||
"name": "删除",
|
||||
"code": "code.btn.remove"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"menus": [
|
||||
"",
|
||||
"User",
|
||||
"Role"
|
||||
],
|
||||
"buttons": [
|
||||
"User.btn.add",
|
||||
"User.btn.remove",
|
||||
"Role.btn.assgin",
|
||||
"Permission.btn.update"
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
.avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar{width:178px;height:178px;display:block}
|
@ -0,0 +1 @@
|
||||
.wscn-http404-container[data-v-62f526d4]{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);position:absolute;top:40%;left:50%}.wscn-http404[data-v-62f526d4]{position:relative;width:1200px;padding:0 50px;overflow:hidden}.wscn-http404 .pic-404[data-v-62f526d4]{position:relative;float:left;width:600px;overflow:hidden}.wscn-http404 .pic-404__parent[data-v-62f526d4]{width:100%}.wscn-http404 .pic-404__child[data-v-62f526d4]{position:absolute}.wscn-http404 .pic-404__child.left[data-v-62f526d4]{width:80px;top:17px;left:220px;opacity:0;-webkit-animation-name:cloudLeft-data-v-62f526d4;animation-name:cloudLeft-data-v-62f526d4;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1s;animation-delay:1s}.wscn-http404 .pic-404__child.mid[data-v-62f526d4]{width:46px;top:10px;left:420px;opacity:0;-webkit-animation-name:cloudMid-data-v-62f526d4;animation-name:cloudMid-data-v-62f526d4;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1.2s;animation-delay:1.2s}.wscn-http404 .pic-404__child.right[data-v-62f526d4]{width:62px;top:100px;left:500px;opacity:0;-webkit-animation-name:cloudRight-data-v-62f526d4;animation-name:cloudRight-data-v-62f526d4;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-delay:1s;animation-delay:1s}@-webkit-keyframes cloudLeft-data-v-62f526d4{0%{top:17px;left:220px;opacity:0}20%{top:33px;left:188px;opacity:1}80%{top:81px;left:92px;opacity:1}to{top:97px;left:60px;opacity:0}}@keyframes cloudLeft-data-v-62f526d4{0%{top:17px;left:220px;opacity:0}20%{top:33px;left:188px;opacity:1}80%{top:81px;left:92px;opacity:1}to{top:97px;left:60px;opacity:0}}@-webkit-keyframes cloudMid-data-v-62f526d4{0%{top:10px;left:420px;opacity:0}20%{top:40px;left:360px;opacity:1}70%{top:130px;left:180px;opacity:1}to{top:160px;left:120px;opacity:0}}@keyframes cloudMid-data-v-62f526d4{0%{top:10px;left:420px;opacity:0}20%{top:40px;left:360px;opacity:1}70%{top:130px;left:180px;opacity:1}to{top:160px;left:120px;opacity:0}}@-webkit-keyframes cloudRight-data-v-62f526d4{0%{top:100px;left:500px;opacity:0}20%{top:120px;left:460px;opacity:1}80%{top:180px;left:340px;opacity:1}to{top:200px;left:300px;opacity:0}}@keyframes cloudRight-data-v-62f526d4{0%{top:100px;left:500px;opacity:0}20%{top:120px;left:460px;opacity:1}80%{top:180px;left:340px;opacity:1}to{top:200px;left:300px;opacity:0}}.wscn-http404 .bullshit[data-v-62f526d4]{position:relative;float:left;width:300px;padding:30px 0;overflow:hidden}.wscn-http404 .bullshit__oops[data-v-62f526d4]{font-size:32px;line-height:40px;color:#1482f0;margin-bottom:20px;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__headline[data-v-62f526d4],.wscn-http404 .bullshit__oops[data-v-62f526d4]{font-weight:700;opacity:0;-webkit-animation-name:slideUp-data-v-62f526d4;animation-name:slideUp-data-v-62f526d4;-webkit-animation-duration:.5s;animation-duration:.5s}.wscn-http404 .bullshit__headline[data-v-62f526d4]{font-size:20px;line-height:24px;color:#222;margin-bottom:10px;-webkit-animation-delay:.1s;animation-delay:.1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__info[data-v-62f526d4]{font-size:13px;line-height:21px;color:grey;margin-bottom:30px;-webkit-animation-delay:.2s;animation-delay:.2s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.wscn-http404 .bullshit__info[data-v-62f526d4],.wscn-http404 .bullshit__return-home[data-v-62f526d4]{opacity:0;-webkit-animation-name:slideUp-data-v-62f526d4;animation-name:slideUp-data-v-62f526d4;-webkit-animation-duration:.5s;animation-duration:.5s}.wscn-http404 .bullshit__return-home[data-v-62f526d4]{display:block;float:left;width:110px;height:36px;background:#1482f0;border-radius:100px;text-align:center;color:#fff;font-size:14px;line-height:36px;cursor:pointer;-webkit-animation-delay:.3s;animation-delay:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes slideUp-data-v-62f526d4{0%{-webkit-transform:translateY(60px);transform:translateY(60px);opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes slideUp-data-v-62f526d4{0%{-webkit-transform:translateY(60px);transform:translateY(60px);opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}
|
@ -0,0 +1 @@
|
||||
@supports(-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container{background-image:url(../../static/img/bg.7285dd88.jpg);background-color:#2d3a4b;background-size:cover}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container .user-type{border:none}.login-container .user-type ::v-deep.el-radio{color:#fff}.login-container[data-v-4132c592]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-4132c592]{position:relative;width:520px;max-width:100%;padding:160px 35px 0;margin:0 auto;overflow:hidden}.login-container .tips[data-v-4132c592]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-4132c592]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-4132c592]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-4132c592]{position:relative}.login-container .title-container .title[data-v-4132c592]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-4132c592]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
|
@ -0,0 +1 @@
|
||||
.avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar{width:178px;height:178px;display:block}
|
@ -0,0 +1 @@
|
||||
.avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar{width:178px;height:178px;display:block}
|
@ -0,0 +1 @@
|
||||
.avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload:hover{border-color:#409eff}.avatar-uploader-icon{font-size:28px;color:#8c939d;width:178px;height:178px;line-height:178px;text-align:center}.avatar{width:178px;height:178px;display:block}.avatar-box{-webkit-box-shadow:-2px 0 20px -16px;box-shadow:-2px 0 20px -16px;width:95%;height:100%}.avatar-box .user-card{min-height:calc(90vh - 200px);padding:30px 10px;text-align:center}.avatar-box .user-card .el-avatar{border-radius:50%}.avatar-box .user-card .user-personality{text-align:center}.avatar-box .user-card .user-personality p{font-size:16px}.avatar-box .user-card .user-personality .nickName{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;font-size:26px}.avatar-box .user-card .user-personality .person-info{margin-top:6px;font-size:14px;color:#999}.avatar-box .user-card .user-information{width:100%;height:100%;text-align:left}.avatar-box .user-card .user-information ul{display:inline-block;height:100%;width:100%;margin-left:20px}.avatar-box .user-card .user-information ul li{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:20px 0;font-size:16px;font-weight:400;color:#606266}.avatar-box .user-card .user-information ul li .title{margin-right:8px;font-weight:800}.user-addcount ul li{border-bottom:2px solid #f0f2f5}.user-addcount ul li .title{padding:10px;font-size:18px;color:#696969}.user-addcount ul li .desc{font-size:16px;padding:0 10px 20px 10px;color:#a9a9a9}.user-addcount ul li .desc a{color:#409eff;float:right}.user-headpic-update{width:120px;height:120px;line-height:120px;margin:0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:20px}.user-headpic-update:hover{color:#fff;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.15)),to(rgba(0,0,0,.15))),radial-gradient(at top center,hsla(0,0%,100%,.4) 0,rgba(0,0,0,.4) 120%) #989898;background:linear-gradient(180deg,hsla(0,0%,100%,.15) 0,rgba(0,0,0,.15)),radial-gradient(at top center,hsla(0,0%,100%,.4) 0,rgba(0,0,0,.4) 120%) #989898;background-blend-mode:multiply,multiply}.user-headpic-update:hover .update{color:#fff}.user-headpic-update .update{height:120px;width:120px;text-align:center;color:transparent}.pointer{cursor:pointer}.code-box{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}
|
@ -0,0 +1 @@
|
||||
.home[data-v-2bef1aba]{display:-webkit-box;display:-ms-flexbox;display:flex;height:500px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding-bottom:50px}.home .title[data-v-2bef1aba]{font-size:35px;letter-spacing:2px}.home .emphasis[data-v-2bef1aba]{font-size:60px;color:#2b8775}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}[hidden],template{display:none}#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;-webkit-box-shadow:0 0 10px #29d,0 0 5px #29d;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;-webkit-box-sizing:border-box;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 96 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 178 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-299dfd1b"],{"26fc":function(t,s,i){t.exports=i.p+"static/img/404_cloud.0f4bc32b.png"},"65ec":function(t,s,i){"use strict";i("ae65")},"8cdb":function(t,s,i){"use strict";i.r(s);var a=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"wscn-http404-container"},[i("div",{staticClass:"wscn-http404"},[t._m(0),i("div",{staticClass:"bullshit"},[i("div",{staticClass:"bullshit__oops"},[t._v("你访问的界面不存在!")]),i("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),i("div",{staticClass:"bullshit__info"},[t._v("请检查你的url是否正确, 或点击下面按钮回到首页")]),i("a",{staticClass:"bullshit__return-home",attrs:{href:""}},[t._v("返回到首页")])])])])},c=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"pic-404"},[a("img",{staticClass:"pic-404__parent",attrs:{src:i("a36b"),alt:"404"}}),a("img",{staticClass:"pic-404__child left",attrs:{src:i("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child mid",attrs:{src:i("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child right",attrs:{src:i("26fc"),alt:"404"}})])}],l={name:"Page404",computed:{message:function(){return"管理员说你不能进入此页面"}}},e=l,n=(i("65ec"),i("2877")),r=Object(n["a"])(e,a,c,!1,null,"62f526d4",null);s["default"]=r.exports},a36b:function(t,s,i){t.exports=i.p+"static/img/404.a57b6f31.png"},ae65:function(t,s,i){}}]);
|
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c5071da"],{2017:function(e,t,o){"use strict";o("cafe")},"9ed6":function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"login-container"},[o("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:e.loginForm,rules:e.loginRules,"auto-complete":"on","label-position":"left"}},[o("div",{staticClass:"title-container"},[o("h3",{staticClass:"title"},[e._v("智慧校园管理系统")])]),o("el-form-item",{attrs:{prop:"username"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"user"}})],1),o("el-input",{ref:"username",attrs:{placeholder:"用户名",name:"username",type:"text",tabindex:"1","auto-complete":"on"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),o("el-form-item",{attrs:{prop:"password"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"password"}})],1),o("el-input",{key:e.passwordType,ref:"password",attrs:{type:e.passwordType,placeholder:"密码",name:"password",tabindex:"2","auto-complete":"on"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),o("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[o("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),o("el-form-item",{attrs:{prop:"verifiCode"}},[o("span",{staticClass:"svg-container"},[o("svg-icon",{attrs:{"icon-class":"people"}})],1),o("el-input",{ref:"verifiCode",attrs:{placeholder:"验证码",name:"verifiCode"},model:{value:e.loginForm.verifiCode,callback:function(t){e.$set(e.loginForm,"verifiCode",t)},expression:"loginForm.verifiCode"}}),o("span",{staticClass:"show-pwd",on:{click:e.updateCode}},[o("img",{attrs:{title:"点击切换验证码",src:e.codeImgUrl,alt:"#"}})])],1),o("el-form-item",{staticClass:"user-type",attrs:{prop:"userType"}},[o("el-radio-group",{model:{value:e.loginForm.userType,callback:function(t){e.$set(e.loginForm,"userType",t)},expression:"loginForm.userType"}},[o("el-radio",{attrs:{label:1}},[e._v("管理员")]),o("el-radio",{attrs:{label:2}},[e._v("学生")]),o("el-radio",{attrs:{label:3}},[e._v("教师")])],1)],1),o("el-button",{staticStyle:{width:"100%","margin-bottom":"30px"},attrs:{loading:e.loading,type:"primary"},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("登 陆")])],1)],1)},r=[],n=(o("99af"),{name:"Login",data:function(){var e=function(e,t,o){t.length<2?o(new Error("用户名长度不能小于2位")):o()},t=function(e,t,o){t.length<5?o(new Error("密码长度不能小于5位")):o()};return{codeImgUrl:"".concat(this.$BASE_API,"/sms/system/getVerifiCodeImage"),loginForm:{username:"admin",password:"admin",verifiCode:null,userType:null},loginRules:{username:[{required:!0,validator:e}],password:[{required:!0,trigger:"blur",validator:t}],verifiCode:[{required:!0,message:"必须输入验证码"}],userType:[{required:!0,message:"必须选择用户类型"}]},loading:!1,passwordType:"password",redirect:void 0}},watch:{$route:{handler:function(e){this.redirect=e.query&&e.query.redirect},immediate:!0}},mounted:function(){this.updateCode()},methods:{updateCode:function(){this.codeImgUrl="".concat(this.$BASE_API,"/sms/system/getVerifiCodeImage?t=").concat(Date.now())},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="text":this.passwordType="password",this.$nextTick((function(){e.$refs.password.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&(e.loading=!0,e.$store.dispatch("user/login",e.loginForm).then((function(){e.$router.push({path:e.redirect||"/"}),e.loading=!1})).catch((function(){e.loading=!1,e.updateCode()})))}))}}}),i=n,a=(o("2017"),o("d00b"),o("2877")),l=Object(a["a"])(i,s,r,!1,null,"4132c592",null);t["default"]=l.exports},cafe:function(e,t,o){},d00b:function(e,t,o){"use strict";o("d01d")},d01d:function(e,t,o){}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-96a4e134"],{"7e65":function(e,t,s){},9406:function(e,t,s){"use strict";s.r(t);var n=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"home"},[s("h2",{staticClass:"title"},[e._v("欢迎使用"),s("span",{staticClass:"emphasis"},[e._v("班级信息")]),e._v("管理系统")])])}],c={name:"Home"},i=c,u=(s("bbb1"),s("2877")),l=Object(u["a"])(i,n,a,!1,null,"2bef1aba",null);t["default"]=l.exports},bbb1:function(e,t,s){"use strict";s("7e65")}}]);
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,19 @@
|
||||
package com.zsz;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class ZhxyApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String environment = System.getProperty("os.name").toLowerCase();
|
||||
System.out.println(environment);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue