diff --git a/miaosha-admin/.gitignore b/miaosha-admin/.gitignore
index 82eca33..0c2b833 100644
--- a/miaosha-admin/.gitignore
+++ b/miaosha-admin/.gitignore
@@ -1,25 +1,2 @@
-/target/
-!.mvn/wrapper/maven-wrapper.jar
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/build/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
\ No newline at end of file
+/.settings/
+/.project
diff --git a/miaosha-admin/.mvn/wrapper/maven-wrapper.jar b/miaosha-admin/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100644
index 9cc84ea..0000000
Binary files a/miaosha-admin/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/miaosha-admin/.mvn/wrapper/maven-wrapper.properties b/miaosha-admin/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100644
index 6c8c0e0..0000000
--- a/miaosha-admin/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1 +0,0 @@
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
diff --git a/miaosha-admin/README.md b/miaosha-admin/README.md
deleted file mode 100644
index fcf66f1..0000000
--- a/miaosha-admin/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# springboot-dubbo
-
-#### 项目介绍
-springboot整合dubbo的demo
-
-#### 参与贡献
-
-项目开发者
-
diff --git a/miaosha-admin/consumer/.gitignore b/miaosha-admin/consumer/.gitignore
deleted file mode 100644
index 82eca33..0000000
--- a/miaosha-admin/consumer/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-/target/
-!.mvn/wrapper/maven-wrapper.jar
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/build/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
\ No newline at end of file
diff --git a/miaosha-admin/consumer/.mvn/wrapper/maven-wrapper.jar b/miaosha-admin/consumer/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100644
index 9cc84ea..0000000
Binary files a/miaosha-admin/consumer/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/miaosha-admin/consumer/.mvn/wrapper/maven-wrapper.properties b/miaosha-admin/consumer/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100644
index 6c8c0e0..0000000
--- a/miaosha-admin/consumer/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1 +0,0 @@
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
diff --git a/miaosha-admin/consumer/mvnw b/miaosha-admin/consumer/mvnw
deleted file mode 100644
index 5bf251c..0000000
--- a/miaosha-admin/consumer/mvnw
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 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 Migwn, 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)`"
- # TODO classpath?
-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
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-echo $MAVEN_PROJECTBASEDIR
-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
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/miaosha-admin/consumer/mvnw.cmd b/miaosha-admin/consumer/mvnw.cmd
deleted file mode 100644
index 019bd74..0000000
--- a/miaosha-admin/consumer/mvnw.cmd
+++ /dev/null
@@ -1,143 +0,0 @@
-@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 http://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 Maven2 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 key stroke 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 enable echoing my 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
-
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/miaosha-admin/consumer/pom.xml b/miaosha-admin/consumer/pom.xml
deleted file mode 100644
index 421add5..0000000
--- a/miaosha-admin/consumer/pom.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
- 4.0.0
-
- com.consumer
- demo
- 0.0.1-SNAPSHOT
- jar
-
- demo
- Demo project for Spring Boot
-
-
- com.dubbo
- module
- 0.0.1-SNAPSHOT
-
-
-
- UTF-8
- UTF-8
- 1.8
-
-
-
-
- com.api
- dubbo
- 0.0.1-SNAPSHOT
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
-
-
diff --git a/miaosha-admin/consumer/src/main/java/com/consumer/demo/DemoApplication.java b/miaosha-admin/consumer/src/main/java/com/consumer/demo/DemoApplication.java
deleted file mode 100644
index cd00cef..0000000
--- a/miaosha-admin/consumer/src/main/java/com/consumer/demo/DemoApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.consumer.demo;
-
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-
-@EnableDubbo
-@SpringBootApplication
-public class DemoApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(DemoApplication.class, args);
- }
-}
diff --git a/miaosha-admin/consumer/src/main/java/com/consumer/demo/controller/TestController.java b/miaosha-admin/consumer/src/main/java/com/consumer/demo/controller/TestController.java
deleted file mode 100644
index 2b4e9a7..0000000
--- a/miaosha-admin/consumer/src/main/java/com/consumer/demo/controller/TestController.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.consumer.demo.controller;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.api.dubbo.service.DemoService;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class TestController {
-
- @Reference
- private DemoService demoService;
-
-
- @RequestMapping("/sayHello/{name}")
- public String sayHello(@PathVariable("name") String name) {
- return demoService.hello(name);
- }
-}
diff --git a/miaosha-admin/consumer/src/main/resources/application.properties b/miaosha-admin/consumer/src/main/resources/application.properties
deleted file mode 100644
index 131c893..0000000
--- a/miaosha-admin/consumer/src/main/resources/application.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-spring.application.name = dubbo-consumer
-server.port = 9091
-dubbo.application.name = dubbo-consumer
-demo.service.version = 1.0.0
-dubbo.protocol.name = dubbo
-dubbo.protocol.port = 20880
-dubbo.registry.address = zookeeper://localhost:2181
-dubbo.consumer.timeout = 5000
-
diff --git a/miaosha-admin/consumer/src/test/java/com/consumer/demo/DemoApplicationTests.java b/miaosha-admin/consumer/src/test/java/com/consumer/demo/DemoApplicationTests.java
deleted file mode 100644
index 60ce33f..0000000
--- a/miaosha-admin/consumer/src/test/java/com/consumer/demo/DemoApplicationTests.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.consumer.demo;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class DemoApplicationTests {
-
- @Test
- public void contextLoads() {
- }
-
-}
diff --git a/miaosha-admin/dubbo/.gitignore b/miaosha-admin/dubbo/.gitignore
deleted file mode 100644
index 82eca33..0000000
--- a/miaosha-admin/dubbo/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-/target/
-!.mvn/wrapper/maven-wrapper.jar
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/build/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
\ No newline at end of file
diff --git a/miaosha-admin/dubbo/.mvn/wrapper/maven-wrapper.jar b/miaosha-admin/dubbo/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100644
index 9cc84ea..0000000
Binary files a/miaosha-admin/dubbo/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/miaosha-admin/dubbo/.mvn/wrapper/maven-wrapper.properties b/miaosha-admin/dubbo/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100644
index 6c8c0e0..0000000
--- a/miaosha-admin/dubbo/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1 +0,0 @@
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
diff --git a/miaosha-admin/dubbo/mvnw b/miaosha-admin/dubbo/mvnw
deleted file mode 100644
index 5bf251c..0000000
--- a/miaosha-admin/dubbo/mvnw
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 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 Migwn, 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)`"
- # TODO classpath?
-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
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-echo $MAVEN_PROJECTBASEDIR
-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
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/miaosha-admin/dubbo/mvnw.cmd b/miaosha-admin/dubbo/mvnw.cmd
deleted file mode 100644
index 019bd74..0000000
--- a/miaosha-admin/dubbo/mvnw.cmd
+++ /dev/null
@@ -1,143 +0,0 @@
-@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 http://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 Maven2 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 key stroke 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 enable echoing my 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
-
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/miaosha-admin/dubbo/pom.xml b/miaosha-admin/dubbo/pom.xml
deleted file mode 100644
index 19d0b70..0000000
--- a/miaosha-admin/dubbo/pom.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- 4.0.0
-
- com.api
- dubbo
- 0.0.1-SNAPSHOT
- jar
-
- dubbo
- Demo project for Spring Boot
-
-
- com.dubbo
- module
- 0.0.1-SNAPSHOT
-
-
-
-
diff --git a/miaosha-admin/dubbo/src/main/java/com/api/dubbo/service/DemoService.java b/miaosha-admin/dubbo/src/main/java/com/api/dubbo/service/DemoService.java
deleted file mode 100644
index 5d225a3..0000000
--- a/miaosha-admin/dubbo/src/main/java/com/api/dubbo/service/DemoService.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.api.dubbo.service;
-
-public interface DemoService {
-
- public String hello(String name);
-}
diff --git a/miaosha-admin/dubbo/src/main/resources/application.properties b/miaosha-admin/dubbo/src/main/resources/application.properties
deleted file mode 100644
index e69de29..0000000
diff --git a/miaosha-admin/dubbo/src/test/java/com/api/dubbo/DubboApplicationTests.java b/miaosha-admin/dubbo/src/test/java/com/api/dubbo/DubboApplicationTests.java
deleted file mode 100644
index 9a81b46..0000000
--- a/miaosha-admin/dubbo/src/test/java/com/api/dubbo/DubboApplicationTests.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.api.dubbo;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class DubboApplicationTests {
-
- @Test
- public void contextLoads() {
- }
-
-}
diff --git a/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.core.resources.prefs b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dc1b414
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
diff --git a/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.jdt.core.prefs b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..6e80039
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.m2e.core.prefs b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.common.component b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..a4fb6cc
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.common.project.facet.core.xml b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..fb95c45
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.validation.prefs b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/miaosha-admin/miaosha-admin-api/pom.xml b/miaosha-admin/miaosha-admin-api/pom.xml
new file mode 100644
index 0000000..2505e38
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/pom.xml
@@ -0,0 +1,10 @@
+
+ 4.0.0
+
+ com.geekq
+ miaosha-admin
+ 0.0.1-SNAPSHOT
+
+ miaosha-admin-api
+
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/pojo/Orders.java b/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/pojo/Orders.java
new file mode 100644
index 0000000..f8a5ec4
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/pojo/Orders.java
@@ -0,0 +1,33 @@
+package com.geekq.order.pojo;
+
+public class Orders {
+ private String id;
+
+ private String orderNum;
+
+ private String itemId;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id == null ? null : id.trim();
+ }
+
+ public String getOrderNum() {
+ return orderNum;
+ }
+
+ public void setOrderNum(String orderNum) {
+ this.orderNum = orderNum == null ? null : orderNum.trim();
+ }
+
+ public String getItemId() {
+ return itemId;
+ }
+
+ public void setItemId(String itemId) {
+ this.itemId = itemId == null ? null : itemId.trim();
+ }
+}
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/pojo/OrdersExample.java b/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/pojo/OrdersExample.java
new file mode 100644
index 0000000..93b0fd8
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/pojo/OrdersExample.java
@@ -0,0 +1,410 @@
+package com.geekq.order.pojo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class OrdersExample {
+ protected String orderByClause;
+
+ protected boolean distinct;
+
+ protected List oredCriteria;
+
+ public OrdersExample() {
+ oredCriteria = new ArrayList();
+ }
+
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andIdIsNull() {
+ addCriterion("id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIsNotNull() {
+ addCriterion("id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdEqualTo(String value) {
+ addCriterion("id =", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotEqualTo(String value) {
+ addCriterion("id <>", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThan(String value) {
+ addCriterion("id >", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdGreaterThanOrEqualTo(String value) {
+ addCriterion("id >=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThan(String value) {
+ addCriterion("id <", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLessThanOrEqualTo(String value) {
+ addCriterion("id <=", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdLike(String value) {
+ addCriterion("id like", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotLike(String value) {
+ addCriterion("id not like", value, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdIn(List values) {
+ addCriterion("id in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotIn(List values) {
+ addCriterion("id not in", values, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdBetween(String value1, String value2) {
+ addCriterion("id between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andIdNotBetween(String value1, String value2) {
+ addCriterion("id not between", value1, value2, "id");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumIsNull() {
+ addCriterion("order_num is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumIsNotNull() {
+ addCriterion("order_num is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumEqualTo(String value) {
+ addCriterion("order_num =", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumNotEqualTo(String value) {
+ addCriterion("order_num <>", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumGreaterThan(String value) {
+ addCriterion("order_num >", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumGreaterThanOrEqualTo(String value) {
+ addCriterion("order_num >=", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumLessThan(String value) {
+ addCriterion("order_num <", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumLessThanOrEqualTo(String value) {
+ addCriterion("order_num <=", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumLike(String value) {
+ addCriterion("order_num like", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumNotLike(String value) {
+ addCriterion("order_num not like", value, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumIn(List values) {
+ addCriterion("order_num in", values, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumNotIn(List values) {
+ addCriterion("order_num not in", values, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumBetween(String value1, String value2) {
+ addCriterion("order_num between", value1, value2, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andOrderNumNotBetween(String value1, String value2) {
+ addCriterion("order_num not between", value1, value2, "orderNum");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdIsNull() {
+ addCriterion("item_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdIsNotNull() {
+ addCriterion("item_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdEqualTo(String value) {
+ addCriterion("item_id =", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdNotEqualTo(String value) {
+ addCriterion("item_id <>", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdGreaterThan(String value) {
+ addCriterion("item_id >", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdGreaterThanOrEqualTo(String value) {
+ addCriterion("item_id >=", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdLessThan(String value) {
+ addCriterion("item_id <", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdLessThanOrEqualTo(String value) {
+ addCriterion("item_id <=", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdLike(String value) {
+ addCriterion("item_id like", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdNotLike(String value) {
+ addCriterion("item_id not like", value, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdIn(List values) {
+ addCriterion("item_id in", values, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdNotIn(List values) {
+ addCriterion("item_id not in", values, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdBetween(String value1, String value2) {
+ addCriterion("item_id between", value1, value2, "itemId");
+ return (Criteria) this;
+ }
+
+ public Criteria andItemIdNotBetween(String value1, String value2) {
+ addCriterion("item_id not between", value1, value2, "itemId");
+ return (Criteria) this;
+ }
+ }
+
+ public static class Criteria extends GeneratedCriteria {
+
+ protected Criteria() {
+ super();
+ }
+ }
+
+ public static class Criterion {
+ private String condition;
+
+ private Object value;
+
+ private Object secondValue;
+
+ private boolean noValue;
+
+ private boolean singleValue;
+
+ private boolean betweenValue;
+
+ private boolean listValue;
+
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+}
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/service/OrdersService.java b/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/service/OrdersService.java
new file mode 100644
index 0000000..dc25672
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-api/src/main/java/com/geekq/order/service/OrdersService.java
@@ -0,0 +1,18 @@
+package com.geekq.order.service;
+
+import com.geekq.order.pojo.Orders;
+
+public interface OrdersService {
+
+ /**
+ * @Description: 根据订单id查询订单
+ */
+ public Orders getOrder(String orderId);
+
+ /**
+ * @Description: 下订单
+ */
+ public boolean createOrder(String itemId);
+
+}
+
diff --git a/miaosha-admin/miaosha-admin-service/.settings/.jsdtscope b/miaosha-admin/miaosha-admin-service/.settings/.jsdtscope
new file mode 100644
index 0000000..81672d4
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.core.resources.prefs b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dc1b414
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.jdt.core.prefs b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..6e80039
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.m2e.core.prefs b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.common.component b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..4a133e1
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+ uses
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.common.project.facet.core.xml b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..e1de9b3
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.jsdt.ui.superType.container b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.jsdt.ui.superType.name b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.validation.prefs b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/miaosha-admin/miaosha-admin-service/pom.xml b/miaosha-admin/miaosha-admin-service/pom.xml
new file mode 100644
index 0000000..6246a7f
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/pom.xml
@@ -0,0 +1,141 @@
+
+ 4.0.0
+
+ com.geekq
+ miaosha-admin
+ 0.0.1-SNAPSHOT
+
+ miaosha-admin-service
+
+ war
+
+
+
+ com.geekq
+ miaosha-admin-api
+ 0.0.1-SNAPSHOT
+
+
+
+
+ com.alibaba
+ dubbo
+
+
+ org.springframework
+ spring
+
+
+
+
+ org.apache.zookeeper
+ zookeeper
+
+
+ com.github.sgroschupf
+ zkclient
+
+
+
+
+ org.springframework
+ spring-context
+
+
+ org.springframework
+ spring-beans
+
+
+ org.springframework
+ spring-webmvc
+
+
+ org.springframework
+ spring-jdbc
+
+
+ org.springframework
+ spring-aspects
+
+
+
+
+ org.mybatis
+ mybatis
+
+
+ org.mybatis
+ mybatis-spring
+
+
+ com.github.miemiedev
+ mybatis-paginator
+
+
+ com.github.pagehelper
+ pagehelper
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+ com.alibaba
+ druid
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.properties
+ **/*.xml
+
+ false
+
+
+ src/main/resources
+
+ **/*.properties
+ **/*.xml
+ **/*.ini
+
+ false
+
+
+
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+
+ 8082
+ /
+ true
+ UTF-8
+
+
+
+
+ maven-eclipse-plugin
+
+
+ org.springframework.ide.eclipse.core.springnature
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+ true
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/mapper/OrdersMapper.java b/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/mapper/OrdersMapper.java
new file mode 100644
index 0000000..3b8050d
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/mapper/OrdersMapper.java
@@ -0,0 +1,32 @@
+package com.geekq.order.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.geekq.order.pojo.Orders;
+import com.geekq.order.pojo.OrdersExample;
+
+public interface OrdersMapper {
+ int countByExample(OrdersExample example);
+
+ int deleteByExample(OrdersExample example);
+
+ int deleteByPrimaryKey(String id);
+
+ int insert(Orders record);
+
+ int insertSelective(Orders record);
+
+ List selectByExample(OrdersExample example);
+
+ Orders selectByPrimaryKey(String id);
+
+ int updateByExampleSelective(@Param("record") Orders record, @Param("example") OrdersExample example);
+
+ int updateByExample(@Param("record") Orders record, @Param("example") OrdersExample example);
+
+ int updateByPrimaryKeySelective(Orders record);
+
+ int updateByPrimaryKey(Orders record);
+}
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/mapper/OrdersMapper.xml b/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/mapper/OrdersMapper.xml
new file mode 100644
index 0000000..2de82ce
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/mapper/OrdersMapper.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ and ${criterion.condition}
+
+
+ and ${criterion.condition} #{criterion.value}
+
+
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+
+
+ and ${criterion.condition}
+
+ #{listItem}
+
+
+
+
+
+
+
+
+
+
+ id, order_num, item_id
+
+
+
+
+ delete from orders
+ where id = #{id,jdbcType=VARCHAR}
+
+
+ delete from orders
+
+
+
+
+
+ insert into orders (id, order_num, item_id
+ )
+ values (#{id,jdbcType=VARCHAR}, #{orderNum,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR}
+ )
+
+
+ insert into orders
+
+
+ id,
+
+
+ order_num,
+
+
+ item_id,
+
+
+
+
+ #{id,jdbcType=VARCHAR},
+
+
+ #{orderNum,jdbcType=VARCHAR},
+
+
+ #{itemId,jdbcType=VARCHAR},
+
+
+
+
+
+ update orders
+
+
+ id = #{record.id,jdbcType=VARCHAR},
+
+
+ order_num = #{record.orderNum,jdbcType=VARCHAR},
+
+
+ item_id = #{record.itemId,jdbcType=VARCHAR},
+
+
+
+
+
+
+
+ update orders
+ set id = #{record.id,jdbcType=VARCHAR},
+ order_num = #{record.orderNum,jdbcType=VARCHAR},
+ item_id = #{record.itemId,jdbcType=VARCHAR}
+
+
+
+
+
+ update orders
+
+
+ order_num = #{orderNum,jdbcType=VARCHAR},
+
+
+ item_id = #{itemId,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=VARCHAR}
+
+
+ update orders
+ set order_num = #{orderNum,jdbcType=VARCHAR},
+ item_id = #{itemId,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=VARCHAR}
+
+
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/service/impl/OrdersServiceImpl.java b/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/service/impl/OrdersServiceImpl.java
new file mode 100644
index 0000000..3f220c1
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/java/com/geekq/order/service/impl/OrdersServiceImpl.java
@@ -0,0 +1,43 @@
+package com.geekq.order.service.impl;
+
+import com.geekq.order.mapper.OrdersMapper;
+import com.geekq.order.pojo.Orders;
+import com.geekq.order.service.OrdersService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.UUID;
+
+@Service("ordersService")
+public class OrdersServiceImpl implements OrdersService {
+
+ final static Logger log = LoggerFactory.getLogger(OrdersServiceImpl.class);
+
+ @Autowired
+ private OrdersMapper ordersMapper;
+
+ @Override
+ public Orders getOrder(String orderId) {
+ return ordersMapper.selectByPrimaryKey(orderId);
+ }
+
+ @Override
+ public boolean createOrder(String itemId) {
+
+ // 创建订单
+ String oid = UUID.randomUUID().toString().replaceAll("-", "");
+// Orders o = new Orders();
+// o.setId(oid);
+// o.setOrderNum(oid);
+// o.setItemId(itemId);
+// ordersMapper.insert(o);
+
+ log.info("订单创建成功");
+
+ return true;
+ }
+
+}
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/dubbo/dubbo.xsd b/miaosha-admin/miaosha-admin-service/src/main/resources/dubbo/dubbo.xsd
new file mode 100644
index 0000000..d7a3377
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/dubbo/dubbo.xsd
@@ -0,0 +1,1205 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/log4j.properties b/miaosha-admin/miaosha-admin-service/src/main/resources/log4j.properties
new file mode 100644
index 0000000..f7e2878
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/log4j.properties
@@ -0,0 +1,11 @@
+log4j.rootLogger=INFO,console
+#INFO,console,dailyFile
+
+log4j.logger.com.geekq.mapper=INFO
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.encoding=UTF-8
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%l] - [%p] %m%n
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/mybatis/SqlMapConfig.xml b/miaosha-admin/miaosha-admin-service/src/main/resources/mybatis/SqlMapConfig.xml
new file mode 100644
index 0000000..d597236
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/mybatis/SqlMapConfig.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/resource/db.properties b/miaosha-admin/miaosha-admin-service/src/main/resources/resource/db.properties
new file mode 100644
index 0000000..2a9df93
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/resource/db.properties
@@ -0,0 +1,4 @@
+jdbc.driver=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://localhost:3306/miaosha?characterEncoding=utf-8
+jdbc.username=root
+jdbc.password=nihaoma
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dao.xml b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dao.xml
new file mode 100644
index 0000000..3dd18fe
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dao.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dubbo-provider.xml b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dubbo-provider.xml
new file mode 100644
index 0000000..d052abd
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-dubbo-provider.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-service.xml b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-service.xml
new file mode 100644
index 0000000..aebe394
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-service.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-transaction.xml b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-transaction.xml
new file mode 100644
index 0000000..9c1be3e
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/applicationContext-transaction.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/resources/spring/spring-context.xml b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/spring-context.xml
new file mode 100644
index 0000000..ac44a1d
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/resources/spring/spring-context.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-service/src/main/webapp/WEB-INF/web.xml b/miaosha-admin/miaosha-admin-service/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..1975bba
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-service/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,18 @@
+
+
+
+ imooc-dubbo-order-service
+
+
+
+ contextConfigLocation
+ classpath:spring/applicationContext-*.xml
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/.settings/.jsdtscope b/miaosha-admin/miaosha-admin-web/.settings/.jsdtscope
new file mode 100644
index 0000000..81672d4
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.core.resources.prefs b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dc1b414
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.jdt.core.prefs b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..6e80039
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.m2e.core.prefs b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.common.component b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..c9288b9
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+ uses
+
+
+ uses
+
+
+ uses
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.common.project.facet.core.xml b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..e1de9b3
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.jsdt.ui.superType.container b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.jsdt.ui.superType.name b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.validation.prefs b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000..04cad8c
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1
diff --git a/miaosha-admin/miaosha-admin-web/pom.xml b/miaosha-admin/miaosha-admin-web/pom.xml
new file mode 100644
index 0000000..dfca25f
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/pom.xml
@@ -0,0 +1,144 @@
+
+ 4.0.0
+
+ com.geekq
+ miaosha-admin
+ 0.0.1-SNAPSHOT
+
+ miaosha-admin-web
+
+ war
+
+
+
+ com.geekq
+ miaosha-common
+ 0.0.1-SNAPSHOT
+
+
+ com.geekq
+ miaosha-admin-api
+ 0.0.1-SNAPSHOT
+
+
+
+
+ com.alibaba
+ dubbo
+
+
+ org.springframework
+ spring
+
+
+
+
+ org.apache.zookeeper
+ zookeeper
+
+
+ com.github.sgroschupf
+ zkclient
+
+
+
+
+ org.apache.curator
+ curator-framework
+
+
+ org.apache.curator
+ curator-recipes
+
+
+
+
+ org.springframework
+ spring-context
+
+
+ org.springframework
+ spring-beans
+
+
+ org.springframework
+ spring-webmvc
+
+
+ org.springframework
+ spring-jdbc
+
+
+ org.springframework
+ spring-aspects
+
+
+
+
+ jstl
+ jstl
+
+
+ javax.servlet
+ servlet-api
+ provided
+
+
+ javax.servlet
+ jsp-api
+ provided
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.properties
+ **/*.xml
+
+ false
+
+
+ src/main/resources
+
+ **/*.properties
+ **/*.xml
+ **/*.ini
+
+ false
+
+
+
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+
+ 8080
+ /
+ true
+ UTF-8
+
+
+
+
+ maven-eclipse-plugin
+
+
+ org.springframework.ide.eclipse.core.springnature
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+ true
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PayController.java b/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PayController.java
new file mode 100644
index 0000000..ae45932
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/controller/PayController.java
@@ -0,0 +1,40 @@
+package com.geekq.web.controller;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.geekq.common.utils.IMoocJSONResult;
+import com.geekq.web.service.CulsterService;
+
+/**
+ * @Description: 订购商品controller
+ */
+@Controller
+public class PayController {
+
+ @Autowired
+ private CulsterService buyService;
+
+ @RequestMapping("/index")
+ public String index() {
+ return "index";
+ }
+
+ @GetMapping("/buy")
+ @ResponseBody
+ public IMoocJSONResult doGetlogin(String itemId) {
+
+ if (StringUtils.isNotBlank(itemId)) {
+ buyService.displayBuy(itemId);
+ } else {
+ return IMoocJSONResult.errorMsg("商品id不能为空");
+ }
+
+ return IMoocJSONResult.ok();
+ }
+
+}
diff --git a/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/CulsterService.java b/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/CulsterService.java
new file mode 100644
index 0000000..4d842ec
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/CulsterService.java
@@ -0,0 +1,12 @@
+package com.geekq.web.service;
+
+public interface CulsterService {
+
+ /**
+ * @Description: 购买商品
+ */
+ public void doBuyItem(String itemId);
+
+ public boolean displayBuy(String itemId);
+}
+
diff --git a/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/impl/CulsterServiceImpl.java b/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/impl/CulsterServiceImpl.java
new file mode 100644
index 0000000..5c7e7d6
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/java/com/geekq/web/service/impl/CulsterServiceImpl.java
@@ -0,0 +1,60 @@
+package com.geekq.web.service.impl;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.geekq.order.service.OrdersService;
+import com.geekq.web.service.CulsterService;
+
+@Service("buyService")
+public class CulsterServiceImpl implements CulsterService {
+
+ final static Logger log = LoggerFactory.getLogger(CulsterServiceImpl.class);
+
+// @Autowired
+// private ItemsService itemService;
+
+ @Autowired
+ private OrdersService ordersService;
+
+ @Override
+ public void doBuyItem(String itemId) {
+ // 减少库存
+// itemService.displayReduceCounts(itemId, 1);
+
+ // 创建订单
+ ordersService.createOrder(itemId);
+ }
+
+ @Override
+ public boolean displayBuy(String itemId) {
+
+ int buyCounts = 5;
+
+// // 1. 判断库存
+// int stockCounts = itemService.getItemCounts(itemId);
+// if (stockCounts < buyCounts) {
+// log.info("库存剩余{}件,用户需求量{}件,库存不足,订单创建失败...",
+// stockCounts, buyCounts);
+// return false;
+// }
+//
+// // 2. 创建订单
+ boolean isOrderCreated = ordersService.createOrder(itemId);
+//
+// // 3. 创建订单成功后,扣除库存
+// if (isOrderCreated) {
+// log.info("订单创建成功...");
+// itemService.displayReduceCounts(itemId, buyCounts);
+// } else {
+// log.info("订单创建失败...");
+// return false;
+// }
+
+ return true;
+ }
+
+}
+
diff --git a/miaosha-admin/miaosha-admin-web/src/main/resources/log4j.properties b/miaosha-admin/miaosha-admin-web/src/main/resources/log4j.properties
new file mode 100644
index 0000000..f7e2878
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/resources/log4j.properties
@@ -0,0 +1,11 @@
+log4j.rootLogger=INFO,console
+#INFO,console,dailyFile
+
+log4j.logger.com.geekq.mapper=INFO
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.encoding=UTF-8
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%l] - [%p] %m%n
+
+
diff --git a/miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-dubbo-consumer.xml b/miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-dubbo-consumer.xml
new file mode 100644
index 0000000..5992c55
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-dubbo-consumer.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-service.xml b/miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-service.xml
new file mode 100644
index 0000000..c0f6c63
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/resources/spring/applicationContext-service.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/src/main/resources/spring/springmvc.xml b/miaosha-admin/miaosha-admin-web/src/main/resources/spring/springmvc.xml
new file mode 100644
index 0000000..3bbd21d
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/resources/spring/springmvc.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/jsp/index.jsp b/miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/jsp/index.jsp
new file mode 100644
index 0000000..d24c0ca
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/jsp/index.jsp
@@ -0,0 +1,2 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+hello world
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/web.xml b/miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..00c847e
--- /dev/null
+++ b/miaosha-admin/miaosha-admin-web/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,66 @@
+
+
+
+ imooc-dubbo-web
+
+
+ index.html
+ index.htm
+ index.jsp
+ default.html
+ default.htm
+ default.jsp
+
+
+
+
+ log4jConfigLocation
+ classpath:log4j.properties
+
+
+ org.springframework.web.util.Log4jConfigListener
+
+
+
+
+ contextConfigLocation
+ classpath:spring/applicationContext-*.xml
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+
+ CharacterEncodingFilter
+ org.springframework.web.filter.CharacterEncodingFilter
+
+ encoding
+ utf-8
+
+
+
+ CharacterEncodingFilter
+ /*
+
+
+
+
+ imooc-dubbo-web
+ org.springframework.web.servlet.DispatcherServlet
+
+ contextConfigLocation
+ classpath:spring/springmvc.xml
+
+ 1
+
+
+
+ imooc-dubbo-web
+ /
+
+
+
diff --git a/miaosha-admin/miaosha-common/.gitignore b/miaosha-admin/miaosha-common/.gitignore
new file mode 100644
index 0000000..10d81e8
--- /dev/null
+++ b/miaosha-admin/miaosha-common/.gitignore
@@ -0,0 +1,4 @@
+/.classpath
+/.project
+/.settings/
+/target/
diff --git a/miaosha-admin/miaosha-common/pom.xml b/miaosha-admin/miaosha-common/pom.xml
new file mode 100644
index 0000000..c26f707
--- /dev/null
+++ b/miaosha-admin/miaosha-common/pom.xml
@@ -0,0 +1,62 @@
+
+ 4.0.0
+
+ com.geekq
+ miaosha-admin
+ 0.0.1-SNAPSHOT
+
+ miaosha-common
+
+
+
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ org.apache.commons
+ commons-io
+
+
+ commons-net
+ commons-net
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+
+ org.apache.httpcomponents
+ httpclient
+
+
+ commons-httpclient
+ commons-httpclient
+
+
+
+ javax.servlet
+ servlet-api
+ provided
+
+
+ javax.servlet
+ jsp-api
+ provided
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/OrderStatusEnum.java b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/OrderStatusEnum.java
new file mode 100644
index 0000000..b471588
--- /dev/null
+++ b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/OrderStatusEnum.java
@@ -0,0 +1,40 @@
+package com.geekq.common.enums;
+
+/**
+ *
+ * @Description: 订单状态
+ */
+public enum OrderStatusEnum {
+
+ WAIT_PAY(10, "待付款"), // 代付款
+ PAYING(20, "付款中"), // 付款中
+ PAID(30, "已付款"), // 已付款
+ PAID_FAILD(40, "付款失败"), // 付款失败
+ CANCELED(50, "已取消"), // 已取消
+ CLOSED(60, "交易关闭"); // 超时未支付, 交易关闭
+
+ public final int key;
+ public final String value;
+
+ OrderStatusEnum(int key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public static String getName(int key) {
+ for (OrderStatusEnum status : OrderStatusEnum.values()) {
+ if (status.getKey() == key) {
+ return status.value;
+ }
+ }
+ return null;
+ }
+
+ public int getKey() {
+ return key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
diff --git a/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/SexEnum.java b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/SexEnum.java
new file mode 100644
index 0000000..5c661ba
--- /dev/null
+++ b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/SexEnum.java
@@ -0,0 +1,23 @@
+package com.geekq.common.enums;
+
+/**
+ *
+ * @Description: 男女枚举
+ */
+public enum SexEnum {
+
+ GIRL(0), // 女
+ BOY(1), // 男
+ SECRET(2); // 保密
+
+ public final int value;
+
+ SexEnum(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+}
diff --git a/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/YesOrNo.java b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/YesOrNo.java
new file mode 100644
index 0000000..6508d3d
--- /dev/null
+++ b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/enums/YesOrNo.java
@@ -0,0 +1,22 @@
+package com.geekq.common.enums;
+
+/**
+ *
+ * @Description: 是否枚举
+ */
+public enum YesOrNo {
+
+ YES(1), // 是 有错误
+ NO(0); // 否 无错误
+
+ public final int value;
+
+ YesOrNo(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+}
diff --git a/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/pojo/JqGridResult.java b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/pojo/JqGridResult.java
new file mode 100644
index 0000000..7a3df20
--- /dev/null
+++ b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/pojo/JqGridResult.java
@@ -0,0 +1,48 @@
+package com.geekq.common.pojo;
+
+import java.util.List;
+
+/**
+ *
+ * @Description: 用来返回jqGrid的数据格式
+ */
+public class JqGridResult {
+
+ private int page; // 当前页数
+ private int total; // 总页数
+ private long records; // 总记录数
+ private List> rows; // 每行显示的内容
+ private Object userdata; // 用户自定义数据
+
+ public int getPage() {
+ return page;
+ }
+ public void setPage(int page) {
+ this.page = page;
+ }
+ public int getTotal() {
+ return total;
+ }
+ public void setTotal(int total) {
+ this.total = total;
+ }
+ public long getRecords() {
+ return records;
+ }
+ public void setRecords(long records) {
+ this.records = records;
+ }
+ public List> getRows() {
+ return rows;
+ }
+ public void setRows(List> rows) {
+ this.rows = rows;
+ }
+ public Object getUserdata() {
+ return userdata;
+ }
+ public void setUserdata(Object userdata) {
+ this.userdata = userdata;
+ }
+
+}
diff --git a/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/utils/IMoocJSONResult.java b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/utils/IMoocJSONResult.java
new file mode 100644
index 0000000..a9462d7
--- /dev/null
+++ b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/utils/IMoocJSONResult.java
@@ -0,0 +1,112 @@
+package com.geekq.common.utils;
+
+/**
+ *
+ * @Description: 自定义响应数据结构
+ * 这个类是提供给门户,ios,安卓,微信商城用的
+ * 门户接受此类数据后需要使用本类的方法转换成对于的数据类型格式(类,或者list)
+ * 其他自行处理
+ * 200:表示成功
+ * 500:表示错误,错误信息在msg字段中
+ * 501:bean验证错误,不管多少个错误都以map形式返回
+ * 502:拦截器拦截到用户token出错
+ * 555:异常抛出信息
+ */
+public class IMoocJSONResult {
+
+ // 响应业务状态
+ private Integer status;
+
+ // 响应消息
+ private String msg;
+
+ // 响应中的数据
+ private Object data;
+
+ private String ok; // 不使用
+
+ public static IMoocJSONResult build(Integer status, String msg, Object data) {
+ return new IMoocJSONResult(status, msg, data);
+ }
+
+ public static IMoocJSONResult ok(Object data) {
+ return new IMoocJSONResult(data);
+ }
+
+ public static IMoocJSONResult ok() {
+ return new IMoocJSONResult(null);
+ }
+
+ public static IMoocJSONResult errorMsg(String msg) {
+ return new IMoocJSONResult(500, msg, null);
+ }
+
+ public static IMoocJSONResult errorMap(Object data) {
+ return new IMoocJSONResult(501, "error", data);
+ }
+
+ public static IMoocJSONResult errorTokenMsg(String msg) {
+ return new IMoocJSONResult(502, msg, null);
+ }
+
+ public static IMoocJSONResult errorException(String msg) {
+ return new IMoocJSONResult(555, msg, null);
+ }
+
+ public IMoocJSONResult() {
+
+ }
+
+// public static LeeJSONResult build(Integer status, String msg) {
+// return new LeeJSONResult(status, msg, null);
+// }
+
+ public IMoocJSONResult(Integer status, String msg, Object data) {
+ this.status = status;
+ this.msg = msg;
+ this.data = data;
+ }
+
+ public IMoocJSONResult(Object data) {
+ this.status = 200;
+ this.msg = "OK";
+ this.data = data;
+ }
+
+ public Boolean isOK() {
+ return this.status == 200;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public Object getData() {
+ return data;
+ }
+
+ public void setData(Object data) {
+ this.data = data;
+ }
+
+ public String getOk() {
+ return ok;
+ }
+
+ public void setOk(String ok) {
+ this.ok = ok;
+ }
+
+}
diff --git a/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/utils/JsonUtils.java b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/utils/JsonUtils.java
new file mode 100644
index 0000000..e8713b1
--- /dev/null
+++ b/miaosha-admin/miaosha-common/src/main/java/com/geekq/common/utils/JsonUtils.java
@@ -0,0 +1,72 @@
+package com.geekq.common.utils;
+
+import java.util.List;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ *
+ * @Description: 自定义响应结构, 转换类
+ */
+public class JsonUtils {
+
+ // 定义jackson对象
+ private static final ObjectMapper MAPPER = new ObjectMapper();
+
+ /**
+ * 将对象转换成json字符串。
+ * Title: pojoToJson
+ * Description:
+ * @param data
+ * @return
+ */
+ public static String objectToJson(Object data) {
+ try {
+ String string = MAPPER.writeValueAsString(data);
+ return string;
+ } catch (JsonProcessingException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * 将json结果集转化为对象
+ *
+ * @param jsonData json数据
+ * @param clazz 对象中的object类型
+ * @return
+ */
+ public static T jsonToPojo(String jsonData, Class beanType) {
+ try {
+ T t = MAPPER.readValue(jsonData, beanType);
+ return t;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * 将json数据转换成pojo对象list
+ * Title: jsonToList
+ * Description:
+ * @param jsonData
+ * @param beanType
+ * @return
+ */
+ public static List jsonToList(String jsonData, Class beanType) {
+ JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType);
+ try {
+ List list = MAPPER.readValue(jsonData, javaType);
+ return list;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+}
diff --git a/miaosha-admin/mvnw b/miaosha-admin/mvnw
deleted file mode 100644
index 5bf251c..0000000
--- a/miaosha-admin/mvnw
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 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 Migwn, 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)`"
- # TODO classpath?
-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
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-echo $MAVEN_PROJECTBASEDIR
-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
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/miaosha-admin/mvnw.cmd b/miaosha-admin/mvnw.cmd
deleted file mode 100644
index 019bd74..0000000
--- a/miaosha-admin/mvnw.cmd
+++ /dev/null
@@ -1,143 +0,0 @@
-@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 http://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 Maven2 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 key stroke 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 enable echoing my 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
-
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/miaosha-admin/pom.xml b/miaosha-admin/pom.xml
index 6ce698c..78785ab 100644
--- a/miaosha-admin/pom.xml
+++ b/miaosha-admin/pom.xml
@@ -1,88 +1,294 @@
-
4.0.0
-
- com.dubbo
- module
+ com.geekq
+ miaosha-admin
0.0.1-SNAPSHOT
- jar
-
-
-
- dubbo
- consumer
- provider
-
-
- module
- Demo project for Spring Boot
-
-
- org.springframework.boot
- spring-boot-starter-parent
- 2.0.4.RELEASE
-
-
+ pom
+
- UTF-8
- UTF-8
- 1.8
+ 4.3.13.RELEASE
+ 1.8.7.RELEASE
+ 2.4.2
+ 3.2.8
+ 1.2.2
+ 1.2.15
+ 5.1.41
+ 1.7.21
+ 2.7.4
+ 1.1.0
+ 4.3.5
+ 1.2
+ 2.5
+ 2.0
+ 3.3.2
+ 1.3.2
+ 3.3
+ 4.1.3
+ 0.9.1
+
+ 2.9.0
+ 3.1
+ 2.5.3
+ 3.4.11
+ 0.1
+ 4.0.0
+
+
+
+
-
-
- org.springframework.boot
- spring-boot-starter-web
-
+
+
+
+
+
-
- org.springframework.boot
- spring-boot-devtools
- runtime
-
+
+
+ org.apache.commons
+ commons-lang3
+ ${commons-lang3.version}
+
+
+ org.apache.commons
+ commons-io
+ ${commons-io.version}
+
+
+ commons-net
+ commons-net
+ ${commons-net.version}
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson.version}
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+ ${jackson.version}
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ ${httpclient.version}
+
-
-
- com.alibaba.boot
- dubbo-spring-boot-starter
- 0.2.0
-
+
+
+ org.mybatis
+ mybatis
+ ${mybatis.version}
+
+
+ org.mybatis
+ mybatis-spring
+ ${mybatis.spring.version}
+
+
+ com.github.miemiedev
+ mybatis-paginator
+ ${mybatis.paginator.version}
+
+
+ com.github.pagehelper
+ pagehelper
+ ${pagehelper.version}
+
+
+
+ mysql
+ mysql-connector-java
+ ${mysql.version}
+
+
+
+ com.alibaba
+ druid
+ ${druid.version}
+
+
+
+ org.springframework
+ spring-core
+ ${spring.version}
+
+
+ org.springframework
+ spring-context
+ ${spring.version}
+
+
+ org.springframework
+ spring-context-support
+ ${spring.version}
+
+
+ org.springframework
+ spring-beans
+ ${spring.version}
+
+
+ org.springframework
+ spring-webmvc
+ ${spring.version}
+
+
+ org.springframework
+ spring-jdbc
+ ${spring.version}
+
+
+ org.springframework
+ spring-aspects
+ ${spring.version}
+
+
+
+
+
+
+
+
+ org.apache.commons
+ commons-pool2
+ ${apache-commons-pool2}
+
+
+
+ jstl
+ jstl
+ ${jstl.version}
+
+
+ javax.servlet
+ servlet-api
+ ${servlet-api.version}
+ provided
+
+
+ javax.servlet
+ jsp-api
+ ${jsp-api.version}
+ provided
+
+
+
+ redis.clients
+ jedis
+ ${jedis.version}
+
-
-
- org.apache.curator
- curator-framework
- 4.0.1
-
+
+
+ commons-httpclient
+ commons-httpclient
+ ${commons.httpclient.version}
+
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j.version}
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j.version}
+
-
-
- org.apache.zookeeper
- zookeeper
- 3.4.13
- pom
-
+
+
+ com.alibaba
+ dubbo
+ ${dubbo.version}
+
+
+ org.apache.zookeeper
+ zookeeper
+ ${zookeeper.version}
+
+
+ com.github.sgroschupf
+ zkclient
+ ${zkclient.version}
+
+
+
+
+ org.apache.curator
+ curator-framework
+ ${apache.curator.version}
+
+
+ org.apache.curator
+ curator-recipes
+ ${apache.curator.version}
+
+
+
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
+
+ ${project.artifactId}
+
- org.springframework.boot
- spring-boot-maven-plugin
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 2.7
+
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.2
+
+
+ 1.8
+ UTF-8
+
+
+
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+ 2.2
+
+
+
+
+ maven-eclipse-plugin
+ 2.9
+
+
+
-
-
+
+ miaosha-common
+ miaosha-admin-api
+ miaosha-admin-service
+ miaosha-admin-web
+
+
\ No newline at end of file
diff --git a/miaosha-admin/provider/.gitignore b/miaosha-admin/provider/.gitignore
deleted file mode 100644
index 82eca33..0000000
--- a/miaosha-admin/provider/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-/target/
-!.mvn/wrapper/maven-wrapper.jar
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-.sts4-cache
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-/nbproject/private/
-/build/
-/nbbuild/
-/dist/
-/nbdist/
-/.nb-gradle/
\ No newline at end of file
diff --git a/miaosha-admin/provider/.mvn/wrapper/maven-wrapper.jar b/miaosha-admin/provider/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100644
index 9cc84ea..0000000
Binary files a/miaosha-admin/provider/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/miaosha-admin/provider/.mvn/wrapper/maven-wrapper.properties b/miaosha-admin/provider/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100644
index 6c8c0e0..0000000
--- a/miaosha-admin/provider/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1 +0,0 @@
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
diff --git a/miaosha-admin/provider/mvnw b/miaosha-admin/provider/mvnw
deleted file mode 100644
index 5bf251c..0000000
--- a/miaosha-admin/provider/mvnw
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven2 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 Migwn, 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)`"
- # TODO classpath?
-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
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-echo $MAVEN_PROJECTBASEDIR
-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
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/miaosha-admin/provider/mvnw.cmd b/miaosha-admin/provider/mvnw.cmd
deleted file mode 100644
index 019bd74..0000000
--- a/miaosha-admin/provider/mvnw.cmd
+++ /dev/null
@@ -1,143 +0,0 @@
-@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 http://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 Maven2 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 key stroke 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 enable echoing my 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
-
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
-
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
-
-exit /B %ERROR_CODE%
diff --git a/miaosha-admin/provider/pom.xml b/miaosha-admin/provider/pom.xml
deleted file mode 100644
index af5471d..0000000
--- a/miaosha-admin/provider/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- 4.0.0
-
- com.provider
- demo
- 0.0.1-SNAPSHOT
- jar
-
- demo
- Demo project for Spring Boot
-
-
- com.dubbo
- module
- 0.0.1-SNAPSHOT
-
-
-
- UTF-8
- UTF-8
- 1.8
-
-
-
-
- com.api
- dubbo
- 0.0.1-SNAPSHOT
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
-
-
diff --git a/miaosha-admin/provider/src/main/java/com/provider/demo/DemoApplication.java b/miaosha-admin/provider/src/main/java/com/provider/demo/DemoApplication.java
deleted file mode 100644
index 4ca516a..0000000
--- a/miaosha-admin/provider/src/main/java/com/provider/demo/DemoApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.provider.demo;
-
-import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-
-@EnableDubbo
-@SpringBootApplication
-public class DemoApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(DemoApplication.class, args);
- }
-}
diff --git a/miaosha-admin/provider/src/main/java/com/provider/demo/service/DemoServiceImpl.java b/miaosha-admin/provider/src/main/java/com/provider/demo/service/DemoServiceImpl.java
deleted file mode 100644
index e19e041..0000000
--- a/miaosha-admin/provider/src/main/java/com/provider/demo/service/DemoServiceImpl.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.provider.demo.service;
-
-import com.alibaba.dubbo.config.annotation.Service;
-import com.api.dubbo.service.DemoService;
-
-
-@Service
-public class DemoServiceImpl implements DemoService {
-
- @Override
- public String hello(String name) {
- System.out.println("hello " + name);
- return "hello " + name;
- }
-}
diff --git a/miaosha-admin/provider/src/main/resources/application.properties b/miaosha-admin/provider/src/main/resources/application.properties
deleted file mode 100644
index e2edaca..0000000
--- a/miaosha-admin/provider/src/main/resources/application.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-spring.application.name = dubbo-provider
-server.port = 9090
-
-#ָǰ/Ӧõ֣ͬķͬҪͱķͬ
-dubbo.application.name = dubbo-provider
-
-demo.service.version = 1.0.0
-
-dubbo.protocol.name = dubbo
-dubbo.protocol.port = 20880
-
-#ָעĵλ
-dubbo.registry.address = zookeeper://localhost:2181
-
-#ͳһ÷ṩĹ
-dubbo.provider.timeout = 1000
\ No newline at end of file
diff --git a/miaosha-admin/provider/src/test/java/com/provider/demo/DemoApplicationTests.java b/miaosha-admin/provider/src/test/java/com/provider/demo/DemoApplicationTests.java
deleted file mode 100644
index 0315263..0000000
--- a/miaosha-admin/provider/src/test/java/com/provider/demo/DemoApplicationTests.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.provider.demo;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class DemoApplicationTests {
-
- @Test
- public void contextLoads() {
- }
-
-}
diff --git a/miaosha-admin/src/main/java/com/dubbo/module/ModuleApplication.java b/miaosha-admin/src/main/java/com/dubbo/module/ModuleApplication.java
deleted file mode 100644
index 4354896..0000000
--- a/miaosha-admin/src/main/java/com/dubbo/module/ModuleApplication.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.dubbo.module;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class ModuleApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(ModuleApplication.class, args);
- }
-}
diff --git a/miaosha-admin/src/main/resources/application.properties b/miaosha-admin/src/main/resources/application.properties
deleted file mode 100644
index e69de29..0000000
diff --git a/miaosha-admin/src/test/java/com/dubbo/module/ModuleApplicationTests.java b/miaosha-admin/src/test/java/com/dubbo/module/ModuleApplicationTests.java
deleted file mode 100644
index 2397f9a..0000000
--- a/miaosha-admin/src/test/java/com/dubbo/module/ModuleApplicationTests.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.dubbo.module;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest
-public class ModuleApplicationTests {
-
- @Test
- public void contextLoads() {
- }
-
-}
diff --git a/pom.xml b/pom.xml
index 5f01582..64463b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,14 +11,42 @@
spring-boot-starter-parent
1.5.8.RELEASE
-
- miaosha
- http://maven.apache.org
UTF-8
+ miaosha
+ http://maven.apache.org
+
+ com.geekq
+ miaosha-common
+ 0.0.1-SNAPSHOT
+
+
+ com.geekq
+ miaosha-admin-api
+ 0.0.1-SNAPSHOT
+
+
+
+ com.github.sgroschupf
+ zkclient
+ 0.1
+
+
+
+
+ org.apache.curator
+ curator-framework
+ 4.0.0
+
+
+ org.apache.curator
+ curator-recipes
+ 4.0.0
+
+
com.alibaba
dubbo
@@ -55,7 +83,16 @@
org.springframework.boot
spring-boot-starter-tomcat
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ log4j
+ log4j
+
+
@@ -80,6 +117,16 @@
org.mybatis.spring.boot
mybatis-spring-boot-starter
1.3.1
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ log4j
+ log4j
+
+
diff --git a/src/main/java/com/geekq/miaosha/GeekQMainApplication.java b/src/main/java/com/geekq/miaosha/GeekQMainApplication.java
index 67cbc3c..3d4e624 100644
--- a/src/main/java/com/geekq/miaosha/GeekQMainApplication.java
+++ b/src/main/java/com/geekq/miaosha/GeekQMainApplication.java
@@ -3,8 +3,13 @@ package com.geekq.miaosha;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
+
+@ImportResource({"classpath:dubbo/applicationContext-dubbo-consumer.xml"})
+@ComponentScan(basePackages={"com.geekq.order.*","com.geekq.miaosha.*"})
@SpringBootApplication
@EnableScheduling
public class GeekQMainApplication {
diff --git a/src/main/java/com/geekq/miaosha/controller/LoginController.java b/src/main/java/com/geekq/miaosha/controller/LoginController.java
index 984bedf..ddc3f83 100644
--- a/src/main/java/com/geekq/miaosha/controller/LoginController.java
+++ b/src/main/java/com/geekq/miaosha/controller/LoginController.java
@@ -1,9 +1,11 @@
package com.geekq.miaosha.controller;
+import com.alibaba.dubbo.config.annotation.Reference;
import com.geekq.miaosha.common.resultbean.ResultGeekQ;
import com.geekq.miaosha.redis.redismanager.RedisLua;
import com.geekq.miaosha.service.MiaoShaUserService;
import com.geekq.miaosha.vo.LoginVo;
+import com.geekq.order.service.OrdersService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -25,10 +27,12 @@ public class LoginController {
@Autowired
private MiaoShaUserService userService;
-
+ @Reference
+ private OrdersService ordersService ;
@RequestMapping("/to_login")
public String tologin(LoginVo loginVo, Model model) {
logger.info(loginVo.toString());
+ ordersService.createOrder("111");
//未完成
RedisLua.vistorCount(COUNTLOGIN);
String count = RedisLua.getVistorCount(COUNTLOGIN).toString();
diff --git a/src/main/java/com/geekq/miaosha/controller/RegisterController.java b/src/main/java/com/geekq/miaosha/controller/RegisterController.java
index b91570a..4b6e253 100644
--- a/src/main/java/com/geekq/miaosha/controller/RegisterController.java
+++ b/src/main/java/com/geekq/miaosha/controller/RegisterController.java
@@ -1,9 +1,11 @@
package com.geekq.miaosha.controller;
+import com.alibaba.dubbo.config.annotation.Reference;
import com.geekq.miaosha.common.resultbean.ResultGeekQ;
import com.geekq.miaosha.domain.MiaoshaUser;
import com.geekq.miaosha.service.MiaoShaUserService;
import com.geekq.miaosha.service.MiaoshaService;
+import com.geekq.order.service.OrdersService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +29,7 @@ public class RegisterController {
private MiaoShaUserService miaoShaUserService;
@Autowired
private MiaoshaService miaoshaService ;
+
@RequestMapping("/do_register")
public String registerIndex(){
return "register";
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 54ad6b7..6c07bc2 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -23,12 +23,12 @@ log4j.logger.java.sql.PreparedStatement=DEBUG
#mybatis
mybatis.type-aliases-package=com.geekq.miaosha.domain
#开启驼峰转换 configuration config-location 不能同時存在 如果要走流程 请 放开注释
-#mybatis.configuration.map-underscore-to-camel-case=true
+mybatis.configuration.map-underscore-to-camel-case=true
#mybatis.mapperLocations = classpath:com/geekq/miaosha/dao/*.xml
mybatis.mapperLocations=classpath:mybatis/mapper/*.xml
#配置xml方式 因为与 mybatis.configuration.map-underscore-to-camel-case 仅用于测试
-mybatis.config-location=classpath:mybatis/mybatis-config.xml
+#mybatis.config-location=classpath:mybatis/mybatis-config.xml
#add mybatis
mybatis.
diff --git a/src/main/resources/dubbo/applicationContext-dubbo-consumer.xml b/src/main/resources/dubbo/applicationContext-dubbo-consumer.xml
new file mode 100644
index 0000000..c602ce1
--- /dev/null
+++ b/src/main/resources/dubbo/applicationContext-dubbo-consumer.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/dubbo/dubbo_consumer.xml b/src/main/resources/dubbo/dubbo_consumer.xml
deleted file mode 100644
index 7496998..0000000
--- a/src/main/resources/dubbo/dubbo_consumer.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/dubbo/springmvc.xml b/src/main/resources/dubbo/springmvc.xml
deleted file mode 100644
index 1abc0d5..0000000
--- a/src/main/resources/dubbo/springmvc.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-