diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/.gitignore
@@ -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/
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 0000000..a45eb6b
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * 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
+ *
+ * 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.
+ */
+
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ private static final String WRAPPER_VERSION = "0.5.6";
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if (mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if (mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if (!outputFile.getParentFile().exists()) {
+ if (!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+ String username = System.getenv("MVNW_USERNAME");
+ char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(username, password);
+ }
+ });
+ }
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..2cc7d4a
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..642d572
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
diff --git a/jieyue.sql b/jieyue.sql
new file mode 100644
index 0000000..1d80a68
--- /dev/null
+++ b/jieyue.sql
@@ -0,0 +1,390 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server : MySQL
+ Source Server Type : MySQL
+ Source Server Version : 50716
+ Source Host : localhost:3306
+ Source Schema : jieyue
+
+ Target Server Type : MySQL
+ Target Server Version : 50716
+ File Encoding : 65001
+
+ Date: 22/04/2021 14:57:16
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for sys_access
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_access`;
+CREATE TABLE `sys_access` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限名称',
+ `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限对应的地址',
+ `status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '1启用 0未启用',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_access
+-- ----------------------------
+INSERT INTO `sys_access` VALUES (1, '权限管理页面', '/admin/rbac', 1);
+INSERT INTO `sys_access` VALUES (2, '后台主页', '/admin/home', 1);
+INSERT INTO `sys_access` VALUES (3, '广告设置页面', '/admin/ui', 1);
+INSERT INTO `sys_access` VALUES (4, '订单列表页面', '/admin/order', 1);
+INSERT INTO `sys_access` VALUES (5, '商户列表页面', '/admin/merchant/', 1);
+INSERT INTO `sys_access` VALUES (6, '会员列表页面', '/admin/user', 1);
+INSERT INTO `sys_access` VALUES (7, '系统消息页面', '/admin/notice', 1);
+
+-- ----------------------------
+-- Table structure for sys_admin
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_admin`;
+CREATE TABLE `sys_admin` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `password` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `email` varchar(75) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `mark` tinyint(3) NOT NULL COMMENT '管理员标记',
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE INDEX `email`(`email`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_admin
+-- ----------------------------
+INSERT INTO `sys_admin` VALUES (1, 'bosen', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@163.com', 1);
+
+-- ----------------------------
+-- Table structure for sys_admin_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_admin_role`;
+CREATE TABLE `sys_admin_role` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `admin_id` int(11) NOT NULL,
+ `role_id` int(11) NOT NULL,
+ `status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '1启用 0未启用',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_admin_role
+-- ----------------------------
+INSERT INTO `sys_admin_role` VALUES (1, 1, 1, 1);
+
+-- ----------------------------
+-- Table structure for sys_cart
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_cart`;
+CREATE TABLE `sys_cart` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `goods_id` int(11) NOT NULL,
+ `user_id` int(11) NOT NULL,
+ `goods_num` int(11) NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_cart
+-- ----------------------------
+INSERT INTO `sys_cart` VALUES (4, 40, 2, 1);
+INSERT INTO `sys_cart` VALUES (5, 39, 2, 1);
+INSERT INTO `sys_cart` VALUES (7, 18, 2, 1);
+INSERT INTO `sys_cart` VALUES (8, 41, 1, 1);
+
+-- ----------------------------
+-- Table structure for sys_comment
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_comment`;
+CREATE TABLE `sys_comment` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `user` int(11) NOT NULL,
+ `goods` int(11) NOT NULL,
+ `merchant` int(11) NOT NULL,
+ `context` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `create_time` bigint(19) NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_comment
+-- ----------------------------
+INSERT INTO `sys_comment` VALUES (17, 1, 40, 9, 'PUMA彪马官方 新款条纹棒球帽 ARCHIVE LOGO 022554 粗呢蓝-条纹-09 均码', 1607241751568);
+INSERT INTO `sys_comment` VALUES (18, 1, 38, 8, '阿迪达斯官网adidas 三叶草TEE男装短袖上衣 DV1922 DV1925DV1929 粉蓝 XL(参考身高:188~192CM)', 1610197695733);
+INSERT INTO `sys_comment` VALUES (19, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247776515);
+INSERT INTO `sys_comment` VALUES (20, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247780833);
+INSERT INTO `sys_comment` VALUES (21, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247784508);
+INSERT INTO `sys_comment` VALUES (22, 1, 44, 8, '测试测试测试测试测试测试测试测试测试测试测试测试测试', 1610247789686);
+
+-- ----------------------------
+-- Table structure for sys_goods
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_goods`;
+CREATE TABLE `sys_goods` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `describe` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `img` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '/image/user/home/product/15.jpg',
+ `price` decimal(10, 2) NOT NULL,
+ `state` tinyint(3) NOT NULL DEFAULT 1 COMMENT '1已上架 0未上架',
+ `merchant` int(11) NOT NULL COMMENT '商品所属的商户id',
+ `stock` int(11) NOT NULL DEFAULT 0 COMMENT '商品库存',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_goods
+-- ----------------------------
+INSERT INTO `sys_goods` VALUES (11, '耐克NIKE 男子 板鞋 AJ1', '耐克NIKE 男子 板鞋 AJ1 乔1 AIR JORDAN 1 LOW SE 休闲鞋 CK3022-005黑色44码', '/data/goods/5/20201109204752392935.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (12, '耐克NIKE 男子 板鞋 经典', '耐克NIKE 男子 板鞋 经典 板鞋 COURT VISION MID 休闲鞋 CD5466-101白色42码', '/data/goods/5/20201109205306213001.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (13, '休闲鞋 CD5463-200', '耐克NIKE 男子 板鞋 经典 板鞋 COURT VISION LOW 休闲鞋 CD5463-200亚麻色44码', '/data/goods/5/20201109205751273390.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (14, '板鞋 AO2810-001', '耐克NIKE 女子 简约 百搭 COURT ROYALE AC 板鞋 AO2810-001黑色36码', '/data/goods/5/20201109205945154276.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (15, '休闲鞋 CZ1055-109', '耐克NIKE 女子 板鞋 经典 BLAZER MID \'77 休闲鞋 CZ1055-109白色36.5码', '/data/goods/5/20201109210325235653.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (17, '运动鞋 CJ0291-005', '耐克NIKE 男子 气垫 跑步鞋 缓震 ZOOM WINFLO 7 运动鞋 CJ0291-005黑色42码', '/data/goods/5/20201109210622705242.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (18, '运动鞋 AV4789-100', '耐克NIKE 男子 休闲鞋 缓震 M2K TEKNO 运动鞋 AV4789-100顶峰白色42码', '/data/goods/5/20201110142709402793.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (19, '运动鞋 AO0269-101', '耐克NIKE 男子 老爹鞋 气垫 ZOOM 2K 运动鞋 AO0269-101白色42.5码', '/data/goods/5/20201110142841106068.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (20, '运动鞋 CK6467-001', '耐克 NIKE 男子 板鞋/复刻鞋 AIR MAX 90 NRG 运动鞋 CK6467-001 黑色 42码', '/data/goods/5/20201110143028570004.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (21, '拖鞋 JORDAN', '耐克 NIKE 中性大童 拖鞋 JORDAN HYDRO XII RETRO BG 运动鞋 820267-107 白色 37.5码', '/data/goods/5/20201110143155960319.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (22, '休闲鞋 NIKE DROP-TYPE', '耐克 NIKE 男子 休闲鞋 NIKE DROP-TYPE MID 运动鞋 BQ5190-300绿 43码', '/data/goods/5/20201110143316976441.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (23, '运动鞋 CZ8681-167', '耐克NIKE 女子 休闲鞋 复古 DAYBREAK 运动鞋 CZ8681-167帆白色38码', '/data/goods/5/20201110143451872085.jpg', 0.01, 1, 5, 1);
+INSERT INTO `sys_goods` VALUES (25, '运动外套GE5175', '阿迪达斯官网 adidas neo W ESNTL 3S WB 女装运动外套GE5175 如图 L', '/data/goods/8/20201110214136520879.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (26, '防风衣ED7539', '阿迪达斯官网 adidas 三叶草LOCK UP TT女装防风衣ED7539 ED7541 淡粉紫灰 32(参考身高:160~165CM)', '/data/goods/8/20201110224214151666.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (28, '防风衣 DV0857', '阿迪达斯官网 adidas 三叶草 女装防风衣 DV0857 DW3890 DX3694 浅粉紫 38(参考身高:169~172CM)', '/data/goods/8/20201110224428269386.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (29, '防风衣 ED7217', '阿迪达斯官网 adidas 三叶草 男装防风衣 ED7217 FL1763 黑色 S(参考身高:173~178CM)', '/data/goods/8/20201110224542348334.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (30, '冬季运动羽绒服FL0036', '阿迪达斯官网 adidas 三叶草 DOWN JACKET 女装冬季运动羽绒服FL0036 黑色 34(参考身高:164~167CM)', '/data/goods/8/20201110224729185763.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (31, '运动棉服FJ6523', '阿迪达斯官网adidas 三叶草 女装冬季运动棉服FJ6523 黑色 34(参考身高:164~167CM)', '/data/goods/8/20201110224846847911.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (32, '运动棉服 ED7601', '阿迪达斯官网 adidas 三叶草 LONG BOMBER 女装冬季运动棉服 ED7601 亮光粉 40(参考身高:170~175CM)', '/data/goods/8/20201110225011851415.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (34, '冬季运动棉服GL6407 ', '阿迪达斯官网 adidas 三叶草 Short Sherpa 女装冬季运动棉服GL6407 森林绿/传奇墨水蓝 40(参考身高:170~175CM)', '/data/goods/8/20201110225219159233.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (35, '连帽外套DN8151', '阿迪达斯官网 adidas 三叶草 3STR ZIP HOODIE女装连帽外套DN8151 如图 34', '/data/goods/8/20201110225330615623.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (36, '连帽外套 DV1935', '阿迪达斯官网 adidas 三叶草 FZ HOODY 男装连帽外套 DV1935 绿 XL(参考身高:188~192CM)', '/data/goods/8/20201110225449776961.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (37, '短袖上衣 CE1666', '阿迪达斯官网 adidas 三叶草 女装短袖上衣 CE1666 CE1667 白 32(参考身高:160~165CM)', '/data/goods/8/20201110225601894276.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (38, '短袖上衣 DV1922', '阿迪达斯官网adidas 三叶草TEE男装短袖上衣 DV1922 DV1925DV1929 粉蓝 XL(参考身高:188~192CM)', '/data/goods/8/20201110225703611247.jpg', 0.01, 1, 8, 1);
+INSERT INTO `sys_goods` VALUES (39, '棒球帽 ARCHIVE', 'PUMA彪马官方 杨洋同款新款棒球帽 ARCHIVE LOGO LABEL 022778 粉紫色 06 ADULT', '/data/goods/9/20201112192043550007.jpg', 0.01, 1, 9, 0);
+INSERT INTO `sys_goods` VALUES (40, '条纹棒球帽 ARCHIVE', 'PUMA彪马官方 新款条纹棒球帽 ARCHIVE LOGO 022554 粗呢蓝-条纹-09 均码', '/data/goods/9/20201112192208777150.jpg', 0.01, 1, 9, 1);
+INSERT INTO `sys_goods` VALUES (41, '运动休闲手提包', 'PUMA彪马官方娜扎同款新款女子运动休闲手提包 PRIME PUFFA 078192 银色 02 OSFA/均码', '/data/goods/9/20201112192355215509.jpg', 0.01, 1, 9, 1);
+INSERT INTO `sys_goods` VALUES (44, '测试商品(勿拍)', '测试测试测试测试测试测试测试测试测试测试测试测试测试', '/data/goods/8/20210109201101998677.jpg', 0.01, 1, 8, 20);
+
+-- ----------------------------
+-- Table structure for sys_mt
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_mt`;
+CREATE TABLE `sys_mt` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `password` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `ratio` float(11, 1) NOT NULL COMMENT '商户每单收费需要支付的费率',
+ `state` tinyint(3) NOT NULL COMMENT '1启用 0未启用 2未通过注册',
+ `header` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '/lib/merchant/images/2.png',
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE INDEX `email`(`email`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_mt
+-- ----------------------------
+INSERT INTO `sys_mt` VALUES (5, 'Nike耐克', 'nike@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 0.1, 1, '/data/header/merchant/5.jpg');
+INSERT INTO `sys_mt` VALUES (8, 'Adidas阿迪达斯', 'adidas@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 0.1, 1, '/data/header/merchant/20201130143514856044.jpg');
+INSERT INTO `sys_mt` VALUES (9, 'Puma彪马', 'puma@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 0.1, 0, '/data/header/merchant/20201130144501417757.jpg');
+
+-- ----------------------------
+-- Table structure for sys_mt_ui
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_mt_ui`;
+CREATE TABLE `sys_mt_ui` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `width` int(7) NOT NULL,
+ `height` int(7) NOT NULL,
+ `merchant` int(11) NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_mt_ui
+-- ----------------------------
+INSERT INTO `sys_mt_ui` VALUES (5, '/data/mtui/5/20201111171430806651.jpg', 400, 320, 5);
+INSERT INTO `sys_mt_ui` VALUES (6, '/data/mtui/5/20201111171436443523.jpg', 600, 310, 5);
+INSERT INTO `sys_mt_ui` VALUES (8, '/data/mtui/8/20201111172245637416.jpg', 600, 310, 8);
+INSERT INTO `sys_mt_ui` VALUES (9, '/data/mtui/9/20201111174106561114.jpg', 400, 320, 9);
+INSERT INTO `sys_mt_ui` VALUES (10, '/data/mtui/9/20201111174116118997.jpg', 600, 310, 9);
+INSERT INTO `sys_mt_ui` VALUES (12, '/data/mtui/8/20210109201740252613.jpg', 400, 320, 8);
+
+-- ----------------------------
+-- Table structure for sys_notice
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_notice`;
+CREATE TABLE `sys_notice` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `context` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '0给管理员发送 1 商户 2用户',
+ `receive` int(11) NOT NULL COMMENT '接收者的id',
+ `create_time` bigint(20) NOT NULL COMMENT '通知发送时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_notice
+-- ----------------------------
+INSERT INTO `sys_notice` VALUES (1, '测试标题', '测试内容', '0', 1, 1607238236877);
+INSERT INTO `sys_notice` VALUES (2, '测试标题', '测试内容', '0', 2, 1607238236897);
+INSERT INTO `sys_notice` VALUES (3, '测试标题', '测试内容', '1', 5, 1607238276845);
+INSERT INTO `sys_notice` VALUES (4, '测试标题', '测试内容', '1', 8, 1607238276846);
+INSERT INTO `sys_notice` VALUES (5, '测试标题', '测试内容', '1', 9, 1607238276847);
+INSERT INTO `sys_notice` VALUES (7, '测试标题', '测试内容', '2', 2, 1607238284600);
+INSERT INTO `sys_notice` VALUES (8, '测试标题', '测试内容', '2', 3, 1607238284601);
+INSERT INTO `sys_notice` VALUES (9, '测试标题', '测试内容', '2', 4, 1607238284601);
+INSERT INTO `sys_notice` VALUES (11, '测试标题2', '测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2', '2', 3, 1609926809535);
+INSERT INTO `sys_notice` VALUES (12, '测试标题2', '测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2', '2', 4, 1609926809536);
+INSERT INTO `sys_notice` VALUES (13, '测试标题2', '测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2测试内容2', '2', 5, 1609926809536);
+INSERT INTO `sys_notice` VALUES (14, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 1, 1610251470774);
+INSERT INTO `sys_notice` VALUES (15, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 3, 1610251470775);
+INSERT INTO `sys_notice` VALUES (16, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 4, 1610251470776);
+INSERT INTO `sys_notice` VALUES (17, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 5, 1610251470776);
+INSERT INTO `sys_notice` VALUES (18, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '0', 1, 1610251505029);
+INSERT INTO `sys_notice` VALUES (19, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '0', 1, 1610251517513);
+INSERT INTO `sys_notice` VALUES (20, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '0', 1, 1610251532490);
+INSERT INTO `sys_notice` VALUES (21, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息', '0', 1, 1610251583253);
+INSERT INTO `sys_notice` VALUES (22, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息', '2', 1, 1610251604151);
+INSERT INTO `sys_notice` VALUES (23, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息', '2', 3, 1610251604152);
+INSERT INTO `sys_notice` VALUES (24, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息', '2', 4, 1610251604153);
+INSERT INTO `sys_notice` VALUES (25, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息', '2', 5, 1610251604153);
+INSERT INTO `sys_notice` VALUES (26, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 1, 1610251616814);
+INSERT INTO `sys_notice` VALUES (27, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 3, 1610251616814);
+INSERT INTO `sys_notice` VALUES (28, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 4, 1610251616815);
+INSERT INTO `sys_notice` VALUES (29, '测试群发系统消息', '测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息测试群发系统消息', '2', 5, 1610251616815);
+
+-- ----------------------------
+-- Table structure for sys_order
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_order`;
+CREATE TABLE `sys_order` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `order_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `create_time` bigint(19) NOT NULL,
+ `pay_time` bigint(19) NULL DEFAULT NULL,
+ `goods_num` int(11) NOT NULL COMMENT '商品数量',
+ `order_state` tinyint(3) NOT NULL DEFAULT 0 COMMENT '1已支付 0未支付',
+ `order_mark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品标记',
+ `order_user` int(11) NOT NULL COMMENT '用户id',
+ `order_merchant` int(11) NOT NULL COMMENT '商户id',
+ `order_price` decimal(10, 2) NOT NULL COMMENT '订单总金额',
+ `goods_id` int(11) NOT NULL,
+ `order_notes` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单特殊注释',
+ `user_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '地址',
+ `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '收件人',
+ `user_phone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电话号码',
+ `coupon_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优惠卷代码',
+ `pay_way` tinyint(3) NOT NULL COMMENT '1支付宝 0微信支付',
+ `pay_code_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '支付链接',
+ `cart_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '批量购买的商品',
+ `merchant_ratio` float(11, 1) NOT NULL DEFAULT 1.0 COMMENT '订单创建时商户的费率',
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE INDEX `order_id`(`order_id`) USING BTREE COMMENT '订单号唯一'
+) ENGINE = InnoDB AUTO_INCREMENT = 95 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_order
+-- ----------------------------
+INSERT INTO `sys_order` VALUES (67, 'EGW202012340213807244213', 1607175487598, 1607175743564, 1, 1, 'AXW202012340213807246245', 1, 5, 0.01, 23, '', '测试', '测试', '测试', '', 0, '/data/pay/AXW202012340213807246245.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (68, 'OXH202012340214627915466', 1607175987049, 1607183449712, 1, 1, 'MYV202012340214627324440', 1, 8, 0.01, 36, '', '测试', '测试', '测试', '', 0, '/data/pay/MYV202012340214627324440.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (69, 'RJF202012340215418785117', 1607176458511, 1607183916993, 1, 1, 'BHL202012340215418546511', 1, 5, 0.01, 19, '', '测试', '测试', '测试', '', 0, '/data/pay/BHL202012340215418546511.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (70, 'OHJ202012340215418723349', 1607176458511, 1607183916993, 1, 1, 'BHL202012340215418546511', 1, 8, 0.01, 34, '', '测试', '测试', '测试', '', 0, '/data/pay/BHL202012340215418546511.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (71, 'TCR202012340221129763691', 1607177489871, 1607183147374, 1, 1, 'ZLA202012340221129912783', 1, 8, 0.01, 34, '', '测试', '测试', '测试', '', 0, '/data/pay/ZLA202012340221129912783.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (72, 'PPI202012340221129185744', 1607177489871, 1607183147374, 1, 1, 'ZLA202012340221129912783', 1, 5, 0.01, 19, '', '测试', '测试', '测试', '', 0, '/data/pay/ZLA202012340221129912783.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (89, 'AVZ202012341002051747406', 1607185251976, 1607185263967, 1, 1, 'KQU202012341002051161208', 1, 9, 0.01, 40, '', '测试', '测试', '测试', '', 0, '/data/pay/KQU202012341002051161208.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (90, 'WVW202012341002151359796', 1607185311336, 1607185323819, 1, 1, 'SDW202012341002151596097', 1, 5, 0.01, 13, '', '测试', '测试', '测试', '', 0, '/data/pay/SDW202012341002151596097.jpg', NULL, 0.1);
+INSERT INTO `sys_order` VALUES (91, 'QAK202012341002151746672', 1607185311336, 1607185323819, 1, 1, 'SDW202012341002151596097', 1, 5, 0.01, 19, '', '测试', '测试', '测试', '', 0, '/data/pay/SDW202012341002151596097.jpg', '1', 0.1);
+INSERT INTO `sys_order` VALUES (92, 'YYT202012341004300490850', 1607186580573, 1607186595850, 1, 1, 'NFF202012341004300926613', 1, 8, 0.01, 34, '', '测试', '测试', '测试', '', 0, '/data/pay/NFF202012341004300926613.jpg', '13', 0.1);
+INSERT INTO `sys_order` VALUES (93, 'LID202012341004300509122', 1607186580573, 1607186595850, 1, 1, 'NFF202012341004300926613', 1, 5, 0.01, 19, '', '测试', '测试', '测试', '', 0, '/data/pay/NFF202012341004300926613.jpg', '10', 0.1);
+
+-- ----------------------------
+-- Table structure for sys_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role`;
+CREATE TABLE `sys_role` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名',
+ `status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '1已启用 0未启用',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_role
+-- ----------------------------
+INSERT INTO `sys_role` VALUES (1, '未定义角色', 1);
+INSERT INTO `sys_role` VALUES (2, '超级管理员', 1);
+INSERT INTO `sys_role` VALUES (3, '普通管理员', 1);
+
+-- ----------------------------
+-- Table structure for sys_role_access
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role_access`;
+CREATE TABLE `sys_role_access` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `role_id` int(11) NOT NULL,
+ `access_id` int(11) NOT NULL,
+ `status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '1启用 0未启用',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_role_access
+-- ----------------------------
+INSERT INTO `sys_role_access` VALUES (9, 2, 1, 1);
+INSERT INTO `sys_role_access` VALUES (10, 2, 2, 1);
+INSERT INTO `sys_role_access` VALUES (11, 2, 3, 1);
+INSERT INTO `sys_role_access` VALUES (12, 2, 4, 1);
+INSERT INTO `sys_role_access` VALUES (13, 2, 5, 1);
+
+-- ----------------------------
+-- Table structure for sys_ui
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_ui`;
+CREATE TABLE `sys_ui` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `width` int(7) NOT NULL,
+ `height` int(7) NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_ui
+-- ----------------------------
+INSERT INTO `sys_ui` VALUES (2, '/data/library/20201106191900642246.jpg', 1920, 737);
+INSERT INTO `sys_ui` VALUES (5, '/data/library/20201106192206806286.jpg', 1230, 535);
+INSERT INTO `sys_ui` VALUES (6, '/data/library/20210109210243296422.jpg', 475, 570);
+INSERT INTO `sys_ui` VALUES (10, '/data/library/20201130223715934619.jpg', 3151, 282);
+INSERT INTO `sys_ui` VALUES (15, '/data/library/20201130222817664532.jpg', 674, 264);
+INSERT INTO `sys_ui` VALUES (16, '/data/library/20201201130048784144.jpeg', 3152, 282);
+
+-- ----------------------------
+-- Table structure for sys_user
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user`;
+CREATE TABLE `sys_user` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `password` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
+ `mark` tinyint(3) NOT NULL COMMENT '0未启用 1已启用',
+ `header` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '/data/header/user/default.jpg',
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE INDEX `email`(`email`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sys_user
+-- ----------------------------
+INSERT INTO `sys_user` VALUES (1, 'test', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@163.com', 1, '/data/header/user/1.jpg');
+INSERT INTO `sys_user` VALUES (3, 'bosen_once@qq.com', 'e10adc3949ba59abbe56e057f20f883e', 'bosen_once@qq.com', 1, '/data/header/user/default.jpg');
+INSERT INTO `sys_user` VALUES (4, 'test111', 'e10adc3949ba59abbe56e057f20f883e', '806317173@qq.com', 0, '/data/header/user/default.jpg');
+INSERT INTO `sys_user` VALUES (5, 'lalalal', 'e10adc3949ba59abbe56e057f20f883e', '2390025289@qq.com', 0, '/data/header/user/default.jpg');
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/mvnw b/mvnw
new file mode 100644
index 0000000..a16b543
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,310 @@
+#!/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 /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="`which 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/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.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"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$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 \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 0000000..c8d4337
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,182 @@
+@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 "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\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/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "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%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.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 "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\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%
+
+exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..05340f2
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,221 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.3.5.RELEASE
+
+
+ com.example
+ jieyue
+ 0.0.1-SNAPSHOT
+ war
+ jieyue
+ Demo project for Spring Boot
+
+
+ UTF-8
+ UTF-8
+ 1.8
+ 8.5.29
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alipay.sdk
+ alipay-sdk-java
+ 3.3.4.ALL
+
+
+ commons-logging
+ commons-logging
+ 1.1.1
+
+
+
+ commons-fileupload
+ commons-fileupload
+ 1.3.3
+
+
+
+ commons-io
+ commons-io
+ 2.6
+
+
+ org.springframework.boot
+ spring-boot-starter-mail
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ true
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 2.1.3
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+ org.jetbrains
+ annotations
+ RELEASE
+ compile
+
+
+ org.springframework.boot
+ spring-boot
+ 2.3.5.RELEASE
+
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.3
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.21
+
+
+
+
+ com.google.zxing
+ core
+ 3.3.0
+
+
+
+ net.glxn
+ qrgen
+ 1.4
+
+
+ com.alibaba
+ fastjson
+ 1.2.47
+
+
+ org.slf4j
+ slf4j-simple
+ 1.7.21
+
+
+ org.springframework.data
+ spring-data-redis
+ 2.3.4.RELEASE
+
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+ provided
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-jasper
+ provided
+
+
+
+
+ ROOT
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 1.8
+
+
+ ${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar
+
+
+
+
+
+
+
+
+ The BSD 3-Clause License
+ https://opensource.org/licenses/BSD-3-Clause
+ repo
+
+
+
+
+
+ wxpay
+ https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=11_1
+
+
+
+
+
+ release
+
+
+ oss
+ https://oss.sonatype.org/content/repositories/snapshots/
+
+
+ oss
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+
+
+
diff --git a/profiles.xml b/profiles.xml
new file mode 100644
index 0000000..919941a
--- /dev/null
+++ b/profiles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/example/jieyue/JieyueApplication.java b/src/main/java/com/example/jieyue/JieyueApplication.java
new file mode 100644
index 0000000..ce5b63a
--- /dev/null
+++ b/src/main/java/com/example/jieyue/JieyueApplication.java
@@ -0,0 +1,50 @@
+package com.example.jieyue;
+
+import org.apache.catalina.connector.Connector;
+import org.apache.coyote.http11.AbstractHttp11Protocol;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@MapperScan("com.example.jieyue.common.mapper")// mapper扫描
+@SpringBootApplication
+@ServletComponentScan
+@EnableScheduling// 定时任务
+public class JieyueApplication extends SpringBootServletInitializer {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JieyueApplication.class, args);
+ }
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
+ return builder.sources(JieyueApplication.class);
+ }
+
+ /*
+ * 处理文件过大上传失败的问题
+ */
+ @Bean
+ public TomcatServletWebServerFactory containerFactory() {
+ return new TomcatServletWebServerFactory() {
+ protected void customizeConnector(Connector connector) {
+ int maxSize = 50000000;
+ super.customizeConnector(connector);
+ connector.setMaxPostSize(maxSize);
+ connector.setMaxSavePostSize(maxSize);
+ if (connector.getProtocolHandler() instanceof AbstractHttp11Protocol) {
+
+ ((AbstractHttp11Protocol >) connector.getProtocolHandler()).setMaxSwallowSize(maxSize);
+ logger.info("Set MaxSwallowSize "+ maxSize);
+ }
+ }
+ };
+
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminHomeController.java b/src/main/java/com/example/jieyue/admin/controller/AdminHomeController.java
new file mode 100644
index 0000000..8651580
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminHomeController.java
@@ -0,0 +1,40 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.common.mapper.SysGoodsMapper;
+import com.example.jieyue.common.mapper.SysOrderMapper;
+import com.example.jieyue.common.mapper.SysUserMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ *
后台主页
+ * @author Bosen
+ * 2020/11/3 20:38
+ */
+@RestController
+public class AdminHomeController {
+ @Autowired
+ SysOrderMapper orderMapper;
+ @Autowired
+ SysGoodsMapper goodsMapper;
+ @Autowired
+ SysUserMapper userMapper;
+
+ @RequestMapping("/admin/home")
+ public ModelAndView index(ModelAndView modelAndView){
+ float profit = orderMapper.websiteProfitCount();
+ int orderCount = orderMapper.payCount();
+ int goodsCount = goodsMapper.allGoodsCount();
+ int userCount = userMapper.userCount();
+
+ modelAndView.addObject("profit",profit);
+ modelAndView.addObject("orderCount",orderCount);
+ modelAndView.addObject("goodsCount",goodsCount);
+ modelAndView.addObject("userCount",userCount);
+
+ modelAndView.setViewName("admin/home/index");
+ return modelAndView;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminLoginController.java b/src/main/java/com/example/jieyue/admin/controller/AdminLoginController.java
new file mode 100644
index 0000000..3a99292
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminLoginController.java
@@ -0,0 +1,119 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminLoginService;
+import com.example.jieyue.common.entity.SysAdmin;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+/**
+ * 后台登陆控制器
+ * @author Bosen
+ * 2020/11/3 14:03
+ */
+@RestController
+@RequestMapping("/admin")
+public class AdminLoginController {
+ @Autowired
+ AdminLoginService service;
+ /*
+ * 登陆页面
+ */
+ @RequestMapping({"login",""})
+ public ModelAndView index(ModelAndView modelAndView){
+ modelAndView.setViewName("admin/login/index");
+ return modelAndView;
+ }
+
+ /*
+ * 登陆处理
+ */
+ @RequestMapping("do-login")
+ public ModelAndView doLogin(HttpSession session, ModelAndView modelAndView,String email, String password){
+ int result = service.doLogin(email,password);
+ if (result==1){
+ // 登陆成功
+ SysAdmin admin = service.adminInfo(email);
+ session.setAttribute("admin",admin);
+ modelAndView.setViewName("redirect:/admin/home");
+ }else if (result==-1){
+ // 用户名或密码错误!
+ modelAndView.addObject("msg","用户名或密码错误!");
+ modelAndView.setViewName("redirect:login");
+ }else if (result==0){
+ // 必填信息不能为空!
+ modelAndView.addObject("msg","必填信息不能为空!");
+ modelAndView.setViewName("redirect:login");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 退出登录
+ */
+ @RequestMapping("logout")
+ public ModelAndView logout(ModelAndView modelAndView,HttpSession session){
+ session.setAttribute("merchant",null);
+ modelAndView.setViewName("redirect:/admin/login");
+ return modelAndView;
+ }
+
+ /*
+ * 注册请求
+ */
+ @RequestMapping("sign-up")
+ public ModelAndView signUp(ModelAndView modelAndView,String name,String email,String password){
+ int result = service.singup(email,email,password);
+ if (result==0){
+ // 必填信息不能为空!
+ modelAndView.addObject("msg","必填信息不能为空!");
+ }
+ if (result==4){
+ // 该邮箱已被注册
+ modelAndView.addObject("msg","该邮箱已被注册");
+ }
+ if (result==3){
+ // 邮箱格式不正确
+ modelAndView.addObject("msg","邮箱格式不正确");
+ }
+ if (result==2){
+ // 两次密码输入不一致
+ modelAndView.addObject("msg","两次密码输入不一致");
+ }
+ if (result==1){
+ // 验证邮件已发送,请留意您的邮箱
+ modelAndView.addObject("msg","验证邮件已发送,请留意您的邮箱");
+ }
+ if (result==-1){
+ // 验证邮件发送失败,请重试
+ modelAndView.addObject("msg","注册超时,请重试");
+ }
+ modelAndView.setViewName("redirect:login");
+ return modelAndView;
+ }
+
+ /*
+ * 验证邮件确认注册
+ */
+ @RequestMapping("sign-check")
+ public ModelAndView singCheck(ModelAndView modelAndView,@Param("email") String email){
+ int res = service.singCheck(email);
+ if (res==-1){
+ modelAndView.setViewName("redirect:/error");
+ }
+ if (res==0){
+ modelAndView.addObject("网络超时请重试");
+ modelAndView.setViewName("redirect:login");
+ }
+ if (res==1){
+ modelAndView.addObject("msg","注册成功");
+ modelAndView.setViewName("redirect:login");
+ }
+ return modelAndView;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminMerchantController.java b/src/main/java/com/example/jieyue/admin/controller/AdminMerchantController.java
new file mode 100644
index 0000000..70ae479
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminMerchantController.java
@@ -0,0 +1,122 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminMerchantService;
+import com.example.jieyue.common.entity.SysMt;
+import com.example.jieyue.common.mapper.SysMtMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * 商户管理页面
+ * @author Bosen
+ * 2020/11/8 10:50
+ */
+@RestController
+@RequestMapping("/admin/merchant")
+public class AdminMerchantController {
+ @Autowired
+ AdminMerchantService merchantService;
+ @Autowired
+ SysMtMapper merchantMapper;
+
+ @RequestMapping("")
+ public ModelAndView index(ModelAndView modelAndView, HttpServletRequest request){
+ modelAndView.setViewName("/admin/merchant/index");
+
+ int pageSize = 10;
+ int pageCount = merchantService.getMtPage(pageSize);
+ int num = 1;
+ int preNum = 1;
+ int nextNum = 1;
+ if (request.getParameter("num")!=null){
+ num = Integer.parseInt(request.getParameter("num"));
+ }
+ if (num <= 1){
+ preNum = 1;
+ nextNum = 2;
+ }else{
+ preNum = num-1;
+ if (num>=pageCount-1){
+ nextNum = pageCount;
+ }else{
+ nextNum = num+1;
+ }
+ }
+ List mtList = merchantService.getMtInfo(num,pageSize);
+ if (mtList.size()<=10){
+ nextNum = num;
+ }
+ modelAndView.addObject("mtList",mtList);
+ modelAndView.addObject("pageCount",pageCount);
+ modelAndView.addObject("nextNum",nextNum);
+ modelAndView.addObject("preNum",preNum);
+ modelAndView.addObject("num",num);
+
+ return modelAndView;
+ }
+
+ @RequestMapping("update-ratio")
+ public ModelAndView updateRatio(ModelAndView modelAndView,String ratio,int id){
+ try {
+ float ratioFloat = Float.valueOf(ratio);
+ if (ratioFloat > 1.0 || ratioFloat < 0.1 || !checkFloat(ratioFloat)){
+ modelAndView.addObject("msg","费率应在0.1~1.0之间(一位小数)");
+ }else{
+ if (merchantMapper.updateRatio(id,ratioFloat)==1){
+ modelAndView.addObject("msg","修改成功");
+ }else{
+ modelAndView.addObject("msg","修改失败");
+ }
+ }
+ }catch (Exception e){
+ modelAndView.addObject("msg","输入的费率不合法");
+ }
+
+ modelAndView.setViewName("redirect:/admin/merchant");
+ return modelAndView;
+ }
+
+ /*
+ * 删除商户
+ */
+ @RequestMapping("delete-merchant")
+ public ModelAndView deleteMerchant(ModelAndView modelAndView,int id){
+ if (merchantService.deleteMerchant(id)==1){
+ modelAndView.addObject("msg","删除商户成功!");
+ }else{
+ modelAndView.addObject("msg","删除商户失败!");
+ }
+ modelAndView.setViewName("redirect:/admin/merchant");
+ return modelAndView;
+ }
+
+ /*
+ * 修改商户状态
+ */
+ @RequestMapping("update-merchant")
+ public ModelAndView updateMerchant(ModelAndView modelAndView,String email,int state){
+ if (merchantService.updateMerchantState(email,state)==1){
+ modelAndView.addObject("msg","操作成功!");
+ }else{
+ modelAndView.addObject("msg","操作失败!");
+ }
+ modelAndView.setViewName("redirect:/admin/merchant");
+ return modelAndView;
+ }
+
+ /*
+ * 检查费率是否超过了一位小数
+ */
+ public boolean checkFloat(float ratio){
+ char[] c = String.valueOf(ratio).split(".")[1].toCharArray();
+ if (c.length > 1){
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminNoticeController.java b/src/main/java/com/example/jieyue/admin/controller/AdminNoticeController.java
new file mode 100644
index 0000000..94302cb
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminNoticeController.java
@@ -0,0 +1,37 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminNoticeService;
+import com.example.jieyue.common.utils.IsEmptyUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+@RestController
+public class AdminNoticeController {
+ @Autowired
+ AdminNoticeService noticeService;
+ @Autowired
+ IsEmptyUtil isEmptyUtil;
+
+ @RequestMapping("/admin/notice")
+ public ModelAndView index(ModelAndView modelAndView){
+ modelAndView.setViewName("admin/notice/index");
+ return modelAndView;
+ }
+
+ /*
+ * 系统消息发送 利用redis异步发送
+ */
+ @RequestMapping("/admin/send-notice")
+ public ModelAndView sendNotice(ModelAndView modelAndView,String title,String context,int type){
+ if (isEmptyUtil.strings(title,context)){
+ modelAndView.addObject("msg","必填信息不能为空");
+ }else{
+ noticeService.send(title,context,type);
+ modelAndView.addObject("msg","系统消息发送成功");
+ }
+ modelAndView.setViewName("redirect:/admin/notice");
+ return modelAndView;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminOrderController.java b/src/main/java/com/example/jieyue/admin/controller/AdminOrderController.java
new file mode 100644
index 0000000..e4a89e2
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminOrderController.java
@@ -0,0 +1,53 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminOrderService;
+import com.example.jieyue.common.entity.SysOrder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.List;
+
+/**
+ * 订单管理控制器
+ * @author Bosen
+ * 2020/12/1 13:02
+ */
+@RestController
+public class AdminOrderController {
+ @Autowired
+ AdminOrderService orderService;
+
+ @RequestMapping("/admin/order")
+ public ModelAndView index(ModelAndView modelAndView,@RequestParam(defaultValue = "2")int flag, @RequestParam(defaultValue = "1")int page){
+ // 获取订单信息
+ List orderList = orderService.getOrderList(page,18,flag);
+ modelAndView.addObject("orderList",orderList);
+
+ // 获取订单总页数
+ int allPage = orderService.getAllPage(flag,18);
+ modelAndView.addObject("page",page);
+ modelAndView.addObject("flag",flag);
+ modelAndView.addObject("allPage",allPage);
+
+ modelAndView.setViewName("admin/order/index");
+ return modelAndView;
+ }
+
+ @RequestMapping("/admin/search-order")
+ public ModelAndView searchOrder(ModelAndView modelAndView,String order){
+ // 获取订单信息
+ List orderList = orderService.getOrderById(order);
+ modelAndView.addObject("orderList",orderList);
+
+ // 获取订单总页数
+ modelAndView.addObject("page",1);
+ modelAndView.addObject("flag",2);
+ modelAndView.addObject("allPage",1);
+
+ modelAndView.setViewName("admin/order/index");
+ return modelAndView;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminRbacController.java b/src/main/java/com/example/jieyue/admin/controller/AdminRbacController.java
new file mode 100644
index 0000000..46b6ed3
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminRbacController.java
@@ -0,0 +1,291 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminRbacService;
+import com.example.jieyue.common.entity.*;
+import com.example.jieyue.common.mapper.*;
+import com.example.jieyue.common.utils.IsEmptyUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class AdminRbacController {
+ @Autowired
+ AdminRbacService rbacService;
+ @Autowired
+ SysAdminMapper adminMapper;
+ @Autowired
+ SysRoleMapper roleMapper;
+ @Autowired
+ SysAccessMapper accessMapper;
+ @Autowired
+ SysAdminRoleMapper adminRoleMapper;
+ @Autowired
+ SysRoleAccessMapper roleAccessMapper;
+ @Autowired
+ IsEmptyUtil isEmptyUtil;
+
+ @RequestMapping("/admin/rbac")
+ public ModelAndView index(ModelAndView modelAndView){
+ // 管理员列表
+ List adminList = adminMapper.findAll();
+ // 角色列表
+ List roleList = roleMapper.findAll();
+ // 权限列表
+ List accessList = accessMapper.findAll();
+
+ modelAndView.addObject("adminList",adminList);
+ modelAndView.addObject("roleList",roleList);
+ modelAndView.addObject("accessList",accessList);
+
+ modelAndView.setViewName("admin/rbac/index");
+ return modelAndView;
+ }
+
+ /*
+ * 编辑管理员的角色页面
+ * todo
+ */
+ @RequestMapping("/admin/rbac/update-admin-role")
+ public ModelAndView updateAdminRole(ModelAndView modelAndView,int adminId){
+ // 获取管理员角色信息
+ SysAdminRole adminRole = adminRoleMapper.findByAdminId(adminId);
+
+ modelAndView.addObject("adminRole",adminRole);
+ modelAndView.setViewName("updateRoleAccess");
+ return modelAndView;
+ }
+
+ /*
+ * 执行编辑管理员的角色操作
+ * todo
+ */
+ @RequestMapping("/admin/rbac/update-admin-role-action")
+ public ModelAndView updateAdminRoleAction(ModelAndView modelAndView,int adminId,String roles){
+
+ modelAndView.setViewName("updateRoleAccess");
+ return modelAndView;
+ }
+
+ /*
+ * 添加角色
+ */
+ @RequestMapping("/admin/add-role")
+ public ModelAndView addRole(ModelAndView modelAndView,String name){
+ if (isEmptyUtil.strings(name)){
+ modelAndView.addObject("msg","请输入角色名");
+ }
+ if (roleMapper.countByName(name)!=0){
+ modelAndView.addObject("msg","此角色已存在");
+ }
+ if (roleMapper.insert(name)!=1){
+ modelAndView.addObject("msg","添加角色失败");
+ }else{
+ modelAndView.addObject("msg","添加角色成功");
+ }
+ modelAndView.setViewName("redirect:/admin/rbac");
+ return modelAndView;
+ }
+
+ /*
+ * 添加权限
+ */
+ @RequestMapping("/admin/add-access")
+ public ModelAndView addAccess(ModelAndView modelAndView,String name,String url){
+ if (isEmptyUtil.strings(name,url)){
+ modelAndView.addObject("msg","必填信息不能为空");
+ }
+ if (accessMapper.countByName(name)!=0){
+ modelAndView.addObject("msg","此权限已存在");
+ }
+ if (accessMapper.insert(name,url)!=1){
+ modelAndView.addObject("msg","添加权限失败");
+ }else{
+ modelAndView.addObject("msg","添加权限成功");
+ }
+ modelAndView.setViewName("redirect:/admin/rbac");
+ return modelAndView;
+ }
+
+ @RequestMapping("/admin/del-admin")
+ public ModelAndView delAdmin(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (id==1){
+ modelAndView.addObject("msg","无法删除此管理员");
+ return modelAndView;
+ }
+ if (adminMapper.deleteById(id)==1){
+ modelAndView.addObject("msg","删除管理员成功");
+ }else{
+ modelAndView.addObject("msg","删除管理员失败");
+ }
+ return modelAndView;
+ }
+
+ @RequestMapping("/admin/del-role")
+ public ModelAndView delRole(ModelAndView modelAndView,int id){
+ if (roleMapper.deleteById(id)==1){
+ modelAndView.addObject("msg","删除角色成功");
+ }else{
+ modelAndView.addObject("msg","删除角色失败");
+ }
+ modelAndView.setViewName("redirect:/admin/rbac");
+ return modelAndView;
+ }
+
+ @RequestMapping("/admin/del-access")
+ public ModelAndView delAccess(ModelAndView modelAndView,int id){
+ if (accessMapper.deleteById(id)==1){
+ modelAndView.addObject("msg","删除权限成功");
+ }else{
+ modelAndView.addObject("msg","删除权限失败");
+ }
+ modelAndView.setViewName("redirect:/admin/rbac");
+ return modelAndView;
+ }
+
+ /*
+ * 停用管理员
+ */
+ @RequestMapping("/admin/off-admin")
+ public ModelAndView offAdmin(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (id==1){
+ modelAndView.addObject("无法停用此管理员!");
+ return modelAndView;
+ }
+ if (adminMapper.updateMarkById(id,0)==1){
+ modelAndView.addObject("msg","停用成功!");
+ }else{
+ modelAndView.addObject("msg","停用失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 启用管理员
+ */
+ @RequestMapping("/admin/on-admin")
+ public ModelAndView onAdmin(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (adminMapper.updateMarkById(id,1)==1){
+ modelAndView.addObject("msg","启用成功!");
+ }else{
+ modelAndView.addObject("msg","启用失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 停用角色
+ */
+ @RequestMapping("/admin/off-role")
+ public ModelAndView offRole(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (roleMapper.updateStatus(0,id)==1){
+ modelAndView.addObject("msg","停用角色成功!");
+ }else{
+ modelAndView.addObject("msg","停用角色失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 启用角色
+ */
+ @RequestMapping("/admin/on-role")
+ public ModelAndView onRole(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (roleMapper.updateStatus(1,id)==1){
+ modelAndView.addObject("msg","启用角色成功!");
+ }else{
+ modelAndView.addObject("msg","启用角色失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 启用权限
+ */
+ @RequestMapping("/admin/on-access")
+ public ModelAndView onAccess(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (accessMapper.updateStatus(1,id)==1){
+ modelAndView.addObject("msg","启用权限成功!");
+ }else{
+ modelAndView.addObject("msg","启用权限失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 停用权限
+ */
+ @RequestMapping("/admin/off-access")
+ public ModelAndView offAccess(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (accessMapper.updateStatus(0,id)==1){
+ modelAndView.addObject("msg","停用权限成功!");
+ }else{
+ modelAndView.addObject("msg","停用权限失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 修改权限信息
+ */
+ @RequestMapping("/admin/update-access")
+ public ModelAndView updateAccess(ModelAndView modelAndView,int id,String name,String url){
+ modelAndView.setViewName("redirect:/admin/rbac");
+ if (accessMapper.updateInfo(id,name,url)==1){
+ modelAndView.addObject("msg","修改权限信息成功!");
+ }else{
+ modelAndView.addObject("msg","修改权限信息失败!");
+ }
+ return modelAndView;
+ }
+
+ /*
+ * 修改角儿权限信息页面
+ */
+ @RequestMapping("/admin/role-access")
+ public ModelAndView roleAccessIndex(ModelAndView modelAndView,int id){
+ modelAndView.setViewName("/admin/rbac/role-access");
+ // 获取角色信息
+ SysRole role = roleMapper.findById(id);
+ // 获取角色的权限信息
+ List roleAccessList = roleAccessMapper.findByRoleId(id);
+ Map roleAccessMap = new HashMap<>();
+ for (SysRoleAccess sysRoleAccess : roleAccessList) {
+ roleAccessMap.put(sysRoleAccess.getAccessId(),sysRoleAccess);
+ }
+ // 获取全部权限信息
+ List allAccessList = accessMapper.findAll();
+
+ modelAndView.addObject("role",role);
+ modelAndView.addObject("allAccessList",allAccessList);
+ modelAndView.addObject("roleAccessMap",roleAccessMap);
+
+ return modelAndView;
+ }
+
+ /*
+ * 修改角色的权限
+ */
+ @RequestMapping("/admin/role-access/action")
+ public ModelAndView action(ModelAndView modelAndView,int role,int ... ids){
+ modelAndView.setViewName("redirect: /admin/role-access?id="+role);
+ if (rbacService.setRoleAccess(role,ids)){
+ modelAndView.addObject("msg","设置成功");
+ }else{
+ modelAndView.addObject("msg","设置失败");
+ }
+ return modelAndView;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminUiController.java b/src/main/java/com/example/jieyue/admin/controller/AdminUiController.java
new file mode 100644
index 0000000..4a6a78e
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminUiController.java
@@ -0,0 +1,71 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminUiService;
+import com.example.jieyue.common.entity.SysUi;
+import com.example.jieyue.user.service.UserHomeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+
+/**
+ * 网页图片UI设置
+ * @author Bosen
+ * 2020/11/4 21:00
+ */
+@RestController
+public class AdminUiController {
+ @Autowired
+ AdminUiService adminUiService;
+ @Autowired
+ UserHomeService userHomeService;
+
+ @RequestMapping("/admin/ui")
+ public ModelAndView index(ModelAndView modelAndView){
+ modelAndView.setViewName("admin/ui/index");
+ Map imgMap = userHomeService.getImage();
+ modelAndView.addObject("imgMap",imgMap);
+ return modelAndView;
+ }
+
+ /**
+ * 文件上传操作
+ * @author Bosen
+ * 2020/11/5 18:56
+ */
+ @RequestMapping("/admin/up-image")
+ public ModelAndView upImage(ModelAndView modelAndView, MultipartFile file, RedirectAttributes redirectAttributes, HttpServletRequest request,int width,int height){
+ if (file.getOriginalFilename().isEmpty()){
+ modelAndView.addObject("msg","文件上传失败");
+ }else{
+ String upFileResult = adminUiService.upImage(file,redirectAttributes,request,"/data/library/",width,height);
+ if (upFileResult==null){
+ modelAndView.addObject("msg","文件上传失败");
+ }else{
+ modelAndView.addObject("msg","文件上传成功");
+
+ }
+ }
+ modelAndView.setViewName("redirect:ui");
+ return modelAndView;
+ }
+
+ /*
+ * 删除海报
+ */
+ @RequestMapping("/admin/del-image")
+ public ModelAndView delImg(ModelAndView modelAndView,int width,int height){
+ modelAndView.setViewName("redirect:ui");
+ if (adminUiService.delImg(width,height)){
+ modelAndView.addObject("msg","删除成功");
+ }else{
+ modelAndView.addObject("msg","删除失败");
+ }
+ return modelAndView;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/controller/AdminUserController.java b/src/main/java/com/example/jieyue/admin/controller/AdminUserController.java
new file mode 100644
index 0000000..821a1fe
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/controller/AdminUserController.java
@@ -0,0 +1,33 @@
+package com.example.jieyue.admin.controller;
+
+import com.example.jieyue.admin.service.AdminUserService;
+import com.example.jieyue.common.entity.SysUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.List;
+
+@RestController
+public class AdminUserController {
+ @Autowired
+ AdminUserService userService;
+
+ @RequestMapping("/admin/user")
+ public ModelAndView index(ModelAndView modelAndView, @RequestParam(defaultValue = "1")int page){
+ // 获取订单信息
+ List userList = userService.getUserList(page,10);
+ modelAndView.addObject("userList",userList);
+
+ // 获取订单总页数
+ int allPage = userService.getAllPage(10);
+ modelAndView.addObject("page",page);
+ modelAndView.addObject("allPage",allPage);
+
+ modelAndView.setViewName("admin/user/index");
+ return modelAndView;
+ }
+
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminLoginService.java b/src/main/java/com/example/jieyue/admin/service/AdminLoginService.java
new file mode 100644
index 0000000..6fa145a
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminLoginService.java
@@ -0,0 +1,145 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.entity.SysAdmin;
+import com.example.jieyue.common.entity.SysMt;
+import com.example.jieyue.common.mapper.SysAdminMapper;
+import com.example.jieyue.common.mapper.SysAdminRoleMapper;
+import com.example.jieyue.common.service.MailService;
+import com.example.jieyue.common.service.SysUserService;
+import com.example.jieyue.common.utils.IsEmptyUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+import org.springframework.util.DigestUtils;
+
+/**
+ * 登陆逻辑处理
+ * @author Bosen
+ * 2020/11/3 19:06
+ */
+@Service
+public class AdminLoginService {
+ @Autowired
+ SysAdminMapper adminMapper;
+ @Autowired
+ MailService mailService;
+ @Autowired
+ SysAdminRoleMapper adminRoleMapper;
+ @Value("${site-url}")
+ String sitrUrl;
+
+ // 判空工具类
+ IsEmptyUtil isEmptyUtil = IsEmptyUtil.getInstance();
+ /**
+ * 登陆验证逻辑处理
+ * @return int
+ * 1 登陆成功
+ * 0 必填信息不能为空
+ *-1 邮箱不存在或密码错误
+ */
+ public int doLogin(String email,String password){
+ SysAdmin admin = adminMapper.selectByEmail(email);
+ // 用户名密码不能为空
+ if (isEmptyUtil.strings(email,password)){
+ return 0;
+ }
+ // 不存在该用户
+ if (admin==null){
+ return -1;
+ }
+ // 密码验证
+ password = DigestUtils.md5DigestAsHex(password.getBytes());
+ // 密码错误
+ if (!admin.getPassword().equals(password)){
+ return -1;
+ }else{
+ return 1;
+ }
+ }
+
+ /*
+ * 返回用户信息
+ */
+ public SysAdmin adminInfo(String email){
+ return adminMapper.getAdminInfo(email);
+ }
+
+ /**
+ * 注册逻辑处理
+ * @return int
+ *-1 注册超时请重试
+ * 0 必填信息不能为空
+ * 1 处理请求合理,已发送验证码
+ * 2 两次密码不一致
+ * 3 邮箱格式有误
+ * 4 该邮箱已被注册
+ */
+ public int singup(String email,String name,String password){
+ // 必填信息不能为空
+ if (isEmptyUtil.strings(email,name,password)){
+ return 0;
+ }
+ // 邮箱格式验证
+ if(!mailService.checkEmail(email)){
+ System.out.println(email);
+ return 3;
+ }
+
+ // 该邮箱已被注册
+ SysAdmin admin = adminMapper.selectByEmail(email);
+ password = DigestUtils.md5DigestAsHex(password.getBytes());
+ if (admin!=null){
+ if (admin.getMark()!=0){
+ return 4;
+ }else{
+ if (adminMapper.update(name,password,email)!=1){
+ return -1;
+ }
+ }
+ }else{
+ // 将信息保存,状态置为0未启用
+
+ // 添加信息未成功返回超时
+ if (adminMapper.insert(name,password,email,0)!=1){
+ return -1;
+ }
+ }
+ // 发送注册验证邮件
+ boolean res = mailService.sendHtmlMail(email,"捷阅网管理员注册验证","点击此链接完成注册验证");
+ if (res){
+ return 1;
+ }else{
+ return -1;
+ }
+ }
+
+ /**
+ * 验证邮件确认注册
+ * @return int
+ *-1 404页面
+ * 0 网络超时请重试
+ * 1 注册成功,跳转至登陆页面
+ */
+ @Transactional
+ public int singCheck(String email){
+ SysAdmin admin = adminMapper.selectByEmail(email);
+ if (admin!=null && admin.getMark()==0){
+ int res1 = adminMapper.updateMark(1,email);
+ if (res1==1){
+ // 设置用户角色,设置失败则回滚
+ if (adminRoleMapper.updateStatus(1,admin.getId()) != 1){
+ // 执行回滚
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+ return 0;
+ }
+ return 1;
+ }else{
+ return 0;
+ }
+ }else{
+ return -1;
+ }
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminMerchantService.java b/src/main/java/com/example/jieyue/admin/service/AdminMerchantService.java
new file mode 100644
index 0000000..a7232f3
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminMerchantService.java
@@ -0,0 +1,59 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.entity.SysMt;
+import com.example.jieyue.common.mapper.SysMtMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class AdminMerchantService {
+ @Autowired
+ SysMtMapper mtMapper;
+ /**
+ * 获取用户的信息
+ *
+ * @param curPage 当前页数
+ * @param pageSize 一页的条数
+ */
+ public List getMtInfo(int curPage,int pageSize){
+ int curRow = (curPage-1)*pageSize;
+ return mtMapper.findPage(curRow,pageSize);
+ }
+
+ /*
+ * 删除商户
+ */
+ public int deleteMerchant(int merchantId){
+ if (mtMapper.deleteById(merchantId)==1){
+ return 1;
+ }
+ return -1;
+ }
+
+ /*
+ * 修改用户状态
+ */
+ public int updateMerchantState(String email,int state){
+ if (mtMapper.updateState(email,state)==1){
+ return 1;
+ }
+ return -1;
+ }
+
+ /*
+ * 获取商户列表总页数
+ */
+ public int getMtPage(int pageSize){
+ if (mtMapper.count()==0){
+ return 1;
+ }else{
+ return (int)Math.ceil((double)mtMapper.count()/pageSize);
+ }
+ }
+
+ public int updateRatio(float ratio,int id){
+ return 1;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminNoticeService.java b/src/main/java/com/example/jieyue/admin/service/AdminNoticeService.java
new file mode 100644
index 0000000..baee366
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminNoticeService.java
@@ -0,0 +1,72 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.entity.SysAdmin;
+import com.example.jieyue.common.entity.SysMt;
+import com.example.jieyue.common.entity.SysUser;
+import com.example.jieyue.common.mapper.SysAdminMapper;
+import com.example.jieyue.common.mapper.SysMtMapper;
+import com.example.jieyue.common.mapper.SysNoticeMapper;
+import com.example.jieyue.common.mapper.SysUserMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class AdminNoticeService {
+ @Autowired
+ SysUserMapper userMapper;
+ @Autowired
+ SysMtMapper merchantMapper;
+ @Autowired
+ SysAdminMapper adminMapper;
+ @Autowired
+ SysNoticeMapper noticeMapper;
+ @Autowired
+ RedisTemplate redisTemplate;
+
+ /*
+ * 将要发送的消息存入redis消息队列
+ */
+ public void send(String title,String context,int type){
+ Map map = new HashMap<>();
+ map.put("title",title);
+ map.put("context",context);
+ map.put("type",type+"");
+ switch (type){
+ case 0:
+ // 获取信息
+ List adminList = adminMapper.findAll();
+ for (SysAdmin sysAdmin : adminList) {
+ long createTime = System.currentTimeMillis();
+ map.put("createTime",createTime+"");
+ map.put("receive",sysAdmin.getId()+"");
+ redisTemplate.opsForList().leftPush("notice",map);
+ }
+ break;
+ case 1:
+ // 获取信息
+ List merchantList = merchantMapper.findAll();
+ for (SysMt sysMt : merchantList) {
+ long createTime = System.currentTimeMillis();
+ map.put("createTime",createTime+"");
+ map.put("receive",sysMt.getId()+"");
+ redisTemplate.opsForList().leftPush("notice",map);
+ }
+ break;
+ case 2:
+ // 获取信息
+ List userList = userMapper.findAll();
+ for (SysUser sysUser : userList) {
+ long createTime = System.currentTimeMillis();
+ map.put("createTime",createTime+"");
+ map.put("receive",sysUser.getId()+"");
+ redisTemplate.opsForList().leftPush("notice",map);
+ }
+ break;
+ }
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminOrderService.java b/src/main/java/com/example/jieyue/admin/service/AdminOrderService.java
new file mode 100644
index 0000000..a74ca7e
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminOrderService.java
@@ -0,0 +1,59 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.entity.SysOrder;
+import com.example.jieyue.common.mapper.SysOrderMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class AdminOrderService {
+ @Autowired
+ SysOrderMapper orderMapper;
+
+ /*
+ * 获取订单信息
+ */
+ public List getOrderList(int page,int num,int flag){
+ switch (flag){
+ case 0:// 未支付
+ return orderMapper.findNotPayLimit((page-1)*num,num);
+ case 1:// 已支付
+ return orderMapper.findPayLimit((page-1)*num,num);
+ case 2:// 全部订单
+ return orderMapper.findLimit((page-1)*num,num);
+ }
+ return null;
+ }
+
+ /*
+ * 通过订单号查找
+ */
+ public List getOrderById(String orderId){
+ SysOrder order = orderMapper.findByOrderId(orderId);
+ List list = new ArrayList<>();
+ if (order!=null){
+ list.add(order);
+ }
+ return list;
+ }
+
+ /*
+ * 获取总页数
+ */
+ public int getAllPage(int flag,int num){
+ switch (flag){
+ case 0:// 未支付
+ return (int)Math.ceil((double)orderMapper.notPayCount()/(double)num);
+ case 1:// 已支付
+ return (int)Math.ceil((double)orderMapper.payCount()/(double)num);
+ case 2:// 全部订单
+ return (int)Math.ceil((double)orderMapper.orderCount()/(double)num);
+ case 3:
+ return 1;
+ }
+ return 1;
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminRbacService.java b/src/main/java/com/example/jieyue/admin/service/AdminRbacService.java
new file mode 100644
index 0000000..b07fa4c
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminRbacService.java
@@ -0,0 +1,44 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.mapper.SysRoleAccessMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+
+@Service
+public class AdminRbacService {
+
+ @Autowired
+ SysRoleAccessMapper roleAccessMapper;
+
+ /**
+ * 修改管理员的角色
+ * @return 1 成功 -1 失败
+ * @author Bosen
+ * 2020/12/30 5:19
+ * TODO TODO TODO TODO
+ */
+ public int updateAdminRoleAction(int adminId,String roles){
+ // 对使用json封装的js数组进行解析
+ return -1;
+ }
+
+ /*
+ * 修改角色的权限
+ */
+ @Transactional
+ public boolean setRoleAccess(int role,int[] ids){
+ // 删除角色原权限
+ roleAccessMapper.deleteByRoleId(role);
+ for (int id : ids) {
+ if (roleAccessMapper.insert(role,id)!=1){
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+ return false;
+ }
+ }
+ return true;
+ }
+
+
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminUiService.java b/src/main/java/com/example/jieyue/admin/service/AdminUiService.java
new file mode 100644
index 0000000..8a65586
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminUiService.java
@@ -0,0 +1,80 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.mapper.SysUiMapper;
+import com.example.jieyue.common.utils.DateUtil;
+import com.example.jieyue.common.utils.FileUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+import org.thymeleaf.util.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+
+@Service
+public class AdminUiService {
+ @Autowired
+ FileUtil fileUtil;
+ @Autowired
+ DateUtil dateUtil;
+ @Autowired
+ SysUiMapper uiMapper;
+ /**
+ * 文件上传逻辑处理
+ *
+ * @return
+ * null 上传失败
+ * 文件名 上传成功
+ */
+ public String upImage(MultipartFile file,RedirectAttributes redirectAttributes,
+ HttpServletRequest request,String url,int weight,int height) {
+ // 设置filename 文件名由年月日时分秒以及六位随机数组成
+ String filename = dateUtil.getNMDHIS()+Math.round(Math.random()*(999999-100000)+100000);
+ // 接收文件工具类返回的文件位置
+ String result = fileUtil.upFile(file,redirectAttributes,request,url,filename);
+ if (result==null){
+ return null;
+ }else{
+ if (uiMapper.findByMark(weight,height) == null) {
+ int insertRes = uiMapper.insert(result, weight, height);
+ if (insertRes == 1) {
+ return filename;
+ } else {
+ // sql语句执行失败,将已上传的图片移除
+ fileUtil.deleteFile(result);
+ return null;
+ }
+ }else{
+ // 删除旧图片
+ fileUtil.deleteFile(uiMapper.findByMark(weight,height).getUrl());
+ // 更改图片
+ int updateRes = uiMapper.updateUrl(result,weight,height);
+ if (updateRes == 1) {
+ return filename;
+ } else {
+ // sql语句执行失败,将已上传的图片移除
+ fileUtil.deleteFile(result);
+ return null;
+ }
+ }
+ }
+ }
+
+ /*
+ * 删除海报逻辑处理
+ */
+ public boolean delImg(int width,int height){
+ if (uiMapper.findByMark(width,height)==null){
+ return false;
+ }else{
+ fileUtil.deleteFile(uiMapper.findByMark(width,height).getUrl());
+ int delResult = uiMapper.deleteByMark(width,height);
+ if (delResult == 1) {
+ return true;
+ } else {
+ // sql语句执行失败
+ return false;
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/example/jieyue/admin/service/AdminUserService.java b/src/main/java/com/example/jieyue/admin/service/AdminUserService.java
new file mode 100644
index 0000000..acae6ee
--- /dev/null
+++ b/src/main/java/com/example/jieyue/admin/service/AdminUserService.java
@@ -0,0 +1,28 @@
+package com.example.jieyue.admin.service;
+
+import com.example.jieyue.common.entity.SysUser;
+import com.example.jieyue.common.mapper.SysUserMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class AdminUserService {
+ @Autowired
+ SysUserMapper userMapper;
+
+ /*
+ * 获取用户信息
+ */
+ public List getUserList(int page, int num){
+ return userMapper.findLimit((page-1)*num,num);
+ }
+
+ /*
+ * 获取总页数
+ */
+ public int getAllPage(int num){
+ return (int)Math.ceil((double)userMapper.userCount()/(double)num);
+ }
+}
diff --git a/src/main/java/com/example/jieyue/alipay/config/AlipayConfig.java b/src/main/java/com/example/jieyue/alipay/config/AlipayConfig.java
new file mode 100644
index 0000000..c939a00
--- /dev/null
+++ b/src/main/java/com/example/jieyue/alipay/config/AlipayConfig.java
@@ -0,0 +1,96 @@
+package com.example.jieyue.alipay.config;
+
+/* *
+ *类名:AlipayConfig1
+ *功能:基础配置类
+ *详细:设置帐户有关信息及返回路径
+ *修改日期:2017-04-05
+ *说明:
+ *以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
+ *该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
+ */
+
+import java.io.FileWriter;
+import java.io.IOException;
+
+public class AlipayConfig {
+
+//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
+
+ // 应用ID,您的APPID,收款账号既是您的APPID对应支付宝账号
+ public static String app_id = "2021002114695818";
+
+ // 商户私钥,您的PKCS8格式RSA2私钥
+ public static String merchant_private_key = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC/0lWCv81WoVbU\n" +
+ "yOTJ7jM9AV6YRmIOUhLqWHGA1wSXAG57NSkK7SifBcit61hdfZaYzDatmQQn5t4D\n" +
+ "S+gQ4rQwnerKzoTmWY6EKXV3BAawdLG30SRJhX0739l7Ul+X3giTIUG5R4fG9gTN\n" +
+ "XnmhGX4yTa2yir/IOeWJ0lqXoKRyxRclaMFsF8gW4EBk5S7PVzMhdjh7EV1D+2QB\n" +
+ "5baNIFaZvfByMr7V+q2+awlBH7ZoDbviyV+vHmZCC/dOLPaWLTkW+t+ih/z9rqaN\n" +
+ "fZIOTgaLB7g7hca7dnzCM/G1i2UNHWzU2mRfALK/ppvJKe7J7GTOSu92iVF5Yryr\n" +
+ "CUv6TcjDAgMBAAECggEAQtqStOwWK8A1XBncK0iakQN+LYIyQJ14PDaw8F+AGQSs\n" +
+ "fMJtWIKJassAQyVH+eWAbCaYU+6FlUaQUAPPkLsCZANVxnMtvH6v/f3ZE67SigNR\n" +
+ "wSfiBsHAgPKmgKWX7X0T7ftkRafZeY1a5RytNWmGIxARnq1e4/DRwDQRINF7HwhZ\n" +
+ "Crp/JXZYOYv/0dSRyV5l/S3J13m7NgimG7nejFc7rRhMS9gXQohD9pXcL8N1F+Af\n" +
+ "zpSf1AFyCvFA41cQO+SNPbpjXHv2k2WuBOFMt08Rxfn4DKiDhhK9eHN0nB9RVeWl\n" +
+ "DOY/6RiMketWvMqx5TCltE5WtGchEqYHVwNK6Tfe+QKBgQDt50tdoxisr+kj2JAA\n" +
+ "BQXZmz5isQpeUt3JruNOnw2hVSbMO60iftLTeB+GHX6hGvD5ViFEDgZotgjYL/p+\n" +
+ "AW7Dm0+D+ecWvVUhySrab/sMso/B33OCqYfPNdj780+fmqVRrRjnK/J4V0n5AoaC\n" +
+ "Rx0vfXfJUXonPZ+Jn8RSiW8CNwKBgQDOaa9ljnO6mcSr+k/I7Biq0e4ZFvl10M4G\n" +
+ "aMDE9AyiGUWn0JIERpLCZ0VIgOqtDXuJo5JwPfIHVppobBqaWdlKBuA2rIwynjls\n" +
+ "+jfplnVlAQKxkdRUM+8nXW24q0qsNFro+KsCE5y6tevxsHyXihmElv9AhRcsXY2g\n" +
+ "LM7BDzIX1QKBgQDTM2P38+Pi4qRB+28TZWIlJioDKZK/3Ccjdkw7rv5FvLed1ljE\n" +
+ "5/w4Wkr6IFMbqTRG1kzgAudzrC875ZQmqxTvOIEl9ARQbrMWNGYD2CfyxM7U2Y/N\n" +
+ "br2vmelQ+1czpPGhCd+y0pQGe8+i7bgGDiX91BA0vE2Kaq2oWxrJ/1J6jwKBgQCh\n" +
+ "RffRzHRllmEQ0dlmrfkz9iQnHEk6oTNn1I7RE7GPMVm4HYEIsC9YjyGV3Yv+O+uL\n" +
+ "Be+TnQKucx7feZ9re8oHScoDTduYbQGHQRVQf8snaJu3K66PP6iaxCfHQqZsV9ez\n" +
+ "8R6D19j8FMnNo8wlBrSbYPL8cUBC3LGcNYYxV3MXJQKBgQDbh5oML1AJ1FYvkMew\n" +
+ "v/xCNMvrsJDNPty4oZD3lXAqq2/rbHKxDqsB9PkVcd4xdHrYuHU+MbYeb96hHAyv\n" +
+ "seYiUCWF/XryBGI/7AcHTKpgBA9TXqudCyPUhz0ewC5vKnYdcqXXTjjL1WqILegj\n" +
+ "cSLF6WzY1X1kw7j9IuP6wyZQZg==";
+
+ // 支付宝公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
+ public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuaRqJqDOBRNsIa1MkgyiR6kRUk+M8cbNmGFN0RDy1NJmxyaR/iqIi5k8vQZ+qnVelXTVVEEYKiYaIxj6co8ERKPXlrnk/GiRxn410jX35iLnm/BgwXaiVP1Fx6kusiXiCGWgrvEsbAMFvbZqyqT/z8m+ogQ7JPTkoauzzu16JJxpcSPEf7SPnbuiBjHbUqRGP1pAa1yVun0eVFHaFeqi+cRfGDhwym2xEAMokJh+aFlU3AnCg/f7fBek4UNi6anAadoX3dKcB8cNeIMzg5FaplZP2V0ztLg2Qvw4ezKSWUFB4hFD0d6De61zwpGjgl+ouobyL4prsUA3qlT48E8d8wIDAQAB";
+
+ // 服务器异步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
+ public static String notify_url = "http://工程公网访问地址/alipay.trade.page.pay-JAVA-UTF-8/notify_url.jsp";
+
+ // 页面跳转同步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
+ public static String return_url = "http://工程公网访问地址/alipay.trade.page.pay-JAVA-UTF-8/return_url.jsp";
+
+ // 签名方式
+ public static String sign_type = "RSA2";
+
+ // 字符编码格式
+ public static String charset = "utf-8";
+
+ // 支付宝网关
+ public static String gatewayUrl = "https://openapi.alipay.com/gateway.do";
+
+ // 支付宝网关
+ public static String log_path = "C:\\";
+
+
+//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
+
+ /**
+ * 写日志,方便测试(看网站需求,也可以改成把记录存入数据库)
+ * @param sWord 要写入日志里的文本内容
+ */
+ public static void logResult(String sWord) {
+ FileWriter writer = null;
+ try {
+ writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
+ writer.write(sWord);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (writer != null) {
+ try {
+ writer.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/example/jieyue/alipay/readme.txt b/src/main/java/com/example/jieyue/alipay/readme.txt
new file mode 100644
index 0000000..8590330
--- /dev/null
+++ b/src/main/java/com/example/jieyue/alipay/readme.txt
@@ -0,0 +1,42 @@
+л
+
+Eclipse+JDK1.6+Tomcat6.0
+
+
+ʹ÷
+
+SDKصַ
+https://doc.open.alipay.com/docs/doc.htm?treeId=193&articleId=103419&docType=1
+
+һءJAVAԴSDK
+
+ڶϺѹѹ
+
+ѹalipay-sdk-javaXXX.jarcommons-logging-1.1.1.jarܰļ빤Ŀalipay.trade.page.pay-PHP-UTF-8\WebContent\WEB-INF\libС
+
+IJAlipayConfig.javaļϢ棬ϢУapp_idmerchant_private_keyalipay_public_keyreturn_urlnotify_url
+bizContentĸ÷ƴӷʽĵhttps://doc.open.alipay.com/docs/doc.htm?treeId=270&articleId=105899&docType=1
+
+岽index.jspļ
+
+֧̣Чȡ
+
+
+ҵע
+
+notify_urlļreturn_urlļУnotify_urlļҪдҵ룬д
+
+֤첽֪ͨݣ
+
+1̻Ҫ֤֪ͨеout_trade_noǷΪ̻ϵͳдĶ
+
+2жtotal_amountǷȷʵΪöʵʽ̻ʱĽ
+
+3У֪ͨеseller_idseller_email) ǷΪñʽӦIJһ̻жseller_id/seller_email
+
+4֤ӿڵ÷app_id
+
+
+˵
+
+demoΪѧϰοʹãʵпѹǶĿƽ̨С
\ No newline at end of file
diff --git a/src/main/java/com/example/jieyue/common/component/LoginHandlerInterceptor.java b/src/main/java/com/example/jieyue/common/component/LoginHandlerInterceptor.java
new file mode 100644
index 0000000..8385802
--- /dev/null
+++ b/src/main/java/com/example/jieyue/common/component/LoginHandlerInterceptor.java
@@ -0,0 +1,91 @@
+package com.example.jieyue.common.component;
+
+import com.example.jieyue.common.mapper.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * 访问网页地址时的过滤器,
+ * 查看用户是否登陆,
+ * 未登陆返回至指定页面
+ *
+ * @author Bosen
+ * 2020/11/2 14:07
+ */
+@Component
+public class LoginHandlerInterceptor implements HandlerInterceptor {
+ @Autowired
+ SysAdminMapper adminMapper;
+ @Autowired
+ SysRoleMapper roleMapper;
+ @Autowired
+ SysAccessMapper accessMapper;
+ @Autowired
+ SysAdminRoleMapper adminRoleMapper;
+ @Autowired
+ SysRoleAccessMapper roleAccessMapper;
+
+ @Override
+ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+ // 判断请求
+ String uri = request.getRequestURI();
+ String admin = "/admin[\\d\\w\\S]*";
+ String merchant = "/mer[\\d\\w\\S]*";
+ Pattern adminPattern = Pattern.compile(admin);
+ Pattern merchantPattern = Pattern.compile(merchant);
+ if(adminPattern.matcher(uri).matches()){
+ // admin
+ Object user = request.getSession().getAttribute("admin");
+ if (user == null) {
+ // 获取request返回页面到登录页
+ request.getRequestDispatcher("/admin/login").forward(request, response);
+ return false;
+ }
+ }else if (merchantPattern.matcher(uri).matches()){
+ // merchant
+ Object user = request.getSession().getAttribute("merchant");
+ if (user == null) {
+ // 获取request返回页面到登录页
+ request.getRequestDispatcher("/merchant/login").forward(request, response);
+ return false;
+ }
+ }else{
+ // user
+ Object user = request.getSession().getAttribute("user");
+ if (user == null) {
+ // 获取request返回页面到登录页
+ request.getRequestDispatcher("/user/login").forward(request, response);
+ return false;
+ }
+ }
+ return true;
+ }
+ @Override
+ public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
+
+ }
+
+ @Override
+ public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
+
+ }
+
+ /**
+ * 管理员权限判断
+ * @author Bosen
+ * 2020/12/7 7:09
+ */
+ public boolean checkAdminAccess(int adminId,String url){
+ int roleId = adminRoleMapper.findByAdminId(adminId).getRoleId();
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/example/jieyue/common/config/AdminWebMvcConfigurer.java b/src/main/java/com/example/jieyue/common/config/AdminWebMvcConfigurer.java
new file mode 100644
index 0000000..eae9046
--- /dev/null
+++ b/src/main/java/com/example/jieyue/common/config/AdminWebMvcConfigurer.java
@@ -0,0 +1,35 @@
+package com.example.jieyue.common.config;
+
+import com.example.jieyue.common.component.LoginHandlerInterceptor;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * 后台登陆拦截器
+ * @author Bosen
+ * 2020/11/2 14:08
+ */
+@Configuration
+public class AdminWebMvcConfigurer implements WebMvcConfigurer {
+ @Override
+ public void addViewControllers(ViewControllerRegistry registry) {
+ registry.addViewController("/index.html").setViewName("/admin/login");
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ /*
+ * 网站主页,静态资源,网站作者页面,以及登陆注册所需页面外,未登录时的访问 统一跳转至登陆注册页面
+ */
+ registry.addInterceptor(new LoginHandlerInterceptor())
+ .addPathPatterns("/admin/**")
+ .excludePathPatterns(
+ "/admin/login","/admin/do-login","/admin/sign-up","/admin/sign-check",
+ "/css/**","/js/**","/image/**","/fonts/**","/mapping/**","/data/**",
+ "/lib/*/*/**"
+ );
+ }
+
+}
diff --git a/src/main/java/com/example/jieyue/common/config/MerchantWebMvcConfigurer.java b/src/main/java/com/example/jieyue/common/config/MerchantWebMvcConfigurer.java
new file mode 100644
index 0000000..15828da
--- /dev/null
+++ b/src/main/java/com/example/jieyue/common/config/MerchantWebMvcConfigurer.java
@@ -0,0 +1,34 @@
+package com.example.jieyue.common.config;
+
+import com.example.jieyue.common.component.LoginHandlerInterceptor;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * 商户登陆拦截器
+ * @author Bosen
+ * 2020/11/2 14:08
+ */
+@Configuration
+public class MerchantWebMvcConfigurer implements WebMvcConfigurer {
+ @Override
+ public void addViewControllers(ViewControllerRegistry registry) {
+ registry.addViewController("/index.html").setViewName("/merchant/login");
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ /*
+ * 网站主页,静态资源,网站作者页面,以及登陆注册所需页面外,未登录时的访问 统一跳转至登陆注册页面
+ */
+ registry.addInterceptor(new LoginHandlerInterceptor())
+ .addPathPatterns("/mer*/**")
+ .excludePathPatterns(
+ "/merchant/login","/merchant/do-login","/merchant/sign-up","/merchant/sign-check",
+ "/css/**","/js/**","/image/**","/fonts/**","/mapping/**","/data/**",
+ "/lib/*/*/**"
+ );
+ }
+}
diff --git a/src/main/java/com/example/jieyue/common/config/RedisConfigurer.java b/src/main/java/com/example/jieyue/common/config/RedisConfigurer.java
new file mode 100644
index 0000000..8dd61f2
--- /dev/null
+++ b/src/main/java/com/example/jieyue/common/config/RedisConfigurer.java
@@ -0,0 +1,48 @@
+package com.example.jieyue.common.config;
+
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+/**
+ * redis配置类
+ * @author Bosen
+ * 2020/12/6 13:54
+ */
+@Configuration
+@EnableCaching
+public class RedisConfigurer extends CachingConfigurerSupport {
+ @Bean
+ public RedisTemplate redisTemplate(RedisConnectionFactory connectionFactory) {
+ RedisTemplate redisTemplate = new RedisTemplate<>();
+ redisTemplate.setConnectionFactory(connectionFactory);
+ // 使用Jackson2JsonRedisSerializer来序列化/反序列化redis的value值
+ Jackson2JsonRedisSerializer