@ -0,0 +1,200 @@
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : springtest
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80030
|
||||
Source Host : localhost:3306
|
||||
Source Schema : productdata
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80030
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 22/12/2023 17:12:39
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for ausertable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `ausertable`;
|
||||
CREATE TABLE `ausertable` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`aname` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||
`apwd` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of ausertable
|
||||
-- ----------------------------
|
||||
INSERT INTO `ausertable` VALUES (1, 'admin', 'admin');
|
||||
INSERT INTO `ausertable` VALUES (2, '杨松林', '123456');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for busertable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `busertable`;
|
||||
CREATE TABLE `busertable` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`bemail` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||
`bpwd` varchar(32) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of busertable
|
||||
-- ----------------------------
|
||||
INSERT INTO `busertable` VALUES (1, 'songlin@qq.com', '78f8a7ae700c91db09facb05a675432b');
|
||||
INSERT INTO `busertable` VALUES (2, 'admin@qq.com', '78f8a7ae700c91db09facb05a675432b');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for carttable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `carttable`;
|
||||
CREATE TABLE `carttable` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`busertable_id` int(0) NOT NULL,
|
||||
`goodstable_id` int(0) NOT NULL,
|
||||
`shoppingnum` int(0) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `bid`(`busertable_id`) USING BTREE,
|
||||
INDEX `gno`(`goodstable_id`) USING BTREE,
|
||||
CONSTRAINT `bid` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
||||
CONSTRAINT `gno` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of carttable
|
||||
-- ----------------------------
|
||||
INSERT INTO `carttable` VALUES (3, 2, 14, 2);
|
||||
INSERT INTO `carttable` VALUES (4, 2, 10, 1);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for focustable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `focustable`;
|
||||
CREATE TABLE `focustable` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`goodstable_id` int(0) NOT NULL,
|
||||
`busertable_id` int(0) NOT NULL,
|
||||
`focustime` datetime(0) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `gno1`(`goodstable_id`) USING BTREE,
|
||||
INDEX `bid1`(`busertable_id`) USING BTREE,
|
||||
CONSTRAINT `bid1` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
||||
CONSTRAINT `gno1` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of focustable
|
||||
-- ----------------------------
|
||||
INSERT INTO `focustable` VALUES (1, 14, 2, '2023-12-22 17:10:00');
|
||||
INSERT INTO `focustable` VALUES (2, 10, 2, '2023-12-22 17:10:04');
|
||||
INSERT INTO `focustable` VALUES (3, 12, 2, '2023-12-22 17:10:06');
|
||||
INSERT INTO `focustable` VALUES (4, 9, 2, '2023-12-22 17:10:08');
|
||||
INSERT INTO `focustable` VALUES (5, 8, 2, '2023-12-22 17:10:16');
|
||||
INSERT INTO `focustable` VALUES (6, 6, 2, '2023-12-22 17:10:19');
|
||||
INSERT INTO `focustable` VALUES (7, 4, 2, '2023-12-22 17:10:23');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for goodstable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `goodstable`;
|
||||
CREATE TABLE `goodstable` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`gname` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
||||
`goprice` double DEFAULT NULL,
|
||||
`grprice` double DEFAULT NULL,
|
||||
`gstore` int(0) DEFAULT NULL,
|
||||
`gpicture` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
|
||||
`isRecommend` tinyint(0) DEFAULT NULL,
|
||||
`isAdvertisement` tinyint(0) DEFAULT NULL,
|
||||
`goodstype_id` int(0) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `typeid`(`goodstype_id`) USING BTREE,
|
||||
CONSTRAINT `typeid` FOREIGN KEY (`goodstype_id`) REFERENCES `goodstype` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of goodstable
|
||||
-- ----------------------------
|
||||
INSERT INTO `goodstable` VALUES (1, '广告1', 1, 1, 1, '广告1.jpg', 0, 1, 1);
|
||||
INSERT INTO `goodstable` VALUES (2, '广告2', 1, 1, 1, '广告2.jpg', 0, 1, 1);
|
||||
INSERT INTO `goodstable` VALUES (3, '广告3', 1, 1, 1, '广告3.jpg', 0, 1, 1);
|
||||
INSERT INTO `goodstable` VALUES (4, '二手衣物', 90, 60, 30, '二手衣物.jpg', 1, 0, 3);
|
||||
INSERT INTO `goodstable` VALUES (5, '二手休闲鞋', 1000, 600, 20, '二手休闲鞋.jpg', 1, 0, 4);
|
||||
INSERT INTO `goodstable` VALUES (6, '二手文具', 60, 30, 100, '二手文具.jpg', 1, 0, 5);
|
||||
INSERT INTO `goodstable` VALUES (8, '吹风机', 100, 60, 30, '吹风机.jpg', 1, 0, 2);
|
||||
INSERT INTO `goodstable` VALUES (9, '二手帽子', 90, 60, 29, '二手帽子.jpg', 1, 0, 2);
|
||||
INSERT INTO `goodstable` VALUES (10, '二手书', 200, 100, 60, '二手书.jpg', 1, 0, 5);
|
||||
INSERT INTO `goodstable` VALUES (11, '二手洗衣机', 6000, 2000, 6, '二手洗衣机.jpg', 1, 0, 2);
|
||||
INSERT INTO `goodstable` VALUES (12, '二手鞋架', 50, 20, 30, '二手鞋架.jpg', 1, 0, 2);
|
||||
INSERT INTO `goodstable` VALUES (13, '二手衣架', 50, 10, 88, '二手衣架.jpg', 1, 0, 2);
|
||||
INSERT INTO `goodstable` VALUES (14, '二手书包', 200, 90, 60, '二手书包.jpg', 1, 0, 5);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for goodstype
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `goodstype`;
|
||||
CREATE TABLE `goodstype` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`typename` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of goodstype
|
||||
-- ----------------------------
|
||||
INSERT INTO `goodstype` VALUES (1, '广告');
|
||||
INSERT INTO `goodstype` VALUES (2, '生活用品');
|
||||
INSERT INTO `goodstype` VALUES (3, '衣服');
|
||||
INSERT INTO `goodstype` VALUES (4, '鞋子');
|
||||
INSERT INTO `goodstype` VALUES (5, '学习用品');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for orderbasetable
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `orderbasetable`;
|
||||
CREATE TABLE `orderbasetable` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`busertable_id` int(0) NOT NULL,
|
||||
`amount` double NOT NULL,
|
||||
`status` tinyint(0) NOT NULL,
|
||||
`orderdate` datetime(0) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `bid2`(`busertable_id`) USING BTREE,
|
||||
CONSTRAINT `bid2` FOREIGN KEY (`busertable_id`) REFERENCES `busertable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of orderbasetable
|
||||
-- ----------------------------
|
||||
INSERT INTO `orderbasetable` VALUES (1, 2, 80, 1, '2023-12-22 17:10:49');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for orderdetail
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `orderdetail`;
|
||||
CREATE TABLE `orderdetail` (
|
||||
`id` int(0) NOT NULL AUTO_INCREMENT,
|
||||
`orderbasetable_id` int(0) NOT NULL,
|
||||
`goodstable_id` int(0) NOT NULL,
|
||||
`shoppingnum` int(0) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `odsn`(`orderbasetable_id`) USING BTREE,
|
||||
INDEX `gno3`(`goodstable_id`) USING BTREE,
|
||||
CONSTRAINT `gno3` FOREIGN KEY (`goodstable_id`) REFERENCES `goodstable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
|
||||
CONSTRAINT `odsn` FOREIGN KEY (`orderbasetable_id`) REFERENCES `orderbasetable` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of orderdetail
|
||||
-- ----------------------------
|
||||
INSERT INTO `orderdetail` VALUES (1, 1, 13, 2);
|
||||
INSERT INTO `orderdetail` VALUES (2, 1, 9, 1);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
@ -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/
|
@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
@ -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
|
@ -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 "$@"
|
@ -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%
|
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.ch</groupId>
|
||||
<artifactId>eBusiness</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>eBusiness</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<java.version>8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.30</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,12 @@
|
||||
package com.ch.ebusiness;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@SpringBootApplication
|
||||
//配置扫描MyBatis接口的包路径
|
||||
@MapperScan(basePackages={"com.ch.ebusiness.repository"})
|
||||
public class EBusinessApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(EBusinessApplication.class, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.ch.ebusiness;
|
||||
import java.sql.SQLException;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
/**
|
||||
* 统一异常处理
|
||||
*/
|
||||
@ControllerAdvice
|
||||
public class GlobalExceptionHandleController {
|
||||
@ExceptionHandler(value=Exception.class)
|
||||
public String exceptionHandler(Exception e, Model model, HttpSession session) {
|
||||
String message = "";
|
||||
//数据库异常
|
||||
if (e instanceof SQLException) {
|
||||
message = "数据库异常";
|
||||
} else if (e instanceof NoLoginException) {
|
||||
message = "未登录异常";
|
||||
} else {//未知异常
|
||||
message = "未知异常";
|
||||
}
|
||||
model.addAttribute("flag",session.getAttribute("flag"));
|
||||
model.addAttribute("mymessage",message);
|
||||
return "myError";
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ch.ebusiness;
|
||||
public class NoLoginException extends Exception{
|
||||
private static final long serialVersionUID = 1L;
|
||||
public NoLoginException() {
|
||||
super();
|
||||
}
|
||||
public NoLoginException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.ch.ebusiness.controller.admin;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.ch.ebusiness.entity.AUser;
|
||||
import com.ch.ebusiness.service.admin.AdminService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/admin")
|
||||
public class AdminController {
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
@RequestMapping("/toLogin")
|
||||
public String toLogin(@ModelAttribute("aUser") AUser aUser) {
|
||||
return "admin/login";
|
||||
}
|
||||
@RequestMapping("/login")
|
||||
public String login(@ModelAttribute("aUser") AUser aUser, HttpSession session, Model model) {
|
||||
return adminService.login(aUser, session, model);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.ch.ebusiness.controller.admin;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.service.admin.GoodsService;
|
||||
@Controller
|
||||
@RequestMapping("/goods")
|
||||
public class GoodsController extends AdminBaseController{
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
@RequestMapping("/selectAllGoodsByPage")
|
||||
public String selectAllGoodsByPage(Model model, int currentPage) {
|
||||
return goodsService.selectAllGoodsByPage(model, currentPage);
|
||||
}
|
||||
@RequestMapping("/toAddGoods")
|
||||
public String toAddGoods(@ModelAttribute("goods") Goods goods, Model model) {
|
||||
goods.setIsAdvertisement(0);
|
||||
goods.setIsRecommend(1);
|
||||
return goodsService.toAddGoods(goods, model);
|
||||
}
|
||||
@RequestMapping("/addGoods")
|
||||
public String addGoods(@ModelAttribute("goods") Goods goods, HttpServletRequest request, String act) throws IllegalStateException, IOException {
|
||||
return goodsService.addGoods(goods, request, act);
|
||||
}
|
||||
@RequestMapping("/detail")
|
||||
public String detail(Model model, Integer id, String act) {
|
||||
return goodsService.detail(model, id, act);
|
||||
}
|
||||
@RequestMapping("/delete")
|
||||
@ResponseBody
|
||||
public String delete(Integer id) {
|
||||
return goodsService.delete(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.ch.ebusiness.controller.admin;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.ch.ebusiness.entity.GoodsType;
|
||||
import com.ch.ebusiness.service.admin.TypeService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/type")
|
||||
public class TypeController extends AdminBaseController{
|
||||
@Autowired
|
||||
private TypeService typeService;
|
||||
@RequestMapping("/selectAllTypeByPage")
|
||||
public String selectAllTypeByPage(Model model, int currentPage) {
|
||||
return typeService.selectAllTypeByPage(model, currentPage);
|
||||
}
|
||||
@RequestMapping("/deleteType")
|
||||
@ResponseBody//返回字符串数据而不是视图
|
||||
public String delete(int id) {
|
||||
return typeService.delete(id);
|
||||
}
|
||||
@RequestMapping("/toAddType")
|
||||
public String toAddType(@ModelAttribute("goodsType") GoodsType goodsType) {
|
||||
return "admin/addType";
|
||||
}
|
||||
@RequestMapping("/addType")
|
||||
public String addType(@ModelAttribute("goodsType") GoodsType goodsType) {
|
||||
return typeService.addType(goodsType);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.ch.ebusiness.controller.admin;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.ch.ebusiness.entity.AUser;
|
||||
import com.ch.ebusiness.service.admin.UserAndOrderAndOutService;
|
||||
@Controller
|
||||
public class UserAndOrderAndOutController extends AdminBaseController{
|
||||
@Autowired
|
||||
private UserAndOrderAndOutService userAndOrderAndOutService;
|
||||
@RequestMapping("/loginOut")
|
||||
public String loginOut(@ModelAttribute("aUser") AUser aUser, HttpSession session) {
|
||||
session.invalidate();
|
||||
return "admin/login";
|
||||
}
|
||||
@RequestMapping("/selectUser")
|
||||
public String selectUser(Model model, int currentPage) {
|
||||
return userAndOrderAndOutService.selectUser(model, currentPage);
|
||||
}
|
||||
@RequestMapping("/deleteUser")
|
||||
@ResponseBody
|
||||
public String deleteUser(Model model, int id) {
|
||||
return userAndOrderAndOutService.deleteUser(model, id);
|
||||
}
|
||||
@RequestMapping("/selectOrder")
|
||||
public String selectOrder(Model model, int currentPage) {
|
||||
return userAndOrderAndOutService.selectOrder(model, currentPage);
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.ch.ebusiness.controller.before;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.Order;
|
||||
import com.ch.ebusiness.service.before.CartService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/cart")
|
||||
public class CartController extends BeforeBaseController{
|
||||
@Autowired
|
||||
private CartService cartService;
|
||||
@RequestMapping("/putCart")
|
||||
public String putCart(Goods goods, Model model, HttpSession session) {
|
||||
return cartService.putCart(goods, model, session);
|
||||
}
|
||||
@RequestMapping("/focus")
|
||||
@ResponseBody
|
||||
public String focus(@RequestBody Goods goods, Model model, HttpSession session) {
|
||||
return cartService.focus(model, session, goods.getId());
|
||||
}
|
||||
@RequestMapping("/selectCart")
|
||||
public String selectCart(Model model, HttpSession session, String act) {
|
||||
return cartService.selectCart(model, session, act);
|
||||
}
|
||||
@RequestMapping("/deleteCart")
|
||||
public String deleteCart(HttpSession session, Integer gid) {
|
||||
return cartService.deleteCart(session, gid);
|
||||
}
|
||||
@RequestMapping("/clearCart")
|
||||
public String clearCart(HttpSession session) {
|
||||
return cartService.clearCart(session);
|
||||
}
|
||||
@RequestMapping("/submitOrder")
|
||||
public String submitOrder(Order order, Model model, HttpSession session) {
|
||||
return cartService.submitOrder(order, model, session);
|
||||
}
|
||||
@RequestMapping("/pay")
|
||||
@ResponseBody
|
||||
public String pay(@RequestBody Order order) {
|
||||
return cartService.pay(order);
|
||||
}
|
||||
@RequestMapping("/myFocus")
|
||||
public String myFocus(Model model, HttpSession session) {
|
||||
return cartService.myFocus(model, session);
|
||||
}
|
||||
@RequestMapping("/myOder")
|
||||
public String myOder(Model model, HttpSession session) {
|
||||
return cartService.myOder(model, session);
|
||||
}
|
||||
@RequestMapping("/orderDetail")
|
||||
public String orderDetail(Model model, Integer id) {
|
||||
return cartService.orderDetail(model, id);
|
||||
}
|
||||
@RequestMapping("/userInfo")
|
||||
public String userInfo() {
|
||||
return "user/userInfo";
|
||||
}
|
||||
@RequestMapping("/updateUpwd")
|
||||
public String updateUpwd(HttpSession session, String bpwd) {
|
||||
return cartService.updateUpwd(session, bpwd);
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ch.ebusiness.controller.before;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.ch.ebusiness.service.before.IndexService;
|
||||
|
||||
@Controller
|
||||
public class IndexController {
|
||||
@Autowired
|
||||
private IndexService indexService;
|
||||
@RequestMapping("/")
|
||||
public String index(Model model, Integer tid) {
|
||||
return indexService.index(model, tid);
|
||||
}
|
||||
@RequestMapping("/goodsDetail")
|
||||
public String goodsDetail(Model model, Integer id) {
|
||||
return indexService.goodsDetail(model, id);
|
||||
}
|
||||
@RequestMapping("/search")
|
||||
public String search(Model model, String mykey) {
|
||||
return indexService.search(model, mykey);
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.ch.ebusiness.controller.before;
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
import com.ch.ebusiness.service.before.UserService;
|
||||
@Controller
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
@RequestMapping("/toRegister")
|
||||
public String toRegister(@ModelAttribute("bUser") BUser bUser) {
|
||||
return "user/register";
|
||||
}
|
||||
@RequestMapping("/toLogin")
|
||||
public String toLogin(@ModelAttribute("bUser") BUser bUser) {
|
||||
//@ModelAttribute("bUser")与th:object="${bUser}"相对应
|
||||
return "user/login";
|
||||
}
|
||||
@RequestMapping("/login")
|
||||
public String login(@ModelAttribute("bUser") @Validated BUser bUser,
|
||||
BindingResult rs, HttpSession session, Model model) {
|
||||
if(rs.hasErrors()){//验证失败
|
||||
return "user/login";
|
||||
}
|
||||
return userService.login(bUser, session, model);
|
||||
}
|
||||
@RequestMapping("/isUse")
|
||||
@ResponseBody
|
||||
public String isUse(@RequestBody BUser bUser) {
|
||||
return userService.isUse(bUser);
|
||||
}
|
||||
@RequestMapping("/register")
|
||||
public String register(@ModelAttribute("bUser") @Validated BUser bUser,BindingResult rs) {
|
||||
if(rs.hasErrors()){//验证失败
|
||||
return "user/register";
|
||||
}
|
||||
return userService.register(bUser);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.ch.ebusiness.entity;
|
||||
public class AUser {
|
||||
private String aname;
|
||||
private String apwd;
|
||||
public String getAname() {
|
||||
return aname;
|
||||
}
|
||||
public void setAname(String aname) {
|
||||
this.aname = aname;
|
||||
}
|
||||
public String getApwd() {
|
||||
return apwd;
|
||||
}
|
||||
public void setApwd(String apwd) {
|
||||
this.apwd = apwd;
|
||||
}
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.ch.ebusiness.entity;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
public class Goods {
|
||||
private int id;
|
||||
private String gname;
|
||||
private double goprice;
|
||||
private double grprice;
|
||||
private int gstore;
|
||||
private String gpicture;
|
||||
private MultipartFile fileName;
|
||||
private int goodstype_id;
|
||||
private String typename;
|
||||
private int buyNumber;//加入购物车使用
|
||||
private int isAdvertisement;
|
||||
private int isRecommend;
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getGname() {
|
||||
return gname;
|
||||
}
|
||||
public void setGname(String gname) {
|
||||
this.gname = gname;
|
||||
}
|
||||
public double getGoprice() {
|
||||
return goprice;
|
||||
}
|
||||
public void setGoprice(double goprice) {
|
||||
this.goprice = goprice;
|
||||
}
|
||||
public double getGrprice() {
|
||||
return grprice;
|
||||
}
|
||||
public void setGrprice(double grprice) {
|
||||
this.grprice = grprice;
|
||||
}
|
||||
public int getGstore() {
|
||||
return gstore;
|
||||
}
|
||||
public void setGstore(int gstore) {
|
||||
this.gstore = gstore;
|
||||
}
|
||||
public String getGpicture() {
|
||||
return gpicture;
|
||||
}
|
||||
public void setGpicture(String gpicture) {
|
||||
this.gpicture = gpicture;
|
||||
}
|
||||
public int getGoodstype_id() {
|
||||
return goodstype_id;
|
||||
}
|
||||
public void setGoodstype_id(int goodstype_id) {
|
||||
this.goodstype_id = goodstype_id;
|
||||
}
|
||||
public String getTypename() {
|
||||
return typename;
|
||||
}
|
||||
public void setTypename(String typename) {
|
||||
this.typename = typename;
|
||||
}
|
||||
public int getBuyNumber() {
|
||||
return buyNumber;
|
||||
}
|
||||
public void setBuyNumber(int buyNumber) {
|
||||
this.buyNumber = buyNumber;
|
||||
}
|
||||
public int getIsAdvertisement() {
|
||||
return isAdvertisement;
|
||||
}
|
||||
public void setIsAdvertisement(int isAdvertisement) {
|
||||
this.isAdvertisement = isAdvertisement;
|
||||
}
|
||||
public int getIsRecommend() {
|
||||
return isRecommend;
|
||||
}
|
||||
public void setIsRecommend(int isRecommend) {
|
||||
this.isRecommend = isRecommend;
|
||||
}
|
||||
public MultipartFile getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
public void setFileName(MultipartFile fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.ch.ebusiness.entity;
|
||||
public class GoodsType {
|
||||
private int id;
|
||||
private String typename;
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getTypename() {
|
||||
return typename;
|
||||
}
|
||||
public void setTypename(String typename) {
|
||||
this.typename = typename;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.ch.ebusiness.entity;
|
||||
|
||||
public class Order {
|
||||
private Integer id;
|
||||
private Integer busertable_id;
|
||||
private Double amount;
|
||||
private Integer status;
|
||||
private String orderdate;
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public Integer getBusertable_id() {
|
||||
return busertable_id;
|
||||
}
|
||||
public void setBusertable_id(Integer busertable_id) {
|
||||
this.busertable_id = busertable_id;
|
||||
}
|
||||
public Double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
public void setAmount(Double amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
public String getOrderdate() {
|
||||
return orderdate;
|
||||
}
|
||||
public void setOrderdate(String orderdate) {
|
||||
this.orderdate = orderdate;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ch.ebusiness.repository.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.AUser;
|
||||
@Repository
|
||||
public interface AdminRepository {
|
||||
List<AUser> login(AUser aUser);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.ch.ebusiness.repository.admin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.GoodsType;
|
||||
@Repository
|
||||
public interface GoodsRepository {
|
||||
int addGoods(Goods goods);
|
||||
int updateGoods(Goods goods);
|
||||
Goods selectAGoods(Integer id);
|
||||
int selectAllGoods();
|
||||
List<GoodsType> selectAllGoodsType();
|
||||
List<Goods> selectAllGoodsByPage(@Param("startIndex") int startIndex, @Param("perPageSize") int perPageSize);
|
||||
int deleteAGoods(Integer id);
|
||||
List<Map<String, Object>> selectFocusGoods(Integer id);
|
||||
List<Map<String, Object>> selectCartGoods(Integer id);
|
||||
List<Map<String, Object>> selectOrderGoods(Integer id);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ch.ebusiness.repository.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.GoodsType;
|
||||
|
||||
@Repository
|
||||
public interface TypeRepository {
|
||||
int selectAll();
|
||||
List<GoodsType> selectAllTypeByPage(@Param("startIndex") int startIndex, @Param("perPageSize") int perPageSize);
|
||||
int deleteType(int id);
|
||||
List<Goods> selectGoods(int goodstype_id);
|
||||
int addType(GoodsType goodsType);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.ch.ebusiness.repository.admin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
|
||||
@Repository
|
||||
public interface UserAndOrderAndOutRepository {
|
||||
List<BUser> selectUserByPage(@Param("startIndex") int startIndex, @Param("perPageSize") int perPageSize);
|
||||
int selectAllUser();
|
||||
List<Map<String, Object>> selectCartUser(int id);
|
||||
List<Map<String, Object>> selectOrderUser(int id);
|
||||
int deleteUser(int id);
|
||||
int selectAllOrder();
|
||||
List<Map<String, Object>> selectOrderByPage(@Param("startIndex") int startIndex, @Param("perPageSize") int perPageSize);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.ch.ebusiness.repository.before;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.Order;
|
||||
|
||||
@Repository
|
||||
public interface CartRepository {
|
||||
public List<Map<String,Object>> isFocus(@Param("uid") Integer uid, @Param("gid") Integer gid);
|
||||
public int focus(@Param("uid") Integer uid, @Param("gid") Integer gid);
|
||||
public int putCart(@Param("uid") Integer uid,
|
||||
@Param("gid") Integer gid,
|
||||
@Param("bnum") Integer bnum);
|
||||
public List<Map<String,Object>> isPutCart(@Param("uid") Integer uid, @Param("gid") Integer gid);
|
||||
public int updateCart(@Param("uid") Integer uid,
|
||||
@Param("gid") Integer gid,
|
||||
@Param("bnum") Integer bnum);
|
||||
public List<Map<String,Object>> selectCart(Integer uid);
|
||||
public int deleteAgoods(@Param("uid") Integer uid, @Param("gid") Integer gid);
|
||||
public int clear(Integer uid);
|
||||
public int addOrder(Order order);
|
||||
public int addOrderDetail(@Param("ordersn") Integer ordersn, @Param("uid") Integer uid);
|
||||
public List<Map<String,Object>> selectGoodsShop(Integer uid);
|
||||
public int updateStore(Map<String,Object> map);
|
||||
public int pay(Integer ordersn);
|
||||
public List<Map<String,Object>> myFocus(Integer uid);
|
||||
public List<Map<String,Object>> myOrder(Integer uid);
|
||||
public List<Map<String,Object>> orderDetail(Integer id);
|
||||
public int updateUpwd(@Param("uid") Integer uid, @Param("bpwd") String bpwd);
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ch.ebusiness.repository.before;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.GoodsType;
|
||||
|
||||
@Repository
|
||||
public interface IndexRepository {
|
||||
public List<Goods> selectAdvertisementGoods();
|
||||
public List<GoodsType> selectGoodsType();
|
||||
public List<Goods> selectRecommendGoods(Integer tid);
|
||||
public List<Goods> selectLastedGoods(Integer tid);
|
||||
public Goods selectAGoods(Integer id);
|
||||
public List<Goods> search(String mykey);
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ch.ebusiness.repository.before;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
@Repository
|
||||
public interface UserRepository {
|
||||
public List<BUser> isUse(BUser bUser);
|
||||
public int register(BUser bUser);
|
||||
public List<BUser> login(BUser bUser);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.AUser;
|
||||
|
||||
public interface AdminService {
|
||||
public String login(AUser aUser, HttpSession session, Model model);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.AUser;
|
||||
import com.ch.ebusiness.repository.admin.AdminRepository;
|
||||
@Service
|
||||
public class AdminServiceImpl implements AdminService{
|
||||
@Autowired
|
||||
private AdminRepository adminRepository;
|
||||
@Override
|
||||
public String login(AUser aUser, HttpSession session, Model model) {
|
||||
List<AUser> list = adminRepository.login(aUser);
|
||||
if(list.size() > 0) {//登录成功
|
||||
session.setAttribute("auser", aUser);
|
||||
return "forward:/goods/selectAllGoodsByPage?currentPage=1";
|
||||
}else {//登录失败
|
||||
model.addAttribute("errorMessage", "用户名或密码错误!");
|
||||
return "admin/login";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
|
||||
public interface GoodsService {
|
||||
public String selectAllGoodsByPage(Model model, int currentPage);
|
||||
public String addGoods(Goods goods, HttpServletRequest request, String act) throws IllegalStateException, IOException ;
|
||||
public String toAddGoods(Goods goods, Model model);
|
||||
public String detail(Model model, Integer id, String act);
|
||||
public String delete(Integer id);
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.GoodsType;
|
||||
|
||||
public interface TypeService {
|
||||
public String selectAllTypeByPage(Model model, int currentPage);
|
||||
public String delete(int id);
|
||||
public String addType(GoodsType goodsType);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.GoodsType;
|
||||
import com.ch.ebusiness.repository.admin.TypeRepository;
|
||||
@Service
|
||||
public class TypeServiceImpl implements TypeService{
|
||||
@Autowired
|
||||
private TypeRepository typeRepository;
|
||||
@Override
|
||||
public String selectAllTypeByPage(Model model, int currentPage) {
|
||||
//共多少个类型
|
||||
int totalCount = typeRepository.selectAll();
|
||||
//计算共多少页
|
||||
int pageSize = 2;
|
||||
int totalPage = (int)Math.ceil(totalCount*1.0/pageSize);
|
||||
List<GoodsType> typeByPage = typeRepository.selectAllTypeByPage((currentPage-1)*pageSize, pageSize);
|
||||
model.addAttribute("allTypes", typeByPage);
|
||||
model.addAttribute("totalPage", totalPage);
|
||||
model.addAttribute("currentPage", currentPage);
|
||||
return "admin/selectGoodsType";
|
||||
}
|
||||
@Override
|
||||
public String delete(int id) {
|
||||
List<Goods> list = typeRepository.selectGoods(id);
|
||||
if(list.size() > 0) {
|
||||
//该类型下有商品不允许删除
|
||||
return "no";
|
||||
}else {
|
||||
typeRepository.deleteType(id);
|
||||
//删除后回到查询页面
|
||||
return "/type/selectAllTypeByPage?currentPage=1";
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String addType(GoodsType goodsType) {
|
||||
typeRepository.addType(goodsType);
|
||||
return "redirect:/type/selectAllTypeByPage?currentPage=1";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
public interface UserAndOrderAndOutService {
|
||||
public String selectUser(Model model, int currentPage);
|
||||
public String deleteUser(Model model, int id);
|
||||
public String selectOrder(Model model, int currentPage);
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.ch.ebusiness.service.admin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
import com.ch.ebusiness.repository.admin.UserAndOrderAndOutRepository;
|
||||
@Service
|
||||
public class UserAndOrderAndOutServiceImpl implements UserAndOrderAndOutService{
|
||||
@Autowired
|
||||
private UserAndOrderAndOutRepository userAndOrderAndOutRepository;
|
||||
|
||||
@Override
|
||||
public String selectUser(Model model, int currentPage) {
|
||||
//共多少个用户
|
||||
int totalCount = userAndOrderAndOutRepository.selectAllUser();
|
||||
//计算共多少页
|
||||
int pageSize = 5;
|
||||
int totalPage = (int)Math.ceil(totalCount*1.0/pageSize);
|
||||
List<BUser> typeByPage = userAndOrderAndOutRepository.selectUserByPage((currentPage-1)*pageSize, pageSize);
|
||||
model.addAttribute("allUsers", typeByPage);
|
||||
model.addAttribute("totalPage", totalPage);
|
||||
model.addAttribute("currentPage", currentPage);
|
||||
return "admin/allUser";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String deleteUser(Model model, int id) {
|
||||
if(userAndOrderAndOutRepository.selectCartUser(id).size() > 0
|
||||
||userAndOrderAndOutRepository.selectOrderUser(id).size() > 0) {
|
||||
return "no";
|
||||
}else {
|
||||
userAndOrderAndOutRepository.deleteUser(id);
|
||||
return "/selectUser?currentPage=1";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectOrder(Model model, int currentPage) {
|
||||
//共多少个订单
|
||||
int totalCount = userAndOrderAndOutRepository.selectAllOrder();
|
||||
//计算共多少页
|
||||
int pageSize = 5;
|
||||
int totalPage = (int)Math.ceil(totalCount*1.0/pageSize);
|
||||
List<Map<String, Object>> orderByPage = userAndOrderAndOutRepository.selectOrderByPage((currentPage-1)*pageSize, pageSize);
|
||||
model.addAttribute("allOrders", orderByPage);
|
||||
model.addAttribute("totalPage", totalPage);
|
||||
model.addAttribute("currentPage", currentPage);
|
||||
return "admin/allOrder";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.ch.ebusiness.service.before;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.Order;
|
||||
|
||||
public interface CartService {
|
||||
public String putCart(Goods goods, Model model, HttpSession session);
|
||||
public String focus(Model model, HttpSession session, Integer gid);
|
||||
public String selectCart(Model model, HttpSession session, String act);
|
||||
public String deleteCart(HttpSession session, Integer gid);
|
||||
public String clearCart(HttpSession session);
|
||||
public String submitOrder(Order order, Model model, HttpSession session);
|
||||
public String pay(Order order);
|
||||
public String myFocus(Model model, HttpSession session);
|
||||
public String myOder(Model model, HttpSession session);
|
||||
public String orderDetail(Model model, Integer id);
|
||||
public String updateUpwd(HttpSession session, String bpwd);
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
package com.ch.ebusiness.service.before;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.Goods;
|
||||
import com.ch.ebusiness.entity.Order;
|
||||
import com.ch.ebusiness.repository.before.CartRepository;
|
||||
import com.ch.ebusiness.repository.before.IndexRepository;
|
||||
import com.ch.ebusiness.util.MD5Util;
|
||||
import com.ch.ebusiness.util.MyUtil;
|
||||
|
||||
@Service
|
||||
public class CartServiceImpl implements CartService{
|
||||
@Autowired
|
||||
private CartRepository cartRepository;
|
||||
@Autowired
|
||||
private IndexRepository indexRepository;
|
||||
@Override
|
||||
public String putCart(Goods goods, Model model, HttpSession session) {
|
||||
Integer uid = MyUtil.getUser(session).getId();
|
||||
//如果商品已在购物车,只更新购买数量
|
||||
if(cartRepository.isPutCart(uid, goods.getId()).size() > 0) {
|
||||
cartRepository.updateCart(uid, goods.getId(), goods.getBuyNumber());
|
||||
}else {//新增到购物车
|
||||
cartRepository.putCart(uid, goods.getId(), goods.getBuyNumber());
|
||||
}
|
||||
//跳转到查询购物车
|
||||
return "forward:/cart/selectCart";
|
||||
}
|
||||
@Override
|
||||
public String selectCart(Model model, HttpSession session, String act) {
|
||||
List<Map<String, Object>> list = cartRepository.selectCart(MyUtil.getUser(session).getId());
|
||||
double sum = 0;
|
||||
for (Map<String, Object> map : list) {
|
||||
sum = sum + (Double)map.get("smallsum");
|
||||
}
|
||||
model.addAttribute("total", sum);
|
||||
model.addAttribute("cartlist", list);
|
||||
//广告区商品
|
||||
model.addAttribute("advertisementGoods", indexRepository.selectAdvertisementGoods());
|
||||
//导航栏商品类型
|
||||
model.addAttribute("goodsType", indexRepository.selectGoodsType());
|
||||
if("toCount".equals(act)) {//去结算页面
|
||||
return "user/count";
|
||||
}
|
||||
return "user/cart";
|
||||
}
|
||||
@Override
|
||||
public String focus(Model model, HttpSession session, Integer gid) {
|
||||
Integer uid = MyUtil.getUser(session).getId();
|
||||
List<Map<String,Object>> list = cartRepository.isFocus(uid, gid);
|
||||
//判断是否已收藏
|
||||
if(list.size() > 0) {
|
||||
return "no";
|
||||
}else {
|
||||
cartRepository.focus(uid, gid);
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public String deleteCart(HttpSession session, Integer gid) {
|
||||
Integer uid = MyUtil.getUser(session).getId();
|
||||
cartRepository.deleteAgoods(uid, gid);
|
||||
return "forward:/cart/selectCart";
|
||||
}
|
||||
@Override
|
||||
public String clearCart(HttpSession session) {
|
||||
cartRepository.clear(MyUtil.getUser(session).getId());
|
||||
return "forward:/cart/selectCart";
|
||||
}
|
||||
@Override
|
||||
@Transactional
|
||||
public String submitOrder(Order order, Model model, HttpSession session) {
|
||||
order.setBusertable_id(MyUtil.getUser(session).getId());
|
||||
//生成订单
|
||||
cartRepository.addOrder(order);
|
||||
//生成订单详情
|
||||
cartRepository.addOrderDetail(order.getId(), MyUtil.getUser(session).getId());
|
||||
//减少商品库存
|
||||
List<Map<String,Object>> listGoods = cartRepository.selectGoodsShop(MyUtil.getUser(session).getId());
|
||||
for (Map<String, Object> map : listGoods) {
|
||||
cartRepository.updateStore(map);
|
||||
}
|
||||
//清空购物车
|
||||
cartRepository.clear(MyUtil.getUser(session).getId());
|
||||
model.addAttribute("order", order);
|
||||
return "user/pay";
|
||||
}
|
||||
@Override
|
||||
public String pay(Order order) {
|
||||
cartRepository.pay(order.getId());
|
||||
return "ok";
|
||||
}
|
||||
@Override
|
||||
public String myFocus(Model model, HttpSession session) {
|
||||
//广告区商品
|
||||
model.addAttribute("advertisementGoods", indexRepository.selectAdvertisementGoods());
|
||||
//导航栏商品类型
|
||||
model.addAttribute("goodsType", indexRepository.selectGoodsType());
|
||||
model.addAttribute("myFocus", cartRepository.myFocus(MyUtil.getUser(session).getId()));
|
||||
return "user/myFocus";
|
||||
}
|
||||
@Override
|
||||
public String myOder(Model model, HttpSession session) {
|
||||
//广告区商品
|
||||
model.addAttribute("advertisementGoods", indexRepository.selectAdvertisementGoods());
|
||||
//导航栏商品类型
|
||||
model.addAttribute("goodsType", indexRepository.selectGoodsType());
|
||||
model.addAttribute("myOrder", cartRepository.myOrder(MyUtil.getUser(session).getId()));
|
||||
return "user/myOrder";
|
||||
}
|
||||
@Override
|
||||
public String orderDetail(Model model, Integer id) {
|
||||
model.addAttribute("orderDetail", cartRepository.orderDetail(id));
|
||||
return "user/orderDetail";
|
||||
}
|
||||
@Override
|
||||
public String updateUpwd(HttpSession session, String bpwd) {
|
||||
Integer uid = MyUtil.getUser(session).getId();
|
||||
cartRepository.updateUpwd(uid, MD5Util.MD5(bpwd));
|
||||
return "forward:/user/toLogin";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ch.ebusiness.service.before;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
public interface IndexService {
|
||||
public String index(Model model, Integer tid);
|
||||
public String goodsDetail(Model model, Integer id);
|
||||
public String search(Model model, String mykey);
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.ch.ebusiness.service.before;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.repository.before.IndexRepository;
|
||||
@Service
|
||||
public class IndexServiceImpl implements IndexService {
|
||||
@Autowired
|
||||
private IndexRepository indexRepository;
|
||||
@Override
|
||||
public String index(Model model, Integer tid) {
|
||||
if(tid == null)
|
||||
tid = 0;
|
||||
//广告区商品
|
||||
model.addAttribute("advertisementGoods", indexRepository.selectAdvertisementGoods());
|
||||
//导航栏商品类型
|
||||
model.addAttribute("goodsType", indexRepository.selectGoodsType());
|
||||
//推荐商品
|
||||
model.addAttribute("recommendGoods", indexRepository.selectRecommendGoods(tid));
|
||||
//最新商品
|
||||
model.addAttribute("lastedGoods", indexRepository.selectLastedGoods(tid));
|
||||
return "user/index";
|
||||
}
|
||||
@Override
|
||||
public String goodsDetail(Model model, Integer id) {
|
||||
//广告区商品
|
||||
model.addAttribute("advertisementGoods", indexRepository.selectAdvertisementGoods());
|
||||
//导航栏商品类型
|
||||
model.addAttribute("goodsType", indexRepository.selectGoodsType());
|
||||
//商品详情
|
||||
model.addAttribute("goods", indexRepository.selectAGoods(id));
|
||||
return "user/goodsDetail";
|
||||
}
|
||||
@Override
|
||||
public String search(Model model, String mykey) {
|
||||
//广告区商品
|
||||
model.addAttribute("advertisementGoods", indexRepository.selectAdvertisementGoods());
|
||||
//导航栏商品类型
|
||||
model.addAttribute("goodsType", indexRepository.selectGoodsType());
|
||||
//商品搜索
|
||||
model.addAttribute("searchgoods", indexRepository.search(mykey));
|
||||
return "user/searchResult";
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ch.ebusiness.service.before;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.ui.Model;
|
||||
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
|
||||
public interface UserService {
|
||||
public String isUse(BUser bUser);
|
||||
public String register(BUser bUser);
|
||||
public String login(BUser bUser, HttpSession session, Model model);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.ch.ebusiness.service.before;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.ui.Model;
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
import com.ch.ebusiness.repository.before.UserRepository;
|
||||
import com.ch.ebusiness.util.MD5Util;
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
@Override
|
||||
public String isUse(BUser bUser) {
|
||||
if(userRepository.isUse(bUser).size() > 0) {
|
||||
return "no";
|
||||
}
|
||||
return "ok";
|
||||
}
|
||||
@Override
|
||||
public String register(BUser bUser) {
|
||||
//对密码MD5加密
|
||||
bUser.setBpwd(MD5Util.MD5(bUser.getBpwd()));
|
||||
if(userRepository.register(bUser) > 0) {
|
||||
return "user/login";
|
||||
}
|
||||
return "user/register";
|
||||
}
|
||||
@Override
|
||||
public String login(BUser bUser, HttpSession session, Model model) {
|
||||
//对密码MD5加密
|
||||
bUser.setBpwd(MD5Util.MD5(bUser.getBpwd()));
|
||||
String rand = (String)session.getAttribute("rand");
|
||||
if(!rand.equalsIgnoreCase(bUser.getCode())) {
|
||||
model.addAttribute("errorMessage", "验证码错误!");
|
||||
return "user/login";
|
||||
}
|
||||
List<BUser> list = userRepository.login(bUser);
|
||||
if(list.size() > 0) {
|
||||
session.setAttribute("bUser", list.get(0));
|
||||
return "redirect:/";//到首页
|
||||
}
|
||||
model.addAttribute("errorMessage", "用户名或密码错误!");
|
||||
return "user/login";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.ch.ebusiness.util;
|
||||
import java.security.MessageDigest;
|
||||
public class MD5Util {
|
||||
/***
|
||||
* MD5加码生成32位md5码
|
||||
*/
|
||||
public static String string2MD5(String inStr) {
|
||||
MessageDigest md5 = null;
|
||||
try {
|
||||
md5 = MessageDigest.getInstance("MD5");
|
||||
} catch (Exception e) {
|
||||
System.out.println(e.toString());
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
char[] charArray = inStr.toCharArray();
|
||||
byte[] byteArray = new byte[charArray.length];
|
||||
for (int i = 0; i < charArray.length; i++)
|
||||
byteArray[i] = (byte) charArray[i];
|
||||
byte[] md5Bytes = md5.digest(byteArray);
|
||||
StringBuffer hexValue = new StringBuffer();
|
||||
for (int i = 0; i < md5Bytes.length; i++) {
|
||||
int val = ((int) md5Bytes[i]) & 0xff;
|
||||
if (val < 16)
|
||||
hexValue.append("0");
|
||||
hexValue.append(Integer.toHexString(val));
|
||||
}
|
||||
return hexValue.toString();
|
||||
}
|
||||
/***
|
||||
* 自己规则加密
|
||||
* @param inStr
|
||||
* @return
|
||||
*/
|
||||
public static String MD5(String inStr){
|
||||
String xy = "abc";
|
||||
String finalStr="";
|
||||
if(inStr!=null){
|
||||
String fStr = inStr.substring(0, 1);
|
||||
String lStr = inStr.substring(1, inStr.length());
|
||||
finalStr = string2MD5( fStr+xy+lStr);
|
||||
}else{
|
||||
finalStr = string2MD5(xy);
|
||||
}
|
||||
return finalStr;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ch.ebusiness.util;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import com.ch.ebusiness.entity.BUser;
|
||||
public class MyUtil {
|
||||
/**
|
||||
* 将实际的文件名重命名
|
||||
*/
|
||||
public static String getNewFileName(String oldFileName) {
|
||||
int lastIndex = oldFileName.lastIndexOf(".");
|
||||
String fileType = oldFileName.substring(lastIndex);
|
||||
Date now = new Date();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("YYYYMMDDHHmmssSSS");
|
||||
String time = sdf.format(now);
|
||||
String newFileName = time + fileType;
|
||||
return newFileName;
|
||||
}
|
||||
/**
|
||||
* 获得用户信息
|
||||
*/
|
||||
public static BUser getUser(HttpSession session) {
|
||||
BUser bUser = (BUser)session.getAttribute("bUser");
|
||||
return bUser;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ch.ebusiness.repository.admin.AdminRepository">
|
||||
<select id="login" parameterType="AUser" resultType="AUser">
|
||||
select * from ausertable where aname = #{aname} and apwd = #{apwd}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ch.ebusiness.repository.admin.GoodsRepository">
|
||||
<select id="selectAllGoods" resultType="integer">
|
||||
select count(*) from goodstable
|
||||
</select>
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectAllGoodsByPage" resultType="Goods">
|
||||
select gt.*,gy.typename
|
||||
from goodstable gt,goodstype gy
|
||||
where gt.goodstype_id = gy.id
|
||||
order by id desc limit #{startIndex}, #{perPageSize}
|
||||
</select>
|
||||
<!-- 添加商品 -->
|
||||
<insert id="addGoods" parameterType="Goods">
|
||||
insert into goodstable (id,gname,goprice,grprice,gstore,gpicture,isRecommend,isAdvertisement,goodstype_id)
|
||||
values (null, #{gname}, #{goprice}, #{grprice}, #{gstore}, #{gpicture},#{isRecommend}, #{isAdvertisement}, #{goodstype_id})
|
||||
</insert>
|
||||
<!-- 查询商品类型 -->
|
||||
<select id="selectAllGoodsType" resultType="GoodsType">
|
||||
select * from goodstype
|
||||
</select>
|
||||
<!-- 查询商品详情 -->
|
||||
<select id="selectAGoods" resultType="Goods">
|
||||
select
|
||||
gt.*, gy.typename
|
||||
from
|
||||
goodstable gt,goodstype gy
|
||||
where
|
||||
gt.goodstype_id = gy.id
|
||||
and gt.id = #{id}
|
||||
</select>
|
||||
<!-- 删除单个商品 -->
|
||||
<delete id="deleteAGoods" parameterType="Integer">
|
||||
delete from goodstable where id=#{id}
|
||||
</delete>
|
||||
<!-- 修改一个商品 -->
|
||||
<update id="updateGoods" parameterType="Goods">
|
||||
update goodstable set
|
||||
gname = #{gname},
|
||||
goprice = #{goprice},
|
||||
grprice = #{grprice},
|
||||
gstore = #{gstore},
|
||||
gpicture = #{gpicture},
|
||||
isRecommend = #{isRecommend},
|
||||
isAdvertisement = #{isAdvertisement},
|
||||
goodstype_id = #{goodstype_id}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="selectFocusGoods" parameterType="integer" resultType="map">
|
||||
select * from focustable where goodstable_id = #{id}
|
||||
</select>
|
||||
<select id="selectCartGoods" parameterType="integer" resultType="map">
|
||||
select * from carttable where goodstable_id = #{id}
|
||||
</select>
|
||||
<select id="selectOrderGoods" parameterType="integer" resultType="map">
|
||||
select * from orderdetail where goodstable_id = #{id}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ch.ebusiness.repository.before.IndexRepository">
|
||||
<!-- 查询广告商品 -->
|
||||
<select id="selectAdvertisementGoods" resultType="Goods">
|
||||
select
|
||||
gt.*, gy.typename
|
||||
from
|
||||
goodstable gt,goodstype gy
|
||||
where
|
||||
gt.goodstype_id = gy.id
|
||||
and gt.isAdvertisement = 1
|
||||
order by gt.id desc limit 5
|
||||
</select>
|
||||
<!-- 查询商品详情 -->
|
||||
<select id="selectAGoods" resultType="Goods">
|
||||
select
|
||||
gt.*, gy.typename
|
||||
from
|
||||
goodstable gt,goodstype gy
|
||||
where
|
||||
gt.goodstype_id = gy.id
|
||||
and gt.id = #{id}
|
||||
</select>
|
||||
<!-- 查询商品类型 -->
|
||||
<select id="selectGoodsType" resultType="GoodsType">
|
||||
select * from goodstype
|
||||
</select>
|
||||
<!-- 查询推荐商品 -->
|
||||
<select id="selectRecommendGoods" resultType="Goods" parameterType="integer">
|
||||
select
|
||||
gt.*, gy.typename
|
||||
from
|
||||
goodstable gt,goodstype gy
|
||||
where
|
||||
gt.goodstype_id = gy.id
|
||||
and gt.isRecommend = 1
|
||||
<if test="tid != 0">
|
||||
and gy.id = #{tid}
|
||||
</if>
|
||||
order by gt.id desc limit 6
|
||||
</select>
|
||||
<!-- 查询最新商品 -->
|
||||
<select id="selectLastedGoods" resultType="Goods" parameterType="integer">
|
||||
select
|
||||
gt.*, gy.typename
|
||||
from
|
||||
goodstable gt,goodstype gy
|
||||
where
|
||||
gt.goodstype_id = gy.id
|
||||
<if test="tid != 0">
|
||||
and gy.id = #{tid}
|
||||
</if>
|
||||
order by gt.id desc limit 6
|
||||
</select>
|
||||
<!-- 首页搜索 -->
|
||||
<select id="search" resultType="Goods" parameterType="String">
|
||||
select gt.*, gy.typename from GOODSTABLE gt,GOODSTYPE gy where gt.goodstype_id = gy.id
|
||||
and gt.gname like concat('%',#{mykey},'%')
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ch.ebusiness.repository.admin.TypeRepository">
|
||||
<select id="selectAll" resultType="integer">
|
||||
select count(*) from goodstype
|
||||
</select>
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectAllTypeByPage" resultType="GoodsType">
|
||||
select * from goodstype limit #{startIndex}, #{perPageSize}
|
||||
</select>
|
||||
<!-- 删除类型 -->
|
||||
<delete id="deleteType" parameterType="integer">
|
||||
delete from goodstype where id=#{id}
|
||||
</delete>
|
||||
<!-- 查询该类型下是否有商品 -->
|
||||
<select id="selectGoods" parameterType="integer" resultType="Goods">
|
||||
select * from goodstable where goodstype_id = #{goodstype_id}
|
||||
</select>
|
||||
<!-- 添加类型 -->
|
||||
<insert id="addType" parameterType="GoodsType">
|
||||
insert into goodstype (id, typename) values(null, #{typename})
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ch.ebusiness.repository.admin.UserAndOrderAndOutRepository">
|
||||
<select id="selectAllUser" resultType="integer">
|
||||
select count(*) from busertable
|
||||
</select>
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectUserByPage" resultType="BUser">
|
||||
select * from busertable limit #{startIndex}, #{perPageSize}
|
||||
</select>
|
||||
<select id="selectCartUser" resultType="map" parameterType="int" >
|
||||
select * from carttable where busertable_id = #{id}
|
||||
</select>
|
||||
<select id="selectOrderUser" resultType="map" parameterType="int">
|
||||
select * from orderbasetable where busertable_id = #{id}
|
||||
</select>
|
||||
<delete id="deleteUser" parameterType="int">
|
||||
delete from busertable where id = #{id}
|
||||
</delete>
|
||||
<select id="selectAllOrder" resultType="integer">
|
||||
select count(*) from orderbasetable
|
||||
</select>
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectOrderByPage" resultType="map">
|
||||
select obt.*, bt.bemail from orderbasetable obt, busertable bt where obt.busertable_id = bt.id limit #{startIndex}, #{perPageSize}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ch.ebusiness.repository.before.UserRepository">
|
||||
<select id="isUse" parameterType="BUser" resultType="BUser">
|
||||
select * from busertable where bemail = #{bemail}
|
||||
</select>
|
||||
<insert id="register" parameterType="BUser">
|
||||
insert into busertable (id, bemail, bpwd) values(null, #{bemail}, #{bpwd})
|
||||
</insert>
|
||||
<select id="login" parameterType="BUser" resultType="BUser">
|
||||
select * from busertable where bemail = #{bemail} and bpwd = #{bpwd}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,587 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-primary.disabled,
|
||||
.btn-success.disabled,
|
||||
.btn-info.disabled,
|
||||
.btn-warning.disabled,
|
||||
.btn-danger.disabled,
|
||||
.btn-default[disabled],
|
||||
.btn-primary[disabled],
|
||||
.btn-success[disabled],
|
||||
.btn-info[disabled],
|
||||
.btn-warning[disabled],
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
fieldset[disabled] .btn-primary,
|
||||
fieldset[disabled] .btn-success,
|
||||
fieldset[disabled] .btn-info,
|
||||
fieldset[disabled] .btn-warning,
|
||||
fieldset[disabled] .btn-danger {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-default .badge,
|
||||
.btn-primary .badge,
|
||||
.btn-success .badge,
|
||||
.btn-info .badge,
|
||||
.btn-warning .badge,
|
||||
.btn-danger .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dbdbdb;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #e0e0e0;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
.btn-default.disabled,
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled.focus,
|
||||
.btn-default[disabled].focus,
|
||||
fieldset[disabled] .btn-default.focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-primary {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background-color: #265a88;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #265a88;
|
||||
border-color: #245580;
|
||||
}
|
||||
.btn-primary.disabled,
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled.focus,
|
||||
.btn-primary[disabled].focus,
|
||||
fieldset[disabled] .btn-primary.focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #265a88;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success:hover,
|
||||
.btn-success:focus {
|
||||
background-color: #419641;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #419641;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
.btn-success.disabled,
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled.focus,
|
||||
.btn-success[disabled].focus,
|
||||
fieldset[disabled] .btn-success.focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #419641;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info:hover,
|
||||
.btn-info:focus {
|
||||
background-color: #2aabd2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
.btn-info.disabled,
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled.focus,
|
||||
.btn-info[disabled].focus,
|
||||
fieldset[disabled] .btn-info.focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus {
|
||||
background-color: #eb9316;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
.btn-warning.disabled,
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled.focus,
|
||||
.btn-warning[disabled].focus,
|
||||
fieldset[disabled] .btn-warning.focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
background-image: none;
|
||||
}
|
||||
.btn-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus {
|
||||
background-color: #c12e2a;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
.btn-danger.disabled,
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled.focus,
|
||||
.btn-danger[disabled].focus,
|
||||
fieldset[disabled] .btn-danger.focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
background-image: none;
|
||||
}
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: #e8e8e8;
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #2e6da4;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.navbar-default {
|
||||
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
|
||||
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-default .navbar-nav > .open > a,
|
||||
.navbar-default .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
|
||||
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
|
||||
}
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.navbar-inverse .navbar-nav > .open > a,
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
|
||||
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
|
||||
}
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||
color: #fff;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
}
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.alert-success {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
}
|
||||
.alert-info {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
}
|
||||
.alert-warning {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
}
|
||||
.alert-danger {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
}
|
||||
.progress {
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.progress-bar-striped {
|
||||
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
}
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
|
||||
}
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #286090;
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2b669a;
|
||||
}
|
||||
.list-group-item.active .badge,
|
||||
.list-group-item.active:hover .badge,
|
||||
.list-group-item.active:focus .badge {
|
||||
text-shadow: none;
|
||||
}
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
||||
}
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
|
||||
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
.well {
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-theme.css.map */
|
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 121 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 737 KiB |
After Width: | Height: | Size: 633 KiB |
After Width: | Height: | Size: 795 KiB |
After Width: | Height: | Size: 280 KiB |
After Width: | Height: | Size: 795 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 111 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 153 KiB |
After Width: | Height: | Size: 172 KiB |
@ -0,0 +1,7 @@
|
||||
function checkNull(myvalue, mymessage){
|
||||
if(myvalue.trim() == ""){
|
||||
alert(mymessage);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
@ -0,0 +1,326 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.3';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
||||
/** Used to skip problem elements */
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
/** Not all elements can be cloned in IE **/
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
/** Detect whether the browser supports default html5 styles */
|
||||
var supportsHtml5Styles;
|
||||
|
||||
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
||||
var expando = '_html5shiv';
|
||||
|
||||
/** The id for the the documents expando */
|
||||
var expanID = 0;
|
||||
|
||||
/** Cached data for each document */
|
||||
var expandoData = {};
|
||||
|
||||
/** Detect whether the browser supports unknown elements */
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
// assign a false positive if unable to shiv
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
// assign a false positive if detection fails => unable to shiv
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a style sheet with the given CSS text and adds it to the document.
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @param {String} cssText The CSS text.
|
||||
* @returns {StyleSheet} The style element.
|
||||
*/
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of `html5.elements` as an array.
|
||||
* @private
|
||||
* @returns {Array} An array of shived element node names.
|
||||
*/
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends the built-in list of html5 elements
|
||||
* @memberOf html5
|
||||
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
|
||||
* @param {Document} ownerDocument The context document.
|
||||
*/
|
||||
function addElements(newElements, ownerDocument) {
|
||||
var elements = html5.elements;
|
||||
if(typeof elements != 'string'){
|
||||
elements = elements.join(' ');
|
||||
}
|
||||
if(typeof newElements != 'string'){
|
||||
newElements = newElements.join(' ');
|
||||
}
|
||||
html5.elements = elements +' '+ newElements;
|
||||
shivDocument(ownerDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @returns {Object} An object of data.
|
||||
*/
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived element for the given nodeName and document
|
||||
* @memberOf html5
|
||||
* @param {String} nodeName name of the element
|
||||
* @param {Document|DocumentFragment} ownerDocument The context document.
|
||||
* @returns {Object} The shived element.
|
||||
*/
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
// Avoid adding some elements to fragments in IE < 9 because
|
||||
// * Attributes like `name` or `type` cannot be set/changed once an element
|
||||
// is inserted into a document/fragment
|
||||
// * Link elements with `src` attributes that are inaccessible, as with
|
||||
// a 403 response, will cause the tab/window to crash
|
||||
// * Script elements appended to fragments will execute when their `src`
|
||||
// or `text` property is set
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived DocumentFragment for the given document
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived DocumentFragment.
|
||||
*/
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
||||
* @private
|
||||
* @param {Document|DocumentFragment} ownerDocument The document.
|
||||
* @param {Object} data of the document.
|
||||
*/
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
//abort shiv
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Shivs the given document.
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The document to shiv.
|
||||
* @returns {Document} The shived document.
|
||||
*/
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
// corrects block display not defined in IE6/7/8/9
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
// adds styling not present in IE6/7/8/9
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
// hides non-rendered elements
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `html5` object is exposed so that more elements can be shived and
|
||||
* existing shiving can be detected on iframes.
|
||||
* @type Object
|
||||
* @example
|
||||
*
|
||||
* // options can be changed before the script is included
|
||||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
|
||||
*/
|
||||
var html5 = {
|
||||
|
||||
/**
|
||||
* An array or space separated string of node names of the elements to shiv.
|
||||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
*/
|
||||
'version': version,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the HTML5 style sheet should be inserted.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
/**
|
||||
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
||||
* @memberOf html5
|
||||
* @type boolean
|
||||
*/
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
||||
* methods should be overwritten.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
/**
|
||||
* A string to describe the type of `html5` object ("default" or "default print").
|
||||
* @memberOf html5
|
||||
* @type String
|
||||
*/
|
||||
'type': 'default',
|
||||
|
||||
// shivs the document according to the specified `html5` object options
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
//creates a shived element
|
||||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment,
|
||||
|
||||
//extends list of elements
|
||||
addElements: addElements
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose html5
|
||||
window.html5 = html5;
|
||||
|
||||
// shiv the document
|
||||
shivDocument(document);
|
||||
|
||||
if(typeof module == 'object' && module.exports){
|
||||
module.exports = html5;
|
||||
}
|
||||
|
||||
}(typeof window !== "undefined" ? window : this, document));
|
@ -0,0 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
* respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries
|
||||
* Copyright 2011, Scott Jehl, scottjehl.com
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* Usage: Check out the readme file or github.com/scottjehl/respond
|
||||
*/
|
||||
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length;for(var z=0;z<w;z++){var y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}else{o[x]=true}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media ([^\{]+)\{([\S\s]+?)(?=\}[\s]*\/\*\/mediaquery\*\/)/gmi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x;if(v.length){v+="/"}if(y){H=1}for(var B=0;B<H;B++){var C;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}var z=C.split(","),F=z.length;for(var A=0;A<F;A++){var D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send()},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this));
|
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>商品类型添加页面</title>
|
||||
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
|
||||
<body>
|
||||
<div th:include="admin/header"></div>
|
||||
<br><br><br>
|
||||
<div class="container">
|
||||
<div class="bg-primary" style="width:70%; height: 60px;padding-top: 0.5px;">
|
||||
<h3 align="center">添加商品</h3>
|
||||
</div><br>
|
||||
<form th:action="@{/goods/addGoods?act=add}"
|
||||
name="myform" method="post"
|
||||
th:object="${goods}"
|
||||
class="form-horizontal"
|
||||
enctype="multipart/form-data" >
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">商品名称</label>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<input type="text" class="form-control"
|
||||
placeholder="请输入商品名"
|
||||
th:field="*{gname}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">商品原价</label>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<input type="number" class="form-control"
|
||||
placeholder="请输入商品原价"
|
||||
th:field="*{goprice}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">商品折扣价</label>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<input type="number" class="form-control"
|
||||
placeholder="请输入商品折扣价"
|
||||
th:field="*{grprice}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">商品库存</label>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<input type="number" class="form-control"
|
||||
placeholder="请输入商品库存"
|
||||
th:field="*{gstore}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">商品图片</label>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<input type="file" placeholder="请选择商品图片" class="form-control" name="fileName"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-4 col-md-4 radio">
|
||||
<label>
|
||||
<input type="radio" th:field="*{isRecommend}" value="1">是
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" th:field="*{isRecommend}" value="0">否
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">是否广告</label>
|
||||
<div class="col-sm-4 col-md-4 radio">
|
||||
<label>
|
||||
<input type="radio" th:field="*{isAdvertisement}" value="1">是
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" th:field="*{isAdvertisement}"s value="0">否
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group has-success">
|
||||
<label class="col-sm-2 col-md-2 control-label">商品类型</label>
|
||||
<div class="col-sm-4 col-md-4">
|
||||
<select class="form-control" th:field="*{goodstype_id}">
|
||||
<option th:each="gty:${goodsType}" th:value="${gty.id}" th:text="${gty.typename}">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit"class="btn btn-success" >添加</button>
|
||||
<button type="reset" class="btn btn-primary" >重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|