Administrator hai 5 meses
achega
123961bd4e
Modificáronse 100 ficheiros con 9554 adicións e 0 borrados
  1. 24 0
      .gitignore
  2. BIN=BIN
      .mvn/wrapper/maven-wrapper.jar
  3. 1 0
      .mvn/wrapper/maven-wrapper.properties
  4. 225 0
      mvnw
  5. 143 0
      mvnw.cmd
  6. 189 0
      pom.xml
  7. 95 0
      sql/zjtblog.sql
  8. 22 0
      src/main/java/com/zjt/ManagerApplication.java
  9. 172 0
      src/main/java/com/zjt/config/DruidConfig.java
  10. 29 0
      src/main/java/com/zjt/config/MyWebMvcConfigurerAdapter.java
  11. 62 0
      src/main/java/com/zjt/config/MybatisDatasourceConfig.java
  12. 154 0
      src/main/java/com/zjt/config/ShiroConfig.java
  13. 4 0
      src/main/java/com/zjt/entity/SelectRequest.java
  14. 104 0
      src/main/java/com/zjt/entity/Tmenu.java
  15. 72 0
      src/main/java/com/zjt/entity/Trole.java
  16. 58 0
      src/main/java/com/zjt/entity/Trolemenu.java
  17. 130 0
      src/main/java/com/zjt/entity/Tuser.java
  18. 58 0
      src/main/java/com/zjt/entity/Tuserrole.java
  19. 118 0
      src/main/java/com/zjt/entity/brand.java
  20. 419 0
      src/main/java/com/zjt/entity/cgmaterial.java
  21. 186 0
      src/main/java/com/zjt/entity/group.java
  22. 217 0
      src/main/java/com/zjt/entity/price.java
  23. 310 0
      src/main/java/com/zjt/entity/requestDate.java
  24. 116 0
      src/main/java/com/zjt/entity/type.java
  25. 64 0
      src/main/java/com/zjt/exception/GlobalDefaultExceptionHandler.java
  26. 31 0
      src/main/java/com/zjt/interceptor/CommonInterceptor.java
  27. 13 0
      src/main/java/com/zjt/interceptor/CommonInterceptorConfig.java
  28. 68 0
      src/main/java/com/zjt/interceptor/TxAdviceInterceptor.java
  29. 15 0
      src/main/java/com/zjt/mapper/TmenuMapper.java
  30. 12 0
      src/main/java/com/zjt/mapper/TroleMapper.java
  31. 7 0
      src/main/java/com/zjt/mapper/TrolemenuMapper.java
  32. 7 0
      src/main/java/com/zjt/mapper/TuserMapper.java
  33. 7 0
      src/main/java/com/zjt/mapper/TuserroleMapper.java
  34. 12 0
      src/main/java/com/zjt/mapper/brandMapper.java
  35. 26 0
      src/main/java/com/zjt/mapper/cgmaterialMapper.java
  36. 13 0
      src/main/java/com/zjt/mapper/groupMapper.java
  37. 14 0
      src/main/java/com/zjt/mapper/priceMapper.java
  38. 12 0
      src/main/java/com/zjt/mapper/typeMapper.java
  39. 119 0
      src/main/java/com/zjt/model/JqgridBean.java
  40. 204 0
      src/main/java/com/zjt/model/Page.java
  41. 25 0
      src/main/java/com/zjt/model/PageRusult.java
  42. 111 0
      src/main/java/com/zjt/model/ReturnDate.java
  43. 98 0
      src/main/java/com/zjt/realm/MyRealm.java
  44. 56 0
      src/main/java/com/zjt/service/IService.java
  45. 20 0
      src/main/java/com/zjt/service/MaterialType.java
  46. 15 0
      src/main/java/com/zjt/service/TmenuService.java
  47. 13 0
      src/main/java/com/zjt/service/TroleService.java
  48. 6 0
      src/main/java/com/zjt/service/TrolemenuService.java
  49. 6 0
      src/main/java/com/zjt/service/TuserService.java
  50. 6 0
      src/main/java/com/zjt/service/TuserroleService.java
  51. 98 0
      src/main/java/com/zjt/service/impl/BaseService.java
  52. 115 0
      src/main/java/com/zjt/service/impl/MaterialTypeImp.java
  53. 31 0
      src/main/java/com/zjt/service/impl/TmenuServieImpl.java
  54. 27 0
      src/main/java/com/zjt/service/impl/TroleServiceImpl.java
  55. 15 0
      src/main/java/com/zjt/service/impl/TrolemenuServiceImpl.java
  56. 15 0
      src/main/java/com/zjt/service/impl/TuserServiceImpl.java
  57. 15 0
      src/main/java/com/zjt/service/impl/TuserroleServiceImpl.java
  58. 63 0
      src/main/java/com/zjt/util/AjaxObject.java
  59. 15 0
      src/main/java/com/zjt/util/MyMapper.java
  60. 54 0
      src/main/java/com/zjt/util/Page.java
  61. 22 0
      src/main/java/com/zjt/web/AbstractController.java
  62. 136 0
      src/main/java/com/zjt/web/DrawImageController.java
  63. 88 0
      src/main/java/com/zjt/web/MaterialContraller.java
  64. 324 0
      src/main/java/com/zjt/web/MenuController.java
  65. 19 0
      src/main/java/com/zjt/web/MyContraller.java
  66. 537 0
      src/main/java/com/zjt/web/RoleAdminController.java
  67. 391 0
      src/main/java/com/zjt/web/UserAdminController.java
  68. 421 0
      src/main/java/com/zjt/web/UserController.java
  69. 2 0
      src/main/resources/META-INF/spring-devtools.properties
  70. 77 0
      src/main/resources/application-dev.properties
  71. 0 0
      src/main/resources/application-prod.properties
  72. 1 0
      src/main/resources/application.properties
  73. 35 0
      src/main/resources/logback-spring.xml
  74. 44 0
      src/main/resources/mapper/TmenuMapper.xml
  75. 32 0
      src/main/resources/mapper/TroleMapper.xml
  76. 12 0
      src/main/resources/mapper/TrolemenuMapper.xml
  77. 12 0
      src/main/resources/mapper/TrserroleMapper.xml
  78. 15 0
      src/main/resources/mapper/TuserMapper.xml
  79. 27 0
      src/main/resources/mapper/brandMapper.xml
  80. 499 0
      src/main/resources/mapper/cgmaterialMapper.xml
  81. 39 0
      src/main/resources/mapper/groupMapper.xml
  82. 49 0
      src/main/resources/mapper/priceMapper.xml
  83. 26 0
      src/main/resources/mapper/typeMapper.xml
  84. 75 0
      src/main/resources/mybatis-generator.xml
  85. 433 0
      src/main/resources/static/css/global.css
  86. 159 0
      src/main/resources/static/css/index.css
  87. 431 0
      src/main/resources/static/css/layuiGlobalForIcon.css
  88. 171 0
      src/main/resources/static/css/public.css
  89. 386 0
      src/main/resources/static/css/ztree/awesomeStyle/awesome.css
  90. 146 0
      src/main/resources/static/css/ztree/awesomeStyle/awesome.less
  91. 480 0
      src/main/resources/static/css/ztree/awesomeStyle/fa.less
  92. BIN=BIN
      src/main/resources/static/css/ztree/awesomeStyle/img/loading.gif
  93. 33 0
      src/main/resources/static/css/ztree/demo.css
  94. BIN=BIN
      src/main/resources/static/css/ztree/metroStyle/img/line_conn.png
  95. BIN=BIN
      src/main/resources/static/css/ztree/metroStyle/img/loading.gif
  96. BIN=BIN
      src/main/resources/static/css/ztree/metroStyle/img/metro.gif
  97. BIN=BIN
      src/main/resources/static/css/ztree/metroStyle/img/metro.png
  98. 96 0
      src/main/resources/static/css/ztree/metroStyle/metroStyle.css
  99. BIN=BIN
      src/main/resources/static/css/ztree/zTreeStyle/img/diy/1_close.png
  100. 0 0
      src/main/resources/static/css/ztree/zTreeStyle/img/diy/1_open.png

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
1
+target/
2
+!.mvn/wrapper/maven-wrapper.jar
3
+
4
+### STS ###
5
+.apt_generated
6
+.classpath
7
+.factorypath
8
+.project
9
+.settings
10
+.springBeans
11
+
12
+### IntelliJ IDEA ###
13
+.idea
14
+*.iws
15
+*.iml
16
+*.ipr
17
+
18
+### NetBeans ###
19
+nbproject/private/
20
+build/
21
+nbbuild/
22
+dist/
23
+nbdist/
24
+.nb-gradle/

BIN=BIN
.mvn/wrapper/maven-wrapper.jar


+ 1 - 0
.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1 @@
1
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip

+ 225 - 0
mvnw

@@ -0,0 +1,225 @@
1
+#!/bin/sh
2
+# ----------------------------------------------------------------------------
3
+# Licensed to the Apache Software Foundation (ASF) under one
4
+# or more contributor license agreements.  See the NOTICE file
5
+# distributed with this work for additional information
6
+# regarding copyright ownership.  The ASF licenses this file
7
+# to you under the Apache License, Version 2.0 (the
8
+# "License"); you may not use this file except in compliance
9
+# with the License.  You may obtain a copy of the License at
10
+#
11
+#    http://www.apache.org/licenses/LICENSE-2.0
12
+#
13
+# Unless required by applicable law or agreed to in writing,
14
+# software distributed under the License is distributed on an
15
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+# KIND, either express or implied.  See the License for the
17
+# specific language governing permissions and limitations
18
+# under the License.
19
+# ----------------------------------------------------------------------------
20
+
21
+# ----------------------------------------------------------------------------
22
+# Maven2 Start Up Batch script
23
+#
24
+# Required ENV vars:
25
+# ------------------
26
+#   JAVA_HOME - location of a JDK home dir
27
+#
28
+# Optional ENV vars
29
+# -----------------
30
+#   M2_HOME - location of maven2's installed home dir
31
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
+#     e.g. to debug Maven itself, use
33
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+# ----------------------------------------------------------------------------
36
+
37
+if [ -z "$MAVEN_SKIP_RC" ] ; then
38
+
39
+  if [ -f /etc/mavenrc ] ; then
40
+    . /etc/mavenrc
41
+  fi
42
+
43
+  if [ -f "$HOME/.mavenrc" ] ; then
44
+    . "$HOME/.mavenrc"
45
+  fi
46
+
47
+fi
48
+
49
+# OS specific support.  $var _must_ be set to either true or false.
50
+cygwin=false;
51
+darwin=false;
52
+mingw=false
53
+case "`uname`" in
54
+  CYGWIN*) cygwin=true ;;
55
+  MINGW*) mingw=true;;
56
+  Darwin*) darwin=true
57
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59
+    if [ -z "$JAVA_HOME" ]; then
60
+      if [ -x "/usr/libexec/java_home" ]; then
61
+        export JAVA_HOME="`/usr/libexec/java_home`"
62
+      else
63
+        export JAVA_HOME="/Library/Java/Home"
64
+      fi
65
+    fi
66
+    ;;
67
+esac
68
+
69
+if [ -z "$JAVA_HOME" ] ; then
70
+  if [ -r /etc/gentoo-release ] ; then
71
+    JAVA_HOME=`java-config --jre-home`
72
+  fi
73
+fi
74
+
75
+if [ -z "$M2_HOME" ] ; then
76
+  ## resolve links - $0 may be a link to maven's home
77
+  PRG="$0"
78
+
79
+  # need this for relative symlinks
80
+  while [ -h "$PRG" ] ; do
81
+    ls=`ls -ld "$PRG"`
82
+    link=`expr "$ls" : '.*-> \(.*\)$'`
83
+    if expr "$link" : '/.*' > /dev/null; then
84
+      PRG="$link"
85
+    else
86
+      PRG="`dirname "$PRG"`/$link"
87
+    fi
88
+  done
89
+
90
+  saveddir=`pwd`
91
+
92
+  M2_HOME=`dirname "$PRG"`/..
93
+
94
+  # make it fully qualified
95
+  M2_HOME=`cd "$M2_HOME" && pwd`
96
+
97
+  cd "$saveddir"
98
+  # echo Using m2 at $M2_HOME
99
+fi
100
+
101
+# For Cygwin, ensure paths are in UNIX format before anything is touched
102
+if $cygwin ; then
103
+  [ -n "$M2_HOME" ] &&
104
+    M2_HOME=`cygpath --unix "$M2_HOME"`
105
+  [ -n "$JAVA_HOME" ] &&
106
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
107
+  [ -n "$CLASSPATH" ] &&
108
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
109
+fi
110
+
111
+# For Migwn, ensure paths are in UNIX format before anything is touched
112
+if $mingw ; then
113
+  [ -n "$M2_HOME" ] &&
114
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
115
+  [ -n "$JAVA_HOME" ] &&
116
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117
+  # TODO classpath?
118
+fi
119
+
120
+if [ -z "$JAVA_HOME" ]; then
121
+  javaExecutable="`which javac`"
122
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
123
+    # readlink(1) is not available as standard on Solaris 10.
124
+    readLink=`which readlink`
125
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
126
+      if $darwin ; then
127
+        javaHome="`dirname \"$javaExecutable\"`"
128
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
129
+      else
130
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
131
+      fi
132
+      javaHome="`dirname \"$javaExecutable\"`"
133
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
134
+      JAVA_HOME="$javaHome"
135
+      export JAVA_HOME
136
+    fi
137
+  fi
138
+fi
139
+
140
+if [ -z "$JAVACMD" ] ; then
141
+  if [ -n "$JAVA_HOME"  ] ; then
142
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
143
+      # IBM's JDK on AIX uses strange locations for the executables
144
+      JAVACMD="$JAVA_HOME/jre/sh/java"
145
+    else
146
+      JAVACMD="$JAVA_HOME/bin/java"
147
+    fi
148
+  else
149
+    JAVACMD="`which java`"
150
+  fi
151
+fi
152
+
153
+if [ ! -x "$JAVACMD" ] ; then
154
+  echo "Error: JAVA_HOME is not defined correctly." >&2
155
+  echo "  We cannot execute $JAVACMD" >&2
156
+  exit 1
157
+fi
158
+
159
+if [ -z "$JAVA_HOME" ] ; then
160
+  echo "Warning: JAVA_HOME environment variable is not set."
161
+fi
162
+
163
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
164
+
165
+# traverses directory structure from process work directory to filesystem root
166
+# first directory with .mvn subdirectory is considered project base directory
167
+find_maven_basedir() {
168
+
169
+  if [ -z "$1" ]
170
+  then
171
+    echo "Path not specified to find_maven_basedir"
172
+    return 1
173
+  fi
174
+
175
+  basedir="$1"
176
+  wdir="$1"
177
+  while [ "$wdir" != '/' ] ; do
178
+    if [ -d "$wdir"/.mvn ] ; then
179
+      basedir=$wdir
180
+      break
181
+    fi
182
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
183
+    if [ -d "${wdir}" ]; then
184
+      wdir=`cd "$wdir/.."; pwd`
185
+    fi
186
+    # end of workaround
187
+  done
188
+  echo "${basedir}"
189
+}
190
+
191
+# concatenates all lines of a file
192
+concat_lines() {
193
+  if [ -f "$1" ]; then
194
+    echo "$(tr -s '\n' ' ' < "$1")"
195
+  fi
196
+}
197
+
198
+BASE_DIR=`find_maven_basedir "$(pwd)"`
199
+if [ -z "$BASE_DIR" ]; then
200
+  exit 1;
201
+fi
202
+
203
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
204
+echo $MAVEN_PROJECTBASEDIR
205
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
206
+
207
+# For Cygwin, switch paths to Windows format before running java
208
+if $cygwin; then
209
+  [ -n "$M2_HOME" ] &&
210
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
211
+  [ -n "$JAVA_HOME" ] &&
212
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
213
+  [ -n "$CLASSPATH" ] &&
214
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
215
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
216
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
217
+fi
218
+
219
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
220
+
221
+exec "$JAVACMD" \
222
+  $MAVEN_OPTS \
223
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
224
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
225
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 143 - 0
mvnw.cmd

@@ -0,0 +1,143 @@
1
+@REM ----------------------------------------------------------------------------
2
+@REM Licensed to the Apache Software Foundation (ASF) under one
3
+@REM or more contributor license agreements.  See the NOTICE file
4
+@REM distributed with this work for additional information
5
+@REM regarding copyright ownership.  The ASF licenses this file
6
+@REM to you under the Apache License, Version 2.0 (the
7
+@REM "License"); you may not use this file except in compliance
8
+@REM with the License.  You may obtain a copy of the License at
9
+@REM
10
+@REM    http://www.apache.org/licenses/LICENSE-2.0
11
+@REM
12
+@REM Unless required by applicable law or agreed to in writing,
13
+@REM software distributed under the License is distributed on an
14
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+@REM KIND, either express or implied.  See the License for the
16
+@REM specific language governing permissions and limitations
17
+@REM under the License.
18
+@REM ----------------------------------------------------------------------------
19
+
20
+@REM ----------------------------------------------------------------------------
21
+@REM Maven2 Start Up Batch script
22
+@REM
23
+@REM Required ENV vars:
24
+@REM JAVA_HOME - location of a JDK home dir
25
+@REM
26
+@REM Optional ENV vars
27
+@REM M2_HOME - location of maven2's installed home dir
28
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
+@REM     e.g. to debug Maven itself, use
32
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
+@REM ----------------------------------------------------------------------------
35
+
36
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
+@echo off
38
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
40
+
41
+@REM set %HOME% to equivalent of $HOME
42
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
+
44
+@REM Execute a user defined script before this one
45
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49
+:skipRcPre
50
+
51
+@setlocal
52
+
53
+set ERROR_CODE=0
54
+
55
+@REM To isolate internal variables from possible post scripts, we use another setlocal
56
+@setlocal
57
+
58
+@REM ==== START VALIDATION ====
59
+if not "%JAVA_HOME%" == "" goto OkJHome
60
+
61
+echo.
62
+echo Error: JAVA_HOME not found in your environment. >&2
63
+echo Please set the JAVA_HOME variable in your environment to match the >&2
64
+echo location of your Java installation. >&2
65
+echo.
66
+goto error
67
+
68
+:OkJHome
69
+if exist "%JAVA_HOME%\bin\java.exe" goto init
70
+
71
+echo.
72
+echo Error: JAVA_HOME is set to an invalid directory. >&2
73
+echo JAVA_HOME = "%JAVA_HOME%" >&2
74
+echo Please set the JAVA_HOME variable in your environment to match the >&2
75
+echo location of your Java installation. >&2
76
+echo.
77
+goto error
78
+
79
+@REM ==== END VALIDATION ====
80
+
81
+:init
82
+
83
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
84
+@REM Fallback to current working directory if not found.
85
+
86
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
87
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
88
+
89
+set EXEC_DIR=%CD%
90
+set WDIR=%EXEC_DIR%
91
+:findBaseDir
92
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
93
+cd ..
94
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
95
+set WDIR=%CD%
96
+goto findBaseDir
97
+
98
+:baseDirFound
99
+set MAVEN_PROJECTBASEDIR=%WDIR%
100
+cd "%EXEC_DIR%"
101
+goto endDetectBaseDir
102
+
103
+:baseDirNotFound
104
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
105
+cd "%EXEC_DIR%"
106
+
107
+:endDetectBaseDir
108
+
109
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
110
+
111
+@setlocal EnableExtensions EnableDelayedExpansion
112
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
113
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
114
+
115
+:endReadAdditionalConfig
116
+
117
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
118
+
119
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
120
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
121
+
122
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
123
+if ERRORLEVEL 1 goto error
124
+goto end
125
+
126
+:error
127
+set ERROR_CODE=1
128
+
129
+:end
130
+@endlocal & set ERROR_CODE=%ERROR_CODE%
131
+
132
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
133
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
134
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
135
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
136
+:skipRcPost
137
+
138
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
139
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
140
+
141
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
142
+
143
+exit /B %ERROR_CODE%

+ 189 - 0
pom.xml

@@ -0,0 +1,189 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+	<modelVersion>4.0.0</modelVersion>
5
+
6
+	<groupId>com.zjt.blog</groupId>
7
+	<artifactId>manager</artifactId>
8
+	<version>0.0.1-SNAPSHOT</version>
9
+	<packaging>jar</packaging>
10
+
11
+	<name>manager</name>
12
+	<description></description>
13
+
14
+	<parent>
15
+		<groupId>org.springframework.boot</groupId>
16
+		<artifactId>spring-boot-starter-parent</artifactId>
17
+		<version>1.5.10.RELEASE</version>
18
+		<relativePath/> <!-- lookup parent from repository -->
19
+	</parent>
20
+
21
+	<properties>
22
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24
+		<java.version>1.8</java.version>
25
+	</properties>
26
+
27
+	<dependencies>
28
+		<!--使用freemarker的starter,里面包含spring-boot-starter-web组件-->
29
+		<dependency>
30
+			<groupId>org.springframework.boot</groupId>
31
+			<artifactId>spring-boot-starter-freemarker</artifactId>
32
+		</dependency>
33
+
34
+		<!--springboot测试组件-->
35
+		<dependency>
36
+			<groupId>org.springframework.boot</groupId>
37
+			<artifactId>spring-boot-starter-test</artifactId>
38
+		</dependency>
39
+
40
+		<!--springboot热部署组件-->
41
+		<dependency>
42
+			<groupId>org.springframework.boot</groupId>
43
+			<artifactId>spring-boot-devtools</artifactId>
44
+			<optional>true</optional> <!-- 这个需要为 true 热部署才有效 -->
45
+		</dependency>
46
+
47
+		<!--mybatis依赖-->
48
+		<dependency>
49
+			<groupId>org.mybatis.spring.boot</groupId>
50
+			<artifactId>mybatis-spring-boot-starter</artifactId>
51
+			<version>1.3.1</version>
52
+		</dependency>
53
+
54
+		<!--通用mapper-->
55
+		<dependency>
56
+			<groupId>tk.mybatis</groupId>
57
+			<artifactId>mapper-spring-boot-starter</artifactId>
58
+			<version>1.1.5</version>
59
+		</dependency>
60
+
61
+		<!--pagehelper 分页插件-->
62
+		<dependency>
63
+			<groupId>com.github.pagehelper</groupId>
64
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
65
+			<version>1.2.3</version>
66
+		</dependency>
67
+
68
+		<!--mysql连接驱动包-->
69
+		<dependency>
70
+			<groupId>mysql</groupId>
71
+			<artifactId>mysql-connector-java</artifactId>
72
+			<version>5.1.44</version>
73
+		</dependency>
74
+
75
+		<!--druid连接池依赖-->
76
+		<dependency>
77
+			<groupId>com.alibaba</groupId>
78
+			<artifactId>druid-spring-boot-starter</artifactId>
79
+			<version>1.1.6</version>
80
+		</dependency>
81
+
82
+		<dependency>
83
+			<groupId>com.alibaba</groupId>
84
+			<artifactId>fastjson</artifactId>
85
+			<version>1.2.31</version>
86
+		</dependency>
87
+
88
+		<!--aspectj组件-->
89
+		<dependency>
90
+			<groupId>org.aspectj</groupId>
91
+			<artifactId>aspectjweaver</artifactId>
92
+			<version>1.8.0</version>
93
+		</dependency>
94
+
95
+
96
+		<dependency>
97
+			<groupId>org.apache.shiro</groupId>
98
+			<artifactId>shiro-core</artifactId>
99
+			<version>1.4.0</version>
100
+		</dependency>
101
+
102
+		<dependency>
103
+			<groupId>org.apache.shiro</groupId>
104
+			<artifactId>shiro-spring</artifactId>
105
+			<version>1.4.0</version>
106
+		</dependency>
107
+
108
+		<dependency>
109
+			<groupId>com.google.code.gson</groupId>
110
+			<artifactId>gson</artifactId>
111
+		</dependency>
112
+
113
+
114
+		<dependency>
115
+			<groupId>org.apache.commons</groupId>
116
+			<artifactId>commons-lang3</artifactId>
117
+			<version>3.4</version>
118
+		</dependency>
119
+
120
+
121
+		<!--部署外部tomcat容器的时候再开启-->
122
+		<!--<dependency>
123
+			<groupId>org.springframework.boot</groupId>
124
+			<artifactId>spring-boot-starter-tomcat</artifactId>
125
+		</dependency>-->
126
+	</dependencies>
127
+
128
+	<build>
129
+		<plugins>
130
+			<plugin>
131
+				<groupId>org.springframework.boot</groupId>
132
+				<artifactId>spring-boot-maven-plugin</artifactId>
133
+				<configuration>
134
+					<!--fork :  如果没有该项配置,这个devtools不会起作用,即应用不会restart -->
135
+					<fork>true</fork>
136
+					<!--支持静态文件热部署-->
137
+					<addResources>true</addResources>
138
+				</configuration>
139
+			</plugin>
140
+
141
+			<!--要打包了这个生成代码要禁止掉,本地开发开启-->
142
+			<plugin>
143
+				<groupId>org.mybatis.generator</groupId>
144
+				<artifactId>mybatis-generator-maven-plugin</artifactId>
145
+				<version>1.3.5</version>
146
+				<dependencies>
147
+					<!--配置这个依赖主要是为了等下在配置mybatis-generator.xml的时候可以不用配置classPathEntry这样的一个属性,避免代码的耦合度太高-->
148
+					<dependency>
149
+						<groupId>mysql</groupId>
150
+						<artifactId>mysql-connector-java</artifactId>
151
+						<version>5.1.44</version>
152
+					</dependency>
153
+					<dependency>
154
+						<groupId>tk.mybatis</groupId>
155
+						<artifactId>mapper</artifactId>
156
+						<version>3.4.0</version>
157
+					</dependency>
158
+				</dependencies>
159
+				<executions>
160
+					<execution>
161
+						<id>Generate MyBatis Artifacts</id>
162
+						<phase>package</phase>
163
+						<goals>
164
+							<goal>generate</goal>
165
+						</goals>
166
+					</execution>
167
+				</executions>
168
+				<configuration>
169
+					<!--允许移动生成的文件 -->
170
+					<verbose>true</verbose>
171
+					<!-- 是否覆盖 -->
172
+					<overwrite>true</overwrite>
173
+					<!-- 自动生成的配置 -->
174
+					<configurationFile>src/main/resources/mybatis-generator.xml</configurationFile>
175
+				</configuration>
176
+			</plugin>
177
+
178
+			<plugin>
179
+				<artifactId>maven-compiler-plugin</artifactId>
180
+				<configuration>
181
+					<source>1.8</source>
182
+					<target>1.8</target>
183
+				</configuration>
184
+			</plugin>
185
+		</plugins>
186
+	</build>
187
+
188
+
189
+</project>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 95 - 0
sql/zjtblog.sql


+ 22 - 0
src/main/java/com/zjt/ManagerApplication.java

@@ -0,0 +1,22 @@
1
+package com.zjt;
2
+
3
+import org.mybatis.spring.annotation.MapperScan;
4
+import org.springframework.boot.SpringApplication;
5
+import org.springframework.boot.autoconfigure.SpringBootApplication;
6
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
7
+import org.springframework.boot.builder.SpringApplicationBuilder;
8
+import org.springframework.boot.web.support.SpringBootServletInitializer;
9
+import org.springframework.transaction.annotation.EnableTransactionManagement;
10
+
11
+@EnableTransactionManagement  // 启注解事务管理,等同于xml配置方式的
12
+//首先要将spring boot自带的DataSourceAutoConfiguration禁掉,因为它会读取application.properties文件的spring.datasource.*属性并自动配置单数据源。在@SpringBootApplication注解中添加exclude属性即可:
13
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
14
+public class ManagerApplication  extends SpringBootServletInitializer {
15
+	@Override
16
+	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
17
+		return application.sources(ManagerApplication.class);
18
+	}
19
+	public static void main(String[] args) {
20
+		SpringApplication.run(ManagerApplication.class, args);
21
+	}
22
+}

+ 172 - 0
src/main/java/com/zjt/config/DruidConfig.java

@@ -0,0 +1,172 @@
1
+package com.zjt.config;
2
+
3
+import com.alibaba.druid.filter.Filter;
4
+import com.alibaba.druid.filter.stat.StatFilter;
5
+import com.alibaba.druid.pool.DruidDataSource;
6
+import com.alibaba.druid.support.http.StatViewServlet;
7
+import com.alibaba.druid.support.http.WebStatFilter;
8
+import com.alibaba.druid.wall.WallConfig;
9
+import com.alibaba.druid.wall.WallFilter;
10
+import org.slf4j.Logger;
11
+import org.slf4j.LoggerFactory;
12
+import org.springframework.beans.factory.annotation.Value;
13
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
14
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
15
+import org.springframework.context.annotation.Bean;
16
+import org.springframework.context.annotation.Configuration;
17
+import org.springframework.context.annotation.Primary;
18
+
19
+import javax.sql.DataSource;
20
+import java.util.ArrayList;
21
+import java.util.List;
22
+
23
+/**
24
+ * Druid配置
25
+ *
26
+ * @author tanxiaoxu
27
+ */
28
+@Configuration
29
+public class DruidConfig {
30
+    private Logger logger = LoggerFactory.getLogger(DruidConfig.class);
31
+
32
+    @Value("${spring.datasource.url:#{null}}")
33
+    private String dbUrl;
34
+    @Value("${spring.datasource.username: #{null}}")
35
+    private String username;
36
+    @Value("${spring.datasource.password:#{null}}")
37
+    private String password;
38
+    @Value("${spring.datasource.driverClassName:#{null}}")
39
+    private String driverClassName;
40
+
41
+
42
+    @Value("${spring.datasource.initialSize:#{null}}")
43
+    private Integer initialSize;
44
+    @Value("${spring.datasource.minIdle:#{null}}")
45
+    private Integer minIdle;
46
+    @Value("${spring.datasource.maxActive:#{null}}")
47
+    private Integer maxActive;
48
+    @Value("${spring.datasource.maxWait:#{null}}")
49
+    private Integer maxWait;
50
+    @Value("${spring.datasource.timeBetweenEvictionRunsMillis:#{null}}")
51
+    private Integer timeBetweenEvictionRunsMillis;
52
+    @Value("${spring.datasource.minEvictableIdleTimeMillis:#{null}}")
53
+    private Integer minEvictableIdleTimeMillis;
54
+    @Value("${spring.datasource.validationQuery:#{null}}")
55
+    private String validationQuery;
56
+    @Value("${spring.datasource.testWhileIdle:#{null}}")
57
+    private Boolean testWhileIdle;
58
+    @Value("${spring.datasource.testOnBorrow:#{null}}")
59
+    private Boolean testOnBorrow;
60
+    @Value("${spring.datasource.testOnReturn:#{null}}")
61
+    private Boolean testOnReturn;
62
+    @Value("${spring.datasource.poolPreparedStatements:#{null}}")
63
+    private Boolean poolPreparedStatements;
64
+    @Value("${spring.datasource.maxPoolPreparedStatementPerConnectionSize:#{null}}")
65
+    private Integer maxPoolPreparedStatementPerConnectionSize;
66
+    @Value("${spring.datasource.filters:#{null}}")
67
+    private String filters;
68
+    @Value("{spring.datasource.connectionProperties:#{null}}")
69
+    private String connectionProperties;
70
+
71
+    @Bean
72
+    @Primary
73
+    public DataSource dataSource(){
74
+        DruidDataSource datasource = new DruidDataSource();
75
+
76
+        datasource.setUrl(this.dbUrl);
77
+        datasource.setUsername(username);
78
+        datasource.setPassword(password);
79
+        datasource.setDriverClassName(driverClassName);
80
+        //configuration
81
+        if(initialSize != null) {
82
+            datasource.setInitialSize(initialSize);
83
+        }
84
+        if(minIdle != null) {
85
+            datasource.setMinIdle(minIdle);
86
+        }
87
+        if(maxActive != null) {
88
+            datasource.setMaxActive(maxActive);
89
+        }
90
+        if(maxWait != null) {
91
+            datasource.setMaxWait(maxWait);
92
+        }
93
+        if(timeBetweenEvictionRunsMillis != null) {
94
+            datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
95
+        }
96
+        if(minEvictableIdleTimeMillis != null) {
97
+            datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
98
+        }
99
+        if(validationQuery!=null) {
100
+            datasource.setValidationQuery(validationQuery);
101
+        }
102
+        if(testWhileIdle != null) {
103
+            datasource.setTestWhileIdle(testWhileIdle);
104
+        }
105
+        if(testOnBorrow != null) {
106
+            datasource.setTestOnBorrow(testOnBorrow);
107
+        }
108
+        if(testOnReturn != null) {
109
+            datasource.setTestOnReturn(testOnReturn);
110
+        }
111
+        if(poolPreparedStatements != null) {
112
+            datasource.setPoolPreparedStatements(poolPreparedStatements);
113
+        }
114
+        if(maxPoolPreparedStatementPerConnectionSize != null) {
115
+            datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
116
+        }
117
+
118
+        if(connectionProperties != null) {
119
+            datasource.setConnectionProperties(connectionProperties);
120
+        }
121
+
122
+        List<Filter> filters = new ArrayList<>();
123
+        filters.add(statFilter());
124
+        filters.add(wallFilter());
125
+        datasource.setProxyFilters(filters);
126
+
127
+        return datasource;
128
+    }
129
+
130
+
131
+
132
+
133
+
134
+    @Bean
135
+    public ServletRegistrationBean druidServlet() {
136
+        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*");
137
+
138
+        //控制台管理用户,加入下面2行 进入druid后台就需要登录
139
+        //servletRegistrationBean.addInitParameter("loginUsername", "admin");
140
+        //servletRegistrationBean.addInitParameter("loginPassword", "admin");
141
+        return servletRegistrationBean;
142
+    }
143
+
144
+    @Bean
145
+    public FilterRegistrationBean filterRegistrationBean() {
146
+        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
147
+        filterRegistrationBean.setFilter(new WebStatFilter());
148
+        filterRegistrationBean.addUrlPatterns("/*");
149
+        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
150
+        filterRegistrationBean.addInitParameter("profileEnable", "true");
151
+        return filterRegistrationBean;
152
+    }
153
+
154
+    @Bean
155
+    public StatFilter statFilter(){
156
+        StatFilter statFilter = new StatFilter();
157
+        statFilter.setLogSlowSql(true); //slowSqlMillis用来配置SQL慢的标准,执行时间超过slowSqlMillis的就是慢。
158
+        statFilter.setMergeSql(true); //SQL合并配置
159
+        statFilter.setSlowSqlMillis(1000);//slowSqlMillis的缺省值为3000,也就是3秒。
160
+        return statFilter;
161
+    }
162
+
163
+    @Bean
164
+    public WallFilter wallFilter(){
165
+        WallFilter wallFilter = new WallFilter();
166
+        //允许执行多条SQL
167
+        WallConfig config = new WallConfig();
168
+        config.setMultiStatementAllow(true);
169
+        wallFilter.setConfig(config);
170
+        return wallFilter;
171
+    }
172
+}

+ 29 - 0
src/main/java/com/zjt/config/MyWebMvcConfigurerAdapter.java

@@ -0,0 +1,29 @@
1
+package com.zjt.config;
2
+
3
+import org.springframework.context.annotation.Configuration;
4
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
6
+
7
+@Configuration
8
+public class MyWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
9
+
10
+
11
+    /**
12
+     * 以前要访问一个页面需要先创建个Controller控制类,在写方法跳转到页面
13
+     * 在这里配置后就不需要那么麻烦了,直接访问http://localhost:8080/toLogin就跳转到login.html页面了
14
+     *
15
+     * @param registry
16
+     */
17
+    @Override
18
+    public void addViewControllers(ViewControllerRegistry registry) {
19
+        registry.addViewController("/").setViewName("welcome");
20
+        registry.addViewController("/tologin").setViewName("login");
21
+        registry.addViewController("/welcome").setViewName("welcome");
22
+        registry.addViewController("/error/errordeal").setViewName("error/errordealogin");
23
+        registry.addViewController("/error/unauthorized").setViewName("error/unauthorized");
24
+        registry.addViewController("/main").setViewName("main");
25
+        super.addViewControllers(registry);
26
+    }
27
+
28
+}
29
+

+ 62 - 0
src/main/java/com/zjt/config/MybatisDatasourceConfig.java

@@ -0,0 +1,62 @@
1
+package com.zjt.config;
2
+
3
+import com.zjt.util.MyMapper;
4
+import org.apache.ibatis.session.SqlSessionFactory;
5
+import org.mybatis.spring.SqlSessionFactoryBean;
6
+import org.mybatis.spring.SqlSessionTemplate;
7
+import org.mybatis.spring.annotation.MapperScan;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.beans.factory.annotation.Qualifier;
10
+import org.springframework.context.annotation.Bean;
11
+import org.springframework.context.annotation.Configuration;
12
+import org.springframework.context.annotation.Primary;
13
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
14
+import org.springframework.core.io.support.ResourcePatternResolver;
15
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
16
+
17
+import javax.sql.DataSource;
18
+
19
+/**
20
+ * @author <a href="tanxiaoxu"></a>
21
+ * @version 1.0, 2017/11/24
22
+ * @description
23
+ */
24
+@Configuration
25
+// 精确到 mapper 目录,以便跟其他数据源隔离
26
+@MapperScan(basePackages = "com.zjt.mapper", markerInterface = MyMapper.class, sqlSessionFactoryRef = "sqlSessionFactory")
27
+public class MybatisDatasourceConfig {
28
+
29
+    @Autowired
30
+    @Qualifier("dataSource")
31
+    private DataSource ds;
32
+
33
+    @Bean
34
+    public SqlSessionFactory sqlSessionFactory() throws Exception {
35
+        SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
36
+        factoryBean.setDataSource(ds);
37
+        //指定mapper xml目录
38
+        ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
39
+        factoryBean.setMapperLocations(resolver.getResources("classpath:mapper/*.xml"));
40
+        return factoryBean.getObject();
41
+
42
+    }
43
+
44
+    @Bean
45
+    public SqlSessionTemplate sqlSessionTemplate() throws Exception {
46
+        SqlSessionTemplate template = new SqlSessionTemplate(sqlSessionFactory()); // 使用上面配置的Factory
47
+        return template;
48
+    }
49
+
50
+    //关于事务管理器,不管是JPA还是JDBC等都实现自接口 PlatformTransactionManager
51
+    // 如果你添加的是 spring-boot-starter-jdbc 依赖,框架会默认注入 DataSourceTransactionManager 实例。
52
+    //在Spring容器中,我们手工注解@Bean 将被优先加载,框架不会重新实例化其他的 PlatformTransactionManager 实现类。
53
+    @Bean(name = "transactionManager")
54
+    @Primary
55
+    public DataSourceTransactionManager masterTransactionManager() {
56
+        //MyBatis自动参与到spring事务管理中,无需额外配置,只要org.mybatis.spring.SqlSessionFactoryBean引用的数据源
57
+        // 与DataSourceTransactionManager引用的数据源一致即可,否则事务管理会不起作用。
58
+        return new DataSourceTransactionManager(ds);
59
+
60
+    }
61
+
62
+}

+ 154 - 0
src/main/java/com/zjt/config/ShiroConfig.java

@@ -0,0 +1,154 @@
1
+package com.zjt.config;
2
+
3
+import com.zjt.realm.MyRealm;
4
+import org.apache.shiro.mgt.SecurityManager;
5
+import org.apache.shiro.spring.LifecycleBeanPostProcessor;
6
+import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
7
+import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
8
+import org.apache.shiro.web.mgt.CookieRememberMeManager;
9
+import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
10
+import org.apache.shiro.web.servlet.SimpleCookie;
11
+import org.springframework.context.annotation.Bean;
12
+import org.springframework.context.annotation.Configuration;
13
+
14
+import java.util.LinkedHashMap;
15
+import java.util.Map;
16
+
17
+/**
18
+* @Description: Shiro配置类
19
+* @Date: Created in 2018/2/8 13:29
20
+* @param 
21
+*/
22
+@Configuration
23
+public class ShiroConfig {
24
+
25
+	/**
26
+     * ShiroFilterFactoryBean 处理拦截资源文件问题。
27
+     * 注意:单独一个ShiroFilterFactoryBean配置是或报错的,以为在
28
+     * 初始化ShiroFilterFactoryBean的时候需要注入:SecurityManager
29
+     *
30
+     * Filter Chain定义说明 1、一个URL可以配置多个Filter,使用逗号分隔 2、当设置多个过滤器时,全部验证通过,才视为通过
31
+     * 3、部分过滤器可指定参数,如perms,roles
32
+     *
33
+     */
34
+    @Bean
35
+    public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
36
+        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
37
+
38
+        // 必须设置 SecurityManager
39
+        shiroFilterFactoryBean.setSecurityManager(securityManager);
40
+
41
+        // 如果不设置默认会自动寻找Web工程根目录下的"/login.jsp"页面
42
+        //shiroFilterFactoryBean.setLoginUrl("/login.ftl");
43
+
44
+        //配置退出过滤器,其中的具体的退出代码Shiro已经替我们实现了
45
+        shiroFilterFactoryBean.setLoginUrl("/tologin");
46
+        shiroFilterFactoryBean.setUnauthorizedUrl("/tologin");
47
+
48
+        // 拦截器.
49
+        Map<String, String> filterChainDefinitionMap = new LinkedHashMap<String, String>();
50
+        //配置记住我或认证通过可以访问的地址(配置不会被拦截的链接 顺序判断)
51
+        filterChainDefinitionMap.put("/static/**", "anon");
52
+        filterChainDefinitionMap.put("/user/login", "anon");
53
+        filterChainDefinitionMap.put("/drawImage", "anon");
54
+
55
+        // 配置退出过滤器,其中的具体的退出代码Shiro已经替我们实现了
56
+        filterChainDefinitionMap.put("/admin/user/logout", "logout");
57
+
58
+
59
+        // <!-- 过滤链定义,从上向下顺序执行,一般将 /**放在最为下边 -->:这是一个坑呢,一不小心代码就不好使了;
60
+        // <!-- authc:所有url都必须认证通过才可以访问; anon:所有url都都可以匿名访问-->
61
+        filterChainDefinitionMap.put("/**", "authc");
62
+
63
+        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
64
+        return shiroFilterFactoryBean;
65
+}
66
+
67
+    @Bean
68
+    public SecurityManager securityManager() {
69
+        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
70
+        // 设置realm.
71
+        securityManager.setRealm(myRealm());
72
+
73
+        //注入记住我管理器;
74
+        securityManager.setRememberMeManager(rememberMeManager());
75
+
76
+
77
+        return securityManager;
78
+    }
79
+
80
+    /**
81
+     * 身份认证realm; (这个需要自己写,账号密码校验;权限等)
82
+     * 
83
+     * @return
84
+     */
85
+    @Bean
86
+    public MyRealm myRealm() {
87
+    	MyRealm myRealm = new MyRealm();
88
+        return myRealm;
89
+    }
90
+
91
+    /**
92
+     * Shiro生命周期处理器
93
+     * @return
94
+     */
95
+    @Bean
96
+    public LifecycleBeanPostProcessor lifecycleBeanPostProcessor(){
97
+        return new LifecycleBeanPostProcessor();
98
+    }
99
+    /**
100
+     * 开启Shiro的注解(如@RequiresRoles,@RequiresPermissions),需借助SpringAOP扫描使用Shiro注解的类,并在必要时进行安全逻辑验证
101
+     * 配置以下两个bean(DefaultAdvisorAutoProxyCreator(可选)和AuthorizationAttributeSourceAdvisor)即可实现此功能
102
+     * 不要使用 DefaultAdvisorAutoProxyCreator 会出现二次代理的问题,这里不详述
103
+     * @return
104
+     */
105
+   /* @Bean
106
+    @DependsOn({"lifecycleBeanPostProcessor"})
107
+    public DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator(){
108
+        DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
109
+        advisorAutoProxyCreator.setProxyTargetClass(true);
110
+        return advisorAutoProxyCreator;
111
+    }*/
112
+    @Bean
113
+    public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(){
114
+        AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
115
+        authorizationAttributeSourceAdvisor.setSecurityManager(securityManager());
116
+        return authorizationAttributeSourceAdvisor;
117
+    }
118
+
119
+
120
+
121
+
122
+
123
+    /**
124
+     * cookie对象;
125
+     * 记住密码实现起来也是比较简单的,主要看下是如何实现的。
126
+     * @return
127
+     */
128
+    @Bean
129
+    public SimpleCookie rememberMeCookie(){
130
+        System.out.println("ShiroConfiguration.rememberMeCookie()");
131
+        //这个参数是cookie的名称,对应前端的checkbox的name = rememberMe
132
+        SimpleCookie simpleCookie = new SimpleCookie("rememberMe");
133
+        //<!-- 记住我cookie生效时间30天 ,单位秒;-->
134
+        simpleCookie.setMaxAge(259200);
135
+        return simpleCookie;
136
+    }
137
+
138
+    /**
139
+     * cookie管理对象;
140
+     * @return
141
+     */
142
+    @Bean
143
+    public CookieRememberMeManager rememberMeManager(){
144
+        System.out.println("ShiroConfiguration.rememberMeManager()");
145
+        CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
146
+        cookieRememberMeManager.setCookie(rememberMeCookie());
147
+        return cookieRememberMeManager;
148
+    }
149
+
150
+
151
+
152
+
153
+
154
+}

+ 4 - 0
src/main/java/com/zjt/entity/SelectRequest.java

@@ -0,0 +1,4 @@
1
+package com.zjt.entity;
2
+
3
+public class SelectRequest {
4
+}

+ 104 - 0
src/main/java/com/zjt/entity/Tmenu.java

@@ -0,0 +1,104 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.*;
4
+
5
+@Table(name = "t_menu")
6
+public class Tmenu {
7
+    @Id
8
+    private Integer id;
9
+
10
+    private String icon;
11
+
12
+    private String name;
13
+
14
+    private Integer state;
15
+
16
+    private String url;
17
+
18
+    @Column(name = "p_id")
19
+    private Integer pId;
20
+
21
+    /**
22
+     * @return id
23
+     */
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    /**
29
+     * @param id
30
+     */
31
+    public void setId(Integer id) {
32
+        this.id = id;
33
+    }
34
+
35
+    /**
36
+     * @return icon
37
+     */
38
+    public String getIcon() {
39
+        return icon;
40
+    }
41
+
42
+    /**
43
+     * @param icon
44
+     */
45
+    public void setIcon(String icon) {
46
+        this.icon = icon == null ? null : icon.trim();
47
+    }
48
+
49
+    /**
50
+     * @return name
51
+     */
52
+    public String getName() {
53
+        return name;
54
+    }
55
+
56
+    /**
57
+     * @param name
58
+     */
59
+    public void setName(String name) {
60
+        this.name = name == null ? null : name.trim();
61
+    }
62
+
63
+    /**
64
+     * @return state
65
+     */
66
+    public Integer getState() {
67
+        return state;
68
+    }
69
+
70
+    /**
71
+     * @param state
72
+     */
73
+    public void setState(Integer state) {
74
+        this.state = state;
75
+    }
76
+
77
+    /**
78
+     * @return url
79
+     */
80
+    public String getUrl() {
81
+        return url;
82
+    }
83
+
84
+    /**
85
+     * @param url
86
+     */
87
+    public void setUrl(String url) {
88
+        this.url = url == null ? null : url.trim();
89
+    }
90
+
91
+    /**
92
+     * @return p_id
93
+     */
94
+    public Integer getpId() {
95
+        return pId;
96
+    }
97
+
98
+    /**
99
+     * @param pId
100
+     */
101
+    public void setpId(Integer pId) {
102
+        this.pId = pId;
103
+    }
104
+}

+ 72 - 0
src/main/java/com/zjt/entity/Trole.java

@@ -0,0 +1,72 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.*;
4
+
5
+@Table(name = "t_role")
6
+public class Trole {
7
+    @Id
8
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
9
+    private Integer id;
10
+
11
+    private String bz;
12
+
13
+    private String name;
14
+
15
+    private String remarks;
16
+
17
+    /**
18
+     * @return id
19
+     */
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    /**
25
+     * @param id
26
+     */
27
+    public void setId(Integer id) {
28
+        this.id = id;
29
+    }
30
+
31
+    /**
32
+     * @return bz
33
+     */
34
+    public String getBz() {
35
+        return bz;
36
+    }
37
+
38
+    /**
39
+     * @param bz
40
+     */
41
+    public void setBz(String bz) {
42
+        this.bz = bz == null ? null : bz.trim();
43
+    }
44
+
45
+    /**
46
+     * @return name
47
+     */
48
+    public String getName() {
49
+        return name;
50
+    }
51
+
52
+    /**
53
+     * @param name
54
+     */
55
+    public void setName(String name) {
56
+        this.name = name == null ? null : name.trim();
57
+    }
58
+
59
+    /**
60
+     * @return remarks
61
+     */
62
+    public String getRemarks() {
63
+        return remarks;
64
+    }
65
+
66
+    /**
67
+     * @param remarks
68
+     */
69
+    public void setRemarks(String remarks) {
70
+        this.remarks = remarks == null ? null : remarks.trim();
71
+    }
72
+}

+ 58 - 0
src/main/java/com/zjt/entity/Trolemenu.java

@@ -0,0 +1,58 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.*;
4
+
5
+@Table(name = "t_role_menu")
6
+public class Trolemenu {
7
+    @Id
8
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
9
+    private Integer id;
10
+
11
+    @Column(name = "menu_id")
12
+    private Integer menuId;
13
+
14
+    @Column(name = "role_id")
15
+    private Integer roleId;
16
+
17
+    /**
18
+     * @return id
19
+     */
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    /**
25
+     * @param id
26
+     */
27
+    public void setId(Integer id) {
28
+        this.id = id;
29
+    }
30
+
31
+    /**
32
+     * @return menu_id
33
+     */
34
+    public Integer getMenuId() {
35
+        return menuId;
36
+    }
37
+
38
+    /**
39
+     * @param menuId
40
+     */
41
+    public void setMenuId(Integer menuId) {
42
+        this.menuId = menuId;
43
+    }
44
+
45
+    /**
46
+     * @return role_id
47
+     */
48
+    public Integer getRoleId() {
49
+        return roleId;
50
+    }
51
+
52
+    /**
53
+     * @param roleId
54
+     */
55
+    public void setRoleId(Integer roleId) {
56
+        this.roleId = roleId;
57
+    }
58
+}

+ 130 - 0
src/main/java/com/zjt/entity/Tuser.java

@@ -0,0 +1,130 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.*;
4
+
5
+@Table(name = "t_user")
6
+public class Tuser {
7
+    @Id
8
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
9
+    private Integer id;
10
+
11
+    private String bz;
12
+
13
+    private String password;
14
+
15
+    @Column(name = "true_name")
16
+    private String trueName;
17
+
18
+    @Column(name = "user_name")
19
+    private String userName;
20
+
21
+    private String remarks;
22
+
23
+    /**
24
+     * @return id
25
+     */
26
+    public Integer getId() {
27
+        return id;
28
+    }
29
+
30
+    /**
31
+     * @param id
32
+     */
33
+    public void setId(Integer id) {
34
+        this.id = id;
35
+    }
36
+
37
+    /**
38
+     * @return bz
39
+     */
40
+    public String getBz() {
41
+        return bz;
42
+    }
43
+
44
+    /**
45
+     * @param bz
46
+     */
47
+    public void setBz(String bz) {
48
+        this.bz = bz == null ? null : bz.trim();
49
+    }
50
+
51
+    /**
52
+     * @return password
53
+     */
54
+    public String getPassword() {
55
+        return password;
56
+    }
57
+
58
+    /**
59
+     * @param password
60
+     */
61
+    public void setPassword(String password) {
62
+        this.password = password == null ? null : password.trim();
63
+    }
64
+
65
+    /**
66
+     * @return true_name
67
+     */
68
+    public String getTrueName() {
69
+        return trueName;
70
+    }
71
+
72
+    /**
73
+     * @param trueName
74
+     */
75
+    public void setTrueName(String trueName) {
76
+        this.trueName = trueName == null ? null : trueName.trim();
77
+    }
78
+
79
+    /**
80
+     * @return user_name
81
+     */
82
+    public String getUserName() {
83
+        return userName;
84
+    }
85
+
86
+    /**
87
+     * @param userName
88
+     */
89
+    public void setUserName(String userName) {
90
+        this.userName = userName == null ? null : userName.trim();
91
+    }
92
+
93
+    /**
94
+     * @return remarks
95
+     */
96
+    public String getRemarks() {
97
+        return remarks;
98
+    }
99
+
100
+    /**
101
+     * @param remarks
102
+     */
103
+    public void setRemarks(String remarks) {
104
+        this.remarks = remarks == null ? null : remarks.trim();
105
+    }
106
+
107
+
108
+
109
+    @Transient
110
+    private String roles;//zjt
111
+
112
+    @Transient
113
+    private String oldPassword;
114
+
115
+    public String getRoles() {
116
+        return roles;
117
+    }
118
+
119
+    public void setRoles(String roles) {
120
+        this.roles = roles;
121
+    }
122
+
123
+    public String getOldPassword() {
124
+        return oldPassword;
125
+    }
126
+
127
+    public void setOldPassword(String oldPassword) {
128
+        this.oldPassword = oldPassword;
129
+    }
130
+}

+ 58 - 0
src/main/java/com/zjt/entity/Tuserrole.java

@@ -0,0 +1,58 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.*;
4
+
5
+@Table(name = "t_user_role")
6
+public class Tuserrole {
7
+    @Id
8
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
9
+    private Integer id;
10
+
11
+    @Column(name = "role_id")
12
+    private Integer roleId;
13
+
14
+    @Column(name = "user_id")
15
+    private Integer userId;
16
+
17
+    /**
18
+     * @return id
19
+     */
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    /**
25
+     * @param id
26
+     */
27
+    public void setId(Integer id) {
28
+        this.id = id;
29
+    }
30
+
31
+    /**
32
+     * @return role_id
33
+     */
34
+    public Integer getRoleId() {
35
+        return roleId;
36
+    }
37
+
38
+    /**
39
+     * @param roleId
40
+     */
41
+    public void setRoleId(Integer roleId) {
42
+        this.roleId = roleId;
43
+    }
44
+
45
+    /**
46
+     * @return user_id
47
+     */
48
+    public Integer getUserId() {
49
+        return userId;
50
+    }
51
+
52
+    /**
53
+     * @param userId
54
+     */
55
+    public void setUserId(Integer userId) {
56
+        this.userId = userId;
57
+    }
58
+}

+ 118 - 0
src/main/java/com/zjt/entity/brand.java

@@ -0,0 +1,118 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.Table;
4
+import java.util.Date;
5
+@Table(name = "b_base_brand")
6
+public class brand {
7
+    private Long id;
8
+
9
+    private String brandCode;
10
+
11
+    private String brandName;
12
+
13
+    private Date createTime;
14
+
15
+    private Long creater;
16
+
17
+    private Date updateTime;
18
+
19
+    private Long updater;
20
+
21
+    private String remark;
22
+
23
+    private Boolean status;
24
+
25
+    private Boolean deleteFlag;
26
+
27
+    private String materialTypeCode;
28
+
29
+
30
+    public Long getId() {
31
+        return id;
32
+    }
33
+
34
+    public void setId(Long id) {
35
+        this.id = id;
36
+    }
37
+
38
+    public String getBrandCode() {
39
+        return brandCode;
40
+    }
41
+
42
+    public void setBrandCode(String brandCode) {
43
+        this.brandCode = brandCode == null ? null : brandCode.trim();
44
+    }
45
+
46
+    public String getBrandName() {
47
+        return brandName;
48
+    }
49
+
50
+    public void setBrandName(String brandName) {
51
+        this.brandName = brandName == null ? null : brandName.trim();
52
+    }
53
+
54
+    public Date getCreateTime() {
55
+        return createTime;
56
+    }
57
+
58
+    public void setCreateTime(Date createTime) {
59
+        this.createTime = createTime;
60
+    }
61
+
62
+    public Long getCreater() {
63
+        return creater;
64
+    }
65
+
66
+    public void setCreater(Long creater) {
67
+        this.creater = creater;
68
+    }
69
+
70
+    public Date getUpdateTime() {
71
+        return updateTime;
72
+    }
73
+
74
+    public void setUpdateTime(Date updateTime) {
75
+        this.updateTime = updateTime;
76
+    }
77
+
78
+    public Long getUpdater() {
79
+        return updater;
80
+    }
81
+
82
+    public void setUpdater(Long updater) {
83
+        this.updater = updater;
84
+    }
85
+
86
+    public String getRemark() {
87
+        return remark;
88
+    }
89
+
90
+    public void setRemark(String remark) {
91
+        this.remark = remark == null ? null : remark.trim();
92
+    }
93
+
94
+    public Boolean getStatus() {
95
+        return status;
96
+    }
97
+
98
+    public void setStatus(Boolean status) {
99
+        this.status = status;
100
+    }
101
+
102
+    public Boolean getDeleteFlag() {
103
+        return deleteFlag;
104
+    }
105
+
106
+    public void setDeleteFlag(Boolean deleteFlag) {
107
+        this.deleteFlag = deleteFlag;
108
+    }
109
+
110
+    public String getMaterialTypeCode() {
111
+        return materialTypeCode;
112
+    }
113
+
114
+    public void setMaterialTypeCode(String materialTypeCode) {
115
+        this.materialTypeCode = materialTypeCode == null ? null : materialTypeCode.trim();
116
+    }
117
+
118
+}

+ 419 - 0
src/main/java/com/zjt/entity/cgmaterial.java

@@ -0,0 +1,419 @@
1
+package com.zjt.entity;
2
+
3
+import java.util.Date;
4
+
5
+public class cgmaterial {
6
+
7
+    private Long id;
8
+
9
+    private String username;
10
+
11
+    private String materialcode;
12
+
13
+    private String materialdetile;
14
+
15
+    private String price;
16
+
17
+    private String sph;
18
+
19
+    private String cyl;
20
+
21
+    private String axis;
22
+
23
+    private String pdfod;
24
+
25
+    private String ph;
26
+
27
+    private String xadd;
28
+
29
+    private String prism;
30
+
31
+    private String cva;
32
+
33
+    private String opticbc;
34
+
35
+    private String rs;
36
+
37
+    private String sd;
38
+
39
+    private String lrs;
40
+
41
+    private String crs;
42
+
43
+    private String brs;
44
+
45
+    private String mpro;
46
+
47
+    private String lbpo;
48
+
49
+    private String frameshape;
50
+
51
+    private String frameheight;
52
+
53
+    private String framebridgewidth;
54
+
55
+    private String spk;
56
+
57
+    private String jframeshape;
58
+
59
+    private String color;
60
+
61
+    private String lenDiameter;
62
+
63
+    private String px;
64
+
65
+    private String ps;
66
+
67
+    private String mark;
68
+
69
+    private String wz;
70
+
71
+    private Date createtime;
72
+
73
+    private String store;
74
+
75
+    private Integer num;
76
+
77
+    private String yuliu1;
78
+
79
+    private String ly;
80
+
81
+    public Long getId() {
82
+        return id;
83
+    }
84
+
85
+    public void setId(Long id) {
86
+        this.id = id;
87
+    }
88
+
89
+    public String getUsername() {
90
+        return username;
91
+    }
92
+
93
+    public void setUsername(String username) {
94
+        this.username = username == null ? null : username.trim();
95
+    }
96
+
97
+    public String getMaterialcode() {
98
+        return materialcode;
99
+    }
100
+
101
+    public void setMaterialcode(String materialcode) {
102
+        this.materialcode = materialcode == null ? null : materialcode.trim();
103
+    }
104
+
105
+    public String getMaterialdetile() {
106
+        return materialdetile;
107
+    }
108
+
109
+    public void setMaterialdetile(String materialdetile) {
110
+        this.materialdetile = materialdetile == null ? null : materialdetile.trim();
111
+    }
112
+
113
+    public String getPrice() {
114
+        return price;
115
+    }
116
+
117
+    public void setPrice(String price) {
118
+        this.price = price == null ? null : price.trim();
119
+    }
120
+
121
+    public String getSph() {
122
+        return sph;
123
+    }
124
+
125
+    public void setSph(String sph) {
126
+        this.sph = sph == null ? null : sph.trim();
127
+    }
128
+
129
+    public String getCyl() {
130
+        return cyl;
131
+    }
132
+
133
+    public void setCyl(String cyl) {
134
+        this.cyl = cyl == null ? null : cyl.trim();
135
+    }
136
+
137
+    public String getAxis() {
138
+        return axis;
139
+    }
140
+
141
+    public void setAxis(String axis) {
142
+        this.axis = axis == null ? null : axis.trim();
143
+    }
144
+
145
+    public String getPdfod() {
146
+        return pdfod;
147
+    }
148
+
149
+    public void setPdfod(String pdfod) {
150
+        this.pdfod = pdfod == null ? null : pdfod.trim();
151
+    }
152
+
153
+    public String getPh() {
154
+        return ph;
155
+    }
156
+
157
+    public void setPh(String ph) {
158
+        this.ph = ph == null ? null : ph.trim();
159
+    }
160
+
161
+    public String getXadd() {
162
+        return xadd;
163
+    }
164
+
165
+    public void setXadd(String xadd) {
166
+        this.xadd = xadd == null ? null : xadd.trim();
167
+    }
168
+
169
+    public String getPrism() {
170
+        return prism;
171
+    }
172
+
173
+    public void setPrism(String prism) {
174
+        this.prism = prism == null ? null : prism.trim();
175
+    }
176
+
177
+    public String getCva() {
178
+        return cva;
179
+    }
180
+
181
+    public void setCva(String cva) {
182
+        this.cva = cva == null ? null : cva.trim();
183
+    }
184
+
185
+    public String getOpticbc() {
186
+        return opticbc;
187
+    }
188
+
189
+    public void setOpticbc(String opticbc) {
190
+        this.opticbc = opticbc == null ? null : opticbc.trim();
191
+    }
192
+
193
+    public String getRs() {
194
+        return rs;
195
+    }
196
+
197
+    public void setRs(String rs) {
198
+        this.rs = rs == null ? null : rs.trim();
199
+    }
200
+
201
+    public String getSd() {
202
+        return sd;
203
+    }
204
+
205
+    public void setSd(String sd) {
206
+        this.sd = sd == null ? null : sd.trim();
207
+    }
208
+
209
+    public String getLrs() {
210
+        return lrs;
211
+    }
212
+
213
+    public void setLrs(String lrs) {
214
+        this.lrs = lrs == null ? null : lrs.trim();
215
+    }
216
+
217
+    public String getCrs() {
218
+        return crs;
219
+    }
220
+
221
+    public void setCrs(String crs) {
222
+        this.crs = crs == null ? null : crs.trim();
223
+    }
224
+
225
+    public String getBrs() {
226
+        return brs;
227
+    }
228
+
229
+    public void setBrs(String brs) {
230
+        this.brs = brs == null ? null : brs.trim();
231
+    }
232
+
233
+    public String getMpro() {
234
+        return mpro;
235
+    }
236
+
237
+    public void setMpro(String mpro) {
238
+        this.mpro = mpro == null ? null : mpro.trim();
239
+    }
240
+
241
+    public String getLbpo() {
242
+        return lbpo;
243
+    }
244
+
245
+    public void setLbpo(String lbpo) {
246
+        this.lbpo = lbpo == null ? null : lbpo.trim();
247
+    }
248
+
249
+    public String getFrameshape() {
250
+        return frameshape;
251
+    }
252
+
253
+    public void setFrameshape(String frameshape) {
254
+        this.frameshape = frameshape == null ? null : frameshape.trim();
255
+    }
256
+
257
+    public String getFrameheight() {
258
+        return frameheight;
259
+    }
260
+
261
+    public void setFrameheight(String frameheight) {
262
+        this.frameheight = frameheight == null ? null : frameheight.trim();
263
+    }
264
+
265
+    public String getFramebridgewidth() {
266
+        return framebridgewidth;
267
+    }
268
+
269
+    public void setFramebridgewidth(String framebridgewidth) {
270
+        this.framebridgewidth = framebridgewidth == null ? null : framebridgewidth.trim();
271
+    }
272
+
273
+    public String getSpk() {
274
+        return spk;
275
+    }
276
+
277
+    public void setSpk(String spk) {
278
+        this.spk = spk == null ? null : spk.trim();
279
+    }
280
+
281
+    public String getJframeshape() {
282
+        return jframeshape;
283
+    }
284
+
285
+    public void setJframeshape(String jframeshape) {
286
+        this.jframeshape = jframeshape == null ? null : jframeshape.trim();
287
+    }
288
+
289
+    public String getColor() {
290
+        return color;
291
+    }
292
+
293
+    public void setColor(String color) {
294
+        this.color = color == null ? null : color.trim();
295
+    }
296
+
297
+    public String getLenDiameter() {
298
+        return lenDiameter;
299
+    }
300
+
301
+    public void setLenDiameter(String lenDiameter) {
302
+        this.lenDiameter = lenDiameter == null ? null : lenDiameter.trim();
303
+    }
304
+
305
+    public String getPx() {
306
+        return px;
307
+    }
308
+
309
+    public void setPx(String px) {
310
+        this.px = px == null ? null : px.trim();
311
+    }
312
+
313
+    public String getPs() {
314
+        return ps;
315
+    }
316
+
317
+    public void setPs(String ps) {
318
+        this.ps = ps == null ? null : ps.trim();
319
+    }
320
+
321
+    public String getMark() {
322
+        return mark;
323
+    }
324
+
325
+    public void setMark(String mark) {
326
+        this.mark = mark == null ? null : mark.trim();
327
+    }
328
+
329
+    public String getWz() {
330
+        return wz;
331
+    }
332
+
333
+    public void setWz(String wz) {
334
+        this.wz = wz == null ? null : wz.trim();
335
+    }
336
+
337
+    public Date getCreatetime() {
338
+        return createtime;
339
+    }
340
+
341
+    public void setCreatetime(Date createtime) {
342
+        this.createtime = createtime;
343
+    }
344
+
345
+    public String getStore() {
346
+        return store;
347
+    }
348
+
349
+    public void setStore(String store) {
350
+        this.store = store == null ? null : store.trim();
351
+    }
352
+
353
+    public Integer getNum() {
354
+        return num;
355
+    }
356
+
357
+    public void setNum(Integer num) {
358
+        this.num = num;
359
+    }
360
+
361
+    public String getYuliu1() {
362
+        return yuliu1;
363
+    }
364
+
365
+    public void setYuliu1(String yuliu1) {
366
+        this.yuliu1 = yuliu1 == null ? null : yuliu1.trim();
367
+    }
368
+
369
+    public String getLy() {
370
+        return ly;
371
+    }
372
+
373
+    public void setLy(String ly) {
374
+        this.ly = ly == null ? null : ly.trim();
375
+    }
376
+
377
+    @Override
378
+    public String toString() {
379
+        return "cgmaterial{" +
380
+                "id=" + id +
381
+                ", username='" + username + '\'' +
382
+                ", materialcode='" + materialcode + '\'' +
383
+                ", materialdetile='" + materialdetile + '\'' +
384
+                ", price='" + price + '\'' +
385
+                ", sph='" + sph + '\'' +
386
+                ", cyl='" + cyl + '\'' +
387
+                ", axis='" + axis + '\'' +
388
+                ", pdfod='" + pdfod + '\'' +
389
+                ", ph='" + ph + '\'' +
390
+                ", xadd='" + xadd + '\'' +
391
+                ", prism='" + prism + '\'' +
392
+                ", cva='" + cva + '\'' +
393
+                ", opticbc='" + opticbc + '\'' +
394
+                ", rs='" + rs + '\'' +
395
+                ", sd='" + sd + '\'' +
396
+                ", lrs='" + lrs + '\'' +
397
+                ", crs='" + crs + '\'' +
398
+                ", brs='" + brs + '\'' +
399
+                ", mpro='" + mpro + '\'' +
400
+                ", lbpo='" + lbpo + '\'' +
401
+                ", frameshape='" + frameshape + '\'' +
402
+                ", frameheight='" + frameheight + '\'' +
403
+                ", framebridgewidth='" + framebridgewidth + '\'' +
404
+                ", spk='" + spk + '\'' +
405
+                ", jframeshape='" + jframeshape + '\'' +
406
+                ", color='" + color + '\'' +
407
+                ", lenDiameter='" + lenDiameter + '\'' +
408
+                ", px='" + px + '\'' +
409
+                ", ps='" + ps + '\'' +
410
+                ", mark='" + mark + '\'' +
411
+                ", wz='" + wz + '\'' +
412
+                ", createtime=" + createtime +
413
+                ", store='" + store + '\'' +
414
+                ", num=" + num +
415
+                ", yuliu1='" + yuliu1 + '\'' +
416
+                ", ly='" + ly + '\'' +
417
+                '}';
418
+    }
419
+}

+ 186 - 0
src/main/java/com/zjt/entity/group.java

@@ -0,0 +1,186 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.Table;
4
+import java.util.Date;
5
+@Table(name = "b_base_material_group")
6
+public class group {
7
+    private Long id;
8
+
9
+    private String clientCode;
10
+
11
+    private String materialGroupCode;
12
+
13
+    private String materialGroupName;
14
+
15
+    private Integer status;
16
+
17
+    private Long fatherId;
18
+
19
+    private String codes;
20
+
21
+    private String materialTypeCode;
22
+
23
+    private String brandCode;
24
+
25
+    private Date createTime;
26
+
27
+    private String createUserCode;
28
+
29
+    private String createUserName;
30
+
31
+    private Long createUserId;
32
+
33
+    private Date updateTime;
34
+
35
+    private String updateUserCode;
36
+
37
+    private String updateUserName;
38
+
39
+    private Long updateUserId;
40
+
41
+    private String propertyContent;
42
+
43
+    public Long getId() {
44
+        return id;
45
+    }
46
+
47
+    public void setId(Long id) {
48
+        this.id = id;
49
+    }
50
+
51
+    public String getClientCode() {
52
+        return clientCode;
53
+    }
54
+
55
+    public void setClientCode(String clientCode) {
56
+        this.clientCode = clientCode == null ? null : clientCode.trim();
57
+    }
58
+
59
+    public String getMaterialGroupCode() {
60
+        return materialGroupCode;
61
+    }
62
+
63
+    public void setMaterialGroupCode(String materialGroupCode) {
64
+        this.materialGroupCode = materialGroupCode == null ? null : materialGroupCode.trim();
65
+    }
66
+
67
+    public String getMaterialGroupName() {
68
+        return materialGroupName;
69
+    }
70
+
71
+    public void setMaterialGroupName(String materialGroupName) {
72
+        this.materialGroupName = materialGroupName == null ? null : materialGroupName.trim();
73
+    }
74
+
75
+    public Integer getStatus() {
76
+        return status;
77
+    }
78
+
79
+    public void setStatus(Integer status) {
80
+        this.status = status;
81
+    }
82
+
83
+    public Long getFatherId() {
84
+        return fatherId;
85
+    }
86
+
87
+    public void setFatherId(Long fatherId) {
88
+        this.fatherId = fatherId;
89
+    }
90
+
91
+    public String getCodes() {
92
+        return codes;
93
+    }
94
+
95
+    public void setCodes(String codes) {
96
+        this.codes = codes == null ? null : codes.trim();
97
+    }
98
+
99
+    public String getMaterialTypeCode() {
100
+        return materialTypeCode;
101
+    }
102
+
103
+    public void setMaterialTypeCode(String materialTypeCode) {
104
+        this.materialTypeCode = materialTypeCode == null ? null : materialTypeCode.trim();
105
+    }
106
+
107
+    public String getBrandCode() {
108
+        return brandCode;
109
+    }
110
+
111
+    public void setBrandCode(String brandCode) {
112
+        this.brandCode = brandCode == null ? null : brandCode.trim();
113
+    }
114
+
115
+    public Date getCreateTime() {
116
+        return createTime;
117
+    }
118
+
119
+    public void setCreateTime(Date createTime) {
120
+        this.createTime = createTime;
121
+    }
122
+
123
+    public String getCreateUserCode() {
124
+        return createUserCode;
125
+    }
126
+
127
+    public void setCreateUserCode(String createUserCode) {
128
+        this.createUserCode = createUserCode == null ? null : createUserCode.trim();
129
+    }
130
+
131
+    public String getCreateUserName() {
132
+        return createUserName;
133
+    }
134
+
135
+    public void setCreateUserName(String createUserName) {
136
+        this.createUserName = createUserName == null ? null : createUserName.trim();
137
+    }
138
+
139
+    public Long getCreateUserId() {
140
+        return createUserId;
141
+    }
142
+
143
+    public void setCreateUserId(Long createUserId) {
144
+        this.createUserId = createUserId;
145
+    }
146
+
147
+    public Date getUpdateTime() {
148
+        return updateTime;
149
+    }
150
+
151
+    public void setUpdateTime(Date updateTime) {
152
+        this.updateTime = updateTime;
153
+    }
154
+
155
+    public String getUpdateUserCode() {
156
+        return updateUserCode;
157
+    }
158
+
159
+    public void setUpdateUserCode(String updateUserCode) {
160
+        this.updateUserCode = updateUserCode == null ? null : updateUserCode.trim();
161
+    }
162
+
163
+    public String getUpdateUserName() {
164
+        return updateUserName;
165
+    }
166
+
167
+    public void setUpdateUserName(String updateUserName) {
168
+        this.updateUserName = updateUserName == null ? null : updateUserName.trim();
169
+    }
170
+
171
+    public Long getUpdateUserId() {
172
+        return updateUserId;
173
+    }
174
+
175
+    public void setUpdateUserId(Long updateUserId) {
176
+        this.updateUserId = updateUserId;
177
+    }
178
+
179
+    public String getPropertyContent() {
180
+        return propertyContent;
181
+    }
182
+
183
+    public void setPropertyContent(String propertyContent) {
184
+        this.propertyContent = propertyContent == null ? null : propertyContent.trim();
185
+    }
186
+}

+ 217 - 0
src/main/java/com/zjt/entity/price.java

@@ -0,0 +1,217 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.Table;
4
+import java.math.BigDecimal;
5
+import java.util.Date;
6
+@Table(name = "b_base_material_price")
7
+public class price {
8
+    private Long id;
9
+
10
+    private String materialCode;
11
+
12
+    private String materialName;
13
+
14
+    private String categoryCode;
15
+
16
+    private String brandCode;
17
+
18
+    private String materialGroupCode;
19
+
20
+    private String batch;
21
+
22
+    private String storeCode;
23
+
24
+    private String companyCode;
25
+
26
+    private BigDecimal purchasePrice;
27
+
28
+    private BigDecimal averagePrice;
29
+
30
+    private BigDecimal retailPrice;
31
+
32
+    private BigDecimal wholesalePrice;
33
+
34
+    private BigDecimal memberPrice;
35
+
36
+    private BigDecimal memberOpticianPrice;
37
+
38
+    private Long creator;
39
+
40
+    private Date createTime;
41
+
42
+    private Long updater;
43
+
44
+    private Date updateTime;
45
+
46
+    private Byte status;
47
+
48
+    private Byte deleteFlag;
49
+
50
+    public Long getId() {
51
+        return id;
52
+    }
53
+
54
+    public void setId(Long id) {
55
+        this.id = id;
56
+    }
57
+
58
+    public String getMaterialCode() {
59
+        return materialCode;
60
+    }
61
+
62
+    public void setMaterialCode(String materialCode) {
63
+        this.materialCode = materialCode == null ? null : materialCode.trim();
64
+    }
65
+
66
+    public String getMaterialName() {
67
+        return materialName;
68
+    }
69
+
70
+    public void setMaterialName(String materialName) {
71
+        this.materialName = materialName == null ? null : materialName.trim();
72
+    }
73
+
74
+    public String getCategoryCode() {
75
+        return categoryCode;
76
+    }
77
+
78
+    public void setCategoryCode(String categoryCode) {
79
+        this.categoryCode = categoryCode == null ? null : categoryCode.trim();
80
+    }
81
+
82
+    public String getBrandCode() {
83
+        return brandCode;
84
+    }
85
+
86
+    public void setBrandCode(String brandCode) {
87
+        this.brandCode = brandCode == null ? null : brandCode.trim();
88
+    }
89
+
90
+    public String getMaterialGroupCode() {
91
+        return materialGroupCode;
92
+    }
93
+
94
+    public void setMaterialGroupCode(String materialGroupCode) {
95
+        this.materialGroupCode = materialGroupCode == null ? null : materialGroupCode.trim();
96
+    }
97
+
98
+    public String getBatch() {
99
+        return batch;
100
+    }
101
+
102
+    public void setBatch(String batch) {
103
+        this.batch = batch == null ? null : batch.trim();
104
+    }
105
+
106
+    public String getStoreCode() {
107
+        return storeCode;
108
+    }
109
+
110
+    public void setStoreCode(String storeCode) {
111
+        this.storeCode = storeCode == null ? null : storeCode.trim();
112
+    }
113
+
114
+    public String getCompanyCode() {
115
+        return companyCode;
116
+    }
117
+
118
+    public void setCompanyCode(String companyCode) {
119
+        this.companyCode = companyCode == null ? null : companyCode.trim();
120
+    }
121
+
122
+    public BigDecimal getPurchasePrice() {
123
+        return purchasePrice;
124
+    }
125
+
126
+    public void setPurchasePrice(BigDecimal purchasePrice) {
127
+        this.purchasePrice = purchasePrice;
128
+    }
129
+
130
+    public BigDecimal getAveragePrice() {
131
+        return averagePrice;
132
+    }
133
+
134
+    public void setAveragePrice(BigDecimal averagePrice) {
135
+        this.averagePrice = averagePrice;
136
+    }
137
+
138
+    public BigDecimal getRetailPrice() {
139
+        return retailPrice;
140
+    }
141
+
142
+    public void setRetailPrice(BigDecimal retailPrice) {
143
+        this.retailPrice = retailPrice;
144
+    }
145
+
146
+    public BigDecimal getWholesalePrice() {
147
+        return wholesalePrice;
148
+    }
149
+
150
+    public void setWholesalePrice(BigDecimal wholesalePrice) {
151
+        this.wholesalePrice = wholesalePrice;
152
+    }
153
+
154
+    public BigDecimal getMemberPrice() {
155
+        return memberPrice;
156
+    }
157
+
158
+    public void setMemberPrice(BigDecimal memberPrice) {
159
+        this.memberPrice = memberPrice;
160
+    }
161
+
162
+    public BigDecimal getMemberOpticianPrice() {
163
+        return memberOpticianPrice;
164
+    }
165
+
166
+    public void setMemberOpticianPrice(BigDecimal memberOpticianPrice) {
167
+        this.memberOpticianPrice = memberOpticianPrice;
168
+    }
169
+
170
+    public Long getCreator() {
171
+        return creator;
172
+    }
173
+
174
+    public void setCreator(Long creator) {
175
+        this.creator = creator;
176
+    }
177
+
178
+    public Date getCreateTime() {
179
+        return createTime;
180
+    }
181
+
182
+    public void setCreateTime(Date createTime) {
183
+        this.createTime = createTime;
184
+    }
185
+
186
+    public Long getUpdater() {
187
+        return updater;
188
+    }
189
+
190
+    public void setUpdater(Long updater) {
191
+        this.updater = updater;
192
+    }
193
+
194
+    public Date getUpdateTime() {
195
+        return updateTime;
196
+    }
197
+
198
+    public void setUpdateTime(Date updateTime) {
199
+        this.updateTime = updateTime;
200
+    }
201
+
202
+    public Byte getStatus() {
203
+        return status;
204
+    }
205
+
206
+    public void setStatus(Byte status) {
207
+        this.status = status;
208
+    }
209
+
210
+    public Byte getDeleteFlag() {
211
+        return deleteFlag;
212
+    }
213
+
214
+    public void setDeleteFlag(Byte deleteFlag) {
215
+        this.deleteFlag = deleteFlag;
216
+    }
217
+}

+ 310 - 0
src/main/java/com/zjt/entity/requestDate.java

@@ -0,0 +1,310 @@
1
+package com.zjt.entity;
2
+
3
+public class requestDate {
4
+    String materialDetile;
5
+    public String materialCode;
6
+    public String price;
7
+    public String WZ ;
8
+    public String SPH;
9
+    public String CYL;
10
+    public String AXIS;
11
+    public String PDFOD;
12
+    public String PH;
13
+    public String ADD;
14
+    public String PRISM;
15
+    public String CVA;
16
+    public String OPTICBC;
17
+    public String RS;
18
+    public String SD;
19
+    public String LRS;
20
+    public String CRS;
21
+    public String BRS;
22
+    public String MPRO;
23
+    public String LBPO;
24
+    public String FRAMESHAPE;
25
+    public String FRAMEHEIGHT;
26
+    public String FRAMEBRIDGEWIDTH;
27
+    public String SPK;
28
+    public String JFRAMESHAPE ;
29
+    public String COLOR;
30
+    public String lEN_DIAMETER;
31
+    public String PX;
32
+    public String PS;
33
+    public String MARK;
34
+
35
+    public String getMaterialDetile() {
36
+        return materialDetile;
37
+    }
38
+
39
+    public void setMaterialDetile(String materialDetile) {
40
+        this.materialDetile = materialDetile;
41
+    }
42
+
43
+    public String getMaterialCode() {
44
+        return materialCode;
45
+    }
46
+
47
+    public void setMaterialCode(String materialCode) {
48
+        this.materialCode = materialCode;
49
+    }
50
+
51
+    public String getPrice() {
52
+        return price;
53
+    }
54
+
55
+    public void setPrice(String price) {
56
+        this.price = price;
57
+    }
58
+
59
+    public String getWZ() {
60
+        return WZ;
61
+    }
62
+
63
+    public void setWZ(String WZ) {
64
+        this.WZ = WZ;
65
+    }
66
+
67
+    public String getSPH() {
68
+        return SPH;
69
+    }
70
+
71
+    public void setSPH(String SPH) {
72
+        this.SPH = SPH;
73
+    }
74
+
75
+    public String getCYL() {
76
+        return CYL;
77
+    }
78
+
79
+    public void setCYL(String CYL) {
80
+        this.CYL = CYL;
81
+    }
82
+
83
+    public String getAXIS() {
84
+        return AXIS;
85
+    }
86
+
87
+    public void setAXIS(String AXIS) {
88
+        this.AXIS = AXIS;
89
+    }
90
+
91
+    public String getPDFOD() {
92
+        return PDFOD;
93
+    }
94
+
95
+    public void setPDFOD(String PDFOD) {
96
+        this.PDFOD = PDFOD;
97
+    }
98
+
99
+    public String getPH() {
100
+        return PH;
101
+    }
102
+
103
+    public void setPH(String PH) {
104
+        this.PH = PH;
105
+    }
106
+
107
+    public String getADD() {
108
+        return ADD;
109
+    }
110
+
111
+    public void setADD(String ADD) {
112
+        this.ADD = ADD;
113
+    }
114
+
115
+    public String getPRISM() {
116
+        return PRISM;
117
+    }
118
+
119
+    public void setPRISM(String PRISM) {
120
+        this.PRISM = PRISM;
121
+    }
122
+
123
+    public String getCVA() {
124
+        return CVA;
125
+    }
126
+
127
+    public void setCVA(String CVA) {
128
+        this.CVA = CVA;
129
+    }
130
+
131
+    public String getOPTICBC() {
132
+        return OPTICBC;
133
+    }
134
+
135
+    public void setOPTICBC(String OPTICBC) {
136
+        this.OPTICBC = OPTICBC;
137
+    }
138
+
139
+    public String getRS() {
140
+        return RS;
141
+    }
142
+
143
+    public void setRS(String RS) {
144
+        this.RS = RS;
145
+    }
146
+
147
+    public String getSD() {
148
+        return SD;
149
+    }
150
+
151
+    public void setSD(String SD) {
152
+        this.SD = SD;
153
+    }
154
+
155
+    public String getLRS() {
156
+        return LRS;
157
+    }
158
+
159
+    public void setLRS(String LRS) {
160
+        this.LRS = LRS;
161
+    }
162
+
163
+    public String getCRS() {
164
+        return CRS;
165
+    }
166
+
167
+    public void setCRS(String CRS) {
168
+        this.CRS = CRS;
169
+    }
170
+
171
+    public String getBRS() {
172
+        return BRS;
173
+    }
174
+
175
+    public void setBRS(String BRS) {
176
+        this.BRS = BRS;
177
+    }
178
+
179
+    public String getMPRO() {
180
+        return MPRO;
181
+    }
182
+
183
+    public void setMPRO(String MPRO) {
184
+        this.MPRO = MPRO;
185
+    }
186
+
187
+    public String getLBPO() {
188
+        return LBPO;
189
+    }
190
+
191
+    public void setLBPO(String LBPO) {
192
+        this.LBPO = LBPO;
193
+    }
194
+
195
+    public String getFRAMESHAPE() {
196
+        return FRAMESHAPE;
197
+    }
198
+
199
+    public void setFRAMESHAPE(String FRAMESHAPE) {
200
+        this.FRAMESHAPE = FRAMESHAPE;
201
+    }
202
+
203
+    public String getFRAMEHEIGHT() {
204
+        return FRAMEHEIGHT;
205
+    }
206
+
207
+    public void setFRAMEHEIGHT(String FRAMEHEIGHT) {
208
+        this.FRAMEHEIGHT = FRAMEHEIGHT;
209
+    }
210
+
211
+    public String getFRAMEBRIDGEWIDTH() {
212
+        return FRAMEBRIDGEWIDTH;
213
+    }
214
+
215
+    public void setFRAMEBRIDGEWIDTH(String FRAMEBRIDGEWIDTH) {
216
+        this.FRAMEBRIDGEWIDTH = FRAMEBRIDGEWIDTH;
217
+    }
218
+
219
+    public String getSPK() {
220
+        return SPK;
221
+    }
222
+
223
+    public void setSPK(String SPK) {
224
+        this.SPK = SPK;
225
+    }
226
+
227
+    public String getJFRAMESHAPE() {
228
+        return JFRAMESHAPE;
229
+    }
230
+
231
+    public void setJFRAMESHAPE(String JFRAMESHAPE) {
232
+        this.JFRAMESHAPE = JFRAMESHAPE;
233
+    }
234
+
235
+    public String getCOLOR() {
236
+        return COLOR;
237
+    }
238
+
239
+    public void setCOLOR(String COLOR) {
240
+        this.COLOR = COLOR;
241
+    }
242
+
243
+    public String getlEN_DIAMETER() {
244
+        return lEN_DIAMETER;
245
+    }
246
+
247
+    public void setlEN_DIAMETER(String lEN_DIAMETER) {
248
+        this.lEN_DIAMETER = lEN_DIAMETER;
249
+    }
250
+
251
+    public String getPX() {
252
+        return PX;
253
+    }
254
+
255
+    public void setPX(String PX) {
256
+        this.PX = PX;
257
+    }
258
+
259
+    public String getPS() {
260
+        return PS;
261
+    }
262
+
263
+    public void setPS(String PS) {
264
+        this.PS = PS;
265
+    }
266
+
267
+    public String getMARK() {
268
+        return MARK;
269
+    }
270
+
271
+    public void setMARK(String MARK) {
272
+        this.MARK = MARK;
273
+    }
274
+
275
+    @Override
276
+    public String toString() {
277
+        return "requestDate{" +
278
+                "materialDetile='" + materialDetile + '\'' +
279
+                ", materialCode='" + materialCode + '\'' +
280
+                ", price='" + price + '\'' +
281
+                ", WZ='" + WZ + '\'' +
282
+                ", SPH='" + SPH + '\'' +
283
+                ", CYL='" + CYL + '\'' +
284
+                ", AXIS='" + AXIS + '\'' +
285
+                ", PDFOD='" + PDFOD + '\'' +
286
+                ", PH='" + PH + '\'' +
287
+                ", ADD='" + ADD + '\'' +
288
+                ", PRISM='" + PRISM + '\'' +
289
+                ", CVA='" + CVA + '\'' +
290
+                ", OPTICBC='" + OPTICBC + '\'' +
291
+                ", RS='" + RS + '\'' +
292
+                ", SD='" + SD + '\'' +
293
+                ", LRS='" + LRS + '\'' +
294
+                ", CRS='" + CRS + '\'' +
295
+                ", BRS='" + BRS + '\'' +
296
+                ", MPRO='" + MPRO + '\'' +
297
+                ", LBPO='" + LBPO + '\'' +
298
+                ", FRAMESHAPE='" + FRAMESHAPE + '\'' +
299
+                ", FRAMEHEIGHT='" + FRAMEHEIGHT + '\'' +
300
+                ", FRAMEBRIDGEWIDTH='" + FRAMEBRIDGEWIDTH + '\'' +
301
+                ", SPK='" + SPK + '\'' +
302
+                ", JFRAMESHAPE='" + JFRAMESHAPE + '\'' +
303
+                ", COLOR='" + COLOR + '\'' +
304
+                ", lEN_DIAMETER='" + lEN_DIAMETER + '\'' +
305
+                ", PX='" + PX + '\'' +
306
+                ", PS='" + PS + '\'' +
307
+                ", MARK='" + MARK + '\'' +
308
+                '}';
309
+    }
310
+}

+ 116 - 0
src/main/java/com/zjt/entity/type.java

@@ -0,0 +1,116 @@
1
+package com.zjt.entity;
2
+
3
+import javax.persistence.Table;
4
+import java.util.Date;
5
+@Table(name = "bas_material_type")
6
+public class type {
7
+    private Integer id;
8
+
9
+    private String materialTypeCode;
10
+
11
+    private String materialTypeName;
12
+
13
+    private String pMaterialType;
14
+
15
+    private String remark;
16
+
17
+    private Date createTime;
18
+
19
+    private String creater;
20
+
21
+    private Date updateTime;
22
+
23
+    private String updater;
24
+
25
+    private Byte status;
26
+
27
+    private Byte deleteFlag;
28
+
29
+    public Integer getId() {
30
+        return id;
31
+    }
32
+
33
+    public void setId(Integer id) {
34
+        this.id = id;
35
+    }
36
+
37
+    public String getMaterialTypeCode() {
38
+        return materialTypeCode;
39
+    }
40
+
41
+    public void setMaterialTypeCode(String materialTypeCode) {
42
+        this.materialTypeCode = materialTypeCode == null ? null : materialTypeCode.trim();
43
+    }
44
+
45
+    public String getMaterialTypeName() {
46
+        return materialTypeName;
47
+    }
48
+
49
+    public void setMaterialTypeName(String materialTypeName) {
50
+        this.materialTypeName = materialTypeName == null ? null : materialTypeName.trim();
51
+    }
52
+
53
+    public String getpMaterialType() {
54
+        return pMaterialType;
55
+    }
56
+
57
+    public void setpMaterialType(String pMaterialType) {
58
+        this.pMaterialType = pMaterialType == null ? null : pMaterialType.trim();
59
+    }
60
+
61
+    public String getRemark() {
62
+        return remark;
63
+    }
64
+
65
+    public void setRemark(String remark) {
66
+        this.remark = remark == null ? null : remark.trim();
67
+    }
68
+
69
+    public Date getCreateTime() {
70
+        return createTime;
71
+    }
72
+
73
+    public void setCreateTime(Date createTime) {
74
+        this.createTime = createTime;
75
+    }
76
+
77
+    public String getCreater() {
78
+        return creater;
79
+    }
80
+
81
+    public void setCreater(String creater) {
82
+        this.creater = creater == null ? null : creater.trim();
83
+    }
84
+
85
+    public Date getUpdateTime() {
86
+        return updateTime;
87
+    }
88
+
89
+    public void setUpdateTime(Date updateTime) {
90
+        this.updateTime = updateTime;
91
+    }
92
+
93
+    public String getUpdater() {
94
+        return updater;
95
+    }
96
+
97
+    public void setUpdater(String updater) {
98
+        this.updater = updater == null ? null : updater.trim();
99
+    }
100
+
101
+    public Byte getStatus() {
102
+        return status;
103
+    }
104
+
105
+    public void setStatus(Byte status) {
106
+        this.status = status;
107
+    }
108
+
109
+    public Byte getDeleteFlag() {
110
+        return deleteFlag;
111
+    }
112
+
113
+    public void setDeleteFlag(Byte deleteFlag) {
114
+        this.deleteFlag = deleteFlag;
115
+    }
116
+}

+ 64 - 0
src/main/java/com/zjt/exception/GlobalDefaultExceptionHandler.java

@@ -0,0 +1,64 @@
1
+package com.zjt.exception;
2
+
3
+import org.springframework.web.bind.annotation.ControllerAdvice;
4
+import org.springframework.web.bind.annotation.ExceptionHandler;
5
+import org.springframework.web.servlet.ModelAndView;
6
+
7
+import javax.servlet.http.HttpServletRequest;
8
+
9
+@ControllerAdvice
10
+public class GlobalDefaultExceptionHandler {
11
+
12
+    @ExceptionHandler(value = Exception.class)
13
+    public ModelAndView defaultErrorHandler(HttpServletRequest req, Exception e) {
14
+//      // If the exception is annotated with @ResponseStatus rethrow it and let
15
+//      // the framework handle it - like the OrderNotFoundException example
16
+//      // at the start of this post.
17
+//      // AnnotationUtils is a Spring Framework utility class.
18
+//      if (AnnotationUtils.findAnnotation(e.getClass(), ResponseStatus.class) != null)
19
+//          throw e;
20
+//
21
+//      // Otherwise setup and send the user to a default error-view.
22
+//      ModelAndView mav = new ModelAndView();
23
+//      mav.addObject("exception", e);
24
+//      mav.addObject("url", req.getRequestURL());
25
+//      mav.setViewName(DEFAULT_ERROR_VIEW);
26
+//      return mav;
27
+
28
+        //打印异常信息:
29
+        e.printStackTrace();
30
+        System.out.println("GlobalDefaultExceptionHandler.defaultErrorHandler()");
31
+
32
+       /*
33
+        * 返回json数据或者String数据:
34
+        * 那么需要在方法上加上注解:@ResponseBody
35
+        * 添加return即可。
36
+        */
37
+
38
+       /*
39
+        * 返回视图:
40
+        * 定义一个ModelAndView即可,
41
+        * 然后return;
42
+        * 定义视图文件(比如:error.html,error.ftl,error.jsp);
43
+        *
44
+        */
45
+
46
+
47
+        ModelAndView mav = new ModelAndView();
48
+        mav.addObject("exception", e);
49
+        mav.addObject("url", req.getRequestURL());
50
+        mav.setViewName("error/errordeal");
51
+
52
+        if(e instanceof org.apache.shiro.authz.UnauthorizedException){
53
+            mav.setViewName("error/unauthorized");
54
+        }
55
+        if(e instanceof org.apache.shiro.authz.AuthorizationException){
56
+            mav.setViewName("error/unauthorized");
57
+        }
58
+
59
+        return mav;
60
+
61
+
62
+    }
63
+}
64
+

+ 31 - 0
src/main/java/com/zjt/interceptor/CommonInterceptor.java

@@ -0,0 +1,31 @@
1
+package com.zjt.interceptor;
2
+
3
+import org.springframework.web.servlet.HandlerInterceptor;
4
+import org.springframework.web.servlet.ModelAndView;
5
+
6
+import javax.servlet.http.HttpServletRequest;
7
+import javax.servlet.http.HttpServletResponse;
8
+
9
+public class CommonInterceptor implements HandlerInterceptor {
10
+
11
+    @Override
12
+    public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception {
13
+        String path = httpServletRequest.getContextPath();
14
+        String scheme = httpServletRequest.getScheme();
15
+        String serverName = httpServletRequest.getServerName();
16
+        int port = httpServletRequest.getServerPort();
17
+        String basePath = scheme + "://" + serverName + ":" + port + path;
18
+        httpServletRequest.setAttribute("basePath", basePath);
19
+        return true;
20
+    }
21
+
22
+    @Override
23
+    public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
24
+
25
+    }
26
+
27
+    @Override
28
+    public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
29
+
30
+    }
31
+}

+ 13 - 0
src/main/java/com/zjt/interceptor/CommonInterceptorConfig.java

@@ -0,0 +1,13 @@
1
+package com.zjt.interceptor;
2
+
3
+import org.springframework.context.annotation.Configuration;
4
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
5
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
6
+
7
+@Configuration
8
+public class CommonInterceptorConfig extends WebMvcConfigurerAdapter {
9
+    @Override
10
+    public void addInterceptors(InterceptorRegistry registry) {
11
+        registry.addInterceptor(new CommonInterceptor()).addPathPatterns("/**");
12
+    }
13
+}

+ 68 - 0
src/main/java/com/zjt/interceptor/TxAdviceInterceptor.java

@@ -0,0 +1,68 @@
1
+package com.zjt.interceptor;
2
+
3
+import org.aspectj.lang.annotation.Aspect;
4
+import org.springframework.aop.Advisor;
5
+import org.springframework.aop.aspectj.AspectJExpressionPointcut;
6
+import org.springframework.aop.support.DefaultPointcutAdvisor;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.beans.factory.annotation.Qualifier;
9
+import org.springframework.context.annotation.Bean;
10
+import org.springframework.context.annotation.Configuration;
11
+import org.springframework.transaction.PlatformTransactionManager;
12
+import org.springframework.transaction.TransactionDefinition;
13
+import org.springframework.transaction.interceptor.*;
14
+
15
+import java.util.Collections;
16
+import java.util.HashMap;
17
+import java.util.Map;
18
+
19
+/**
20
+
21
+ * @version 1.0, 2017/11/29
22
+ * @description
23
+ * 注解声明式事务
24
+ */
25
+@Aspect
26
+@Configuration
27
+public class TxAdviceInterceptor {
28
+    private static final int TX_METHOD_TIMEOUT = 50000;//单位秒
29
+    private static final String AOP_POINTCUT_EXPRESSION = "execution (* com.zjt.service.*.*(..))";
30
+
31
+    @Autowired
32
+    @Qualifier("transactionManager")
33
+    private PlatformTransactionManager transactionManager;
34
+
35
+    @Bean
36
+    public TransactionInterceptor txAdvice() {
37
+        NameMatchTransactionAttributeSource source = new NameMatchTransactionAttributeSource();
38
+         /*只读事务,不做更新操作*/
39
+        RuleBasedTransactionAttribute readOnlyTx = new RuleBasedTransactionAttribute();
40
+        readOnlyTx.setReadOnly(true);
41
+        readOnlyTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_NOT_SUPPORTED );
42
+        /*当前存在事务就使用当前事务,当前不存在事务就创建一个新的事务*/
43
+        RuleBasedTransactionAttribute requiredTx = new RuleBasedTransactionAttribute();
44
+        requiredTx.setRollbackRules(
45
+                Collections.singletonList(new RollbackRuleAttribute(Exception.class)));
46
+        requiredTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
47
+        requiredTx.setTimeout(TX_METHOD_TIMEOUT);
48
+        Map<String, TransactionAttribute> txMap = new HashMap<>();
49
+        txMap.put("add*", requiredTx);
50
+        txMap.put("save*", requiredTx);
51
+        txMap.put("insert*", requiredTx);
52
+        txMap.put("update*", requiredTx);
53
+        txMap.put("delete*", requiredTx);
54
+        txMap.put("get*", readOnlyTx);
55
+        txMap.put("select*", readOnlyTx);
56
+        txMap.put("query*", readOnlyTx);
57
+        source.setNameMap( txMap );
58
+    TransactionInterceptor txAdvice = new TransactionInterceptor(transactionManager, source);
59
+        return txAdvice;
60
+}
61
+
62
+    @Bean
63
+    public Advisor txAdviceAdvisor() {
64
+        AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
65
+        pointcut.setExpression(AOP_POINTCUT_EXPRESSION);
66
+        return new DefaultPointcutAdvisor(pointcut, txAdvice());
67
+    }
68
+}

+ 15 - 0
src/main/java/com/zjt/mapper/TmenuMapper.java

@@ -0,0 +1,15 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.Tmenu;
4
+import com.zjt.util.MyMapper;
5
+
6
+import java.util.HashMap;
7
+import java.util.List;
8
+
9
+public interface TmenuMapper extends MyMapper<Tmenu> {
10
+
11
+    List<Tmenu> selectMenusByRoleId(Integer roleid);
12
+
13
+    List<Tmenu> selectByParentIdAndRoleId(HashMap<String,Object> paraMap);
14
+
15
+}

+ 12 - 0
src/main/java/com/zjt/mapper/TroleMapper.java

@@ -0,0 +1,12 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.Trole;
4
+import com.zjt.util.MyMapper;
5
+
6
+import java.util.List;
7
+
8
+public interface TroleMapper extends MyMapper<Trole> {
9
+
10
+    List<Trole> selectRolesByUserId(Integer userid);
11
+
12
+}

+ 7 - 0
src/main/java/com/zjt/mapper/TrolemenuMapper.java

@@ -0,0 +1,7 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.Trolemenu;
4
+import com.zjt.util.MyMapper;
5
+
6
+public interface TrolemenuMapper extends MyMapper<Trolemenu> {
7
+}

+ 7 - 0
src/main/java/com/zjt/mapper/TuserMapper.java

@@ -0,0 +1,7 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.Tuser;
4
+import com.zjt.util.MyMapper;
5
+
6
+public interface TuserMapper extends MyMapper<Tuser> {
7
+}

+ 7 - 0
src/main/java/com/zjt/mapper/TuserroleMapper.java

@@ -0,0 +1,7 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.Tuserrole;
4
+import com.zjt.util.MyMapper;
5
+
6
+public interface TuserroleMapper extends MyMapper<Tuserrole> {
7
+}

+ 12 - 0
src/main/java/com/zjt/mapper/brandMapper.java

@@ -0,0 +1,12 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.brand;
4
+import com.zjt.util.MyMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+@Mapper
10
+public interface brandMapper extends MyMapper<brand> {
11
+    List<brand> selectBrand(String material_type_code);
12
+}

+ 26 - 0
src/main/java/com/zjt/mapper/cgmaterialMapper.java

@@ -0,0 +1,26 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.cgmaterial;
4
+import com.zjt.util.MyMapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+
9
+public interface cgmaterialMapper extends MyMapper<cgmaterial> {
10
+    int deleteByPrimaryKey(Long id);
11
+
12
+    void deldate(Long idl,String code);
13
+
14
+    int insert(cgmaterial record);
15
+
16
+    int insertSelective(cgmaterial record);
17
+
18
+    List<cgmaterial> selectData();
19
+
20
+    int updateByPrimaryKeySelective(cgmaterial record);
21
+
22
+    int updateByPrimaryKey(cgmaterial record);
23
+
24
+    List<cgmaterial> selectDataBy(@Param("id")String id, @Param("storeCode")String storeCode, @Param("begin")String begin, @Param("end")String end, @Param("receive")String receive);
25
+
26
+}

+ 13 - 0
src/main/java/com/zjt/mapper/groupMapper.java

@@ -0,0 +1,13 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.group;
4
+import com.zjt.entity.type;
5
+import com.zjt.util.MyMapper;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface groupMapper extends MyMapper<group> {
12
+    List<group> selectBrand(String brand);
13
+}

+ 14 - 0
src/main/java/com/zjt/mapper/priceMapper.java

@@ -0,0 +1,14 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.price;
4
+import com.zjt.entity.type;
5
+import com.zjt.util.MyMapper;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+import java.util.List;
9
+
10
+@Mapper
11
+public interface priceMapper extends MyMapper<price> {
12
+    List<price> selectPrice(String group);
13
+    List<price> selectCode(String code);
14
+}

+ 12 - 0
src/main/java/com/zjt/mapper/typeMapper.java

@@ -0,0 +1,12 @@
1
+package com.zjt.mapper;
2
+
3
+import com.zjt.entity.Tmenu;
4
+import com.zjt.entity.type;
5
+import com.zjt.util.MyMapper;
6
+import org.apache.ibatis.annotations.Mapper;
7
+
8
+import java.util.List;
9
+public interface typeMapper extends MyMapper<type> {
10
+    List<type> selectAll();
11
+
12
+}

+ 119 - 0
src/main/java/com/zjt/model/JqgridBean.java

@@ -0,0 +1,119 @@
1
+package com.zjt.model;
2
+
3
+/**
4
+ * @author <a href="mailto:zhaojt@gtmap.cn"></a>
5
+ * @version 1.0, 2017/11/13
6
+ * @description
7
+ */
8
+public class JqgridBean {
9
+    Integer page;//请求页码
10
+    Integer length;//每页记录数
11
+    String sidx;//排序字段
12
+    String sord;//排序规则
13
+    String search;//是否是搜索
14
+    String searchField;//搜索字段
15
+    String searchString;//搜索值
16
+    String searchOper;//搜索条件公式
17
+    String oper;
18
+    String match;
19
+    String rules;
20
+    String filters;//多条件查询json
21
+
22
+
23
+    public Integer getPage() {
24
+        return page;
25
+    }
26
+
27
+    public void setPage(Integer page) {
28
+        this.page = page;
29
+    }
30
+
31
+    public Integer getLength() {
32
+        return length;
33
+    }
34
+
35
+    public void setLength(Integer length) {
36
+        this.length = length;
37
+    }
38
+
39
+    public String getSidx() {
40
+        return sidx;
41
+    }
42
+
43
+    public void setSidx(String sidx) {
44
+        this.sidx = sidx;
45
+    }
46
+
47
+    public String getSord() {
48
+        return sord;
49
+    }
50
+
51
+    public void setSord(String sord) {
52
+        this.sord = sord;
53
+    }
54
+
55
+
56
+    public String getSearch() {
57
+        return search;
58
+    }
59
+
60
+    public void setSearch(String search) {
61
+        this.search = search;
62
+    }
63
+
64
+    public String getSearchField() {
65
+        return searchField;
66
+    }
67
+
68
+    public void setSearchField(String searchField) {
69
+        this.searchField = searchField;
70
+    }
71
+
72
+    public String getSearchString() {
73
+        return searchString;
74
+    }
75
+
76
+    public void setSearchString(String searchString) {
77
+        this.searchString = searchString;
78
+    }
79
+
80
+    public String getSearchOper() {
81
+        return searchOper;
82
+    }
83
+
84
+    public void setSearchOper(String searchOper) {
85
+        this.searchOper = searchOper;
86
+    }
87
+
88
+    public String getOper() {
89
+        return oper;
90
+    }
91
+
92
+    public void setOper(String oper) {
93
+        this.oper = oper;
94
+    }
95
+
96
+    public String getMatch() {
97
+        return match;
98
+    }
99
+
100
+    public void setMatch(String match) {
101
+        this.match = match;
102
+    }
103
+
104
+    public String getRules() {
105
+        return rules;
106
+    }
107
+
108
+    public void setRules(String rules) {
109
+        this.rules = rules;
110
+    }
111
+
112
+    public String getFilters() {
113
+        return filters;
114
+    }
115
+
116
+    public void setFilters(String filters) {
117
+        this.filters = filters;
118
+    }
119
+}

+ 204 - 0
src/main/java/com/zjt/model/Page.java

@@ -0,0 +1,204 @@
1
+package com.zjt.model;
2
+
3
+/**
4
+ * @author <a href=""mailto:Administrator@gtmap.cn></a>
5
+ * @version 1.0, 2017/11/8
6
+ * @description
7
+ */
8
+
9
+import java.io.Serializable;
10
+
11
+/**
12
+ * 分页对象.
13
+ *
14
+ * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
15
+ * @version 1.0.1.0, Oct 6, 2012
16
+ */
17
+public final class Page implements Serializable {
18
+
19
+    /**
20
+     * 默认的序列化版本 id.
21
+     */
22
+    private static final long serialVersionUID = 1L;
23
+    /**
24
+     * 分页查询开始记录位置.
25
+     */
26
+    private int               begin;
27
+    /**
28
+     * 分页查看下结束位置.
29
+     */
30
+    private int               end;
31
+    /**
32
+     * 每页显示记录数.
33
+     */
34
+    private int               length           = 20;
35
+    /**
36
+     * 查询结果总记录数.
37
+     */
38
+    private int               totalRecords;
39
+    /**
40
+     * 当前页码.
41
+     */
42
+    private int               pageNo;
43
+    /**
44
+     * 总共页数.
45
+     */
46
+    private int               pageCount;
47
+
48
+    public Page() {
49
+    }
50
+
51
+    /**
52
+     * 构造函数.
53
+     *
54
+     * @param begin
55
+     * @param length
56
+     */
57
+    public Page(int begin, int length) {
58
+        this.begin = begin;
59
+        this.length = length;
60
+        this.end = this.begin + this.length;
61
+        this.pageNo = (int) Math.floor((this.begin * 1.0d) / this.length) + 1;
62
+    }
63
+
64
+    /**
65
+     * @param begin
66
+     * @param length
67
+     * @param totalRecords
68
+     */
69
+    public Page(int begin, int length, int totalRecords) {
70
+        this(begin, length);
71
+        this.totalRecords = totalRecords;
72
+        setTotalRecords(totalRecords);//zjt
73
+    }
74
+
75
+    /**
76
+     * 设置页数,自动计算数据范围.
77
+     *
78
+     * @param pageNo
79
+     */
80
+    public Page(int pageNo) {
81
+        this.pageNo = pageNo;
82
+        pageNo = pageNo > 0 ? pageNo : 1;
83
+        this.begin = this.length * (pageNo - 1);
84
+        this.end = this.length * pageNo;
85
+    }
86
+
87
+
88
+
89
+    /**
90
+     * @return the begin
91
+     */
92
+    public int getBegin() {
93
+        return begin;
94
+    }
95
+
96
+    /**
97
+     * @return the end
98
+     */
99
+    public int getEnd() {
100
+        return end;
101
+    }
102
+
103
+    /**
104
+     * @param end
105
+     *            the end to set
106
+     */
107
+    public void setEnd(int end) {
108
+        this.end = end;
109
+    }
110
+
111
+    /**
112
+     * @param begin
113
+     *            the begin to set
114
+     */
115
+    public void setBegin(int begin) {
116
+        this.begin = begin;
117
+        if (this.length != 0) {
118
+            this.pageNo = (int) Math.floor((this.begin * 1.0d) / this.length) + 1;
119
+        }
120
+    }
121
+
122
+    /**
123
+     * @return the length
124
+     */
125
+    public int getLength() {
126
+        return length;
127
+    }
128
+
129
+    /**
130
+     * @param length
131
+     *            the length to set
132
+     */
133
+    public void setLength(int length) {
134
+        this.length = length;
135
+        if (this.begin != 0) {
136
+            this.pageNo = (int) Math.floor((this.begin * 1.0d) / this.length) + 1;
137
+        }
138
+    }
139
+
140
+    /**
141
+     * @return the totalRecords
142
+     */
143
+    public int getTotalRecords() {
144
+        return totalRecords;
145
+    }
146
+
147
+    /**
148
+     * @param totalRecords
149
+     *            the totalRecords to set
150
+     */
151
+    public void setTotalRecords(int totalRecords) {
152
+        this.totalRecords = totalRecords;
153
+        this.pageCount = (int) Math.floor((this.totalRecords * 1.0d) / this.length);
154
+        if (this.totalRecords % this.length != 0) {
155
+            this.pageCount++;
156
+        }
157
+    }
158
+
159
+    /**
160
+     * @return the pageNo
161
+     */
162
+    public int getPageNo() {
163
+        return pageNo;
164
+    }
165
+
166
+    /**
167
+     * @param pageNo
168
+     *            the pageNo to set
169
+     */
170
+    public void setPageNo(int pageNo) {
171
+        this.pageNo = pageNo;
172
+        pageNo = pageNo > 0 ? pageNo : 1;
173
+        this.begin = this.length * (pageNo - 1);
174
+        this.end = this.length * pageNo;
175
+    }
176
+
177
+    /**
178
+     * @return the pageCount
179
+     */
180
+    public int getPageCount() {
181
+        if (pageCount == 0) {
182
+            return 1;
183
+        }
184
+        return pageCount;
185
+    }
186
+
187
+    /**
188
+     * @param pageCount
189
+     *            the pageCount to set
190
+     */
191
+    public void setPageCount(int pageCount) {
192
+        this.pageCount = pageCount;
193
+    }
194
+
195
+    @Override
196
+    public String toString() {
197
+        final StringBuilder builder = new StringBuilder("begin=").append(begin).append(", end=")
198
+                .append(end).append(", length=").append(length).append(", totalRecords=").append(
199
+                        totalRecords).append(", pageNo=").append(pageNo).append(", pageCount=")
200
+                .append(pageCount);
201
+
202
+        return builder.toString();
203
+    }
204
+}

+ 25 - 0
src/main/java/com/zjt/model/PageRusult.java

@@ -0,0 +1,25 @@
1
+package com.zjt.model;
2
+
3
+import com.github.pagehelper.PageInfo;
4
+
5
+import java.util.List;
6
+
7
+public class PageRusult<T> extends PageInfo<T> {
8
+    public PageRusult() {
9
+    }
10
+
11
+    public PageRusult(List<T> list) {
12
+        super(list, 8);
13
+    }
14
+
15
+    private Integer code;//layui框架列表模块返回参数中必须包含code状态字段
16
+
17
+    public Integer getCode() {
18
+        return code;
19
+    }
20
+
21
+    public void setCode(Integer code) {
22
+        this.code = code;
23
+    }
24
+
25
+}

+ 111 - 0
src/main/java/com/zjt/model/ReturnDate.java

@@ -0,0 +1,111 @@
1
+package com.zjt.model;
2
+
3
+import java.math.BigDecimal;
4
+
5
+public class ReturnDate {
6
+
7
+    private String materialTypeCode;
8
+
9
+    private String materialTypeName;
10
+
11
+    private String materialCode;
12
+
13
+    private String materialName;
14
+
15
+    private BigDecimal retailPrice;
16
+
17
+    private String brandCode;
18
+
19
+    private String brandName;
20
+
21
+    private String materialGroupCode;
22
+
23
+    private String materialGroupName;
24
+
25
+    public String getMaterialTypeCode() {
26
+        return materialTypeCode;
27
+    }
28
+
29
+    public void setMaterialTypeCode(String materialTypeCode) {
30
+        this.materialTypeCode = materialTypeCode;
31
+    }
32
+
33
+    public String getMaterialTypeName() {
34
+        return materialTypeName;
35
+    }
36
+
37
+    public void setMaterialTypeName(String materialTypeName) {
38
+        this.materialTypeName = materialTypeName;
39
+    }
40
+
41
+    public String getMaterialCode() {
42
+        return materialCode;
43
+    }
44
+
45
+    public void setMaterialCode(String materialCode) {
46
+        this.materialCode = materialCode;
47
+    }
48
+
49
+    public String getMaterialName() {
50
+        return materialName;
51
+    }
52
+
53
+    public void setMaterialName(String materialName) {
54
+        this.materialName = materialName;
55
+    }
56
+
57
+    public BigDecimal getRetailPrice() {
58
+        return retailPrice;
59
+    }
60
+
61
+    public void setRetailPrice(BigDecimal retailPrice) {
62
+        this.retailPrice = retailPrice;
63
+    }
64
+
65
+    public String getBrandCode() {
66
+        return brandCode;
67
+    }
68
+
69
+    public void setBrandCode(String brandCode) {
70
+        this.brandCode = brandCode;
71
+    }
72
+
73
+    public String getBrandName() {
74
+        return brandName;
75
+    }
76
+
77
+    public void setBrandName(String brandName) {
78
+        this.brandName = brandName;
79
+    }
80
+
81
+    public String getMaterialGroupCode() {
82
+        return materialGroupCode;
83
+    }
84
+
85
+    public void setMaterialGroupCode(String materialGroupCode) {
86
+        this.materialGroupCode = materialGroupCode;
87
+    }
88
+
89
+    public String getMaterialGroupName() {
90
+        return materialGroupName;
91
+    }
92
+
93
+    public void setMaterialGroupName(String materialGroupName) {
94
+        this.materialGroupName = materialGroupName;
95
+    }
96
+
97
+    @Override
98
+    public String toString() {
99
+        return "ReturnDate{" +
100
+                "materialTypeCode='" + materialTypeCode + '\'' +
101
+                ", materialTypeName='" + materialTypeName + '\'' +
102
+                ", materialCode='" + materialCode + '\'' +
103
+                ", materialName='" + materialName + '\'' +
104
+                ", retailPrice=" + retailPrice +
105
+                ", brandCode='" + brandCode + '\'' +
106
+                ", brandName='" + brandName + '\'' +
107
+                ", materialGroupCode='" + materialGroupCode + '\'' +
108
+                ", materialGroupName='" + materialGroupName + '\'' +
109
+                '}';
110
+    }
111
+}

+ 98 - 0
src/main/java/com/zjt/realm/MyRealm.java

@@ -0,0 +1,98 @@
1
+package com.zjt.realm;
2
+
3
+import com.zjt.entity.Tmenu;
4
+import com.zjt.entity.Trole;
5
+import com.zjt.entity.Tuser;
6
+import com.zjt.mapper.TmenuMapper;
7
+import com.zjt.mapper.TroleMapper;
8
+import com.zjt.mapper.TuserMapper;
9
+import com.zjt.mapper.TuserroleMapper;
10
+import org.apache.shiro.SecurityUtils;
11
+import org.apache.shiro.authc.AuthenticationException;
12
+import org.apache.shiro.authc.AuthenticationInfo;
13
+import org.apache.shiro.authc.AuthenticationToken;
14
+import org.apache.shiro.authc.SimpleAuthenticationInfo;
15
+import org.apache.shiro.authz.AuthorizationInfo;
16
+import org.apache.shiro.authz.SimpleAuthorizationInfo;
17
+import org.apache.shiro.realm.AuthorizingRealm;
18
+import org.apache.shiro.subject.PrincipalCollection;
19
+import tk.mybatis.mapper.entity.Example;
20
+
21
+import javax.annotation.Resource;
22
+import java.util.HashSet;
23
+import java.util.List;
24
+import java.util.Set;
25
+
26
+/**
27
+ * 自定义Realm
28
+ * @author zjt
29
+ *
30
+ */
31
+public class MyRealm extends AuthorizingRealm{
32
+
33
+	@Resource
34
+	private TuserMapper tuserMapper;
35
+	
36
+	@Resource
37
+	private TroleMapper troleMapper;
38
+
39
+	@Resource
40
+	private TuserroleMapper tuserroleMapper;
41
+	
42
+	@Resource
43
+	private TmenuMapper tmenuMapper;
44
+
45
+	/**
46
+	 * 授权
47
+	 */
48
+	@Override
49
+	protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
50
+		String userName=(String) SecurityUtils.getSubject().getPrincipal();
51
+
52
+		//User user=userRepository.findByUserName(userName);
53
+		//根据用户名查询出用户记录
54
+		Example tuserExample=new Example(Tuser.class);
55
+		tuserExample.or().andEqualTo("userName",userName);
56
+		Tuser user=tuserMapper.selectByExample(tuserExample).get(0);
57
+
58
+
59
+		SimpleAuthorizationInfo info=new SimpleAuthorizationInfo();
60
+
61
+		//List<Role> roleList=roleRepository.findByUserId(user.getId());
62
+		List<Trole> roleList = troleMapper.selectRolesByUserId(user.getId());
63
+
64
+		Set<String> roles=new HashSet<String>();
65
+		if(roleList.size()>0){
66
+			for(Trole role:roleList){
67
+				roles.add(role.getName());
68
+				//List<Tmenu> menuList=menuRepository.findByRoleId(role.getId());
69
+				//根据角色id查询所有资源
70
+				List<Tmenu> menuList=tmenuMapper.selectMenusByRoleId(role.getId());
71
+				for(Tmenu menu:menuList){
72
+					info.addStringPermission(menu.getName()); // 添加权限
73
+				}
74
+			}
75
+		}
76
+		info.setRoles(roles);
77
+		return info;
78
+	}
79
+
80
+	/**
81
+	 * 权限认证
82
+				*/
83
+		@Override
84
+		protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
85
+			String userName=(String)token.getPrincipal();
86
+			//User user=userRepository.findByUserName(userName);
87
+			Example tuserExample=new Example(Tuser.class);
88
+			tuserExample.or().andEqualTo("userName",userName);
89
+			Tuser user=tuserMapper.selectByExample(tuserExample).get(0);
90
+			if(user!=null){
91
+				AuthenticationInfo authcInfo=new SimpleAuthenticationInfo(user.getUserName(),user.getPassword(),"xxx");
92
+				return authcInfo;
93
+			}else{
94
+				return null;
95
+			}
96
+	}
97
+
98
+}

+ 56 - 0
src/main/java/com/zjt/service/IService.java

@@ -0,0 +1,56 @@
1
+/*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2014 abel533@gmail.com
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */
24
+
25
+package com.zjt.service;
26
+
27
+import org.springframework.stereotype.Service;
28
+
29
+import java.util.List;
30
+
31
+/**
32
+ * 通用接口
33
+ */
34
+@Service
35
+public interface IService<T> {
36
+
37
+    T selectByKey(Object key);
38
+
39
+    int save(T entity);
40
+
41
+    int saveNotNull(T entity);
42
+
43
+    int delete(Object key);
44
+
45
+    int deleteByExample(Object example);
46
+
47
+    int updateAll(T entity);
48
+
49
+    int updateNotNull(T entity);
50
+
51
+    List<T> selectByExample(Object example);
52
+
53
+    int selectCountByExample(Object example);
54
+
55
+    //TODO 其他...
56
+}

+ 20 - 0
src/main/java/com/zjt/service/MaterialType.java

@@ -0,0 +1,20 @@
1
+package com.zjt.service;
2
+
3
+import com.zjt.entity.cgmaterial;
4
+import com.zjt.entity.type;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+
9
+public interface MaterialType extends IService<type>{
10
+    List<type> selectAll();
11
+    public String type();
12
+    public String brand(String materialTypeCode);
13
+    public String group(String brand);
14
+    public String price(String group) throws Exception;
15
+    public String code(String code);
16
+    public String insertCg(cgmaterial cgmaterial);
17
+    public List<cgmaterial> selectData();
18
+    public int deldate(Long id, String code);
19
+    public List<cgmaterial> selectDataBy(@Param("id")String id, @Param("storeCode")String storeCode, @Param("begin")String begin, @Param("end")String end, @Param("receive")String receive);
20
+}

+ 15 - 0
src/main/java/com/zjt/service/TmenuService.java

@@ -0,0 +1,15 @@
1
+package com.zjt.service;
2
+
3
+import com.zjt.entity.Tmenu;
4
+
5
+import java.util.HashMap;
6
+import java.util.List;
7
+
8
+public interface TmenuService extends IService<Tmenu>{
9
+
10
+    List<Tmenu> selectMenusByRoleId(Integer roleid);
11
+
12
+    List<Tmenu> selectByParentIdAndRoleId(HashMap<String, Object> paraMap);
13
+
14
+
15
+}

+ 13 - 0
src/main/java/com/zjt/service/TroleService.java

@@ -0,0 +1,13 @@
1
+package com.zjt.service;
2
+
3
+import com.zjt.entity.Trole;
4
+
5
+import java.util.List;
6
+
7
+public interface TroleService extends IService<Trole>{
8
+
9
+
10
+    //↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
11
+    List<Trole> selectRolesByUserId(Integer userid);//根据userid查询所有的角色
12
+
13
+}

+ 6 - 0
src/main/java/com/zjt/service/TrolemenuService.java

@@ -0,0 +1,6 @@
1
+package com.zjt.service;
2
+
3
+import com.zjt.entity.Trolemenu;
4
+
5
+public interface TrolemenuService extends IService<Trolemenu>{
6
+}

+ 6 - 0
src/main/java/com/zjt/service/TuserService.java

@@ -0,0 +1,6 @@
1
+package com.zjt.service;
2
+
3
+import com.zjt.entity.Tuser;
4
+
5
+public interface TuserService  extends IService<Tuser>{
6
+}

+ 6 - 0
src/main/java/com/zjt/service/TuserroleService.java

@@ -0,0 +1,6 @@
1
+package com.zjt.service;
2
+
3
+import com.zjt.entity.Tuserrole;
4
+
5
+public interface TuserroleService extends IService<Tuserrole>{
6
+}

+ 98 - 0
src/main/java/com/zjt/service/impl/BaseService.java

@@ -0,0 +1,98 @@
1
+/*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2014 abel533@gmail.com
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */
24
+
25
+package com.zjt.service.impl;
26
+
27
+import com.zjt.service.IService;
28
+import org.springframework.beans.factory.annotation.Autowired;
29
+import tk.mybatis.mapper.common.Mapper;
30
+
31
+import java.util.List;
32
+
33
+/**
34
+ * 通用Service
35
+ * @param <T>
36
+ */
37
+public abstract class BaseService<T> implements IService<T> {
38
+
39
+    @Autowired
40
+    protected Mapper<T> mapper;
41
+    public Mapper<T> getMapper() {
42
+        return mapper;
43
+    }
44
+
45
+    @Override
46
+    public T selectByKey(Object key) {
47
+        //说明:根据主键字段进行查询,方法参数必须包含完整的主键属性,查询条件使用等号
48
+        return mapper.selectByPrimaryKey(key);
49
+    }
50
+
51
+    @Override
52
+    public int save(T entity) {
53
+        //说明:保存一个实体,null的属性也会保存,不会使用数据库默认值
54
+        return mapper.insert(entity);
55
+    }
56
+
57
+    @Override
58
+    public int saveNotNull(T entity) {
59
+        //说明:保存一个实体,属性不为null的值
60
+        return mapper.insertSelective(entity);
61
+    }
62
+
63
+    @Override
64
+    public int delete(Object key) {
65
+        //说明:根据主键字段进行删除,方法参数必须包含完整的主键属性
66
+        return mapper.deleteByPrimaryKey(key);
67
+    }
68
+
69
+    @Override
70
+    public int deleteByExample(Object example) {
71
+        //说明:根据主键字段进行删除,方法参数必须包含完整的主键属性
72
+        return mapper.deleteByExample(example);
73
+    }
74
+
75
+    @Override
76
+    public int updateAll(T entity) {
77
+        //说明:根据主键更新实体全部字段,null值会被更新
78
+        return mapper.updateByPrimaryKey(entity);
79
+    }
80
+
81
+    @Override
82
+    public int updateNotNull(T entity) {
83
+        //根据主键更新属性不为null的值
84
+        return mapper.updateByPrimaryKeySelective(entity);
85
+    }
86
+
87
+    @Override
88
+    public List<T> selectByExample(Object example) {
89
+        //说明:根据Example条件进行查询
90
+        //重点:这个查询支持通过Example类指定查询列,通过selectProperties方法指定查询列
91
+        return mapper.selectByExample(example);
92
+    }
93
+
94
+    @Override
95
+    public int selectCountByExample(Object example) {
96
+        return mapper.selectCountByExample(example);
97
+    }
98
+}

+ 115 - 0
src/main/java/com/zjt/service/impl/MaterialTypeImp.java

@@ -0,0 +1,115 @@
1
+package com.zjt.service.impl;
2
+
3
+import com.alibaba.fastjson.JSONArray;
4
+import com.zjt.entity.*;
5
+import com.zjt.mapper.*;
6
+import com.zjt.model.ReturnDate;
7
+import com.zjt.service.MaterialType;
8
+import org.apache.ibatis.annotations.Param;
9
+import org.springframework.stereotype.Service;
10
+
11
+import javax.annotation.Resource;
12
+import java.util.List;
13
+import java.util.function.Function;
14
+import java.util.stream.Collectors;
15
+
16
+@Service
17
+public class MaterialTypeImp extends BaseService<type> implements MaterialType  {
18
+    @Resource
19
+    private typeMapper typeMapper;
20
+    @Resource
21
+    private brandMapper brandMapper;
22
+    @Resource
23
+    private groupMapper groupMapper;
24
+    @Resource
25
+    private priceMapper priceMapper;
26
+    @Resource
27
+    private cgmaterialMapper cgmaterialMapper;
28
+    @Override
29
+    public List<type> selectAll() {
30
+        return typeMapper.selectAll();
31
+    }
32
+    public String type(){
33
+        Function<type, ReturnDate> dataMap = (bas_material_type)->{
34
+            ReturnDate ReturnDate=new ReturnDate();
35
+            ReturnDate.setBrandCode(bas_material_type.getMaterialTypeCode());
36
+            ReturnDate.setBrandName(bas_material_type.getMaterialTypeName());
37
+            return ReturnDate;
38
+        };
39
+        List<type> materialType= typeMapper.selectAll();
40
+/*        ReturnDate ReturnDate=new ReturnDate();
41
+        List<ReturnDate> list= new ArrayList<ReturnDate>();*/
42
+        List<ReturnDate> collect = materialType.parallelStream().map(dataMap).collect(Collectors.toList());
43
+        return JSONArray.toJSON(collect).toString();
44
+    }
45
+    public String brand(String materialTypeCode){
46
+
47
+        Function<brand,ReturnDate> ReturnDate=(brand)->{
48
+            ReturnDate returnDate =new ReturnDate();
49
+            returnDate.setBrandName(brand.getBrandName());
50
+            returnDate.setBrandCode(brand.getBrandCode());
51
+            return returnDate;
52
+        };
53
+        List<ReturnDate> returnDates = brandMapper.selectBrand(materialTypeCode).stream().map(ReturnDate).collect(Collectors.toList());
54
+        return JSONArray.toJSON(returnDates).toString();
55
+    }
56
+    public String group(String brand){
57
+
58
+        Function<group,ReturnDate> ReturnDate=(group)->{
59
+            ReturnDate returnDate =new ReturnDate();
60
+            returnDate.setMaterialGroupName(group.getMaterialGroupName());
61
+            returnDate.setMaterialGroupCode(group.getMaterialGroupCode());
62
+            return returnDate;
63
+        };
64
+        List<ReturnDate> returnDates = groupMapper.selectBrand(brand).stream().map(ReturnDate).collect(Collectors.toList());
65
+        return JSONArray.toJSON(returnDates).toString();
66
+    }
67
+
68
+    public String price(String group) throws Exception {
69
+
70
+        if("".equals(group)&&null==group){
71
+            throw new Exception("group为空!!!");
72
+        }
73
+        Function<price,ReturnDate> ReturnDate=(price)->{
74
+            ReturnDate returnDate =new ReturnDate();
75
+            returnDate.setMaterialName(price.getMaterialName());
76
+            returnDate.setMaterialCode(price.getMaterialCode());
77
+            return returnDate;
78
+        };
79
+        List<ReturnDate> returnDates = priceMapper.selectPrice(group).stream().map(ReturnDate).collect(Collectors.toList());
80
+        System.out.println(returnDates);
81
+        return JSONArray.toJSON(returnDates).toString();
82
+    }
83
+    public String code(String code){
84
+
85
+        Function<price,ReturnDate> ReturnDate=(price)->{
86
+            ReturnDate returnDate =new ReturnDate();
87
+            returnDate.setMaterialName(price.getMaterialName());
88
+            returnDate.setMaterialCode(price.getMaterialCode());
89
+            returnDate.setRetailPrice(price.getRetailPrice());
90
+            return returnDate;
91
+        };
92
+        List<ReturnDate> returnDates = priceMapper.selectCode(code).stream().map(ReturnDate).collect(Collectors.toList());
93
+        System.out.println(returnDates);
94
+        return JSONArray.toJSON(returnDates).toString();
95
+    }
96
+
97
+    public String insertCg(cgmaterial cgmaterial){
98
+        return cgmaterialMapper.insert(cgmaterial)+"";
99
+    }
100
+
101
+    @Override
102
+    public List<cgmaterial> selectData() {
103
+        return cgmaterialMapper.selectData();
104
+    }
105
+
106
+    public int deldate(Long idl, String code){
107
+        cgmaterialMapper.deldate(idl,code);
108
+        return 1;
109
+    }
110
+    @Override
111
+    public List<cgmaterial> selectDataBy(@Param("id")String id, @Param("storeCode")String storeCode, @Param("begin")String begin, @Param("end")String end, @Param("receive")String receive) {
112
+        return cgmaterialMapper.selectDataBy(id,storeCode,begin,end,receive);
113
+    }
114
+
115
+}

+ 31 - 0
src/main/java/com/zjt/service/impl/TmenuServieImpl.java

@@ -0,0 +1,31 @@
1
+package com.zjt.service.impl;
2
+
3
+import com.zjt.entity.Tmenu;
4
+import com.zjt.mapper.TmenuMapper;
5
+import com.zjt.service.TmenuService;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+
9
+import java.util.HashMap;
10
+import java.util.List;
11
+
12
+/**
13
+ * @author <a href=""mailto:zhaojt@gtmap.cn></a>
14
+ * @version 1.0, 2017/11/10
15
+ * @description
16
+ */
17
+@Service("tmenuService")
18
+public class TmenuServieImpl extends BaseService<Tmenu> implements TmenuService {
19
+    @Autowired
20
+    private TmenuMapper tmenuMapper;
21
+
22
+    @Override
23
+    public List<Tmenu> selectMenusByRoleId(Integer roleid) {
24
+        return tmenuMapper.selectMenusByRoleId(roleid);
25
+    }
26
+
27
+    @Override
28
+    public List<Tmenu> selectByParentIdAndRoleId(HashMap<String, Object> paraMap) {
29
+        return tmenuMapper.selectByParentIdAndRoleId(paraMap);
30
+    }
31
+}

+ 27 - 0
src/main/java/com/zjt/service/impl/TroleServiceImpl.java

@@ -0,0 +1,27 @@
1
+package com.zjt.service.impl;
2
+
3
+import com.zjt.entity.Trole;
4
+import com.zjt.entity.Trolemenu;
5
+import com.zjt.mapper.TroleMapper;
6
+import com.zjt.service.TroleService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * @author <a href=""mailto:zhaojt@gtmap.cn></a>
14
+ * @version 1.0, 2017/11/10
15
+ * @description
16
+ */
17
+
18
+@Service("troleService")
19
+public class TroleServiceImpl   extends BaseService<Trole> implements TroleService {
20
+    @Autowired
21
+    private TroleMapper troleMapper;
22
+
23
+    @Override
24
+    public List<Trole> selectRolesByUserId(Integer userid) {
25
+        return troleMapper.selectRolesByUserId(userid);
26
+    }
27
+}

+ 15 - 0
src/main/java/com/zjt/service/impl/TrolemenuServiceImpl.java

@@ -0,0 +1,15 @@
1
+package com.zjt.service.impl;
2
+
3
+import com.zjt.entity.Trolemenu;
4
+import com.zjt.service.TrolemenuService;
5
+import org.springframework.stereotype.Service;
6
+
7
+/**
8
+ * @author <a href=""mailto:zhaojt@gtmap.cn></a>
9
+ * @version 1.0, 2017/11/10
10
+ * @description
11
+ */
12
+@Service("trolemenuService")
13
+public class TrolemenuServiceImpl   extends BaseService<Trolemenu> implements TrolemenuService {
14
+
15
+}

+ 15 - 0
src/main/java/com/zjt/service/impl/TuserServiceImpl.java

@@ -0,0 +1,15 @@
1
+package com.zjt.service.impl;
2
+
3
+import com.zjt.entity.Tuser;
4
+import com.zjt.service.TuserService;
5
+import org.springframework.stereotype.Service;
6
+
7
+/**
8
+ * @author <a href=""mailto:zhaojt@gtmap.cn></a>
9
+ * @version 1.0, 2017/11/10
10
+ * @description
11
+ */
12
+@Service("tuserService")
13
+public class TuserServiceImpl   extends BaseService<Tuser> implements TuserService {
14
+
15
+}

+ 15 - 0
src/main/java/com/zjt/service/impl/TuserroleServiceImpl.java

@@ -0,0 +1,15 @@
1
+package com.zjt.service.impl;
2
+
3
+import com.zjt.entity.Tuserrole;
4
+import com.zjt.service.TuserroleService;
5
+import org.springframework.stereotype.Service;
6
+
7
+/**
8
+ * @author <a href=""mailto:zhaojt@gtmap.cn></a>
9
+ * @version 1.0, 2017/11/10
10
+ * @description
11
+ */
12
+@Service("tuserroleService")
13
+public class TuserroleServiceImpl   extends BaseService<Tuserrole>  implements TuserroleService {
14
+
15
+}

+ 63 - 0
src/main/java/com/zjt/util/AjaxObject.java

@@ -0,0 +1,63 @@
1
+package com.zjt.util;
2
+
3
+
4
+import org.springframework.http.HttpStatus;
5
+
6
+import java.util.HashMap;
7
+import java.util.Map;
8
+
9
+/**
10
+ * 返回数据
11
+ */
12
+public class AjaxObject extends HashMap<String, Object> {
13
+	private static final long serialVersionUID = 1L;
14
+	
15
+	public AjaxObject() {
16
+		put("code", 0);
17
+	}
18
+	
19
+	public static AjaxObject error() {
20
+		return error(HttpStatus.INTERNAL_SERVER_ERROR.value(), "未知异常,请联系管理员");
21
+	}
22
+	
23
+	public static AjaxObject error(String msg) {
24
+		return error(HttpStatus.INTERNAL_SERVER_ERROR.value(), msg);
25
+	}
26
+	
27
+	public static AjaxObject error(int code, String msg) {
28
+		AjaxObject r = new AjaxObject();
29
+		r.put("code", code);
30
+		r.put("msg", msg);
31
+		return r;
32
+	}
33
+
34
+	public static AjaxObject ok(String msg) {
35
+		AjaxObject r = new AjaxObject();
36
+		r.put("msg", msg);
37
+		return r;
38
+	}
39
+	
40
+	public static AjaxObject ok(Map<String, Object> map) {
41
+		AjaxObject r = new AjaxObject();
42
+		r.putAll(map);
43
+		return r;
44
+	}
45
+	
46
+	public static AjaxObject ok() {
47
+		return new AjaxObject();
48
+	}
49
+
50
+	public AjaxObject put(String key, Object value) {
51
+		super.put(key, value);
52
+		return this;
53
+	}
54
+	
55
+	public AjaxObject data(Object value) {
56
+		super.put("data", value);
57
+		return this;
58
+	}
59
+
60
+	public static AjaxObject apiError(String msg) {
61
+		return error(1, msg);
62
+	}
63
+}

+ 15 - 0
src/main/java/com/zjt/util/MyMapper.java

@@ -0,0 +1,15 @@
1
+package com.zjt.util;
2
+
3
+import tk.mybatis.mapper.common.Mapper;
4
+import tk.mybatis.mapper.common.MySqlMapper;
5
+
6
+/**
7
+ * 继承自己的MyMapper
8
+ *
9
+ * @author
10
+ * @since 2017-06-26 21:53
11
+ */
12
+public interface MyMapper<T> extends Mapper<T>, MySqlMapper<T> {
13
+    //FIXME 特别注意,该接口不能被扫描到,否则会出错
14
+    //FIXME 最后在启动类中通过MapperScan注解指定扫描的mapper路径:
15
+}

+ 54 - 0
src/main/java/com/zjt/util/Page.java

@@ -0,0 +1,54 @@
1
+package com.zjt.util;
2
+
3
+import java.io.Serializable;
4
+import java.util.Collections;
5
+import java.util.List;
6
+import java.util.Map;
7
+
8
+/**
9
+ * 分页工具类
10
+ * @param <T>
11
+ */
12
+public class Page<T> implements Serializable {
13
+    private int page; //当前页
14
+    private int rows; //每页多少条
15
+    private static final long serialVersionUID = 1L;
16
+    private List<T> records = Collections.emptyList();
17
+    private Map<String, Object> condition;
18
+
19
+    public int getPage() {
20
+        return page;
21
+    }
22
+
23
+    public void setPage(int page) {
24
+        this.page = page;
25
+    }
26
+
27
+    public int getRows() {
28
+        return rows;
29
+    }
30
+
31
+    public void setRows(int rows) {
32
+        this.rows = rows;
33
+    }
34
+
35
+    public static long getSerialVersionUID() {
36
+        return serialVersionUID;
37
+    }
38
+
39
+    public List<T> getRecords() {
40
+        return records;
41
+    }
42
+
43
+    public void setRecords(List<T> records) {
44
+        this.records = records;
45
+    }
46
+
47
+    public Map<String, Object> getCondition() {
48
+        return condition;
49
+    }
50
+
51
+    public void setCondition(Map<String, Object> condition) {
52
+        this.condition = condition;
53
+    }
54
+}

+ 22 - 0
src/main/java/com/zjt/web/AbstractController.java

@@ -0,0 +1,22 @@
1
+package com.zjt.web;
2
+
3
+import org.slf4j.Logger;
4
+import org.slf4j.LoggerFactory;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+
7
+import javax.servlet.http.HttpServletRequest;
8
+
9
+/**
10
+ * Controller公共组件
11
+ */
12
+public abstract class AbstractController {
13
+	protected Logger logger = LoggerFactory.getLogger(getClass());
14
+	
15
+	@Autowired
16
+	private HttpServletRequest request;
17
+	
18
+	protected String getContextPath(){
19
+		return request.getContextPath();
20
+	}
21
+
22
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 136 - 0
src/main/java/com/zjt/web/DrawImageController.java


+ 88 - 0
src/main/java/com/zjt/web/MaterialContraller.java

@@ -0,0 +1,88 @@
1
+package com.zjt.web;
2
+
3
+import com.zjt.entity.Tuser;
4
+import com.zjt.entity.cgmaterial;
5
+import com.zjt.service.MaterialType;
6
+import org.springframework.ui.Model;
7
+import org.springframework.web.bind.annotation.RequestMapping;
8
+import org.springframework.web.bind.annotation.RestController;
9
+
10
+import javax.annotation.Resource;
11
+import javax.servlet.http.HttpSession;
12
+import java.text.SimpleDateFormat;
13
+import java.util.List;
14
+import java.util.function.Predicate;
15
+import java.util.stream.Collectors;
16
+
17
+@RestController
18
+@RequestMapping("/user")
19
+public class MaterialContraller {
20
+    @Resource
21
+    private MaterialType MaterialType;
22
+
23
+    @RequestMapping("materialtype")
24
+    public String SelectMaterialType(){
25
+        return MaterialType.selectAll().toString();
26
+    }
27
+    @RequestMapping("type")
28
+    public String type(){
29
+        return MaterialType.type();
30
+    }
31
+    @RequestMapping("brand")
32
+    public String brand(String materialTypeCode) {
33
+        return MaterialType.brand(materialTypeCode);
34
+    }
35
+
36
+    @RequestMapping("group")
37
+    public String group(String brand){
38
+        return MaterialType.group(brand);
39
+    }
40
+    @RequestMapping("price")
41
+    public String price(String group) throws Exception {
42
+        return MaterialType.price(group);
43
+    }
44
+    @RequestMapping("code")
45
+    public String code(String code){
46
+        return MaterialType.code(code);
47
+    }
48
+    @RequestMapping("deldate")
49
+    public String deldate(String id, String code){
50
+        id=id.replace(" ","").replace("S","");
51
+        Long idl=Long.parseLong(id.replace(",",""));
52
+        code=code.replace(" ","");
53
+        return MaterialType.deldate(idl,code)+"";
54
+
55
+    }
56
+/*    @RequestMapping("select")
57
+    public String select(String store, String date, HttpSession session, Model model){
58
+
59
+        Tuser users= (Tuser) session.getAttribute("currentUser");
60
+        Predicate<cgmaterial> predicate = a->{
61
+            if(a.getUsername().equals(users.getTrueName())){
62
+                return true;
63
+            }else{
64
+                return false;
65
+            }
66
+        };
67
+        Predicate<cgmaterial> predicate2=a->{
68
+            if(date!=null){
69
+                String[] split = date.split(" - ");
70
+                String strDateFormat = "yyyy-MM-dd HH:mm:ss";
71
+                SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
72
+                if(sdf.format(a.getCreatetime()).compareTo(split[0])>0&&sdf.format(a.getCreatetime()).compareTo(split[1])<0){
73
+                    return true;
74
+                }else{
75
+                    return false;
76
+                }
77
+            }else{
78
+                return false;
79
+            }
80
+        };
81
+        List<cgmaterial> collect = MaterialType.selectData().stream()
82
+                .filter(a -> a.getUsername().equals(users.getTrueName()))
83
+                .filter(predicate2)
84
+                .collect(Collectors.toList());
85
+        model.addAttribute("listcg",collect);
86
+        return "mypackage/selectcg";
87
+    }*/
88
+}

+ 324 - 0
src/main/java/com/zjt/web/MenuController.java

@@ -0,0 +1,324 @@
1
+package com.zjt.web;
2
+
3
+import com.google.gson.JsonArray;
4
+import com.google.gson.JsonObject;
5
+import com.zjt.entity.Tmenu;
6
+import com.zjt.entity.Trolemenu;
7
+import com.zjt.service.*;
8
+import org.apache.commons.lang3.StringUtils;
9
+import org.apache.shiro.authz.annotation.RequiresPermissions;
10
+import org.springframework.stereotype.Controller;
11
+import org.springframework.web.bind.annotation.PostMapping;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.ResponseBody;
14
+import tk.mybatis.mapper.entity.Example;
15
+
16
+import javax.annotation.Resource;
17
+import javax.servlet.http.HttpSession;
18
+import java.util.LinkedHashMap;
19
+import java.util.List;
20
+import java.util.Map;
21
+
22
+import static org.apache.commons.lang3.StringUtils.isNumeric;
23
+
24
+/**
25
+ * @param
26
+
27
+ * @Description:
28
+ * @Date: Created in 2018/2/21 11:18
29
+ */
30
+
31
+
32
+
33
+@Controller
34
+@RequestMapping("/admin/menu")
35
+public class MenuController {
36
+    @Resource
37
+    private TuserService userService;
38
+
39
+    @Resource
40
+    private TroleService roleService;
41
+
42
+    @Resource
43
+    private TuserroleService userRoleService;
44
+
45
+    @Resource
46
+    private TmenuService tmenuService;
47
+
48
+    @Resource
49
+    private TrolemenuService trolemenuService;
50
+
51
+    @RequestMapping("/tomunemanage")
52
+    @RequiresPermissions(value = {"菜单管理"})
53
+    public String tousermanage() {
54
+        return "power/menu";
55
+    }
56
+
57
+
58
+
59
+    /**
60
+    * @Description: 查询parentId为1的所有菜单及子菜单集合
61
+    * @Date: Created in 2018/2/21 12:53
62
+    * @param
63
+    */
64
+    @ResponseBody
65
+    @PostMapping("/loadCheckMenuInfo")
66
+    @RequiresPermissions(value = {"菜单管理"})
67
+    public String loadCheckMenuInfo(Integer parentId) throws Exception {
68
+        String json = getAllMenuByParentId(parentId).toString();
69
+        //System.out.println(json);
70
+        return json;
71
+    }
72
+
73
+
74
+    private JsonArray getAllMenuByParentId(Integer parentId) {
75
+        JsonArray jsonArray = this.getMenuByParentId(parentId);
76
+        for (int i = 0; i < jsonArray.size(); i++) {
77
+            JsonObject jsonObject = (JsonObject) jsonArray.get(i);
78
+            //判断该节点下时候还有子节点
79
+            Example example=new Example(Tmenu.class);
80
+            example.or().andEqualTo("pId",jsonObject.get("id").getAsString());
81
+            if (tmenuService.selectCountByExample(example)==0) {
82
+                continue;
83
+            } else {
84
+                jsonObject.add("children", getAllMenuByParentId(jsonObject.get("id").getAsInt()));
85
+            }
86
+        }
87
+        return jsonArray;
88
+    }
89
+
90
+
91
+    private JsonArray getMenuByParentId(Integer parentId) {
92
+        Example tmenuExample = new Example(Tmenu.class);
93
+        tmenuExample.or().andEqualTo("pId",parentId);
94
+        List<Tmenu> menuList = tmenuService.selectByExample(tmenuExample);
95
+        JsonArray jsonArray = new JsonArray();
96
+        for (Tmenu menu : menuList) {
97
+            JsonObject jsonObject = new JsonObject();
98
+            Integer menuId = menu.getId();
99
+            jsonObject.addProperty("id", menuId); // 节点id
100
+            jsonObject.addProperty("name", menu.getName()); // 节点名称
101
+            //判断该节点下是否还有子节点
102
+            Example example=new Example(Tmenu.class);
103
+            example.or().andEqualTo("pId",jsonObject.get("id").getAsString());
104
+            //if (menu.getState() == 1) {
105
+            if (tmenuService.selectCountByExample(example)==0) {
106
+                jsonObject.addProperty("open", "false"); // 无子节点
107
+            } else {
108
+                jsonObject.addProperty("open", "true"); // 有子节点
109
+            }
110
+            jsonObject.addProperty("state", String.valueOf(menu.getState()));
111
+            jsonObject.addProperty("iconValue", menu.getIcon());
112
+            jsonObject.addProperty("pId", String.valueOf(menu.getpId()));
113
+            jsonArray.add(jsonObject);
114
+        }
115
+        return jsonArray;
116
+    }
117
+
118
+
119
+
120
+    /**
121
+
122
+    * @Description: 编辑节点之前将该节点select出来
123
+    * @Date: Created in 2018/2/24 17:03
124
+    * @param 
125
+    */
126
+    @ResponseBody
127
+    @RequestMapping(value = "/selectMenuById")
128
+    @RequiresPermissions(value = {"菜单管理"})
129
+    public Map<String, Object> selectMenuById(Integer id) {
130
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
131
+        try {
132
+            if(id==null||id==0){
133
+                resultmap.put("state", "fail");
134
+                resultmap.put("mesg", "无法获取节点id");
135
+                return resultmap;
136
+            }else{
137
+                Tmenu tmenu=tmenuService.selectByKey(id);
138
+                if(tmenu==null){
139
+                    resultmap.put("state", "fail");
140
+                    resultmap.put("mesg", "无法找到该节点对象");
141
+                    return resultmap;
142
+                }else{
143
+                    resultmap.put("state", "success");
144
+                    resultmap.put("mesg", "获取该节点对象成功");
145
+                    resultmap.put("tmenu", tmenu);
146
+                    return resultmap;
147
+                }
148
+            }
149
+
150
+        } catch (Exception e) {
151
+            e.printStackTrace();
152
+            resultmap.put("state", "fail");
153
+            resultmap.put("mesg", "操作失败,系统异常");
154
+            return resultmap;
155
+        }
156
+    }
157
+
158
+
159
+
160
+
161
+
162
+    @ResponseBody
163
+    @RequestMapping(value = "/addupdatemenu")
164
+    @RequiresPermissions(value = {"菜单管理"})
165
+    public Map<String, Object> addupdatemenu(HttpSession session, Tmenu tmenu) {
166
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
167
+        try {
168
+            if (tmenu.getId() == null) {//新建
169
+                //首先校验本次新增操作提交的菜单对象中的name属性的值是否存在
170
+                Example tmenuExample = new Example(Tmenu.class);
171
+                tmenuExample.or().andEqualTo("name",tmenu.getName());
172
+                List<Tmenu> menulist = tmenuService.selectByExample(tmenuExample);
173
+                if (menulist != null && menulist.size() > 0) {
174
+                    resultmap.put("state", "fail");
175
+                    resultmap.put("mesg", "当前菜单名已存在");
176
+                    return resultmap;
177
+                }
178
+
179
+                //校验是否提交了pId
180
+                if(tmenu.getpId()==null||tmenu.getpId()==0){
181
+                    resultmap.put("state", "fail");
182
+                    resultmap.put("mesg", "无法获取父级id");
183
+                    return resultmap;
184
+                }else{
185
+
186
+                    Tmenu pmenu=tmenuService.selectByKey(tmenu.getpId());//父节点对象
187
+                    if(pmenu.getState()==3){
188
+                        resultmap.put("state", "fail");
189
+                        resultmap.put("mesg", "3级菜单不可再添加子菜单");
190
+                        return resultmap;
191
+                    }
192
+                    if("-1".equalsIgnoreCase(String.valueOf(pmenu.getpId()))
193
+                            &&"1".equalsIgnoreCase(String.valueOf(pmenu.getState()))){//如果父节点是最顶级那一个,则本次新增为一级菜单
194
+
195
+                        //一级菜单的名字不可为纯数字
196
+                        if(isNumeric(tmenu.getName())){
197
+                            resultmap.put("state", "fail");
198
+                            resultmap.put("mesg", "1级菜单的名字不可为纯数字");
199
+                            return resultmap;
200
+                        }
201
+
202
+                        tmenu.setState(1);
203
+                    }else if("1".equalsIgnoreCase(String.valueOf(pmenu.getpId()))
204
+                            &&"1".equalsIgnoreCase(String.valueOf(pmenu.getState()))){//如果父节点是一级菜单,本次新增为2级菜单
205
+                        tmenu.setState(2);
206
+                    }else if(!"1".equalsIgnoreCase(String.valueOf(pmenu.getpId()))
207
+                            &&"2".equalsIgnoreCase(String.valueOf(pmenu.getState()))){//如果父节点是二级菜单,本次新增为3级菜单
208
+                        tmenu.setState(3);
209
+                    }
210
+
211
+                    //指定pid的值,根据id倒序查询同级菜单集合
212
+                    Example example=new Example(Tmenu.class);
213
+                    example.or().andEqualTo("pId",String.valueOf(tmenu.getpId()));
214
+                    example.setOrderByClause("ID DESC");
215
+                    List<Tmenu> list=tmenuService.selectByExample(example);
216
+
217
+                    if(list!=null&&list.size()>0){//如果本次新增的菜单实体的同一级菜单集合不为空
218
+                        tmenu.setId(list.get(0).getId()+1);//获取已经存在的同级菜单的id的最大值+1
219
+                    }else{//如果本次新增的菜单实体还没有同一级的菜单的话,则根据父节点生成子节点id
220
+                        if("1".equalsIgnoreCase(String.valueOf(tmenu.getpId()))){
221
+                            tmenu.setId(tmenu.getpId()*10);//第一个一级菜单id为1*10
222
+                        }else{
223
+                            tmenu.setId(tmenu.getpId()*100);//二级三级菜单id生成策略为根据父菜单id*100
224
+                        }
225
+                    }
226
+
227
+                }
228
+
229
+                tmenuService.saveNotNull(tmenu);
230
+            } else {//编辑(对于节点的编辑只允许编辑icon、name、url)
231
+                //首先校验本次编辑操作提交的菜单对象中的name属性的值是否存在
232
+                Example tmenuExample = new Example(Tmenu.class);
233
+                tmenuExample.or().andEqualTo("name",tmenu.getName());
234
+                List<Tmenu> menulist = tmenuService.selectByExample(tmenuExample);
235
+                if (menulist.size() > 0
236
+                            && Integer.compare(menulist.get(0).getId(),tmenu.getId())!=0) {//如果本次提交的名字在本次修改的节点之外已经存在
237
+                        resultmap.put("state", "fail");
238
+                        resultmap.put("mesg", "当前菜单名已存在");
239
+                        return resultmap;
240
+                }else{
241
+                    Tmenu tmenuNew=new Tmenu();
242
+                    tmenuNew.setId(tmenu.getId());
243
+                    if(StringUtils.isNotEmpty(tmenu.getIcon())){
244
+                        tmenuNew.setIcon(tmenu.getIcon());
245
+                    }
246
+                    if(StringUtils.isNotEmpty(tmenu.getName())){
247
+                        tmenuNew.setName(tmenu.getName());
248
+                    }
249
+                    if(StringUtils.isNotEmpty(tmenu.getUrl())){
250
+                        tmenuNew.setUrl(tmenu.getUrl());
251
+                    }
252
+                    tmenuService.updateNotNull(tmenuNew);
253
+                }
254
+
255
+            }
256
+            resultmap.put("state", "success");
257
+            resultmap.put("mesg", "操作成功");
258
+            resultmap.put("id", String.valueOf(tmenu.getId()));
259
+
260
+
261
+            return resultmap;
262
+        } catch (Exception e) {
263
+            e.printStackTrace();
264
+            resultmap.put("state", "fail");
265
+            resultmap.put("mesg", "操作失败,系统异常");
266
+            return resultmap;
267
+        }
268
+    }
269
+
270
+
271
+
272
+
273
+
274
+    @ResponseBody
275
+    @RequestMapping(value = "/deletemenu")
276
+    @RequiresPermissions(value = {"菜单管理"})
277
+    public Map<String, Object> deletemenu(HttpSession session,Tmenu tmenu) {
278
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
279
+        try {
280
+            if(tmenu.getId()!=null&&!tmenu.getId().equals(0)){
281
+                Tmenu menu=tmenuService.selectByKey(tmenu.getId());
282
+                if(menu==null){
283
+                    resultmap.put("state", "fail");
284
+                    resultmap.put("mesg", "删除失败,无法找到该记录");
285
+                    return resultmap;
286
+                }else{
287
+                    //还需删除中间表
288
+                    if(true){
289
+                        Example trolemenuexample=new Example(Trolemenu.class);
290
+                        trolemenuexample.or().andEqualTo("menuId",tmenu.getId());
291
+                        trolemenuService.deleteByExample(trolemenuexample);
292
+                    }
293
+                    //删除该节点的所有子节点
294
+                    if(true){
295
+                        Example tmenuexample=new Example(Tmenu.class);
296
+                        tmenuexample.or().andEqualTo("pId",tmenu.getId());
297
+                        tmenuService.deleteByExample(tmenuexample);
298
+                    }
299
+                    //删除该节点
300
+                    tmenuService.delete(tmenu.getId());
301
+
302
+                }
303
+            }else{
304
+                resultmap.put("state", "fail");
305
+                resultmap.put("mesg", "删除失败");
306
+            }
307
+
308
+
309
+            resultmap.put("state", "success");
310
+            resultmap.put("mesg", "删除成功");
311
+            return resultmap;
312
+        } catch (Exception e) {
313
+            e.printStackTrace();
314
+            resultmap.put("state", "fail");
315
+            resultmap.put("mesg", "删除失败,系统异常");
316
+            return resultmap;
317
+        }
318
+    }
319
+
320
+
321
+
322
+
323
+
324
+}

+ 19 - 0
src/main/java/com/zjt/web/MyContraller.java

@@ -0,0 +1,19 @@
1
+package com.zjt.web;
2
+
3
+import com.zjt.entity.cgmaterial;
4
+import com.zjt.service.MaterialType;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.stereotype.Controller;
7
+import org.springframework.web.bind.annotation.RequestMapping;
8
+import com.zjt.service.MaterialType;
9
+
10
+import javax.annotation.Resource;
11
+
12
+@Controller
13
+@RequestMapping("/pos/user")
14
+public class MyContraller {
15
+    @Resource
16
+    private MaterialType MaterialType;
17
+
18
+
19
+}

+ 537 - 0
src/main/java/com/zjt/web/RoleAdminController.java

@@ -0,0 +1,537 @@
1
+package com.zjt.web;
2
+
3
+import com.github.pagehelper.PageHelper;
4
+import com.google.gson.JsonArray;
5
+import com.google.gson.JsonObject;
6
+import com.zjt.entity.Tmenu;
7
+import com.zjt.entity.Trole;
8
+import com.zjt.entity.Trolemenu;
9
+import com.zjt.entity.Tuserrole;
10
+import com.zjt.model.JqgridBean;
11
+import com.zjt.model.PageRusult;
12
+import com.zjt.service.*;
13
+import org.apache.commons.lang3.StringUtils;
14
+import org.apache.shiro.authz.annotation.RequiresPermissions;
15
+import org.springframework.stereotype.Controller;
16
+import org.springframework.web.bind.annotation.PostMapping;
17
+import org.springframework.web.bind.annotation.RequestMapping;
18
+import org.springframework.web.bind.annotation.ResponseBody;
19
+import tk.mybatis.mapper.entity.Example;
20
+
21
+import javax.annotation.Resource;
22
+import java.util.*;
23
+
24
+/**
25
+ * 后台管理用户Controller
26
+         *
27
+         * @author zjt
28
+        */
29
+@Controller
30
+@RequestMapping("/admin/role")
31
+public class RoleAdminController {
32
+
33
+    @Resource
34
+    private TuserService userService;
35
+
36
+    @Resource
37
+    private TroleService roleService;
38
+
39
+    @Resource
40
+    private TuserroleService userRoleService;
41
+
42
+    @Resource
43
+    private TmenuService tmenuService;
44
+
45
+    @Resource
46
+    private TrolemenuService trolemenuService;
47
+
48
+
49
+    @RequestMapping("/torolemanage")
50
+    @RequiresPermissions(value = {"角色管理"})
51
+    public String tousermanage() {
52
+        return "power/role";
53
+    }
54
+
55
+    /**
56
+     * 分页查询角色信息
57
+     */
58
+
59
+    @ResponseBody
60
+    @RequestMapping(value = "/list")
61
+    @RequiresPermissions(value = {"角色管理"})
62
+    public Map<String, Object> list(JqgridBean jqgridbean
63
+                    /*String userName,@RequestParam(value="page",required=false)Integer page*/
64
+    ) throws Exception {
65
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
66
+        LinkedHashMap<String, Object> datamap = new LinkedHashMap<String, Object>();
67
+
68
+        Example troleExample = new Example(Trole.class);
69
+        //tuserExample.or().andIdNotEqualTo(1L);
70
+        Example.Criteria criteria = troleExample.or();
71
+
72
+        if (StringUtils.isNotEmpty(jqgridbean.getSearchField())) {
73
+            if ("name".equalsIgnoreCase(jqgridbean.getSearchField())) {
74
+                if ("eq".contentEquals(jqgridbean.getSearchOper())) {
75
+                    criteria.andEqualTo("name",jqgridbean.getSearchString());
76
+                }
77
+            }
78
+        }
79
+
80
+        PageHelper.startPage(jqgridbean.getPage(), jqgridbean.getLength());
81
+        List<Trole> roleList = roleService.selectByExample(troleExample);
82
+        PageRusult<Trole> pageRusult =new PageRusult<Trole>(roleList);
83
+
84
+        /*Integer totalrecords = roleService.countByExample(troleExample);//总记录数
85
+        Page pagebean = new Page(jqgridbean.getLength() * ((jqgridbean.getPage() > 0 ? jqgridbean.getPage() : 1) - 1), jqgridbean.getLength(), totalrecords);
86
+        troleExample.setPage(pagebean);
87
+        troleExample.setOrderByClause(jqgridbean.getSidx() + " " + jqgridbean.getSord());
88
+        List<Trole> roleList = roleService.selectByExample(troleExample);*/
89
+
90
+        resultmap.put("currpage", String.valueOf(pageRusult.getPageNum()));
91
+        resultmap.put("totalpages", String.valueOf(pageRusult.getPages()));
92
+        resultmap.put("totalrecords", String.valueOf(pageRusult.getTotal()));
93
+        resultmap.put("datamap", roleList);
94
+
95
+        return resultmap;
96
+    }
97
+
98
+
99
+    @ResponseBody
100
+    @RequestMapping(value = "/addupdaterole")
101
+    @RequiresPermissions(value = {"角色管理"})
102
+    public Map<String, Object> addupdaterole(Trole trole) {
103
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
104
+        try {
105
+            if (trole.getId() == null) {//新建
106
+                //首先判断用户名是否可用
107
+                Example troleExample = new Example(Trole.class);
108
+                troleExample.or().andEqualTo("name",trole.getName());
109
+                List<Trole> rolelist = roleService.selectByExample(troleExample);
110
+                if (rolelist != null && rolelist.size() > 0) {
111
+                    resultmap.put("state", "fail");
112
+                    resultmap.put("mesg", "当前角色名已存在");
113
+                    return resultmap;
114
+                }
115
+                roleService.saveNotNull(trole);
116
+            } else {//编辑
117
+                Trole oldObject = roleService.selectByKey(trole.getId());
118
+                if (oldObject == null) {
119
+                    resultmap.put("state", "fail");
120
+                    resultmap.put("mesg", "当前角色名不存在");
121
+                    return resultmap;
122
+                } else {
123
+                    roleService.updateNotNull(trole);
124
+                }
125
+            }
126
+            resultmap.put("state", "success");
127
+            resultmap.put("mesg", "操作成功");
128
+            return resultmap;
129
+        } catch (Exception e) {
130
+            e.printStackTrace();
131
+            resultmap.put("state", "fail");
132
+            resultmap.put("mesg", "操作失败,系统异常");
133
+            return resultmap;
134
+        }
135
+    }
136
+
137
+
138
+    @ResponseBody
139
+    @RequestMapping(value = "/deleterole")
140
+    @RequiresPermissions(value = {"角色管理"})
141
+    public Map<String, Object> deleteuser(Trole trole) {
142
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
143
+        try {
144
+            if (trole.getId() != null && !trole.getId().equals(0)) {
145
+                Trole role = roleService.selectByKey(trole.getId());
146
+                if (role == null) {
147
+                    resultmap.put("state", "fail");
148
+                    resultmap.put("mesg", "删除失败,无法找到该记录");
149
+                    return resultmap;
150
+                } else {
151
+                    //还需删除用户角色中间表
152
+                    Example tuserroleexample = new Example(Tuserrole.class);
153
+                    tuserroleexample.or().andEqualTo("roleId",trole.getId());
154
+                    userRoleService.deleteByExample(tuserroleexample);
155
+                    Example trolemenuexample = new Example(Trolemenu.class);
156
+                    trolemenuexample.or().andEqualTo("roleId",trole.getId());
157
+                    trolemenuService.deleteByExample(trolemenuexample);
158
+
159
+                    roleService.delete(trole.getId());
160
+                }
161
+            } else {
162
+                resultmap.put("state", "fail");
163
+                resultmap.put("mesg", "删除失败");
164
+            }
165
+
166
+
167
+            resultmap.put("state", "success");
168
+            resultmap.put("mesg", "删除成功");
169
+            return resultmap;
170
+        } catch (Exception e) {
171
+            e.printStackTrace();
172
+            resultmap.put("state", "fail");
173
+            resultmap.put("mesg", "删除失败,系统异常");
174
+            return resultmap;
175
+        }
176
+    }
177
+
178
+
179
+    @ResponseBody
180
+    @RequestMapping(value = "/selectRoleById")
181
+    @RequiresPermissions(value = {"角色管理"})
182
+    public Map<String, Object> selectRoleById(Trole trole) {
183
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
184
+        try {
185
+            if (trole.getId() != null && !trole.getId().equals(0)) {
186
+                trole = roleService.selectByKey(trole.getId());
187
+                if (trole == null) {
188
+                    resultmap.put("state", "fail");
189
+                    resultmap.put("mesg", "无法找到该记录");
190
+                    return resultmap;
191
+                }
192
+            } else {
193
+                resultmap.put("state", "fail");
194
+                resultmap.put("mesg", "无法找到该记录的id");
195
+                return resultmap;
196
+            }
197
+
198
+            resultmap.put("trole", trole);
199
+            resultmap.put("state", "success");
200
+            resultmap.put("mesg", "获取成功");
201
+            return resultmap;
202
+        } catch (Exception e) {
203
+            e.printStackTrace();
204
+            resultmap.put("state", "fail");
205
+            resultmap.put("mesg", "获取失败,系统异常");
206
+            return resultmap;
207
+        }
208
+    }
209
+
210
+
211
+    /**
212
+     * 根据父节点获取所有复选框权限菜单树
213
+     *
214
+     * @param parentId
215
+     * @param roleId
216
+     * @return
217
+     * @throws Exception
218
+     */
219
+    @ResponseBody
220
+    @PostMapping("/loadCheckMenuInfo")
221
+    @RequiresPermissions(value = {"角色管理"})
222
+    public String loadCheckMenuInfo(Integer parentId, Integer roleId) throws Exception {
223
+        List<Tmenu> menuList = tmenuService.selectMenusByRoleId(roleId);// 根据角色查询所有权限菜单信息
224
+        //移除所有没有pid的menuid
225
+        Iterator<Tmenu> it = menuList.iterator();
226
+        while (it.hasNext()) {
227
+            Tmenu tmenu = it.next();
228
+            if (tmenu.getpId() == null) {
229
+                it.remove();
230
+            }
231
+        }
232
+        List<Integer> menuIdList = new LinkedList<Integer>();
233
+        for (Tmenu menu : menuList) {
234
+            menuIdList.add(menu.getId());
235
+        }
236
+        String json = getAllCheckedMenuByParentId(parentId, menuIdList).toString();
237
+        //System.out.println(json);
238
+        return json;
239
+    }
240
+
241
+    /**
242
+     * 根据父节点ID和权限菜单ID集合获取复选框菜单节点
243
+     *
244
+     * @param parentId
245
+     * @param menuIdList
246
+     * @return
247
+     */
248
+    private JsonArray getAllCheckedMenuByParentId(Integer parentId, List<Integer> menuIdList) {
249
+        JsonArray jsonArray = this.getCheckedMenuByParentId(parentId, menuIdList);
250
+        for (int i = 0; i < jsonArray.size(); i++) {
251
+            JsonObject jsonObject = (JsonObject) jsonArray.get(i);
252
+            //判断该节点下时候还有子节点
253
+            Example example=new Example(Tmenu.class);
254
+            example.or().andEqualTo("pId",jsonObject.get("id").getAsString());
255
+            //if ("open".equals(jsonObject.get("state").getAsString())) {
256
+            if (tmenuService.selectCountByExample(example)==0) {
257
+                continue;
258
+            } else {
259
+                jsonObject.add("children", getAllCheckedMenuByParentId(jsonObject.get("id").getAsInt(), menuIdList));
260
+            }
261
+        }
262
+        return jsonArray;
263
+    }
264
+
265
+    /**
266
+     * 根据父节点ID和权限菜单ID集合获取复选框菜单节点
267
+     *
268
+     * @param parentId
269
+     * @param menuIdList
270
+     * @return
271
+     */
272
+    private JsonArray getCheckedMenuByParentId(Integer parentId, List<Integer> menuIdList) {
273
+        Example tmenuExample = new Example(Tmenu.class);
274
+        tmenuExample.or().andEqualTo("pId",parentId);
275
+        List<Tmenu> menuList = tmenuService.selectByExample(tmenuExample);
276
+        JsonArray jsonArray = new JsonArray();
277
+        for (Tmenu menu : menuList) {
278
+            JsonObject jsonObject = new JsonObject();
279
+            Integer menuId = menu.getId();
280
+            jsonObject.addProperty("id", menuId); // 节点id
281
+            jsonObject.addProperty("name", menu.getName()); // 节点名称
282
+            //判断该节点下时候还有子节点
283
+            Example example=new Example(Tmenu.class);
284
+            example.or().andEqualTo("pId",jsonObject.get("id").getAsString());
285
+            //if (menu.getState() == 1) {
286
+            if (tmenuService.selectCountByExample(example)==0) {
287
+                jsonObject.addProperty("open", "true"); // 无子节点
288
+            } else {
289
+                jsonObject.addProperty("open", "false"); // 有子节点
290
+            }
291
+            if (menuIdList.contains(menuId)) {
292
+                jsonObject.addProperty("checked", true);
293
+            }
294
+            jsonArray.add(jsonObject);
295
+        }
296
+        return jsonArray;
297
+    }
298
+
299
+    /**
300
+     * 保存角色权限设置
301
+     *
302
+     * @param menuIds
303
+     * @param roleId
304
+     * @return
305
+     * @throws Exception
306
+     */
307
+    @ResponseBody
308
+    @RequestMapping("/saveMenuSet")
309
+    @RequiresPermissions(value = {"角色管理"})
310
+    public Map<String, Object> saveMenuSet(String menuIds, Integer roleId) throws Exception {
311
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
312
+
313
+        if (StringUtils.isNotEmpty(menuIds)) {
314
+            //先根据roleid查询出原有的对应的所有menuid集合
315
+            List<Tmenu> menuList = tmenuService.selectMenusByRoleId(roleId);
316
+            //移除所有没有pid的menuid
317
+            Iterator<Tmenu> it = menuList.iterator();
318
+            while (it.hasNext()) {
319
+                Tmenu tmenu = it.next();
320
+                if (tmenu.getpId() == null) {
321
+                    it.remove();
322
+                }
323
+            }
324
+            List<Integer> menuIdList = new LinkedList<Integer>();
325
+            for (Tmenu menu : menuList) {
326
+                menuIdList.add(menu.getId());
327
+            }
328
+
329
+            if(menuIdList!=null&&menuIdList.size()>0){
330
+                Example trolemenuExample = new Example(Trolemenu.class);
331
+                trolemenuExample.or().andEqualTo("roleId",roleId).andIn("menuId",menuIdList);
332
+                trolemenuService.deleteByExample(trolemenuExample);
333
+            }
334
+
335
+            String idsStr[] = menuIds.split(",");
336
+            for (int i = 0; i < idsStr.length; i++) { // 然后添加所有角色权限关联实体
337
+                Trolemenu trolemenu = new Trolemenu();
338
+                trolemenu.setRoleId(roleId);
339
+                trolemenu.setMenuId(Integer.parseInt(idsStr[i]));
340
+                trolemenuService.saveNotNull(trolemenu);
341
+            }
342
+        }else{
343
+            resultmap.put("state", "fail");
344
+            resultmap.put("mesg", "操作失败,未获取选中记录,请重新选择");
345
+            return resultmap;
346
+        }
347
+        resultmap.put("state", "success");
348
+        resultmap.put("mesg", "操作成功");
349
+        return resultmap;
350
+    }
351
+
352
+
353
+    /*//加载细粒度字段级别权限树
354
+    @ResponseBody
355
+    @PostMapping("/loadColumnsPermissionTree")
356
+    @RequiresPermissions(value = {"角色管理"})
357
+    public String loadColumnsPermissionTree(Integer roleId) throws Exception {
358
+        List<Tmenu> menuList = tmenuService.selectMenusByRoleId(roleId);// 根据角色查询所有权限菜单信息
359
+        //移除有pid的menuid
360
+        Iterator<Tmenu> it = menuList.iterator();
361
+        while (it.hasNext()) {
362
+            Tmenu tmenu = it.next();
363
+            if (tmenu.getPid() != null) {
364
+                it.remove();
365
+            }
366
+        }
367
+        List<String> menuNameList = new LinkedList<String>();
368
+        for (Tmenu menu : menuList) {
369
+            menuNameList.add(menu.getName());
370
+        }
371
+
372
+        JsonArray jsonArray = new JsonArray();
373
+
374
+        for (XyStates xystate : XyStates.values()) {
375
+            JsonObject jsonObject = new JsonObject();
376
+            jsonObject.addProperty("name", xystate.toString()); // 节点名称
377
+            jsonObject.addProperty("checked", "false");
378
+            jsonObject.addProperty("chkDisabled", "true");
379
+            jsonObject.addProperty("nocheck", "true");
380
+
381
+            JsonArray jsonArray2 = new JsonArray();
382
+            for (TableNames tablename : TableNames.values()) {
383
+                JsonObject jsonObject2 = new JsonObject();
384
+                jsonObject2.addProperty("name", tablename.toString()); // 节点名称
385
+                jsonObject2.addProperty("checked", "false");
386
+                jsonObject2.addProperty("chkDisabled", "true");
387
+                jsonObject2.addProperty("nocheck", "true");
388
+                JsonArray jsonArray3 = new JsonArray();
389
+
390
+                Object[] columnObject = null;
391
+                switch (tablename.toString()) {
392
+                    case "FCJY_CLF_ZJJGXY":
393
+                        columnObject = FcjyClfZjjgxyColumns.values();
394
+                        break;
395
+                    case "FCJY_CLF_ZJJGHT":
396
+                        columnObject = FcjyClfZjjghtColumns.values();
397
+                        break;
398
+                    case "FCJY_CLF_ZJJGHT_ZT":
399
+                        columnObject = FcjyClfZjjghtZtColumns.values();
400
+                        break;
401
+                    case "FCJY_CLF_ZJJGZH":
402
+                        columnObject = FcjyClfZjjgzhColumns.values();
403
+                        break;
404
+                    case "FCJY_CLF_ZJJGRZJL":
405
+                        columnObject = FcjyClfZjjgrzjlColumns.values();
406
+                        break;
407
+                    case "FCJY_CLF_ZJJGCZJL":
408
+                        columnObject = FcjyClfZjjgczjlColumns.values();
409
+                        break;
410
+                    default:
411
+                        break;
412
+                }
413
+
414
+                for (Object column : columnObject) {
415
+                    JsonObject jsonObject3 = new JsonObject();
416
+                    jsonObject3.addProperty("name", column.toString()); // 节点名称
417
+                    jsonObject3.addProperty("checked", "false");
418
+                    jsonObject3.addProperty("chkDisabled", "false");
419
+                    jsonObject3.addProperty("nocheck", "true");
420
+                    JsonArray jsonArray4 = new JsonArray();
421
+
422
+                    for (TableOptions option : TableOptions.values()) {
423
+                        JsonObject jsonObject4 = new JsonObject();
424
+                        jsonObject4.addProperty("name", option.toString()); // 节点名称
425
+                        String targetname = (xystate.toString() + ":" + tablename.toString() + ":" + column.toString() + ":" + option.toString()).trim();
426
+                        if (menuNameList.contains(targetname)) {
427
+                            jsonObject4.addProperty("checked", "true");
428
+                        } else {
429
+                            jsonObject4.addProperty("checked", "false");
430
+                        }
431
+                        jsonObject4.addProperty("id", targetname);
432
+                        jsonObject3.addProperty("chkDisabled", "false");
433
+                        jsonArray4.add(jsonObject4);
434
+                    }
435
+
436
+                    jsonObject3.add("children", jsonArray4);
437
+                    jsonArray3.add(jsonObject3);
438
+                }
439
+
440
+
441
+                jsonObject2.add("children", jsonArray3);
442
+                jsonArray2.add(jsonObject2);
443
+            }
444
+
445
+            jsonObject.add("children", jsonArray2);
446
+            jsonArray.add(jsonObject);
447
+        }
448
+
449
+        System.out.println(jsonArray.toString());
450
+
451
+        return jsonArray.toString();
452
+    }*/
453
+
454
+
455
+    /**
456
+     * 保存角色字段权限设置
457
+     *
458
+     * @param permisIds
459
+     * @param roleId
460
+     * @return
461
+     * @throws Exception
462
+     */
463
+    @ResponseBody
464
+    @RequestMapping("/saveColumnsSet")
465
+    @RequiresPermissions(value = {"角色管理"})
466
+    public Map<String, Object> saveColumnsSet(String permisIds, Integer roleId) throws Exception {
467
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
468
+
469
+        if (StringUtils.isNotEmpty(permisIds.trim())) {
470
+
471
+            //先根据roleid查询出原有的对应的所有menuid集合
472
+            List<Tmenu> menuList = tmenuService.selectMenusByRoleId(roleId);
473
+            //移除所有没有pid的menuid
474
+            Iterator<Tmenu> it = menuList.iterator();
475
+            while (it.hasNext()) {
476
+                Tmenu tmenu = it.next();
477
+                if (tmenu.getpId() != null) {
478
+                    it.remove();
479
+                }
480
+            }
481
+            List<Integer> menuIdList = new LinkedList<Integer>();
482
+            for (Tmenu menu : menuList) {
483
+                menuIdList.add(menu.getId());
484
+            }
485
+
486
+            if(menuIdList!=null&&menuIdList.size()>0){
487
+                Example trolemenuExample = new Example(Trolemenu.class);
488
+                trolemenuExample.or().andEqualTo("roleId",roleId).andIn("menuId",menuIdList);
489
+                trolemenuService.deleteByExample(trolemenuExample);
490
+            }
491
+
492
+
493
+
494
+
495
+            String namesStr[] = permisIds.split(",");
496
+            for (int i = 0; i < namesStr.length; i++) { // 然后添加所有角色权限关联实体
497
+                if (StringUtils.isEmpty(namesStr[i])) {
498
+                    continue;
499
+                }
500
+                Integer menuid = null;
501
+                //根据name先查询有没有这个menu
502
+                Example tmenuExample = new Example(Tmenu.class);
503
+                tmenuExample.or().andEqualTo("name",namesStr[i]).andIsNull("pId");
504
+                List<Tmenu> tmenuList = tmenuService.selectByExample(tmenuExample);
505
+                if (tmenuList == null || tmenuList.size() == 0) {
506
+                    //当前menu表还没有这个name的记录,则先新增menu表的记录,再新增中间表的几率
507
+                    Tmenu tmenu = new Tmenu();
508
+                    tmenu.setName(namesStr[i]);
509
+                    tmenuService.saveNotNull(tmenu);
510
+
511
+                    Example tmenuExample2 = new Example(Tmenu.class);
512
+                    tmenuExample2.or().andEqualTo("name",tmenu.getName()).andIsNull("pId");
513
+                    List<Tmenu> tmenuList2 = tmenuService.selectByExample(tmenuExample2);
514
+                    if (tmenuList2 != null && tmenuList2.size() > 0) {
515
+                        menuid = tmenuList2.get(0).getId();
516
+                    }
517
+                } else {
518
+                    menuid = tmenuList.get(0).getId();
519
+                }
520
+
521
+                Trolemenu trolemenu = new Trolemenu();
522
+                trolemenu.setRoleId(roleId);
523
+                trolemenu.setMenuId(menuid);
524
+                trolemenuService.saveNotNull(trolemenu);
525
+            }
526
+        } else {
527
+            resultmap.put("state", "fail");
528
+            resultmap.put("mesg", "未获取选中记录,请重新选择");
529
+            return resultmap;
530
+        }
531
+        resultmap.put("state", "success");
532
+        resultmap.put("mesg", "操作成功");
533
+        return resultmap;
534
+    }
535
+
536
+
537
+}

+ 391 - 0
src/main/java/com/zjt/web/UserAdminController.java

@@ -0,0 +1,391 @@
1
+package com.zjt.web;
2
+
3
+import com.github.pagehelper.PageHelper;
4
+import com.zjt.entity.Trole;
5
+import com.zjt.entity.Tuser;
6
+import com.zjt.entity.Tuserrole;
7
+import com.zjt.model.JqgridBean;
8
+import com.zjt.model.PageRusult;
9
+import com.zjt.service.TroleService;
10
+import com.zjt.service.TuserService;
11
+import com.zjt.service.TuserroleService;
12
+import org.apache.commons.lang3.StringUtils;
13
+import org.apache.shiro.SecurityUtils;
14
+import org.apache.shiro.authz.annotation.RequiresPermissions;
15
+import org.springframework.stereotype.Controller;
16
+import org.springframework.web.bind.annotation.GetMapping;
17
+import org.springframework.web.bind.annotation.PostMapping;
18
+import org.springframework.web.bind.annotation.RequestMapping;
19
+import org.springframework.web.bind.annotation.ResponseBody;
20
+import tk.mybatis.mapper.entity.Example;
21
+
22
+import javax.annotation.Resource;
23
+import java.util.Iterator;
24
+import java.util.LinkedHashMap;
25
+import java.util.List;
26
+import java.util.Map;
27
+
28
+/**
29
+ * 后台管理用户Controller
30
+ * @author zjt
31
+ */
32
+@Controller
33
+@RequestMapping("/admin/user")
34
+public class UserAdminController {
35
+
36
+    @Resource
37
+    private TuserService userService;
38
+
39
+    @Resource
40
+    private TroleService roleService;
41
+
42
+    @Resource
43
+    private TuserroleService userRoleService;
44
+
45
+
46
+    @RequestMapping("/tousermanage")
47
+    @RequiresPermissions(value = {"用户管理"})
48
+    public String tousermanage() {
49
+        return "power/user";
50
+    }
51
+
52
+    /**
53
+     * 分页查询用户信息
54
+     */
55
+    @ResponseBody
56
+    @RequestMapping(value = "/list")
57
+    @RequiresPermissions(value = {"用户管理"})
58
+    public Map<String, Object> list(JqgridBean jqgridbean
59
+                    /*String userName,@RequestParam(value="page",required=false)Integer page*/
60
+    ) throws Exception {
61
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
62
+        LinkedHashMap<String, Object> datamap = new LinkedHashMap<String, Object>();
63
+
64
+        Example tuserExample = new Example(Tuser.class);
65
+        //tuserExample.or().andIdNotEqualTo(1L);
66
+        Example.Criteria criteria = tuserExample.or();
67
+        criteria.andNotEqualTo("userName","admin");
68
+
69
+        if (StringUtils.isNotEmpty(jqgridbean.getSearchField())) {
70
+            if ("username".equalsIgnoreCase(jqgridbean.getSearchField())) {
71
+                if ("eq".contentEquals(jqgridbean.getSearchOper())) {
72
+                    criteria.andEqualTo("userName",jqgridbean.getSearchString());
73
+                }
74
+            }
75
+        }
76
+
77
+        if(StringUtils.isNotEmpty(jqgridbean.getSidx())&&StringUtils.isNotEmpty(jqgridbean.getSord())){
78
+            tuserExample.setOrderByClause(jqgridbean.getSidx() + " " + jqgridbean.getSord());
79
+        }
80
+
81
+        PageHelper.startPage(jqgridbean.getPage(), jqgridbean.getLength());
82
+        List<Tuser> userList = userService.selectByExample(tuserExample);
83
+        PageRusult<Tuser> pageRusult =new PageRusult<Tuser>(userList);
84
+
85
+
86
+       /* Integer totalrecords = userService.selectCountByExample(tuserExample);//总记录数
87
+        Page pagebean = new Page(jqgridbean.getLength() * ((jqgridbean.getPage() > 0 ? jqgridbean.getPage() : 1) - 1), jqgridbean.getLength(), totalrecords);
88
+        tuserExample.setPage(pagebean);
89
+        tuserExample.setOrderByClause(jqgridbean.getSidx() + " " + jqgridbean.getSord());
90
+        List<Tuser> userList = userService.selectByExample(tuserExample);*/
91
+
92
+
93
+        for (Tuser u : userList) {
94
+            List<Trole> roleList = roleService.selectRolesByUserId(u.getId());
95
+            StringBuffer sb = new StringBuffer();
96
+            for (Trole r : roleList) {
97
+                sb.append("," + r.getName());
98
+            }
99
+            u.setRoles(sb.toString().replaceFirst(",", ""));
100
+        }
101
+
102
+        resultmap.put("currpage", String.valueOf(pageRusult.getPageNum()));
103
+        resultmap.put("totalpages", String.valueOf(pageRusult.getPages()));
104
+        resultmap.put("totalrecords", String.valueOf(pageRusult.getTotal()));
105
+        resultmap.put("datamap", userList);
106
+
107
+        return resultmap;
108
+    }
109
+
110
+
111
+    @ResponseBody
112
+    @RequestMapping(value = "/addupdateuser")
113
+    @RequiresPermissions(value = {"用户管理"})
114
+    public Map<String, Object> addupdateuser(Tuser tuser) {
115
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
116
+        try {
117
+            if (tuser.getId() == null) {//新建
118
+                //首先判断用户名是否可用
119
+                Example tuserExample = new Example(Tuser.class);
120
+                tuserExample.or().andEqualTo("userName",tuser.getUserName());
121
+                List<Tuser> userlist = userService.selectByExample(tuserExample);
122
+                if (userlist != null && userlist.size() > 0) {
123
+                    resultmap.put("state", "fail");
124
+                    resultmap.put("mesg", "当前用户名已存在");
125
+                    return resultmap;
126
+                }
127
+                userService.saveNotNull(tuser);
128
+            } else {//编辑
129
+                Tuser oldObject=userService.selectByKey(tuser.getId());
130
+                if(oldObject==null){
131
+                    resultmap.put("state", "fail");
132
+                    resultmap.put("mesg", "当前用户名不存在");
133
+                    return resultmap;
134
+                }else{
135
+                    userService.updateNotNull(tuser);
136
+                }
137
+            }
138
+            resultmap.put("state", "success");
139
+            resultmap.put("mesg", "操作成功");
140
+            return resultmap;
141
+        } catch (Exception e) {
142
+            e.printStackTrace();
143
+            resultmap.put("state", "fail");
144
+            resultmap.put("mesg", "操作失败,系统异常");
145
+            return resultmap;
146
+        }
147
+    }
148
+
149
+
150
+
151
+    @ResponseBody
152
+    @RequestMapping(value = "/deleteuser")
153
+    @RequiresPermissions(value = {"用户管理"})
154
+    public Map<String, Object> deleteuser(Tuser tuser) {
155
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
156
+        try {
157
+            if(tuser.getId()!=null&&!tuser.getId().equals(0)){
158
+                Tuser user=userService.selectByKey(tuser.getId());
159
+                if(user==null){
160
+                    resultmap.put("state", "fail");
161
+                    resultmap.put("mesg", "删除失败,无法找到该记录");
162
+                    return resultmap;
163
+                }else{
164
+
165
+                    //还需删除用户角色中间表
166
+                    Example tuserroleexample=new Example(Tuserrole.class);
167
+                    tuserroleexample.or().andEqualTo("userId",tuser.getId());
168
+                    userRoleService.deleteByExample(tuserroleexample);
169
+
170
+                    userService.delete(tuser.getId());
171
+
172
+                }
173
+            }else{
174
+                resultmap.put("state", "fail");
175
+                resultmap.put("mesg", "删除失败");
176
+            }
177
+
178
+
179
+            resultmap.put("state", "success");
180
+            resultmap.put("mesg", "删除成功");
181
+            return resultmap;
182
+        } catch (Exception e) {
183
+            e.printStackTrace();
184
+            resultmap.put("state", "fail");
185
+            resultmap.put("mesg", "删除失败,系统异常");
186
+            return resultmap;
187
+        }
188
+    }
189
+
190
+
191
+
192
+
193
+    @ResponseBody
194
+    @RequestMapping(value = "/selectUserById")
195
+    @RequiresPermissions(value = {"用户管理"})
196
+    public Map<String, Object> selectUserById(Tuser tuser) {
197
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
198
+        try {
199
+            if(tuser.getId()!=null&&!tuser.getId().equals(0)){
200
+                tuser=userService.selectByKey(tuser.getId());
201
+                if(tuser==null){
202
+                    resultmap.put("state", "fail");
203
+                    resultmap.put("mesg", "无法找到该记录");
204
+                    return resultmap;
205
+                }
206
+            }else{
207
+                resultmap.put("state", "fail");
208
+                resultmap.put("mesg", "无法找到该记录的id");
209
+                return resultmap;
210
+            }
211
+
212
+            List<Trole> roleList = roleService.selectRolesByUserId(tuser.getId());
213
+            StringBuffer sb = new StringBuffer();
214
+            for (Trole r : roleList) {
215
+                sb.append("," + r.getName());
216
+            }
217
+            tuser.setRoles(sb.toString().replaceFirst(",", ""));
218
+
219
+
220
+
221
+            //所有角色
222
+            Example troleExample=new Example(Trole.class);
223
+            //troleExample.or().andNameNotEqualTo("管理员");
224
+            List<Trole> allrolelist=roleService.selectByExample(troleExample);
225
+
226
+            resultmap.put("roleList",roleList);//用户拥有的所有角色
227
+
228
+
229
+            Iterator<Trole> it = allrolelist.iterator();
230
+            while (it.hasNext()) {
231
+                Trole temp = it.next();
232
+                for(Trole e2:roleList){
233
+                    if(temp.getId().compareTo(e2.getId())==0){
234
+                        it.remove();
235
+                    }
236
+                }
237
+            }
238
+
239
+            List<Trole> notinrolelist=allrolelist;
240
+
241
+            resultmap.put("notinrolelist",notinrolelist);//用户不拥有的角色
242
+
243
+            resultmap.put("tuser",tuser);
244
+            resultmap.put("state", "success");
245
+            resultmap.put("mesg", "获取成功");
246
+            return resultmap;
247
+        } catch (Exception e) {
248
+            e.printStackTrace();
249
+            resultmap.put("state", "fail");
250
+            resultmap.put("mesg", "获取失败,系统异常");
251
+            return resultmap;
252
+        }
253
+    }
254
+
255
+
256
+
257
+    //设置用户角色
258
+    @ResponseBody
259
+    @RequestMapping(value = "/saveRoleSet")
260
+    @RequiresPermissions(value = {"用户管理"})
261
+    public Map<String, Object> saveRoleSet(Integer[] role,Integer id) {
262
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
263
+        try {
264
+            // 根据用户id删除所有用户角色关联实体
265
+            Example tuserroleexample=new Example(Tuserrole.class);
266
+            tuserroleexample.or().andEqualTo("userId",id);
267
+            userRoleService.deleteByExample(tuserroleexample);
268
+
269
+            if(role!=null && role.length>0){
270
+                for(Integer roleid:role){
271
+                    Tuserrole tuserrole=new Tuserrole();
272
+                    tuserrole.setRoleId(roleid);
273
+                    tuserrole.setUserId(id);
274
+                    userRoleService.saveNotNull(tuserrole);
275
+                }
276
+            }
277
+
278
+            resultmap.put("state", "success");
279
+            resultmap.put("mesg", "设置成功");
280
+            return resultmap;
281
+        } catch (Exception e) {
282
+            e.printStackTrace();
283
+            resultmap.put("state", "fail");
284
+            resultmap.put("mesg", "设置失败,系统异常");
285
+            return resultmap;
286
+        }
287
+    }
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+    /**
299
+     * 安全退出
300
+     *
301
+     * @return
302
+     * @throws Exception*/
303
+
304
+    @GetMapping("/logout")
305
+    @RequiresPermissions(value = {"安全退出"})
306
+    public String logout() throws Exception {
307
+//		logService.save(new Log(Log.LOGOUT_ACTION,"用户注销"));
308
+        SecurityUtils.getSubject().logout();
309
+        return "redirect:/tologin";
310
+    }
311
+
312
+
313
+
314
+    //跳转到修改密码页面
315
+    @RequestMapping("/toUpdatePassword")
316
+    @RequiresPermissions(value = {"修改密码"})
317
+    public String toUpdatePassword() {
318
+        return "power/updatePassword";
319
+    }
320
+
321
+
322
+
323
+
324
+    //修改密码
325
+    @ResponseBody
326
+    @PostMapping("/updatePassword")
327
+    @RequiresPermissions(value = {"修改密码"})
328
+    public Map<String, Object> updatePassword(Tuser tuser) throws Exception {
329
+        LinkedHashMap<String, Object> resultmap = new LinkedHashMap<String, Object>();
330
+        try {
331
+
332
+            if(tuser==null){
333
+                resultmap.put("state", "fail");
334
+                resultmap.put("mesg", "设置失败,缺乏字段信息");
335
+                return resultmap;
336
+            }else{
337
+                if(tuser.getId()!=null
338
+                    &&tuser.getId().intValue()!=0
339
+                        && StringUtils.isNotEmpty(tuser.getUserName())
340
+                            && StringUtils.isNotEmpty(tuser.getOldPassword())
341
+                                && StringUtils.isNotEmpty(tuser.getPassword())){
342
+                    Example userExample=new Example(Tuser.class);
343
+                    Example.Criteria criteria=userExample.or();
344
+                    criteria
345
+                            .andEqualTo("userName",tuser.getUserName())
346
+                            .andEqualTo("password",tuser.getOldPassword());
347
+                    List<Tuser> tuserList=userService.selectByExample(userExample);
348
+                    if(tuserList==null||tuserList.size()==0){
349
+                        resultmap.put("state", "fail");
350
+                        resultmap.put("mesg", "用户名或密码错误");
351
+                        return resultmap;
352
+                    }else{
353
+                        Tuser newEntity=tuserList.get(0);
354
+                        newEntity.setPassword(tuser.getPassword());
355
+                        userService.updateNotNull(newEntity);
356
+                    }
357
+                }else{
358
+                    resultmap.put("state", "fail");
359
+                    resultmap.put("mesg", "设置失败,缺乏字段信息");
360
+                    return resultmap;
361
+                }
362
+            }
363
+
364
+            resultmap.put("state", "success");
365
+            resultmap.put("mesg", "密码修改成功");
366
+            return resultmap;
367
+        } catch (Exception e) {
368
+            e.printStackTrace();
369
+            resultmap.put("state", "fail");
370
+            resultmap.put("mesg", "密码修改失败,系统异常");
371
+            return resultmap;
372
+        }
373
+    }
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+}

+ 421 - 0
src/main/java/com/zjt/web/UserController.java

@@ -0,0 +1,421 @@
1
+package com.zjt.web;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONArray;
5
+import com.alibaba.fastjson.JSONObject;
6
+import com.google.gson.JsonArray;
7
+import com.google.gson.JsonObject;
8
+import com.zjt.entity.*;
9
+import com.zjt.service.MaterialType;
10
+import com.zjt.service.TmenuService;
11
+import com.zjt.service.TroleService;
12
+import com.zjt.service.TuserService;
13
+import org.apache.commons.lang3.StringUtils;
14
+import org.apache.shiro.SecurityUtils;
15
+import org.apache.shiro.authc.UsernamePasswordToken;
16
+import org.apache.shiro.subject.Subject;
17
+import org.springframework.stereotype.Controller;
18
+import org.springframework.ui.Model;
19
+import org.springframework.validation.BindingResult;
20
+import org.springframework.web.bind.annotation.*;
21
+import tk.mybatis.mapper.entity.Example;
22
+
23
+import javax.annotation.Resource;
24
+import javax.servlet.http.HttpSession;
25
+import javax.validation.Valid;
26
+import javax.validation.constraints.Size;
27
+import java.net.URLEncoder;
28
+import java.text.SimpleDateFormat;
29
+import java.util.Date;
30
+import java.util.HashMap;
31
+import java.util.List;
32
+import java.util.Map;
33
+import java.util.function.Consumer;
34
+import java.util.function.Predicate;
35
+import java.util.stream.Collectors;
36
+
37
+import static org.apache.commons.lang3.StringUtils.length;
38
+
39
+/**
40
+* @Description: 当前登录用户控制器
41
+* @Date: Created in 2018/2/8 19:28
42
+* @param 
43
+*/
44
+@Controller
45
+@RequestMapping("/user")
46
+public class UserController {
47
+
48
+	@Resource
49
+	private com.zjt.service.MaterialType MaterialType;
50
+
51
+	@Resource
52
+	private TroleService troleService;
53
+	
54
+	@Resource
55
+	private TuserService tuserService;
56
+	
57
+	@Resource
58
+	private TmenuService tmenuService;
59
+
60
+	/*@Resource
61
+	private LogService logService;*/
62
+	@RequestMapping("list")
63
+	public String select(String id,String storeCode, String createtime,String receive, HttpSession session, Model model){
64
+		Tuser users= (Tuser) session.getAttribute("currentUser");
65
+		List<cgmaterial> collect1;
66
+		String id1="";
67
+		if(!"".equals(id)){
68
+			id1=id.substring(1);
69
+		}
70
+		if(!"".equals(createtime)){
71
+			String[] split1 = createtime.split(" - ");
72
+			String strDateFormat1 = "yyyy-MM-dd HH:mm:ss";
73
+			SimpleDateFormat sdf1 = new SimpleDateFormat(strDateFormat1);
74
+			if(!"".equals(storeCode)){
75
+				if("admin".equals(users.getTrueName())){
76
+					collect1=MaterialType.selectDataBy(id1,storeCode,split1[0],split1[1],receive);
77
+				}else{
78
+					collect1=MaterialType.selectDataBy(id1,users.getUserName(),split1[0],split1[1],receive);
79
+				}
80
+			}else{
81
+				if("admin".equals(users.getTrueName())){
82
+					collect1=MaterialType.selectDataBy(id1,"",split1[0],split1[1],receive);
83
+				}else{
84
+					collect1=MaterialType.selectDataBy(id1,users.getUserName(),split1[0],split1[1],receive);
85
+				}
86
+			}
87
+		}else{
88
+			if(!"".equals(storeCode)){
89
+				if("admin".equals(users.getTrueName())){
90
+					collect1=MaterialType.selectDataBy(id1,storeCode,"","",receive);
91
+				}else{
92
+					collect1=MaterialType.selectDataBy(id1,users.getUserName(),"","",receive);
93
+				}
94
+			}else{
95
+				if("admin".equals(users.getTrueName())){
96
+					collect1=MaterialType.selectDataBy(id1,"","","",receive);
97
+				}else {
98
+					collect1 = MaterialType.selectDataBy(id1, users.getUserName(), "", "", receive);
99
+				}
100
+			}
101
+		}
102
+		model.addAttribute("listcg",collect1);
103
+
104
+		//List<cgmaterial> collect1 = MaterialType.selectDataBy(id,storeCode,split1[0],split1[1],receive);
105
+
106
+		Predicate<cgmaterial> predicate = a->{
107
+			if(!"admin".equals(users.getTrueName())){
108
+				if(a.getUsername().equals(users.getTrueName())){
109
+					return true;
110
+				}else{
111
+					return false;
112
+				}
113
+			}else {
114
+			return true;
115
+			}
116
+		};
117
+		Predicate<cgmaterial> predicate2=a->{
118
+			if(createtime.length()>0){
119
+				String[] split = createtime.split(" - ");
120
+				String strDateFormat = "yyyy-MM-dd HH:mm:ss";
121
+				SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
122
+				if(sdf.format(a.getCreatetime()).compareTo(split[0])>0&&sdf.format(a.getCreatetime()).compareTo(split[1])<0){
123
+					return true;
124
+				}else{
125
+					return false;
126
+				}
127
+			}else{
128
+				return true;
129
+			}
130
+		};
131
+/*		Predicate<cgmaterial> predicate3=a->{
132
+		if(receive.length()>0){
133
+			if(a.getLy().equals(receive)){
134
+				return true;
135
+			}else{
136
+				return false;
137
+			}
138
+		}else {
139
+				return true;
140
+			}
141
+
142
+		};*/
143
+		Predicate<cgmaterial> predicate4=a->{
144
+			if(storeCode.length()>0){
145
+				if(a.getStore().equals(storeCode)){
146
+					return true;
147
+				}else{
148
+					return false;
149
+				}
150
+			}else {
151
+				return true;
152
+			}
153
+		};
154
+		Predicate<cgmaterial> predicate5=a->{
155
+			if(id.length()>0){
156
+				String replace = id.replace(",", "");
157
+				if(("S"+a.getId()).equals(replace)){
158
+					return true;
159
+				}else{
160
+					return false;
161
+				}
162
+			}else {
163
+				return true;
164
+			}
165
+		};
166
+
167
+/*		List<cgmaterial> collect = MaterialType.selectData().stream()
168
+				.filter(predicate)
169
+				.filter(predicate2)
170
+				.filter(predicate3)
171
+				.filter(predicate4)
172
+				.filter(predicate5)
173
+				.collect(Collectors.toList());*/
174
+
175
+		return "mypackage/selectcg";
176
+	}
177
+
178
+	@RequestMapping("input")
179
+	public String input(){
180
+		return "mypackage/input";
181
+	}
182
+
183
+	@RequestMapping("test")
184
+	public String test(){
185
+		return "mypackage/test";
186
+	}
187
+		@RequestMapping("insert")
188
+		public String insert(@RequestParam("list")String userList,HttpSession session){
189
+			//List<requestDate> requestDates = JSON.parseArray(userList, requestDate.class);
190
+			List<cgmaterial> cgmaterial = JSON.parseArray(userList, cgmaterial.class);
191
+			Tuser user= (Tuser) session.getAttribute("currentUser");
192
+			SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");//设置日期格式
193
+			String s=user.getId()+""+df.format(new Date());
194
+			Consumer<cgmaterial> consumer= a->MaterialType.insertCg(a);
195
+			Predicate<cgmaterial> predicate=a->{
196
+				if(a.getMaterialcode()!= null&&a.getWz()!=null&&a.getLy()!=null){
197
+				return true;
198
+			}else{
199
+				return false;
200
+				}
201
+			};
202
+
203
+			cgmaterial.stream().filter(a->a.getMaterialcode()!= null&&a.getWz()!=null&&a.getLy()!=null).map(
204
+					a->{
205
+						a.setId(Long.parseLong(s));
206
+						a.setUsername(user.getTrueName());
207
+						a.setCreatetime(new Date());
208
+						a.setStore(user.getUserName());
209
+					return a;
210
+					}
211
+			).collect(Collectors.toList()).forEach(consumer);
212
+			return "mypackage/test";
213
+		}
214
+
215
+	
216
+	/**
217
+     * 用户登录请求
218
+     * @param user
219
+     * @return
220
+     */
221
+    @ResponseBody
222
+    @PostMapping("/login")
223
+    public Map<String,Object> login(String imageCode, @Valid Tuser user, BindingResult bindingResult, HttpSession session){
224
+    	Map<String,Object> map=new HashMap<String,Object>();
225
+    	if(StringUtils.isEmpty(imageCode)){
226
+    		map.put("success", false);
227
+    		map.put("errorInfo", "请输入验证码!");
228
+    		return map;
229
+    	}
230
+    	if(!session.getAttribute("checkcode").equals(imageCode)){
231
+    		map.put("success", false);
232
+    		map.put("errorInfo", "验证码输入错误!");
233
+    		return map;
234
+    	}
235
+    	if(bindingResult.hasErrors()){
236
+    		map.put("success", false);
237
+    		map.put("errorInfo", bindingResult.getFieldError().getDefaultMessage());
238
+    		return map;
239
+    	}
240
+		Subject subject=SecurityUtils.getSubject();
241
+		UsernamePasswordToken token=new UsernamePasswordToken(user.getUserName(), user.getPassword());
242
+		try{
243
+			subject.login(token); // 登录认证
244
+			String userName=(String) SecurityUtils.getSubject().getPrincipal();
245
+			//Tuser currentUser=tuserService.findByUserName(userName);
246
+			Example tuserExample=new Example(Tuser.class);
247
+			tuserExample.or().andEqualTo("userName",userName);
248
+			Tuser currentUser=tuserService.selectByExample(tuserExample).get(0);
249
+			session.setAttribute("currentUser", currentUser);
250
+			//List<Trole> roleList=troleService.findByUserId(currentUser.getId());
251
+			List<Trole> roleList=troleService.selectRolesByUserId(currentUser.getId());
252
+			map.put("roleList", roleList);
253
+			map.put("roleSize", roleList.size());
254
+			map.put("success", true);
255
+			//logService.save(new Log(Log.LOGIN_ACTION,"用户登录")); // 写入日志
256
+			return map;
257
+		}catch(Exception e){
258
+			e.printStackTrace();
259
+			map.put("success", false);
260
+			map.put("errorInfo", "用户名或者密码错误!");
261
+			return map;
262
+		}
263
+    }
264
+
265
+
266
+
267
+	/**
268
+	 * 保存角色信息
269
+	 * @param roleId
270
+	 * @param session
271
+	 * @return
272
+	 * @throws Exception
273
+	 */
274
+	@ResponseBody
275
+	@PostMapping("/saveRole")
276
+	public Map<String,Object> saveRole(Integer roleId,HttpSession session)throws Exception{
277
+		Map<String,Object> map=new HashMap<String,Object>();
278
+		Trole currentRole=troleService.selectByKey(roleId);
279
+		session.setAttribute("currentRole", currentRole); // 保存当前角色信息
280
+
281
+		putTmenuOneClassListIntoSession(session);
282
+
283
+		map.put("success", true);
284
+		return map;
285
+	}
286
+
287
+
288
+	/**
289
+	 * 安全退出
290
+	 *
291
+	 * @return
292
+	 * @throws Exception
293
+	 */
294
+	@GetMapping("/logout")
295
+	public String logout() throws Exception {
296
+//		logService.save(new Log(Log.LOGOUT_ACTION,"用户注销"));
297
+		SecurityUtils.getSubject().logout();
298
+		return "redirect:/tologin";
299
+	}
300
+
301
+
302
+	/**
303
+	 * 加载权限菜单
304
+	 * @param session
305
+	 * @return
306
+	 * @throws Exception
307
+	 * 这里传入的parentId是1
308
+	 */
309
+	@ResponseBody
310
+	@GetMapping("/loadMenuInfo")
311
+	public String loadMenuInfo(HttpSession session, Integer parentId)throws Exception{
312
+
313
+		putTmenuOneClassListIntoSession(session);
314
+
315
+		Trole currentRole=(Trole) session.getAttribute("currentRole");
316
+		//根据当前用户的角色id和父节点id查询所有菜单及子集json
317
+		String json=getAllMenuByParentId(parentId,currentRole.getId()).toString();
318
+		//System.out.println(json);
319
+		return json;
320
+	}
321
+
322
+	/**
323
+	 * 获取根频道所有菜单信息
324
+	 * @param parentId
325
+	 * @param roleId
326
+	 * @return
327
+	 */
328
+	private JsonObject getAllMenuByParentId(Integer parentId,Integer roleId){
329
+		JsonObject resultObject=new JsonObject();
330
+		JsonArray jsonArray=this.getMenuByParentId(parentId, roleId);//得到所有一级菜单
331
+		for(int i=0;i<jsonArray.size();i++){
332
+			JsonObject jsonObject=(JsonObject) jsonArray.get(i);
333
+			//判断该节点下时候还有子节点
334
+			Example example=new Example(Tmenu.class);
335
+			example.or().andEqualTo("pId",jsonObject.get("id").getAsString());
336
+			//if("true".equals(jsonObject.get("spread").getAsString())){
337
+			if (tmenuService.selectCountByExample(example)==0) {
338
+				continue;
339
+			}else{
340
+				//由于后台模板的规定,一级菜单以title最为json的key
341
+				resultObject.add(jsonObject.get("title").getAsString(), getAllMenuJsonArrayByParentId(jsonObject.get("id").getAsInt(),roleId));
342
+			}
343
+		}
344
+		return resultObject;
345
+	}
346
+
347
+
348
+
349
+	//获取根频道下子频道菜单列表集合
350
+	private JsonArray getAllMenuJsonArrayByParentId(Integer parentId,Integer roleId){
351
+		JsonArray jsonArray=this.getMenuByParentId(parentId, roleId);
352
+		for(int i=0;i<jsonArray.size();i++){
353
+			JsonObject jsonObject=(JsonObject) jsonArray.get(i);
354
+			//判断该节点下是否还有子节点
355
+			Example example=new Example(Tmenu.class);
356
+			example.or().andEqualTo("pId",jsonObject.get("id").getAsString());
357
+			//if("true".equals(jsonObject.get("spread").getAsString())){
358
+			if (tmenuService.selectCountByExample(example)==0) {
359
+				continue;
360
+			}else{
361
+				//二级或三级菜单
362
+				jsonObject.add("children", getAllMenuJsonArrayByParentId(jsonObject.get("id").getAsInt(),roleId));
363
+			}
364
+		}
365
+		return jsonArray;
366
+	}
367
+
368
+
369
+
370
+
371
+	/**
372
+	 * 根据父节点和用户角色id查询菜单
373
+	 * @param parentId
374
+	 * @param roleId
375
+	 * @return
376
+	 */
377
+	private JsonArray getMenuByParentId(Integer parentId,Integer roleId){
378
+		//List<Menu> menuList=menuService.findByParentIdAndRoleId(parentId, roleId);
379
+		HashMap<String,Object> paraMap=new HashMap<String,Object>();
380
+		paraMap.put("pid",parentId);
381
+		paraMap.put("roleid",roleId);
382
+		List<Tmenu> menuList=tmenuService.selectByParentIdAndRoleId(paraMap);
383
+		JsonArray jsonArray=new JsonArray();
384
+		for(Tmenu menu:menuList){
385
+			JsonObject jsonObject=new JsonObject();
386
+			jsonObject.addProperty("id", menu.getId()); // 节点id
387
+			jsonObject.addProperty("title", menu.getName()); // 节点名称
388
+			jsonObject.addProperty("spread", false); // 不展开
389
+			jsonObject.addProperty("icon", menu.getIcon());
390
+			if(StringUtils.isNotEmpty(menu.getUrl())){
391
+				jsonObject.addProperty("href", menu.getUrl()); // 菜单请求地址
392
+			}
393
+			jsonArray.add(jsonObject);
394
+
395
+		}
396
+		return jsonArray;
397
+	}
398
+
399
+
400
+
401
+
402
+public void putTmenuOneClassListIntoSession(HttpSession session){
403
+	//用来在welcome.ftl中获取主菜单列表
404
+	Example example=new Example(Tmenu.class);
405
+	example.or().andEqualTo("pId",1);
406
+	List<Tmenu> tmenuOneClassList=tmenuService.selectByExample(example);
407
+	session.setAttribute("tmenuOneClassList", tmenuOneClassList);
408
+}
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+    
421
+}

+ 2 - 0
src/main/resources/META-INF/spring-devtools.properties

@@ -0,0 +1,2 @@
1
+restart.include.mapper=/mapper-[\\w-\\.]+jar
2
+restart.include.pagehelper=/pagehelper-[\\w-\\.]+jar

+ 77 - 0
src/main/resources/application-dev.properties

@@ -0,0 +1,77 @@
1
+
2
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
3
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
4
+spring.datasource.url=jdbc:mysql://8.140.207.9:2206/jt-pos-test?useUnicode=true&characterEncoding=utf-8
5
+spring.datasource.username=root
6
+spring.datasource.password=best-pos!@#qwe123
7
+
8
+spring.datasource.initialSize=5
9
+spring.datasource.minIdle=5
10
+spring.datasource.maxActive=20
11
+
12
+spring.datasource.maxWait=60000
13
+
14
+spring.datasource.timeBetweenEvictionRunsMillis=60000
15
+
16
+spring.datasource.minEvictableIdleTimeMillis=300000
17
+spring.datasource.validationQuery=SELECT 1 FROM DUAL
18
+spring.datasource.testWhileIdle=true
19
+spring.datasource.testOnBorrow=false
20
+spring.datasource.testOnReturn=false
21
+
22
+spring.datasource.poolPreparedStatements=true
23
+spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
24
+
25
+druid.removeAbandoned=true
26
+druid.removeAbandonedTimeout=300
27
+druid.logAbandoned=true
28
+
29
+spring.datasource.filters=stat,wall,log4j
30
+#spring.datasource.useGlobalDataSourceStat=true
31
+
32
+#mybatis
33
+mybatis.type-aliases-package=com.zjt.entity
34
+mybatis.mapper-locations=classpath:mapper/*.xml
35
+#mapper.mappers=tk.mybatis.mapper.common.Mapper
36
+mapper.mappers=com.zjt.util.MyMapper
37
+mapper.not-empty=false
38
+mapper.identity=MYSQL
39
+
40
+#pagehelper
41
+pagehelper.helperDialect=mysql
42
+pagehelper.reasonable=true
43
+pagehelper.supportMethodsArguments=true
44
+pagehelper.params=count=countSql
45
+
46
+
47
+
48
+
49
+########################################################
50
+###FREEMARKER (FreeMarkerAutoConfiguration)
51
+########################################################
52
+spring.freemarker.allow-request-override=false
53
+spring.freemarker.cache=false
54
+spring.freemarker.settings.template_update_delay=0
55
+spring.freemarker.check-template-location=true
56
+spring.freemarker.charset=UTF-8
57
+spring.freemarker.content-type=text/html
58
+spring.freemarker.expose-request-attributes=false
59
+spring.freemarker.expose-session-attributes=false
60
+spring.freemarker.expose-spring-macro-helpers=false
61
+spring.freemarker.prefix=
62
+spring.freemarker.request-context-attribute=request
63
+#spring.freemarker.settings.*=
64
+spring.freemarker.suffix=.ftl
65
+spring.freemarker.template-loader-path=classpath:/templates/ 
66
+#spring.freemarker.view-names= #whitelistofviewnamesthatcanberesolved
67
+
68
+#spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.upload-path}
69
+spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
70
+
71
+spring.freemarker.settings.auto_import=common/common.ftl as com
72
+spring.freemarker.settings.datetime_format=yyyy-MM-dd
73
+spring.freemarker.settings.classic_compatible=true
74
+spring.mvc.static-path-pattern=/static/**
75
+server.port=7001
76
+server.context-path=/blogmanager
77
+server.session.timeout=10000

+ 0 - 0
src/main/resources/application-prod.properties


+ 1 - 0
src/main/resources/application.properties

@@ -0,0 +1 @@
1
+spring.profiles.active=dev

+ 35 - 0
src/main/resources/logback-spring.xml

@@ -0,0 +1,35 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<configuration  scan="true" scanPeriod="60 seconds" debug="false">
3
+    <contextName>logback</contextName>
4
+    <property name="log.path" value="/Users/Documents/log" /><!--日志路径-->
5
+    <!--输出到控制台-->
6
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
7
+       <!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
8
+            <level>ERROR</level>
9
+        </filter>-->
10
+        <encoder>
11
+            <pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
12
+        </encoder>
13
+    </appender>
14
+
15
+    <!--输出到文件-->
16
+    <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
17
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
18
+            <fileNamePattern>${log.path}/logback.%d{yyyy-MM-dd}.log</fileNamePattern>
19
+            <maxHistory>30</maxHistory>
20
+            <totalSizeCap>1GB</totalSizeCap>
21
+        </rollingPolicy>
22
+        <encoder>
23
+            <pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
24
+        </encoder>
25
+    </appender>
26
+
27
+    <root level="DEBUG">
28
+        <appender-ref ref="console" />
29
+        <appender-ref ref="file" />
30
+    </root>
31
+
32
+    <logger name="com.zjt.mapper" level="DEBUG" additivity="false">
33
+        <appender-ref ref="console" />
34
+    </logger>
35
+</configuration>

+ 44 - 0
src/main/resources/mapper/TmenuMapper.xml

@@ -0,0 +1,44 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.zjt.mapper.TmenuMapper">
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.Tmenu">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="INTEGER" property="id" />
9
+    <result column="icon" jdbcType="VARCHAR" property="icon" />
10
+    <result column="name" jdbcType="VARCHAR" property="name" />
11
+    <result column="state" jdbcType="INTEGER" property="state" />
12
+    <result column="url" jdbcType="VARCHAR" property="url" />
13
+    <result column="p_id" jdbcType="INTEGER" property="pId" />
14
+  </resultMap>
15
+
16
+
17
+
18
+  <!--根据角色id查询所有资源-->
19
+  <select id="selectMenusByRoleId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
20
+    <![CDATA[
21
+    SELECT tm.*
22
+    from T_MENU tm
23
+    inner join
24
+    T_ROLE_MENU trm
25
+    on tm.id=trm.menu_id
26
+    where
27
+    trm.role_id=]]>#{roleid}
28
+  </select>
29
+
30
+
31
+  <select id="selectByParentIdAndRoleId" resultMap="BaseResultMap" parameterType="java.util.HashMap">
32
+    <![CDATA[
33
+    select tm.*
34
+    from t_menu tm
35
+      inner join t_role_menu trm
36
+        on trm.menu_id=tm.id
37
+    where trm.role_id=]]>#{roleid}
38
+    <![CDATA[and tm.p_id=]]>#{pid}
39
+    order by tm.id ASC
40
+  </select>
41
+
42
+
43
+
44
+</mapper>

+ 32 - 0
src/main/resources/mapper/TroleMapper.xml

@@ -0,0 +1,32 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.zjt.mapper.TroleMapper">
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.Trole">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="INTEGER" property="id" />
9
+    <result column="bz" jdbcType="VARCHAR" property="bz" />
10
+    <result column="name" jdbcType="VARCHAR" property="name" />
11
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
12
+  </resultMap>
13
+
14
+
15
+
16
+  <!--根据用户id查询所有角色-->
17
+  <select id="selectRolesByUserId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
18
+    <![CDATA[
19
+  SELECT
20
+    tr.ID, tr.BZ, tr.NAME, tr.REMARKS
21
+  from T_ROLE tr
22
+  inner join
23
+  T_USER_ROLE tur
24
+  on tr.id=tur.role_id
25
+  where
26
+  tur.user_id= ]]>#{userid}
27
+  </select>
28
+
29
+
30
+
31
+
32
+</mapper>

+ 12 - 0
src/main/resources/mapper/TrolemenuMapper.xml

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.zjt.mapper.TrolemenuMapper">
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.Trolemenu">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="INTEGER" property="id" />
9
+    <result column="menu_id" jdbcType="INTEGER" property="menuId" />
10
+    <result column="role_id" jdbcType="INTEGER" property="roleId" />
11
+  </resultMap>
12
+</mapper>

+ 12 - 0
src/main/resources/mapper/TrserroleMapper.xml

@@ -0,0 +1,12 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.zjt.mapper.TuserroleMapper">
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.Tuserrole">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="INTEGER" property="id" />
9
+    <result column="role_id" jdbcType="INTEGER" property="roleId" />
10
+    <result column="user_id" jdbcType="INTEGER" property="userId" />
11
+  </resultMap>
12
+</mapper>

+ 15 - 0
src/main/resources/mapper/TuserMapper.xml

@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.zjt.mapper.TuserMapper">
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.Tuser">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="INTEGER" property="id" />
9
+    <result column="bz" jdbcType="VARCHAR" property="bz" />
10
+    <result column="password" jdbcType="VARCHAR" property="password" />
11
+    <result column="true_name" jdbcType="VARCHAR" property="trueName" />
12
+    <result column="user_name" jdbcType="VARCHAR" property="userName" />
13
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
14
+  </resultMap>
15
+</mapper>

+ 27 - 0
src/main/resources/mapper/brandMapper.xml

@@ -0,0 +1,27 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.zjt.mapper.brandMapper" >
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.brand" >
5
+    <id column="id" property="id" jdbcType="BIGINT" />
6
+    <result column="brand_code" property="brandCode" jdbcType="VARCHAR" />
7
+    <result column="brand_name" property="brandName" jdbcType="VARCHAR" />
8
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
9
+    <result column="creater" property="creater" jdbcType="BIGINT" />
10
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
11
+    <result column="updater" property="updater" jdbcType="BIGINT" />
12
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
13
+    <result column="status" property="status" jdbcType="BIT" />
14
+    <result column="delete_flag" property="deleteFlag" jdbcType="BIT" />
15
+    <result column="material_type_code" property="materialTypeCode" jdbcType="VARCHAR" />
16
+  </resultMap>
17
+  <sql id="Base_Column_List" >
18
+    id, brand_code, brand_name, create_time, creater, update_time, updater, remark, status, 
19
+    delete_flag, material_type_code
20
+  </sql>
21
+  <select id="selectBrand" resultMap="BaseResultMap" parameterType="java.lang.String">
22
+    SELECT <include refid="Base_Column_List" />
23
+    FROM `b_base_brand` t
24
+    WHERE t.`material_type_code` = #{brand};
25
+  </select>
26
+
27
+</mapper>

+ 499 - 0
src/main/resources/mapper/cgmaterialMapper.xml

@@ -0,0 +1,499 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.zjt.mapper.cgmaterialMapper" >
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.cgmaterial" >
5
+    <id column="id" property="id" jdbcType="BIGINT" />
6
+    <result column="username" property="username" jdbcType="VARCHAR" />
7
+    <result column="materialCode" property="materialcode" jdbcType="VARCHAR" />
8
+    <result column="materialDetile" property="materialdetile" jdbcType="VARCHAR" />
9
+    <result column="price" property="price" jdbcType="VARCHAR" />
10
+    <result column="SPH" property="sph" jdbcType="VARCHAR" />
11
+    <result column="CYL" property="cyl" jdbcType="VARCHAR" />
12
+    <result column="AXIS" property="axis" jdbcType="VARCHAR" />
13
+    <result column="PDFOD" property="pdfod" jdbcType="VARCHAR" />
14
+    <result column="PH" property="ph" jdbcType="VARCHAR" />
15
+    <result column="XADD" property="xadd" jdbcType="VARCHAR" />
16
+    <result column="PRISM" property="prism" jdbcType="VARCHAR" />
17
+    <result column="CVA" property="cva" jdbcType="VARCHAR" />
18
+    <result column="OPTICBC" property="opticbc" jdbcType="VARCHAR" />
19
+    <result column="RS" property="rs" jdbcType="VARCHAR" />
20
+    <result column="SD" property="sd" jdbcType="VARCHAR" />
21
+    <result column="LRS" property="lrs" jdbcType="VARCHAR" />
22
+    <result column="CRS" property="crs" jdbcType="VARCHAR" />
23
+    <result column="BRS" property="brs" jdbcType="VARCHAR" />
24
+    <result column="MPRO" property="mpro" jdbcType="VARCHAR" />
25
+    <result column="LBPO" property="lbpo" jdbcType="VARCHAR" />
26
+    <result column="FRAMESHAPE" property="frameshape" jdbcType="VARCHAR" />
27
+    <result column="FRAMEHEIGHT" property="frameheight" jdbcType="VARCHAR" />
28
+    <result column="FRAMEBRIDGEWIDTH" property="framebridgewidth" jdbcType="VARCHAR" />
29
+    <result column="SPK" property="spk" jdbcType="VARCHAR" />
30
+    <result column="JFRAMESHAPE" property="jframeshape" jdbcType="VARCHAR" />
31
+    <result column="COLOR" property="color" jdbcType="VARCHAR" />
32
+    <result column="lEN_DIAMETER" property="lenDiameter" jdbcType="VARCHAR" />
33
+    <result column="PX" property="px" jdbcType="VARCHAR" />
34
+    <result column="PS" property="ps" jdbcType="VARCHAR" />
35
+    <result column="MARK" property="mark" jdbcType="VARCHAR" />
36
+    <result column="WZ" property="wz" jdbcType="VARCHAR" />
37
+    <result column="CREATETIME" property="createtime" jdbcType="TIMESTAMP" />
38
+    <result column="STORE" property="store" jdbcType="VARCHAR" />
39
+    <result column="NUM" property="num" jdbcType="INTEGER" />
40
+    <result column="YULIU1" property="yuliu1" jdbcType="VARCHAR" />
41
+    <result column="LY" property="ly" jdbcType="VARCHAR" />
42
+  </resultMap>
43
+  <sql id="Base_Column_List" >
44
+    id, username, materialCode, materialDetile, price, SPH, CYL, AXIS, PDFOD, PH, XADD,
45
+    PRISM, CVA, OPTICBC, RS, SD, LRS, CRS, BRS, MPRO, LBPO, FRAMESHAPE, FRAMEHEIGHT,
46
+    FRAMEBRIDGEWIDTH, SPK, JFRAMESHAPE, COLOR, lEN_DIAMETER, PX, PS, MARK, WZ, CREATETIME,
47
+    STORE, NUM, YULIU1, LY
48
+  </sql>
49
+<!--  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >-->
50
+<!--    select-->
51
+<!--    <include refid="Base_Column_List" />-->
52
+<!--    from b_cg_material-->
53
+<!--    where id = #{id,jdbcType=BIGINT}-->
54
+<!--  </select>-->
55
+<!--  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >-->
56
+<!--    delete from b_cg_material-->
57
+<!--    where id = #{id,jdbcType=BIGINT}-->
58
+<!--  </delete>-->
59
+  <insert id="insert" parameterType="com.zjt.entity.cgmaterial" >
60
+    insert into b_cg_material (id, username, materialCode,
61
+      materialDetile, price, SPH,
62
+      CYL, AXIS, PDFOD, PH,
63
+      XADD, PRISM, CVA, OPTICBC,
64
+      RS, SD, LRS, CRS,
65
+      BRS, MPRO, LBPO, FRAMESHAPE,
66
+      FRAMEHEIGHT, FRAMEBRIDGEWIDTH, SPK,
67
+      JFRAMESHAPE, COLOR, lEN_DIAMETER,
68
+      PX, PS, MARK, WZ,
69
+      CREATETIME, STORE, NUM,
70
+      YULIU1, LY)
71
+    values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{materialcode,jdbcType=VARCHAR},
72
+      #{materialdetile,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{sph,jdbcType=VARCHAR},
73
+      #{cyl,jdbcType=VARCHAR}, #{axis,jdbcType=VARCHAR}, #{pdfod,jdbcType=VARCHAR}, #{ph,jdbcType=VARCHAR},
74
+      #{xadd,jdbcType=VARCHAR}, #{prism,jdbcType=VARCHAR}, #{cva,jdbcType=VARCHAR}, #{opticbc,jdbcType=VARCHAR},
75
+      #{rs,jdbcType=VARCHAR}, #{sd,jdbcType=VARCHAR}, #{lrs,jdbcType=VARCHAR}, #{crs,jdbcType=VARCHAR},
76
+      #{brs,jdbcType=VARCHAR}, #{mpro,jdbcType=VARCHAR}, #{lbpo,jdbcType=VARCHAR}, #{frameshape,jdbcType=VARCHAR},
77
+      #{frameheight,jdbcType=VARCHAR}, #{framebridgewidth,jdbcType=VARCHAR}, #{spk,jdbcType=VARCHAR},
78
+      #{jframeshape,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{lenDiameter,jdbcType=VARCHAR},
79
+      #{px,jdbcType=VARCHAR}, #{ps,jdbcType=VARCHAR}, #{mark,jdbcType=VARCHAR}, #{wz,jdbcType=VARCHAR},
80
+      #{createtime,jdbcType=TIMESTAMP}, #{store,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
81
+      #{yuliu1,jdbcType=VARCHAR}, #{ly,jdbcType=VARCHAR})
82
+  </insert>
83
+  <insert id="insertSelective" parameterType="com.zjt.entity.cgmaterial" >
84
+    insert into b_cg_material
85
+    <trim prefix="(" suffix=")" suffixOverrides="," >
86
+      <if test="id != null" >
87
+        id,
88
+      </if>
89
+      <if test="username != null" >
90
+        username,
91
+      </if>
92
+      <if test="materialcode != null" >
93
+        materialCode,
94
+      </if>
95
+      <if test="materialdetile != null" >
96
+        materialDetile,
97
+      </if>
98
+      <if test="price != null" >
99
+        price,
100
+      </if>
101
+      <if test="sph != null" >
102
+        SPH,
103
+      </if>
104
+      <if test="cyl != null" >
105
+        CYL,
106
+      </if>
107
+      <if test="axis != null" >
108
+        AXIS,
109
+      </if>
110
+      <if test="pdfod != null" >
111
+        PDFOD,
112
+      </if>
113
+      <if test="ph != null" >
114
+        PH,
115
+      </if>
116
+      <if test="xadd != null" >
117
+        XADD,
118
+      </if>
119
+      <if test="prism != null" >
120
+        PRISM,
121
+      </if>
122
+      <if test="cva != null" >
123
+        CVA,
124
+      </if>
125
+      <if test="opticbc != null" >
126
+        OPTICBC,
127
+      </if>
128
+      <if test="rs != null" >
129
+        RS,
130
+      </if>
131
+      <if test="sd != null" >
132
+        SD,
133
+      </if>
134
+      <if test="lrs != null" >
135
+        LRS,
136
+      </if>
137
+      <if test="crs != null" >
138
+        CRS,
139
+      </if>
140
+      <if test="brs != null" >
141
+        BRS,
142
+      </if>
143
+      <if test="mpro != null" >
144
+        MPRO,
145
+      </if>
146
+      <if test="lbpo != null" >
147
+        LBPO,
148
+      </if>
149
+      <if test="frameshape != null" >
150
+        FRAMESHAPE,
151
+      </if>
152
+      <if test="frameheight != null" >
153
+        FRAMEHEIGHT,
154
+      </if>
155
+      <if test="framebridgewidth != null" >
156
+        FRAMEBRIDGEWIDTH,
157
+      </if>
158
+      <if test="spk != null" >
159
+        SPK,
160
+      </if>
161
+      <if test="jframeshape != null" >
162
+        JFRAMESHAPE,
163
+      </if>
164
+      <if test="color != null" >
165
+        COLOR,
166
+      </if>
167
+      <if test="lenDiameter != null" >
168
+        lEN_DIAMETER,
169
+      </if>
170
+      <if test="px != null" >
171
+        PX,
172
+      </if>
173
+      <if test="ps != null" >
174
+        PS,
175
+      </if>
176
+      <if test="mark != null" >
177
+        MARK,
178
+      </if>
179
+      <if test="wz != null" >
180
+        WZ,
181
+      </if>
182
+      <if test="createtime != null" >
183
+        CREATETIME,
184
+      </if>
185
+      <if test="store != null" >
186
+        STORE,
187
+      </if>
188
+      <if test="num != null" >
189
+        NUM,
190
+      </if>
191
+      <if test="yuliu1 != null" >
192
+        YULIU1,
193
+      </if>
194
+      <if test="ly != null" >
195
+        LY,
196
+      </if>
197
+    </trim>
198
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
199
+      <if test="id != null" >
200
+        #{id,jdbcType=BIGINT},
201
+      </if>
202
+      <if test="username != null" >
203
+        #{username,jdbcType=VARCHAR},
204
+      </if>
205
+      <if test="materialcode != null" >
206
+        #{materialcode,jdbcType=VARCHAR},
207
+      </if>
208
+      <if test="materialdetile != null" >
209
+        #{materialdetile,jdbcType=VARCHAR},
210
+      </if>
211
+      <if test="price != null" >
212
+        #{price,jdbcType=VARCHAR},
213
+      </if>
214
+      <if test="sph != null" >
215
+        #{sph,jdbcType=VARCHAR},
216
+      </if>
217
+      <if test="cyl != null" >
218
+        #{cyl,jdbcType=VARCHAR},
219
+      </if>
220
+      <if test="axis != null" >
221
+        #{axis,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="pdfod != null" >
224
+        #{pdfod,jdbcType=VARCHAR},
225
+      </if>
226
+      <if test="ph != null" >
227
+        #{ph,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="xadd != null" >
230
+        #{xadd,jdbcType=VARCHAR},
231
+      </if>
232
+      <if test="prism != null" >
233
+        #{prism,jdbcType=VARCHAR},
234
+      </if>
235
+      <if test="cva != null" >
236
+        #{cva,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="opticbc != null" >
239
+        #{opticbc,jdbcType=VARCHAR},
240
+      </if>
241
+      <if test="rs != null" >
242
+        #{rs,jdbcType=VARCHAR},
243
+      </if>
244
+      <if test="sd != null" >
245
+        #{sd,jdbcType=VARCHAR},
246
+      </if>
247
+      <if test="lrs != null" >
248
+        #{lrs,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="crs != null" >
251
+        #{crs,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="brs != null" >
254
+        #{brs,jdbcType=VARCHAR},
255
+      </if>
256
+      <if test="mpro != null" >
257
+        #{mpro,jdbcType=VARCHAR},
258
+      </if>
259
+      <if test="lbpo != null" >
260
+        #{lbpo,jdbcType=VARCHAR},
261
+      </if>
262
+      <if test="frameshape != null" >
263
+        #{frameshape,jdbcType=VARCHAR},
264
+      </if>
265
+      <if test="frameheight != null" >
266
+        #{frameheight,jdbcType=VARCHAR},
267
+      </if>
268
+      <if test="framebridgewidth != null" >
269
+        #{framebridgewidth,jdbcType=VARCHAR},
270
+      </if>
271
+      <if test="spk != null" >
272
+        #{spk,jdbcType=VARCHAR},
273
+      </if>
274
+      <if test="jframeshape != null" >
275
+        #{jframeshape,jdbcType=VARCHAR},
276
+      </if>
277
+      <if test="color != null" >
278
+        #{color,jdbcType=VARCHAR},
279
+      </if>
280
+      <if test="lenDiameter != null" >
281
+        #{lenDiameter,jdbcType=VARCHAR},
282
+      </if>
283
+      <if test="px != null" >
284
+        #{px,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="ps != null" >
287
+        #{ps,jdbcType=VARCHAR},
288
+      </if>
289
+      <if test="mark != null" >
290
+        #{mark,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="wz != null" >
293
+        #{wz,jdbcType=VARCHAR},
294
+      </if>
295
+      <if test="createtime != null" >
296
+        #{createtime,jdbcType=TIMESTAMP},
297
+      </if>
298
+      <if test="store != null" >
299
+        #{store,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="num != null" >
302
+        #{num,jdbcType=INTEGER},
303
+      </if>
304
+      <if test="yuliu1 != null" >
305
+        #{yuliu1,jdbcType=VARCHAR},
306
+      </if>
307
+      <if test="ly != null" >
308
+        #{ly,jdbcType=VARCHAR},
309
+      </if>
310
+    </trim>
311
+  </insert>
312
+  <update id="updateByPrimaryKeySelective" parameterType="com.zjt.entity.cgmaterial" >
313
+    update b_cg_material
314
+    <set >
315
+      <if test="username != null" >
316
+        username = #{username,jdbcType=VARCHAR},
317
+      </if>
318
+      <if test="materialcode != null" >
319
+        materialCode = #{materialcode,jdbcType=VARCHAR},
320
+      </if>
321
+      <if test="materialdetile != null" >
322
+        materialDetile = #{materialdetile,jdbcType=VARCHAR},
323
+      </if>
324
+      <if test="price != null" >
325
+        price = #{price,jdbcType=VARCHAR},
326
+      </if>
327
+      <if test="sph != null" >
328
+        SPH = #{sph,jdbcType=VARCHAR},
329
+      </if>
330
+      <if test="cyl != null" >
331
+        CYL = #{cyl,jdbcType=VARCHAR},
332
+      </if>
333
+      <if test="axis != null" >
334
+        AXIS = #{axis,jdbcType=VARCHAR},
335
+      </if>
336
+      <if test="pdfod != null" >
337
+        PDFOD = #{pdfod,jdbcType=VARCHAR},
338
+      </if>
339
+      <if test="ph != null" >
340
+        PH = #{ph,jdbcType=VARCHAR},
341
+      </if>
342
+      <if test="xadd != null" >
343
+        XADD = #{xadd,jdbcType=VARCHAR},
344
+      </if>
345
+      <if test="prism != null" >
346
+        PRISM = #{prism,jdbcType=VARCHAR},
347
+      </if>
348
+      <if test="cva != null" >
349
+        CVA = #{cva,jdbcType=VARCHAR},
350
+      </if>
351
+      <if test="opticbc != null" >
352
+        OPTICBC = #{opticbc,jdbcType=VARCHAR},
353
+      </if>
354
+      <if test="rs != null" >
355
+        RS = #{rs,jdbcType=VARCHAR},
356
+      </if>
357
+      <if test="sd != null" >
358
+        SD = #{sd,jdbcType=VARCHAR},
359
+      </if>
360
+      <if test="lrs != null" >
361
+        LRS = #{lrs,jdbcType=VARCHAR},
362
+      </if>
363
+      <if test="crs != null" >
364
+        CRS = #{crs,jdbcType=VARCHAR},
365
+      </if>
366
+      <if test="brs != null" >
367
+        BRS = #{brs,jdbcType=VARCHAR},
368
+      </if>
369
+      <if test="mpro != null" >
370
+        MPRO = #{mpro,jdbcType=VARCHAR},
371
+      </if>
372
+      <if test="lbpo != null" >
373
+        LBPO = #{lbpo,jdbcType=VARCHAR},
374
+      </if>
375
+      <if test="frameshape != null" >
376
+        FRAMESHAPE = #{frameshape,jdbcType=VARCHAR},
377
+      </if>
378
+      <if test="frameheight != null" >
379
+        FRAMEHEIGHT = #{frameheight,jdbcType=VARCHAR},
380
+      </if>
381
+      <if test="framebridgewidth != null" >
382
+        FRAMEBRIDGEWIDTH = #{framebridgewidth,jdbcType=VARCHAR},
383
+      </if>
384
+      <if test="spk != null" >
385
+        SPK = #{spk,jdbcType=VARCHAR},
386
+      </if>
387
+      <if test="jframeshape != null" >
388
+        JFRAMESHAPE = #{jframeshape,jdbcType=VARCHAR},
389
+      </if>
390
+      <if test="color != null" >
391
+        COLOR = #{color,jdbcType=VARCHAR},
392
+      </if>
393
+      <if test="lenDiameter != null" >
394
+        lEN_DIAMETER = #{lenDiameter,jdbcType=VARCHAR},
395
+      </if>
396
+      <if test="px != null" >
397
+        PX = #{px,jdbcType=VARCHAR},
398
+      </if>
399
+      <if test="ps != null" >
400
+        PS = #{ps,jdbcType=VARCHAR},
401
+      </if>
402
+      <if test="mark != null" >
403
+        MARK = #{mark,jdbcType=VARCHAR},
404
+      </if>
405
+      <if test="wz != null" >
406
+        WZ = #{wz,jdbcType=VARCHAR},
407
+      </if>
408
+      <if test="createtime != null" >
409
+        CREATETIME = #{createtime,jdbcType=TIMESTAMP},
410
+      </if>
411
+      <if test="store != null" >
412
+        STORE = #{store,jdbcType=VARCHAR},
413
+      </if>
414
+      <if test="num != null" >
415
+        NUM = #{num,jdbcType=INTEGER},
416
+      </if>
417
+      <if test="yuliu1 != null" >
418
+        YULIU1 = #{yuliu1,jdbcType=VARCHAR},
419
+      </if>
420
+      <if test="ly != null" >
421
+        LY = #{ly,jdbcType=VARCHAR},
422
+      </if>
423
+    </set>
424
+    where id = #{id,jdbcType=BIGINT}
425
+  </update>
426
+  <update id="updateByPrimaryKey" parameterType="com.zjt.entity.cgmaterial" >
427
+    update b_cg_material
428
+    set username = #{username,jdbcType=VARCHAR},
429
+      materialCode = #{materialcode,jdbcType=VARCHAR},
430
+      materialDetile = #{materialdetile,jdbcType=VARCHAR},
431
+      price = #{price,jdbcType=VARCHAR},
432
+      SPH = #{sph,jdbcType=VARCHAR},
433
+      CYL = #{cyl,jdbcType=VARCHAR},
434
+      AXIS = #{axis,jdbcType=VARCHAR},
435
+      PDFOD = #{pdfod,jdbcType=VARCHAR},
436
+      PH = #{ph,jdbcType=VARCHAR},
437
+      XADD = #{xadd,jdbcType=VARCHAR},
438
+      PRISM = #{prism,jdbcType=VARCHAR},
439
+      CVA = #{cva,jdbcType=VARCHAR},
440
+      OPTICBC = #{opticbc,jdbcType=VARCHAR},
441
+      RS = #{rs,jdbcType=VARCHAR},
442
+      SD = #{sd,jdbcType=VARCHAR},
443
+      LRS = #{lrs,jdbcType=VARCHAR},
444
+      CRS = #{crs,jdbcType=VARCHAR},
445
+      BRS = #{brs,jdbcType=VARCHAR},
446
+      MPRO = #{mpro,jdbcType=VARCHAR},
447
+      LBPO = #{lbpo,jdbcType=VARCHAR},
448
+      FRAMESHAPE = #{frameshape,jdbcType=VARCHAR},
449
+      FRAMEHEIGHT = #{frameheight,jdbcType=VARCHAR},
450
+      FRAMEBRIDGEWIDTH = #{framebridgewidth,jdbcType=VARCHAR},
451
+      SPK = #{spk,jdbcType=VARCHAR},
452
+      JFRAMESHAPE = #{jframeshape,jdbcType=VARCHAR},
453
+      COLOR = #{color,jdbcType=VARCHAR},
454
+      lEN_DIAMETER = #{lenDiameter,jdbcType=VARCHAR},
455
+      PX = #{px,jdbcType=VARCHAR},
456
+      PS = #{ps,jdbcType=VARCHAR},
457
+      MARK = #{mark,jdbcType=VARCHAR},
458
+      WZ = #{wz,jdbcType=VARCHAR},
459
+      CREATETIME = #{createtime,jdbcType=TIMESTAMP},
460
+      STORE = #{store,jdbcType=VARCHAR},
461
+      NUM = #{num,jdbcType=INTEGER},
462
+      YULIU1 = #{yuliu1,jdbcType=VARCHAR},
463
+      LY = #{ly,jdbcType=VARCHAR}
464
+    where id = #{id,jdbcType=BIGINT}
465
+  </update>
466
+  <select id="selectData" resultMap="BaseResultMap">
467
+      select
468
+      <include refid="Base_Column_List" />
469
+      from b_cg_material order by `createtime` asc
470
+    </select>
471
+
472
+  <select id="selectDataBy" resultMap="BaseResultMap">
473
+    select
474
+    <include refid="Base_Column_List" />
475
+    from b_cg_material
476
+    where 1=1
477
+     <if test="id != null and id != ''">
478
+       and id= #{id}
479
+     </if>
480
+    <if test="storeCode != null and storeCode != '' and storeCode !='admin'">
481
+      and store= #{storeCode}
482
+    </if>
483
+    <if test="begin != null and begin != ''">
484
+      and createtime between #{begin}
485
+    </if>
486
+    <if test="end != null and end!= ''">
487
+      and #{end}
488
+    </if>
489
+    <if test="receive != null and receive!= ''">
490
+      and ly= #{receive}
491
+    </if>
492
+     order by `createtime` asc
493
+  </select>
494
+
495
+  <delete id="deldate">
496
+     delete from b_cg_material
497
+     where id =#{arg0} and materialCode=#{arg1}
498
+  </delete>
499
+</mapper>

+ 39 - 0
src/main/resources/mapper/groupMapper.xml

@@ -0,0 +1,39 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.zjt.mapper.groupMapper" >
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.group" >
5
+    <id column="id" property="id" jdbcType="BIGINT" />
6
+    <result column="client_code" property="clientCode" jdbcType="VARCHAR" />
7
+    <result column="material_group_code" property="materialGroupCode" jdbcType="VARCHAR" />
8
+    <result column="material_group_name" property="materialGroupName" jdbcType="VARCHAR" />
9
+    <result column="status" property="status" jdbcType="INTEGER" />
10
+    <result column="father_id" property="fatherId" jdbcType="BIGINT" />
11
+    <result column="codes" property="codes" jdbcType="VARCHAR" />
12
+    <result column="material_type_code" property="materialTypeCode" jdbcType="VARCHAR" />
13
+    <result column="brand_code" property="brandCode" jdbcType="VARCHAR" />
14
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
15
+    <result column="create_user_code" property="createUserCode" jdbcType="VARCHAR" />
16
+    <result column="create_user_name" property="createUserName" jdbcType="VARCHAR" />
17
+    <result column="create_user_id" property="createUserId" jdbcType="BIGINT" />
18
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
19
+    <result column="update_user_code" property="updateUserCode" jdbcType="VARCHAR" />
20
+    <result column="update_user_name" property="updateUserName" jdbcType="VARCHAR" />
21
+    <result column="update_user_id" property="updateUserId" jdbcType="BIGINT" />
22
+  </resultMap>
23
+  <resultMap id="ResultMapWithBLOBs" type="com.zjt.entity.group" extends="BaseResultMap" >
24
+    <result column="property_content" property="propertyContent" jdbcType="LONGVARCHAR" />
25
+  </resultMap>
26
+  <sql id="Base_Column_List" >
27
+    id, client_code, material_group_code, material_group_name, status, father_id, codes, 
28
+    material_type_code, brand_code, create_time, create_user_code, create_user_name, 
29
+    create_user_id, update_time, update_user_code, update_user_name, update_user_id
30
+  </sql>
31
+  <sql id="Blob_Column_List" >
32
+    property_content
33
+  </sql>
34
+  <select id="selectBrand" resultMap="BaseResultMap" parameterType="java.lang.String">
35
+    SELECT <include refid="Base_Column_List" />
36
+    FROM `b_base_material_group` t WHERE t.`brand_code`= #{brand};
37
+
38
+  </select>
39
+</mapper>

+ 49 - 0
src/main/resources/mapper/priceMapper.xml

@@ -0,0 +1,49 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.zjt.mapper.priceMapper" >
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.price" >
5
+    <id column="id" property="id" jdbcType="BIGINT" />
6
+    <result column="material_code" property="materialCode" jdbcType="VARCHAR" />
7
+    <result column="material_name" property="materialName" jdbcType="VARCHAR" />
8
+    <result column="category_code" property="categoryCode" jdbcType="VARCHAR" />
9
+    <result column="brand_code" property="brandCode" jdbcType="VARCHAR" />
10
+    <result column="material_group_code" property="materialGroupCode" jdbcType="VARCHAR" />
11
+    <result column="batch" property="batch" jdbcType="VARCHAR" />
12
+    <result column="store_code" property="storeCode" jdbcType="VARCHAR" />
13
+    <result column="company_code" property="companyCode" jdbcType="VARCHAR" />
14
+    <result column="purchase_price" property="purchasePrice" jdbcType="DECIMAL" />
15
+    <result column="average_price" property="averagePrice" jdbcType="DECIMAL" />
16
+    <result column="retail_price" property="retailPrice" jdbcType="DECIMAL" />
17
+    <result column="wholesale_price" property="wholesalePrice" jdbcType="DECIMAL" />
18
+    <result column="member_price" property="memberPrice" jdbcType="DECIMAL" />
19
+    <result column="member_optician_price" property="memberOpticianPrice" jdbcType="DECIMAL" />
20
+    <result column="creator" property="creator" jdbcType="BIGINT" />
21
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
22
+    <result column="updater" property="updater" jdbcType="BIGINT" />
23
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
24
+    <result column="status" property="status" jdbcType="TINYINT" />
25
+    <result column="delete_flag" property="deleteFlag" jdbcType="TINYINT" />
26
+  </resultMap>
27
+  <sql id="Base_Column_List" >
28
+    id, material_code, material_name, category_code, brand_code, material_group_code, 
29
+    batch, store_code, company_code, purchase_price, average_price, retail_price, wholesale_price, 
30
+    member_price, member_optician_price, creator, create_time, updater, update_time, 
31
+    status, delete_flag
32
+  </sql>
33
+  <select id="selectPrice" resultMap="BaseResultMap">
34
+    select <include refid="Base_Column_List" />
35
+    from `b_base_material_price` t
36
+    where 1 = 1
37
+    <if test="group != null and group != '' ">
38
+      and t.`material_group_code`= #{group};
39
+    </if>
40
+  </select>
41
+  <select id="selectCode" resultMap="BaseResultMap">
42
+    select <include refid="Base_Column_List" />
43
+    from `b_base_material_price` t
44
+    WHERE
45
+    <if test="code != null and code != '' ">
46
+      and t.`material_code`= #{code};
47
+    </if>
48
+  </select>
49
+</mapper>

+ 26 - 0
src/main/resources/mapper/typeMapper.xml

@@ -0,0 +1,26 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.zjt.mapper.typeMapper" >
4
+  <resultMap id="BaseResultMap" type="com.zjt.entity.type" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="material_type_code" property="materialTypeCode" jdbcType="VARCHAR" />
7
+    <result column="material_type_name" property="materialTypeName" jdbcType="VARCHAR" />
8
+    <result column="p_material_type" property="pMaterialType" jdbcType="VARCHAR" />
9
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
10
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
11
+    <result column="creater" property="creater" jdbcType="VARCHAR" />
12
+    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
13
+    <result column="updater" property="updater" jdbcType="VARCHAR" />
14
+    <result column="status" property="status" jdbcType="TINYINT" />
15
+    <result column="delete_flag" property="deleteFlag" jdbcType="TINYINT" />
16
+  </resultMap>
17
+  <sql id="Base_Column_List" >
18
+    id, material_type_code, material_type_name, p_material_type, remark, create_time, 
19
+    creater, update_time, updater, status, delete_flag
20
+  </sql>
21
+  <select id="selectAll" resultMap="BaseResultMap">
22
+    select
23
+    <include refid="Base_Column_List" />
24
+    from bas_material_type
25
+  </select>
26
+</mapper>

+ 75 - 0
src/main/resources/mybatis-generator.xml

@@ -0,0 +1,75 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE generatorConfiguration
3
+        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
5
+<generatorConfiguration>
6
+    <!--加载配置文件,为下面读取数据库信息准备-->
7
+    <properties resource="application.properties"/>
8
+
9
+    <context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
10
+
11
+        <plugin type="tk.mybatis.mapper.generator.MapperPlugin">
12
+            <!--其中tk.mybatis.mapper.generator.MapperPlugin很重要,用来指定通用Mapper对应的文件,这样我们生成的mapper都会继承这个通用Mapper-->
13
+            <property name="mappers" value="com.zjt.util.MyMapper" />
14
+            <!--caseSensitive默认false,当数据库表名区分大小写时,可以将该属性设置为true-->
15
+            <property name="caseSensitive" value="false"/>
16
+        </plugin>
17
+
18
+        <!-- 阻止生成自动注释 -->
19
+        <commentGenerator>
20
+            <property name="javaFileEncoding" value="UTF-8"/>
21
+            <property name="suppressDate" value="true"/>
22
+            <property name="suppressAllComments" value="true"/>
23
+        </commentGenerator>
24
+
25
+        <!--数据库链接地址账号密码,这里由于我使用的是根据开发和生产分离的配置文件,所以这里直接写上了-->
26
+        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
27
+                        connectionURL="jdbc:mysql://192.168.16.170:3306/zjtblog?useUnicode=true&characterEncoding=utf-8"
28
+                        userId="root"
29
+                        password="">
30
+        </jdbcConnection>
31
+
32
+        <javaTypeResolver>
33
+            <property name="forceBigDecimals" value="false"/>
34
+        </javaTypeResolver>
35
+
36
+        <!--生成Model类存放位置-->
37
+        <javaModelGenerator targetPackage="com.zjt.entity" targetProject="src/main/java">
38
+            <property name="enableSubPackages" value="true"/>
39
+            <property name="trimStrings" value="true"/>
40
+        </javaModelGenerator>
41
+
42
+        <!--生成映射文件存放位置-->
43
+        <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
44
+            <property name="enableSubPackages" value="true"/>
45
+        </sqlMapGenerator>
46
+
47
+        <!--生成Dao类存放位置-->
48
+        <!-- 客户端代码,生成易于使用的针对Model对象和XML配置文件 的代码
49
+                type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象
50
+                type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
51
+        -->
52
+        <javaClientGenerator type="XMLMAPPER" targetPackage="com.zjt.mapper" targetProject="src/main/java">
53
+            <property name="enableSubPackages" value="true"/>
54
+        </javaClientGenerator>
55
+
56
+        <!--生成对应表及类名
57
+        去掉Mybatis Generator生成的一堆 example
58
+        -->
59
+        <table tableName="T_MENU" domainObjectName="Tmenu" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
60
+            <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
61
+        </table>
62
+        <table tableName="T_ROLE" domainObjectName="Trole" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
63
+            <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
64
+        </table>
65
+        <table tableName="T_ROLE_MENU" domainObjectName="Trolemenu" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
66
+            <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
67
+        </table>
68
+        <table tableName="T_USER" domainObjectName="Tuser" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
69
+            <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
70
+        </table>
71
+        <table tableName="T_USER_ROLE" domainObjectName="Trserrole" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
72
+            <generatedKey column="id" sqlStatement="Mysql" identity="true"/>
73
+        </table>
74
+    </context>
75
+</generatorConfiguration>

+ 433 - 0
src/main/resources/static/css/global.css

@@ -0,0 +1,433 @@
1
+/**
2
+
3
+ layui官网
4
+ By 贤心
5
+
6
+*/
7
+
8
+
9
+/* 布局 */
10
+.site-inline{font-size: 0;}
11
+.site-tree, .site-content{display: inline-block;  *display:inline; *zoom:1; vertical-align: top; font-size: 14px;}
12
+.site-tree{width: 220px; min-height: 900px; padding: 5px 0 20px;}
13
+.site-content{width: 899px; min-height: 900px; padding: 20px 0 10px 20px;}
14
+
15
+/* 头部 */admin-side-toggle
16
+.header{height: 65px; border-bottom: 1px solid #404553;  background-color: #393D49; color: #fff;}
17
+.logo{position: absolute; left: 0; top: 18px;}
18
+.logo img{width: 82px; height: 31px;}
19
+
20
+.header .layui-nav{position: absolute; right: 0; top: 0; padding: 0; background: none;}
21
+.header .layui-nav .layui-nav-item{margin: 0 20px; line-height: 66px;}
22
+
23
+.menu{position: absolute; right: 0; top: 0; line-height: 65px;}
24
+.menu a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;}
25
+.menu a{position: relative; padding: 0 20px; margin: 0 20px; color: #c2c2c2; font-size: 14px;}
26
+.menu a:hover{color: #fff; transition: all .5s; -webkit-transition: all .5s}
27
+.menu a.this{color: #fff}
28
+.menu a.this::after{content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 5px; background-color: #5FB878;}
29
+
30
+.header-index{background-color: #080018; border: none;}
31
+
32
+.layui-layout-admin .header-demo{border-bottom-color: #1AA094; background-color: #fff;}
33
+.header-demo .logo{left: 40px;}
34
+.header-demo .layui-nav{top: 0;}
35
+.header-demo .layui-nav .layui-nav-item{margin: 0 10px; line-height: 65px;}
36
+.header-demo .layui-nav .layui-nav-item a{color: #999;}
37
+.header-demo .layui-nav .layui-this{background-color: #f2f2f2;}
38
+.header-demo .layui-nav .layui-nav-item a:hover, 
39
+.header-demo .layui-nav .layui-this a{color: #000;}
40
+.header-demo .layui-nav .layui-this:after, 
41
+.header-demo .layui-nav-bar{background-color: #393D49;}
42
+.header-demo .layui-nav .layui-this a{padding: 0 20px;}
43
+
44
+/* 底部 */
45
+.footer{padding: 30px 0; line-height: 30px; text-align: center; background-color: #eee; color: #666; font-weight: 300;}
46
+body .layui-layout-admin .footer-demo{height: auto; padding: 5px 0; line-height: 26px;}
47
+.footer a{padding: 0 5px;}
48
+
49
+/* 首页banner部分 */
50
+.site-banner{position: relative; height: 600px; text-align: center; overflow: hidden; background-color: #393D49;}
51
+.site-banner-bg
52
+,.site-banner-main{position: absolute; left: 0; top: 0; width: 100%; height: 100%;}
53
+.site-banner-bg{background-position: center 0;}
54
+
55
+
56
+.site-zfj{padding-top: 25px; height: 220px;}
57
+.site-zfj i{position: absolute; left: 50%; top: 25px; width: 200px; height: 200px; margin-left: -100px; font-size: 200px; color: #c2c2c2;}
58
+
59
+@-webkit-keyframes site-zfj {
60
+  0% {opacity: 1;  -webkit-transform: translate3d(0, 0, 0) rotate(0deg) scale(1);}
61
+  10% {opacity: 0.8; -webkit-transform: translate3d(-100px, 0px, 0) rotate(10deg) scale(0.7);}
62
+  35% {opacity: 0.6; -webkit-transform: translate3d(100px, 0px, 0) rotate(30deg) scale(0.4);}
63
+  50% {opacity: 0.4; -webkit-transform: translate3d(0, 0, 0) rotate(360deg) scale(0);}
64
+  80% {opacity: 0.2; -webkit-transform: translate3d(0, 0, 0) rotate(720deg) scale(1);}
65
+  90% {opacity: 0.1; -webkit-transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);}
66
+  100% {opacity: 1; -webkit-transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);}
67
+}
68
+@keyframes site-zfj {
69
+  0% {opacity: 1;  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);}
70
+  10% {opacity: 0.8; transform: translate3d(-100px, 0px, 0) rotate(10deg) scale(0.7);}
71
+  35% {opacity: 0.6; transform: translate3d(100px, 0px, 0) rotate(30deg) scale(0.4);}
72
+  50% {opacity: 0.4; transform: translate3d(0, 0, 0) rotate(360deg) scale(0);}
73
+  80% {opacity: 0.2; transform: translate3d(0, 0, 0) rotate(720deg) scale(1);}
74
+  90% {opacity: 0.1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);}
75
+  100% {opacity: 1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);}
76
+}
77
+
78
+@-webkit-keyframes site-desc {
79
+  0% { -webkit-transform: scale(1.1);}
80
+  100% {opacity: 1; -webkit-transform: scale(1);}
81
+}
82
+@keyframes site-desc {
83
+  0% { transform: scale(1.1);}
84
+  100% {transform: scale(1);}
85
+}
86
+
87
+.layui-anim-scaleSpring{-webkit-animation-name: layui-scale-spring; animation-name: layui-scale-spring}
88
+.site-zfj-anim i{-webkit-animation-name: site-zfj; animation-name: site-zfj; -webkit-animation-duration: 5s; animation-duration: 5s;  -webkit-animation-timing-function: linear; animation-timing-function: linear;}
89
+
90
+
91
+.site-desc{position: relative; height: 70px; margin-top: 25px;  background: url(../images/layui/desc.png) center no-repeat;}
92
+.site-desc-anim{-webkit-animation-name: site-desc; animation-name: site-desc;}
93
+
94
+.site-desc cite{position: absolute; bottom: -40px; left: 0; width: 100%; color: #c2c2c2; font-style: normal;}
95
+.site-download{margin-top: 80px; font-size: 0;}
96
+.site-download a{position: relative; padding: 0 45px 0 90px; height: 60px; line-height: 60px; border: 1px solid #464B5B; font-size: 24px; color: #ccc; transition: all .5s; -webkit-transition: all .5s;}
97
+.site-download a:hover{border: 1px solid #778097; color: #fff; border-radius: 30px; }
98
+.site-download a cite{position: absolute; left: 45px; font-size: 30px;}
99
+.site-version{position: relative; margin-top: 15px; color: #ccc; font-size: 12px;}
100
+.site-version span{padding: 0 3px;}
101
+.site-version *{font-style: normal;}
102
+.site-version a{color: #e2e2e2; text-decoration: underline;}
103
+
104
+.site-banner-other{position: absolute; left: 0; bottom: 32px; width: 100%; text-align: center;}
105
+.site-banner-other iframe{border: none;}
106
+
107
+.site-idea{margin: 50px 0; font-size: 0; text-align: center; font-weight: 300;}
108
+.site-idea li{display: inline-block; vertical-align: top; *display: inline; *zoom:1; font-size: 14px; }
109
+.site-idea li{width: 298px; height: 150px; padding: 30px; line-height: 24px; margin-left: 30px; border: 1px solid #d2d2d2; text-align: left;}
110
+.site-idea li:first-child{margin-left: 0}
111
+.site-idea .layui-field-title{border-color: #d2d2d2}
112
+.site-idea .layui-field-title legend{margin: 0 20px 20px 0; padding: 0 20px; text-align: center;}
113
+
114
+
115
+/* 辅助 */
116
+.site-tips{margin-bottom: 10px; padding: 15px; border-left: 5px solid #0078AD; background-color: #f2f2f2;}
117
+body .site-tips p{margin: 0;}
118
+
119
+/* 目录 */
120
+.site-dir{display: none;}
121
+.site-dir li{line-height: 26px; margin-left: 20px; overflow: visible; list-style-type: disc;}
122
+.site-dir li a{display: block;}
123
+.site-dir li a:active{color: #01AAED;}
124
+.site-dir li a.layui-this{color: #01AAED;}
125
+body .layui-layer-dir{box-shadow: none; border: 1px solid #d2d2d2;}
126
+body .layui-layer-dir .layui-layer-content{padding: 10px; max-height: 280px; overflow: auto;}
127
+.site-dir a em{padding-left: 5px; font-size: 12px; color: #c2c2c2; font-style: normal;}
128
+
129
+/* 文档 */
130
+.site-tree{border-right: 1px solid #eee; }
131
+.site-tree .layui-tree{line-height: 32px;}
132
+.site-tree .layui-tree li i{position: relative; font-size: 22px; color: #000}
133
+.site-tree .layui-tree li a cite{padding: 0 8px;}
134
+.site-tree .layui-tree .site-tree-noicon a cite{padding-left: 15px;}
135
+.site-tree .layui-tree li a em{font-size: 12px; color: #bbb; padding-right: 5px; font-style: normal;}
136
+.site-tree .layui-tree li h2{line-height: 36px; border-left: 5px solid #009E94; margin: 15px 0 5px; padding: 0 10px; background-color: #f2f2f2;}
137
+.site-tree .layui-tree li ul{margin-left: 27px; line-height: 28px;}
138
+.site-tree .layui-tree li ul a,
139
+.site-tree .layui-tree li ul a i{color: #777;}
140
+.site-tree .layui-tree li ul a:hover{color: #333;}
141
+.site-tree .layui-tree li ul li{margin-left: 25px; overflow: visible; list-style-type: disc; /*list-style-position: inside;*/}
142
+.site-tree .layui-tree li ul li cite,
143
+.site-tree .layui-tree .site-tree-noicon ul li cite{padding-left: 0;}
144
+
145
+.site-tree .layui-tree .layui-this a{color: #01AAED;}
146
+.site-tree .layui-tree .layui-this .layui-icon{color: #01AAED;}
147
+
148
+.site-fix .site-tree{position: fixed; top: 0; bottom: 0; z-index: 666; min-height: 0; overflow: auto;  background-color: #fff;}
149
+.site-fix .site-content{margin-left: 220px;}
150
+.site-fix-footer .site-tree{margin-bottom: 120px;}
151
+
152
+
153
+.site-title{ margin: 30px 0 20px;}
154
+.site-title fieldset{border: none; padding: 0; border-top: 1px solid #eee;}
155
+.site-title fieldset legend{margin-left: 20px;  padding: 0 10px; font-size: 22px; font-weight: 300;}
156
+
157
+.site-text a{color: #01AAED;}
158
+.site-h1{margin-bottom: 20px; line-height: 60px; padding-bottom: 10px; color: #393D49; border-bottom: 1px solid #eee;  font-size: 28px; font-weight: 300;}
159
+.site-h1 .layui-icon{position: relative; top: 5px; font-size: 50px; margin-right: 10px;}
160
+.site-text{position:relative;}
161
+.site-text p{margin-bottom: 10px;  line-height:22px;}
162
+.site-text em{padding: 0 3px; font-weight: 500; font-style: italic; color: #666;}
163
+.site-text code{margin:0 5px; padding: 3px 10px; border: 1px solid #e2e2e2; background-color: #fbfbfb; color: #666; border-radius: 2px;}
164
+
165
+.site-table{width: 100%; margin: 10px 0;}
166
+.site-table thead{background-color:#f2f2f2; }
167
+.site-table th, 
168
+.site-table td{padding: 6px 15px; min-height: 20px; line-height: 20px; border:1px solid #ddd; font-size: 14px; font-weight: 400;}
169
+.site-table tr:nth-child(even){background: #fbfbfb;}
170
+
171
+.site-block{padding: 20px; border: 1px solid #eee;}
172
+.site-block .layui-form{margin-right: 200px;}
173
+
174
+
175
+/* 演示 */
176
+body .layui-layout-admin .site-demo{bottom: 82px; padding: 0;z-index:-1;}
177
+body .site-demo-nav .layui-nav-item{line-height: 40px}
178
+.layui-nav-item .layui-icon{position: relative; /*font-size: 20px;*/}
179
+.layui-nav-item a cite{padding: 0 10px;}
180
+.site-demo .layui-main{margin: 15px; line-height: 22px;}
181
+.site-demo-editor{position: absolute; top: 0; bottom: 0; left: 0; width: 50%; }
182
+.site-demo-area{position: absolute; top: 0; bottom: 90px; width: 100%;}
183
+.site-demo-editor textarea{position: absolute; width: 100%; height: 100%; padding: 15px; border: none; resize: none; /*background-color: #F7FBFF;*/ background-color: #272822; color: #CFBFAF; font-family: Courier New; font-size: 12px; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;}
184
+.site-demo-btn{position: absolute; bottom: 100px; right: 20px;}
185
+.site-demo-zanzhu{position: absolute; bottom: 0; left: 0; width: 100%; height: 90px; text-align: center; background-color: #e2e2e2; overflow: hidden;}
186
+.site-demo-zanzhu>*{position: relative; z-index: 1;}
187
+.site-demo-zanzhu:before{content: ""; position: absolute; z-index: 0; top: 50%; left: 50%; width: 120px; margin: -10px 0px 0px -60px; text-align: center; color: rgb(170, 170, 170); font-size: 18px; font-weight: 300; }
188
+
189
+.site-demo-result{position: absolute; right: 0; top: 0; bottom: 0; width: 50%;}
190
+.site-demo-result iframe{position: absolute; width: 100%; height: 100%;}
191
+
192
+.site-demo-button{margin-bottom: 30px;}
193
+.site-demo-button div{margin: 20px 30px 10px;}
194
+.site-demo-button .layui-btn{margin-bottom: 10px;}
195
+
196
+
197
+.site-demo-laytpl{text-align: center;}
198
+.site-demo-laytpl textarea,
199
+.site-demo-laytpl div span{width: 40%;  padding: 15px; margin: 0 15px;}
200
+.site-demo-laytpl textarea{height: 300px; border: none; background-color: #3F3F3F; color: #E3CEAB; font-family: Courier New; resize: none;}
201
+.site-demo-laytpl div span{display: inline-block; text-align: center; background: #101010; color: #fff;}
202
+.site-demo-tplres{margin: 10px 0; text-align: center}
203
+.site-demo-tplres .site-demo-tplh2,
204
+.site-demo-tplres .site-demo-tplview{display: inline-block; width: 50%;}
205
+.site-demo-tplres h2{padding: 15px; background: #e2e2e2;}
206
+.site-demo-tplres h3{font-weight: 700;}
207
+.site-demo-tplres div{padding: 14px; border: 1px solid #e2e2e2; text-align: left;}
208
+
209
+.site-demo-upload,
210
+.site-demo-upload img{width: 200px; height: 200px; border-radius: 100%;}
211
+.site-demo-upload{position: relative; background: #e2e2e2;}
212
+.site-demo-upload .site-demo-upbar{position: absolute; top: 50%; left: 50%; margin: -18px 0 0 -56px;}
213
+.site-demo-upload .layui-upload-button{background-color: rgba(0,0,0,.2); color: rgba(255,255,255,1);}
214
+
215
+.site-demo-util{position: relative; width: 300px;}
216
+.site-demo-util img{width: 300px; border-radius: 100%;}
217
+.site-demo-util span{position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #333; cursor: pointer;}
218
+@-webkit-keyframes demo-fengjie {
219
+  0% {-webkit-filter: blur(0); opacity: 1; background: #fff; height: 300px; border-radius: 100%;}
220
+  80% {-webkit-filter: blur(50px);  opacity: 0.95;}
221
+  100% {-webkit-filter: blur(20px); opacity: 0; background: #fff;}
222
+}
223
+@keyframes demo-fengjie {
224
+  0% {filter: blur(0); opacity: 1; background: #fff; height: 300px; border-radius: 100%;}
225
+  80% {filter: blur(50px);  opacity: 0.95;}
226
+  100% {filter: blur(20px); opacity: 0; background: #fff;}
227
+}
228
+.site-demo-fengjie{-webkit-animation-name: demo-fengjie; animation-name: demo-fengjie; -webkit-animation-duration: 5s; animation-duration: 5s;}
229
+
230
+
231
+.layui-layout-admin .site-demo-body{top: 117px;}
232
+.site-demo-title{position: fixed; left: 200px; right: 0; top: 76px;}
233
+.site-demo-code{position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: none; padding: 10px; resize: none; font-size: 12px; background-color: #F7FBFF; color: #881280; font-family: Courier New;}
234
+
235
+.site-demo-body .layui-elem-quote a{color: #01AAED;}
236
+.site-demo-body .layui-elem-quote a:hover{color: #FF5722;}
237
+
238
+
239
+/* 其它 */
240
+#trans-tooltip,
241
+#tip-arrow-bottom,
242
+#tip-arrow-top{display: none !important;}
243
+
244
+
245
+/* 独立组件 */
246
+.alone{width:730px; margin:200px auto;}
247
+.alone ul{margin-left:1px; font-size:0;}
248
+.alone li{display:inline-block; width:181px; font-size: 16px; text-align:center; line-height:80px; margin:0 1px 1px 0; background-color:#393D49; color:#fff;}
249
+.alone li:hover{opacity:0.8;}
250
+.alone li a{display:block; color:#fff;}
251
+
252
+
253
+/* 自定义css */
254
+.admin-header-item-mobile{
255
+	position: absolute; right: 0px; height: 70px;line-height: 70px; 
256
+	padding: 0 20px; text-align: center; top:0;
257
+	display: none;
258
+}
259
+
260
+.admin-nav-tree .layui-nav-child a {
261
+	padding-left: 30px;
262
+}
263
+
264
+.admin{
265
+	border: 0;
266
+	margin: 0;
267
+	box-shadow:none;
268
+}
269
+.admin-nav-card{
270
+	margin-top: 5px;
271
+}
272
+.admin-nav-card .layui-icon{
273
+	position: relative;
274
+}
275
+.admin-nav-card .layui-tab-item iframe{
276
+	width: 100%;
277
+	border: 0;
278
+	height: 100%;
279
+}
280
+.admin-nav-card>.layui-tab-title{
281
+	border-bottom: 1px solid #1AA094;
282
+}
283
+.admin-nav-card .layui-tab-title cite{
284
+	font-style: normal;
285
+	padding-left: 5px;
286
+}
287
+.admin-nav-card>.layui-tab-title .layui-this{
288
+	color: white;
289
+    background-color: #1AA094;
290
+}
291
+.admin-nav-card>.layui-tab-title .layui-this:after{
292
+	border-bottom: 0;
293
+}
294
+.admin-header-user img{
295
+	width: 40px; height: 40px; border-radius: 100%;    
296
+	/*position: relative;
297
+    top: 15px;*/
298
+}
299
+.admin-header-user .layui-nav-more{
300
+	top:33px;
301
+}
302
+.admin-header-user .layui-nav-mored{
303
+	top: 26px;
304
+}
305
+
306
+/*lock*/
307
+.admin-header-lock{
308
+	width: 320px; height: 150px; padding: 20px; position: relative; text-align: center;
309
+}
310
+.admin-header-lock-img{
311
+	width: 60px; height: 60px; margin: 0 auto;
312
+}
313
+.admin-header-lock-img img{
314
+	width: 60px; height: 60px; border-radius: 100%;
315
+}
316
+.admin-header-lock-name{
317
+	color: #009688;margin: 8px 0 15px 0;
318
+}
319
+.admin-header-lock-input{
320
+	width: 150px; color: #FFFFFF; height: 30px; border: 0;background-color: #009688; padding: 0 7px; border-radius: 2px;
321
+}
322
+/*table*/
323
+.site-table tbody tr td {text-align: center;}
324
+.site-table tbody tr td .layui-btn+.layui-btn{margin-left: 0px;}
325
+.admin-table-page {position: fixed;z-index: 19940201;bottom: 0;width: 100%;background-color: #eee;border-bottom: 1px solid #ddd;left: 0px;}
326
+.admin-table-page .page{padding-left:20px;}
327
+.admin-table-page .page .layui-laypage {margin: 6px 0 0 0;}
328
+
329
+/**/
330
+.admin-main {margin: 15px;}
331
+
332
+.admin-side-toggle,.admin-side-full{
333
+	position: absolute; cursor: pointer;
334
+    z-index: 19940201;
335
+    left: 200px;
336
+    color: white;
337
+    text-align: center;
338
+    width: 30px;
339
+    height: 30px;
340
+    background-color: #1AA094;
341
+    line-height: 30px;
342
+    top: 25%;
343
+}
344
+.admin-side-toggle:hover{
345
+	background-color: #5FB878;
346
+}
347
+.admin-side-full{
348
+	left: 240px;
349
+}
350
+.admin-login-box{
351
+	width: 185px; height: 70px; position: relative;
352
+}
353
+
354
+.beg-navbar .layui-nav-child dd a{
355
+	padding-left: 30px;
356
+}
357
+
358
+
359
+.admin-contextmenu{
360
+	position: absolute;line-height: 36px;padding: 5px 0;
361
+	border: 1px solid #d2d2d2;background-color: white;z-index: 19940201;border-radius: 2px;white-space: nowrap;top:30px;
362
+	/*width: 100px;height: 200px; */
363
+}
364
+.admin-contextmenu ul li{
365
+	padding: 0 15px;
366
+}
367
+.admin-contextmenu ul li:hover{
368
+	background-color: #eee;
369
+	cursor: pointer;
370
+}
371
+
372
+
373
+/* 适配多设备 */
374
+@media screen and (max-width: 750px) {
375
+  .layui-main{width: auto; margin: 0 10px;}
376
+  .logo,
377
+  .header-demo .logo{left: 10px;}
378
+
379
+  .site-nav-layim{display: none !important;}
380
+  .header .layui-nav .layui-nav-item{margin: 0;}
381
+  .header .layui-nav .layui-nav-item a{padding: 0 15px;}
382
+  .site-banner{height: 300px;}
383
+  .site-banner-bg{background-size: cover;}
384
+  .site-zfj{height: 100px; padding-top: 5px;}
385
+  .site-zfj i{top: 10px; width: 100px; height: 100px; margin-left: -50px; font-size: 100px;}
386
+  .site-desc{background-size: 70%; margin: 0;}
387
+  .site-desc cite{display: none;}
388
+  .site-download{margin-top: 0; }
389
+  .site-download a{height: 40px; line-height: 40px; padding: 0 25px 0 60px; border: 1px solid #778097; border-radius: 30px; color: #fff; font-size: 16px;}
390
+  .site-download a cite{left: 20px;}
391
+  .site-banner-other{bottom: 15px;}
392
+
393
+  .site-idea{margin: 20px 0;}
394
+  .site-idea li{margin: 0 0 20px 0; width: 100%; height: auto; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;}
395
+  .site-hengfu img{max-width: 100%}
396
+
397
+  .layui-layer-dir{display: none;}
398
+  .site-tree{position: fixed; top: 0; bottom: 0; min-height: 0; overflow: auto; z-index: 1000; left: -260px; background-color: #fff;  transition: all .3s; -webkit-transition: all .3s;}
399
+  .site-content{width: 100%; padding: 0; overflow: auto;}
400
+  .site-content img{max-width: 100%;}
401
+  .site-tree-mobile{display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width: 50px; height: 50px; line-height: 50px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
402
+  .site-home .site-tree-mobile{display: none!important;}
403
+  .site-mobile .site-tree-mobile{display: none !important;}
404
+  .site-mobile .site-tree{left: 0;}
405
+  .site-mobile .site-mobile-shade{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 9999;}
406
+  .site-tree-mobile i{font-size: 20px;}
407
+  .layui-code-view{-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
408
+
409
+  .layui-layout-admin .layui-side{position: fixed; top: 0; left: -260px; transition: all .3s; -webkit-transition: all .3s; z-index: 10000;}
410
+  .layui-body{position: static; bottom: 0; left: 0;}
411
+  .site-mobile .layui-side{left: 0;}
412
+  body .layui-layout-admin .footer-demo{position: static;}
413
+
414
+  .site-demo-area,
415
+  .site-demo-editor,
416
+  .site-demo-result,
417
+  .site-demo-editor textarea,
418
+  .site-demo-result iframe{position: static; width: 100%;}
419
+  .site-demo-editor textarea{height: 350px;}
420
+  .site-demo-zanzhu{display: none;}
421
+  .site-demo-btn{bottom: auto; top: 370px;}
422
+  .site-demo-result iframe{height: 500px;}
423
+
424
+  .site-demo-laytpl textarea, .site-demo-laytpl div span{margin: 0;}
425
+  .site-demo-tplres .site-demo-tplh2, .site-demo-tplres .site-demo-tplview{width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
426
+
427
+  .site-demo-title{position: static; left: 0;}
428
+  body .layui-layout-admin .site-demo{}
429
+  .site-demo-code{position: static; height: 350px;}
430
+  
431
+  .admin-side-toggle ,.admin-header-item{display: none;}
432
+  .admin-header-item-mobile{ display: block; }
433
+}

+ 159 - 0
src/main/resources/static/css/index.css

@@ -0,0 +1,159 @@
1
+/*公共样式*/
2
+.header .layui-nav-child{ z-index:99999; top:60px; left: auto; right: 0;}
3
+.seraph{ font-size:16px !important;}
4
+.main_body{ min-width:320px; }
5
+.layui-nav .layui-nav-item a{ cursor:pointer;}
6
+.layui-nav .layui-nav-item>a{ color:rgba(255,255,255,1); max-height:60px;}
7
+.layui-layer-tab .layui-layer-title span{ padding:0 !important;}
8
+iframe{ position:absolute; height:100%; width:100%; border:none;}
9
+.top_menu.layui-nav .layui-nav-child dd.layui-this a,.closeBox.layui-nav .layui-nav-child dd.layui-this a,.closeBox .layui-nav-child dd.layui-this,.top_menu .layui-nav-child dd.layui-this{ background:none; color:#333;}
10
+.layui-nav .layui-nav-child a:hover,.layui-nav .layui-nav-child dd.layui-this a:hover{background-color:#5FB878;color:#fff;}
11
+
12
+/*模拟加载层图标样式*/
13
+.layui-layer-dialog .layui-layer-content .layui-layer-ico16{ background-size:100% 100% !important; }
14
+/*样式改变的过渡*/
15
+.layui-body,.layui-footer,.layui-layout-admin .layui-side,.logo,.topLevelMenus li.layui-nav-item,.topLevelMenus li.layui-nav-item:hover{ transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;-o-transition: all 0.3s ease-in-out;-moz-transition: all 0.3s ease-in-out;-ms-transition: all 0.3s ease-in-out; }
16
+/*隐藏*/
17
+*[mobile],.component .layui-select-title i.layui-edge{ display:none;}
18
+
19
+/*打开页面动画*/
20
+.layui-tab-item.layui-show{ animation:moveTop 1s; -webkit-animation:moveTop 1s; animation-fill-mode:both; -webkit-animation-fill-mode:both; position:relative; height:100%; -webkit-overflow-scrolling: touch; overflow:auto; }
21
+@keyframes moveTop{
22
+	0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
23
+	100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
24
+}
25
+@-o-keyframes moveTop{
26
+	0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
27
+	100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
28
+}
29
+@-moz-keyframes moveTop{
30
+	0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
31
+	100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
32
+}
33
+@-webkit-keyframes moveTop{
34
+	0% {opacity: 0;-webkit-transform: translateY(20px);-ms-transform: translateY(20px);transform: translateY(20px);}
35
+	100% {opacity: 1;-webkit-transform: translateY(0);-ms-transform: translateY(0);transform: translateY(0);}
36
+}
37
+/*锁屏*/
38
+.admin-header-lock{width: 320px; height: 170px; padding: 20px; position: relative; text-align: center;}
39
+.admin-header-lock-img{width:70px; height:70px; margin: 0 auto;}
40
+.admin-header-lock-img img{width:70px; height:70px; border-radius: 100%; box-shadow:0 0 30px #44576b;}
41
+.admin-header-lock-name{color: #009688;margin: 8px 0 15px 0;}
42
+.input_btn{ overflow: hidden; margin-bottom: 10px; }
43
+.admin-header-lock-input{width: 170px; color: #fff;background-color: #009688; float: left; margin:0 10px 0 40px; border:none;}
44
+.admin-header-lock-input::-webkit-input-placeholder {color:#fff;}
45
+.admin-header-lock-input::-moz-placeholder {color:#fff;}
46
+.admin-header-lock-input:-ms-input-placeholder {color:#fff;}
47
+.admin-header-lock-input:-moz-placeholder {color:#fff;}
48
+#unlock{ float: left; }
49
+#lock-box p{ color:#e60000; }
50
+/*顶部*/
51
+.header{ z-index:2000;}
52
+.logo{ color: #fff; float: left; line-height:60px; font-size:20px; padding:0 25px; text-align: center; width:150px;}
53
+.hideMenu{ float:left; width:20px; height:20px; margin-top:15px; font-size:17px; line-height:20px; text-align:center; padding:5px 5px; color:#fff; background-color:#1AA094; }
54
+.hideMenu:hover{ color:#fff; }
55
+.layui-nav cite{ margin-left: 5px;}
56
+/*顶部右侧*/
57
+.topLevelMenus{float:left;}
58
+.topLevelMenus li.layui-nav-item:hover{ background-color:rgba(221,221,221,0.2);}
59
+.layui-nav .layui-this:after{ bottom:-5px!important;}
60
+.header .layui-nav-bar{top:60px !important;}
61
+.topLevelMenus .layui-nav-item.layui-this{ background-color:rgba(0,0,0,0.5);}
62
+.top_menu.layui-nav .layui-this:after{ width:0px; }
63
+.top_menu .layui-nav-bar,.mobileTopLevelMenus .layui-nav-bar{background-color:rgba(0,0,0,0.7);}
64
+
65
+/*左侧导航*/
66
+.layui-nav{background-color: inherit !important;}
67
+.showMenu.layui-layout-admin .layui-side{ left:-200px; }
68
+.showMenu .layui-body,.showMenu .layui-footer{ left:0; }
69
+/*左侧用户头像*/
70
+.top_menu{ background-color:inherit !important; position:absolute; right:0;top:0; }
71
+.layui-layout-admin .layui-side{ left:0; overflow:hidden;}
72
+.user-photo{width: 200px; height: 120px; padding:15px 0 5px;}
73
+.user-photo a.img{ display: block; width:80px; height:80px; margin: 0 auto 10px;}
74
+.user-photo a.img img{ display: block; border: none; width: 100%; height: 100%; border-radius: 50%; -webkit-border-radius: 50%; -moz-border-radius: 50%; border: 4px solid #44576b; box-sizing:border-box;}
75
+.user-photo p{ display: block; width: 100%; height: 25px; color: #ffffff; text-align: center; font-size: 12px; white-space: nowrap;line-height: 25px; overflow: hidden;}
76
+/*左侧导航重定义*/
77
+.layui-nav-item.layui-nav-itemed{ background-color:#2B2E37 !important;}
78
+.layui-nav-itemed:before{ width:5px; height:100%; background-color:#009688; position:absolute; content:''; left:0; top:0;}
79
+.layui-nav-itemed .layui-nav-child a{ padding-left:40px;}
80
+/*左侧搜索框*/
81
+.component{ width:180px; height:30px; margin:0 auto 5px; position:relative;}
82
+.component .layui-input{ height:30px; line-height: 30px; font-size:12px; border:none; transition: all 0.3s; background:rgba(255,255,255,0.05); }
83
+.component .layui-input:focus{ background:#fff; color:#000; }
84
+.component .layui-form-select dl{ top:33px; background:#fff; }
85
+.component .layui-icon{ position: absolute; right:8px; top:8px; color:#000; }
86
+.component dl dd{ color:#000 !important;}
87
+.component dl dd.layui-this{ color:#fff !important;}
88
+.component dl dd.layui-select-tips{ color:#999 !important;}
89
+
90
+/*layui-body*/
91
+.layui-body{overflow:hidden; border-top:5px solid #1AA094;border-left:2px solid #1AA094; background:#fff;}
92
+#top_tabs_box{ padding-right:138px; height:40px; border-bottom:1px solid #e2e2e2; }
93
+#top_tabs{ position: absolute; border-bottom:none;}
94
+.layui-tab-title .layui-this{ background-color:#1AA094; color:#fff; }
95
+.layui-tab-title .layui-this:after{ border:none; }
96
+.layui-tab-title li cite{ font-style: normal; padding-left:5px; }
97
+.clildFrame.layui-tab-content{ top:41px; position:absolute; bottom:0; width:100%; padding:0;}
98
+/*多窗口页面操作下拉*/
99
+.closeBox{ position:absolute; right:0; background-color:#fff !important; color:#000; border-left:1px solid #e2e2e2; border-bottom:1px solid #e2e2e2; }
100
+.closeBox .layui-nav-item{ line-height:40px; }
101
+.closeBox .layui-nav-item>a,.closeBox .layui-nav-item>a:hover{ color:#000; }
102
+.closeBox .layui-nav-child{ top:42px; left:-12px; }
103
+.closeBox .layui-nav-bar{ display:none; }
104
+.closeBox a i.caozuo{ font-size: 20px; position:absolute; top:1px; left:0; }
105
+.closeBox a span.layui-nav-more{ border-color:#333 transparent transparent;}
106
+.closeBox a span.layui-nav-more.layui-nav-mored{ border-color:transparent transparent #333;}
107
+/*功能设定*/
108
+.functionSrtting_box{ padding-top:15px;}
109
+.functionSrtting_box .layui-form-label{ width:81px;}
110
+.functionSrtting_box .layui-word-aux{ position:absolute;left:60px; top:9px; font-size: 12px;}
111
+/*换肤*/
112
+.skins_box{ padding:10px 34px 0; }
113
+.skinBtn{ text-align:center; }
114
+/*橙色*/
115
+.orange .layui-layout-admin .layui-header{ background-color:orange !important; }
116
+.orange .layui-bg-black{ background-color:#e47214 !important; }
117
+/*蓝色*/
118
+.blue .layui-layout-admin .layui-header{ background-color:#3396d8 !important; }
119
+.blue .layui-bg-black,.blue .hideMenu{ background-color:#146aa2 !important; }
120
+/*自定义*/
121
+.skinCustom{ visibility:hidden; }
122
+.skinCustom input{ width:48%; margin:5px 2% 5px 0; float:left; }
123
+.orange .layui-nav-tree .layui-nav-child a,.blue .layui-nav-tree .layui-nav-child a{ color:#fff; }
124
+.orange .top_menu.layui-nav .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-more{border-color:#fff transparent transparent !important;}
125
+.orange .top_menu.layui-nav-itemed .layui-nav-more,.orange .top_menu.layui-nav .layui-nav-mored,.blue .top_menu.layui-nav-itemed .layui-nav-more,.blue .top_menu.layui-nav .layui-nav-mored{border-color:transparent transparent #fff !important;}
126
+/*底部*/
127
+.footer{ text-align: center; line-height:44px;border-left: 2px solid #1AA094; z-index:999;}
128
+
129
+/*响应式样式*/
130
+@media screen and (max-width:1080px){
131
+	.mobileTopLevelMenus[mobile]{display:inline-block;}
132
+	.site-mobile .site-tree-mobile,.topLevelMenus[pc]{display:none !important;}
133
+}
134
+@media screen and (max-width: 720px){
135
+	.hideMenu{ display: none !important; }
136
+	.mobileTopLevelMenus[mobile]{ padding:0;}
137
+	.top_menu>li[pc]{ display: none !important; }
138
+	/*左侧导航*/
139
+	.layui-layout-admin .layui-side{ left:-260px; }
140
+	.site-mobile .layui-side{ left: 0; z-index:1100; }
141
+	.site-tree-mobile {display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width:40px; height:40px; line-height:40px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
142
+	.site-mobile .site-mobile-shade { content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;}
143
+	.layui-body,.layui-layout-admin .layui-footer{ left:-2px; }
144
+}
145
+@media screen and (max-width:480px){
146
+	.logo{ width:120px; font-size: 18px;}
147
+	#userInfo>a{ padding:0 10px;}
148
+	.mobileTopLevelMenus[mobile] li>a{ padding:0 17px 0 15px;}
149
+	.logo,.layui-nav.top_menu{ padding:0 5px;}
150
+	.adminName,.top_menu dd[pc]{ display: none !important; }
151
+	*[mobile],.top_menu .layui-nav-item.showNotice[pc]{ display:inline-block !important; }
152
+}
153
+
154
+
155
+/*修改顶部高度*/
156
+.header .layui-nav-child,.layui-body,.layui-layout-admin .layui-side,.header .layui-nav-bar{ top:50px !important;}
157
+.header .layui-nav .layui-nav-item,.header .layui-nav .layui-nav-item>a,.header,.logo{ line-height:50px !important; max-height:50px; !important;}
158
+.mobileTopLevelMenus{ float:left;}
159
+.hideMenu{ margin-top: 10px;}

+ 431 - 0
src/main/resources/static/css/layuiGlobalForIcon.css

@@ -0,0 +1,431 @@
1
+/**
2
+
3
+ layui瀹樼綉
4
+ By 璐ゅ績
5
+
6
+*/
7
+
8
+h1,h2,h3{font-size: 14px;}
9
+
10
+/* 甯冨眬 */
11
+.site-inline{font-size: 0;}
12
+.site-tree, .site-content{display: inline-block;  *display:inline; *zoom:1; vertical-align: top; font-size: 14px;}
13
+.site-tree{width: 220px; min-height: 900px; padding: 5px 0 20px;}
14
+.site-content{width: 899px; min-height: 900px; padding: 20px 0 10px 20px;}
15
+
16
+/* 澶撮儴 */
17
+.header{height: 59px; border-bottom: 1px solid #404553;  background-color: #393D49;}
18
+.logo{position: absolute; left: 0; top: 16px;}
19
+.logo img{width: 82px; height: 31px;}
20
+
21
+.header .layui-nav{position: absolute; right: 0; top: 0; padding: 0; background: none;}
22
+.header .layui-nav .layui-nav-item{margin: 0 20px; }
23
+.header .layui-nav .layui-nav-item[mobile]{display: none;}
24
+
25
+.header .layui-container .logo{left: 15px;}
26
+.header .layui-container .layui-nav{right: 15px;}
27
+
28
+.menu{position: absolute; right: 0; top: 0; line-height: 65px;}
29
+.menu a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;}
30
+.menu a{position: relative; padding: 0 20px; margin: 0 20px; color: #c2c2c2; font-size: 14px;}
31
+.menu a:hover{color: #fff; transition: all .5s; -webkit-transition: all .5s}
32
+.menu a.this{color: #fff}
33
+.menu a.this::after{content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 5px; background-color: #5FB878;}
34
+
35
+.header-index{background-color: #05031A; border: none;}
36
+.header-index .site-banner-bg{}
37
+.header-index[spring]{background-color: #0D1206}
38
+.header-index[summer]{background-color: #0A0E11}
39
+.header-index[autumn]{background-color: #100903}
40
+.header-index[winter]{background-color: #0E0E0E}
41
+
42
+.header-demo{height: 60px; border-bottom: none;}
43
+.header-demo .logo{left: 40px;}
44
+.header-demo .layui-nav{top: 0;}
45
+.header-demo .layui-nav .layui-nav-item{margin: 0 10px;}
46
+
47
+.header-demo .layui-nav .layui-this a{padding: 0 30px;}
48
+
49
+.component{position: absolute; width: 200px; left: 120px; top: 16px; }
50
+.component .layui-input{height: 30px; padding-left: 12px; background-color: #424652; background-color: rgba(255,255,255,.05); border: none 0; color: #fff; font-size: 12px;}
51
+.component .layui-form-select .layui-edge{display: none; border-top-color: #999;}
52
+.component .layui-form-select dl{top: 36px; background-color: rgba(255,255,255,.9)}
53
+.header-demo .component{left: 185px;}
54
+
55
+/* 瀛愪晶杈� */
56
+.layui-side-child{width: 160px!important; left: 200px; bottom: 60px!important; border-right: 1px solid #eee; background-color: #fff;}
57
+.layui-side-child .layui-side-scroll{width: 170px;}
58
+.layui-side-child .layui-nav{padding: 10px 0; width: 160px; border-radius: 0; background: none}
59
+.layui-side-child .layui-nav-child{border-radius: 0;}
60
+.layui-side-child .layui-nav .layui-nav-title a,
61
+.layui-side-child .layui-nav .layui-nav-title a:hover,
62
+.layui-side-child .layui-nav-itemed>a{color: #666 !important;}
63
+.layui-side-child .layui-nav-itemed .layui-nav-child{margin-bottom: 10px; background: none !important;}
64
+.layui-side-child .layui-nav .layui-nav-item a{height: 30px; line-height: 30px; color: #666;}
65
+.layui-side-child .layui-nav .layui-nav-item a:hover{background: none !important;}
66
+.layui-side-child .layui-nav .layui-nav-child a{color: #999 !important;}
67
+.layui-side-child .layui-nav .layui-nav-more{display: none;}
68
+.layui-side-child .layui-nav-tree .layui-this,
69
+.layui-side-child .layui-nav-tree .layui-this>a,
70
+.layui-side-child .layui-nav-tree .layui-nav-child dd.layui-this,
71
+.layui-side-child .layui-nav-tree .layui-nav-child dd.layui-this a{background: none; color: #5FB878 !important;}
72
+.layui-side-child .layui-nav .layui-nav-child a:hover{color: #009688 !important}
73
+.layui-side-child .layui-nav-bar{background-color: #5FB878;}
74
+
75
+
76
+/* 搴曢儴 */
77
+.footer{padding: 30px 0; line-height: 30px; text-align: center; color: #666; font-weight: 300;}
78
+body .layui-layout-admin .footer-demo{height: 50px; padding: 5px 0;}
79
+.footer a{padding: 0 5px;}
80
+.site-union{margin-top: 10px; color: #999;}
81
+.site-union>*{display: inline-block; vertical-align: middle;}
82
+.site-union a[upyun] img{width: 80px;}
83
+.site-union span{position: relative; top: 3px;}
84
+.site-union span a{padding: 0; display: inline; color: #999;}
85
+.site-union span a:hover{text-decoration: underline;}
86
+
87
+.footer-demo p{display: inline-block; vertical-align: middle; height: 50px; padding-right: 10px;}
88
+.footer-demo .site-union{position: relative; top: -9px;}
89
+
90
+/* 棣栭〉banner閮ㄥ垎 */
91
+.site-banner{position: relative; height: 600px; text-align: center; overflow: hidden; background-color: #393D49;}
92
+.site-banner-bg
93
+,.site-banner-main{position: absolute; left: 0; top: 0; width: 100%; height: 100%;}
94
+.site-banner-bg{background-position: center 0;}
95
+
96
+
97
+.site-zfj{padding-top: 25px; height: 220px;}
98
+.site-zfj i{position: absolute; left: 50%; top: 25px; width: 200px; height: 200px; margin-left: -100px; font-size: 200px; color: #c2c2c2;}
99
+
100
+@-webkit-keyframes site-zfj {
101
+    0% {opacity: 1;  -webkit-transform: translate3d(0, 0, 0) rotate(0deg) scale(1);}
102
+    10% {opacity: 0.8; -webkit-transform: translate3d(-100px, 0px, 0) rotate(10deg) scale(0.7);}
103
+    35% {opacity: 0.6; -webkit-transform: translate3d(100px, 0px, 0) rotate(30deg) scale(0.4);}
104
+    50% {opacity: 0.4; -webkit-transform: translate3d(0, 0, 0) rotate(360deg) scale(0);}
105
+    80% {opacity: 0.2; -webkit-transform: translate3d(0, 0, 0) rotate(720deg) scale(1);}
106
+    90% {opacity: 0.1; -webkit-transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);}
107
+    100% {opacity: 1; -webkit-transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);}
108
+}
109
+@keyframes site-zfj {
110
+    0% {opacity: 1;  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);}
111
+    10% {opacity: 0.8; transform: translate3d(-100px, 0px, 0) rotate(10deg) scale(0.7);}
112
+    35% {opacity: 0.6; transform: translate3d(100px, 0px, 0) rotate(30deg) scale(0.4);}
113
+    50% {opacity: 0.4; transform: translate3d(0, 0, 0) rotate(360deg) scale(0);}
114
+    80% {opacity: 0.2; transform: translate3d(0, 0, 0) rotate(720deg) scale(1);}
115
+    90% {opacity: 0.1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);}
116
+    100% {opacity: 1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);}
117
+}
118
+
119
+@-webkit-keyframes site-desc {
120
+    0% { -webkit-transform: scale(1.1);}
121
+    100% {opacity: 1; -webkit-transform: scale(1);}
122
+}
123
+@keyframes site-desc {
124
+    0% { transform: scale(1.1);}
125
+    100% {transform: scale(1);}
126
+}
127
+
128
+.site-zfj-anim i{-webkit-animation-name: site-zfj; animation-name: site-zfj; -webkit-animation-duration: 5s; animation-duration: 5s;  -webkit-animation-timing-function: linear; animation-timing-function: linear;}
129
+
130
+
131
+.site-desc{position: relative; height: 70px; margin-top: 25px;  background: url(../images/layui/desc.png) center no-repeat;}
132
+.site-desc-anim{-webkit-animation-name: site-desc; animation-name: site-desc;}
133
+
134
+.site-desc cite{position: absolute; bottom: -40px; left: 0; width: 100%; color: #c2c2c2; font-style: normal;}
135
+.site-download{margin-top: 80px; font-size: 0;}
136
+.site-download a{position: relative; padding: 0 45px 0 90px; height: 60px; line-height: 60px; border: 1px solid #c2c2c2;  border-color: rgba(255,255,255,.2); font-size: 24px; color: #ccc; transition: all .5s; -webkit-transition: all .5s;}
137
+.site-download a:hover{border-color: rgba(255,255,255,.3); color: #fff; background-color: rgba(255,255,255,.05); border-radius: 30px;}
138
+.site-download a cite{position: absolute; left: 45px; font-size: 30px;}
139
+.site-version{position: relative; margin-top: 15px; color: #ccc; font-size: 12px;}
140
+.site-version span{padding: 0 3px;}
141
+.site-version *{font-style: normal;}
142
+.site-version a{color: #e2e2e2; text-decoration: underline;}
143
+
144
+.site-banner-other{position: absolute; left: 0; bottom: 30px; width: 100%; text-align: center; font-size: 0;}
145
+.site-banner-other iframe{border: none;}
146
+.site-banner-other a{display: inline-block; line-height: 28px; margin: 0 5px; padding: 0 8px; border-radius: 2px; color: #c2c2c2; color: rgba(255,255,255,.8); border: 1px solid #c2c2c2; border-color: rgba(255,255,255,.2); font-size: 14px; transition: all .5s; -webkit-transition: all .5s;}
147
+.site-banner-other a:hover{color: #fff; background-color: rgba(255,255,255,.1);}
148
+
149
+
150
+.site-idea{margin: 50px 0; font-size: 0; text-align: center; font-weight: 300;}
151
+.site-idea li{display: inline-block; vertical-align: top; *display: inline; *zoom:1; font-size: 14px; }
152
+.site-idea li{width: 298px; height: 150px; padding: 30px; line-height: 24px; margin-left: 30px; border: 1px solid #d2d2d2; text-align: left;}
153
+.site-idea li:first-child{margin-left: 0}
154
+.site-idea .layui-field-title{border-color: #d2d2d2}
155
+.site-idea .layui-field-title legend{margin: 0 20px 20px 0; padding: 0 20px; text-align: center;}
156
+
157
+/* 璧炲姪鍟� */
158
+.site-sponsor-home{margin-top: 40px; text-align: center;}
159
+.site-sponsor-home .layui-btn{position: relative; width: 233px; height: 65px; line-height: 65px; background: none; border-color: #212121; font-size: 26px; border-radius: 6px; /*padding-left: 55px;*/}
160
+.site-sponsor-home .layui-btn:hover{background: #4A4855; color: #BAB8C3;}
161
+.site-sponsor-home .layui-btn:before{/*position: absolute; left: 15px; top: 15px; content: ''; width: 30px; height: 30px; background: url(http://cdn.layui.com/upload/2018_1/168_1514869467160_26113.png) center; background-repeat: no-repeat; background-size: contain;*/}
162
+.site-sponsor-home p{position: relative; padding-top: 15px; font-size: 22px; color: #212121;}
163
+.site-sponsor-home p:before{content: ''; position: relative; top: -2px; display: inline-block; vertical-align: middle; width: 30px; height: 30px; margin-right: 10px; background: url(http://cdn.layui.com/upload/2018_1/168_1514869467160_26113.png) center; background-repeat: no-repeat; background-size: contain;}
164
+@media screen and (max-width: 750px) {
165
+    .site-sponsor-home .layui-btn{width: 180px; height: 45px; line-height: 45px; font-size: 20px;}
166
+    .site-sponsor-home p{font-size: 16px;}
167
+    .site-sponsor-home p:before{width: 20px; height: 20px;}
168
+}
169
+
170
+
171
+
172
+/* 杈呭姪 */
173
+.site-tips{margin-bottom: 10px; padding: 15px; line-height: 22px; border-left: 5px solid #0078AD; background-color: #f2f2f2;}
174
+body .site-tips p{margin: 0;}
175
+body .layui-layer-notice .layui-layer-content{padding: 20px; line-height: 26px; background-color: #393D49; color: #fff; font-weight: 300;}
176
+.layui-layer-notice .layui-text{color: #f8f8f8;}
177
+.layui-layer-notice .layui-text a{color: #009688;}
178
+
179
+/* 鐩綍 */
180
+.site-dir{display: none;}
181
+.site-dir li{line-height: 26px; margin-left: 20px; overflow: visible; list-style-type: disc;}
182
+.site-dir li a{display: block;}
183
+.site-dir li a:active{color: #01AAED;}
184
+.site-dir li a.layui-this{color: #01AAED;}
185
+body .layui-layer-dir{box-shadow: none; border: 1px solid #d2d2d2;}
186
+body .layui-layer-dir .layui-layer-content{padding: 10px;}
187
+.site-dir a em{padding-left: 5px; font-size: 12px; color: #c2c2c2; font-style: normal;}
188
+
189
+/* 鏂囨。 */
190
+.site-tree{border-right: 1px solid #eee; }
191
+.site-tree .layui-tree{line-height: 32px;}
192
+.site-tree .layui-tree li i{position: relative; font-size: 22px; color: #000}
193
+.site-tree .layui-tree li a cite{padding: 0 8px;}
194
+.site-tree .layui-tree .site-tree-noicon a cite{padding-left: 15px;}
195
+.site-tree .layui-tree li a em{font-size: 12px; color: #bbb; padding-right: 5px; font-style: normal;}
196
+.site-tree .layui-tree li h2{line-height: 36px; border-left: 5px solid #009E94; margin: 15px 0 5px; padding: 0 10px; background-color: #f2f2f2;}
197
+.site-tree .layui-tree li ul{margin-left: 27px; line-height: 28px;}
198
+.site-tree .layui-tree li ul a,
199
+.site-tree .layui-tree li ul a i{color: #777;}
200
+.site-tree .layui-tree li ul a:hover{color: #333;}
201
+.site-tree .layui-tree li ul li{margin-left: 25px; overflow: visible; list-style-type: disc; /*list-style-position: inside;*/}
202
+.site-tree .layui-tree li ul li cite,
203
+.site-tree .layui-tree .site-tree-noicon ul li cite{padding-left: 0;}
204
+
205
+.site-tree .layui-tree .layui-this a{color: #01AAED;}
206
+.site-tree .layui-tree .layui-this .layui-icon{color: #01AAED;}
207
+
208
+.site-fix .site-tree{position: fixed; top: 0; bottom: 0; z-index: 666; min-height: 0; overflow: auto;  background-color: #fff;}
209
+.site-fix .site-content{margin-left: 220px;}
210
+.site-fix-footer .site-tree{/*margin-bottom: 120px;*/}
211
+
212
+
213
+.site-title{ margin: 30px 0 20px;}
214
+.site-title fieldset{border: none; padding: 0; border-top: 1px solid #eee;}
215
+.site-title fieldset legend{margin-left: 20px;  padding: 0 10px; font-size: 22px; font-weight: 300;}
216
+
217
+.site-text a{color: #01AAED;}
218
+.site-h1{margin-bottom: 20px; line-height: 60px; padding-bottom: 10px; color: #393D49; border-bottom: 1px solid #eee;  font-size: 28px; font-weight: 300;}
219
+.site-h1 .layui-icon{position: relative; top: 5px; font-size: 50px; margin-right: 10px;}
220
+.site-text{position:relative;}
221
+.site-text p{margin-bottom: 10px;  line-height:22px;}
222
+.site-text em{padding: 0 3px; font-weight: 500; font-style: italic; color: #666;}
223
+.site-text code{margin:0 5px; padding: 3px 10px; border: 1px solid #e2e2e2; background-color: #fbfbfb; color: #666; border-radius: 2px;}
224
+
225
+.site-table{width: 100%; margin: 10px 0;}
226
+.site-table thead{background-color:#f2f2f2; }
227
+.site-table th,
228
+.site-table td{padding: 6px 15px; min-height: 20px; line-height: 20px; border:1px solid #ddd; font-size: 14px; font-weight: 400;}
229
+.site-table tr:nth-child(even){background: #fbfbfb;}
230
+
231
+.site-block{padding: 20px; border: 1px solid #eee;}
232
+.site-block .layui-form{margin-right: 200px;}
233
+
234
+/* 鏇存柊鏃ュ織 */
235
+.site-changelog .layui-timeline-title h2{display: inline-block;}
236
+.site-changelog .layui-timeline-title .layui-badge-rim{top: -2px; left: 10px;}
237
+
238
+/* 棰滆壊 */
239
+.site-doc-color{font-size: 0;}
240
+.site-doc-color li{display: inline-block; vertical-align: middle; width: 180px; margin-left: 20px; margin-bottom: 20px; padding: 20px 10px; color: #fff; text-align: center; border-radius: 2px; line-height: 22px; font-size: 14px;}
241
+.site-doc-color li p[tips]{opacity: 0.8; font-size: 12px;}
242
+
243
+.site-doc-necolor li{width: 108px; margin-top: 15px; margin-left: 0; border-radius: 0;}
244
+
245
+.site-doc-bgcolor li{padding: 10px;}
246
+
247
+/* 瀹牸 */
248
+.site-doc-icon{margin-bottom: 50px; font-size: 0;}
249
+.site-doc-icon li{display: inline-block; vertical-align: middle; width: 127px; line-height: 25px; padding: 20px 0; margin-right: -1px; margin-bottom: -1px; border: 1px solid #e2e2e2; font-size: 14px; text-align: center; color: #666; transition: all .3s; -webkit-transition: all .3s;}
250
+.site-doc-icon li .layui-icon{display: inline-block; font-size: 36px;}
251
+
252
+.site-doc-icon li .fontclass{display: none;}
253
+.site-doc-icon li .name{color: #c2c2c2;}
254
+.site-doc-icon li:hover{background-color: #f2f2f2; color: #000;}
255
+
256
+/* 鏍呮牸绀轰緥 */
257
+.grid-demo{padding: 10px; line-height: 50px; text-align: center; background-color: #79C48C; color: #fff;}
258
+.grid-demo-bg1{background-color: #63BA79;}
259
+.grid-demo-bg2{background-color: #49A761;}
260
+.grid-demo-bg3{background-color: #38814A;}
261
+
262
+
263
+/* 婕旂ず */
264
+body .layui-layout-admin .site-demo{bottom: 60px; padding: 0;}
265
+body .site-demo-nav .layui-nav-item{line-height: 40px}
266
+.layui-nav-item .layui-icon{position: relative; font-size: 20px;}
267
+.layui-nav-item a cite{padding: 0 10px;}
268
+.site-demo .layui-main{margin: 15px; line-height: 22px;}
269
+.site-demo-editor{position: absolute; top: 0; bottom: 0; left: 0; width: 50%; }
270
+.site-demo-area{position: absolute; top: 0; bottom: 0; width: 100%;}
271
+.site-demo-editor textarea{position: absolute; width: 100%; height: 100%; padding: 10px; border: none; resize: none; background-color: #F7FBFF; background-color: #13151A; color: #999; font-family: Courier New; font-size: 12px; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;}
272
+.site-demo-btn{position: absolute; bottom: 15px; right: 20px;}
273
+.site-demo-zanzhu{position: absolute; bottom: 0; left: 0; width: 100%; height: 90px; text-align: center; background-color: #e2e2e2; overflow: hidden;}
274
+.site-demo-zanzhu>*{position: relative; z-index: 1;}
275
+.site-demo-zanzhu:before{content: ""; position: absolute; z-index: 0; top: 50%; left: 50%; width: 120px; margin: -10px 0px 0px -60px; text-align: center; color: rgb(170, 170, 170); font-size: 18px; font-weight: 300; }
276
+
277
+.site-demo-result{position: absolute; right: 0; top: 0; bottom: 0; width: 50%;}
278
+.site-demo-result iframe{position: absolute; width: 100%; height: 100%;}
279
+
280
+.site-demo-button{margin-bottom: 30px;}
281
+.site-demo-button div{margin: 20px 30px 10px;}
282
+.site-demo-button .layui-btn+.layui-btn{margin-left: 0;}
283
+.site-demo-button .layui-btn{margin: 0 7px 10px 0; }
284
+
285
+.site-demo-text a{color: #01AAED;}
286
+
287
+.site-demo-laytpl{text-align: center;}
288
+.site-demo-laytpl textarea,
289
+.site-demo-laytpl div span{width: 40%;  padding: 15px; margin: 0 15px;}
290
+.site-demo-laytpl textarea{height: 300px; border: none; background-color: #3F3F3F; color: #E3CEAB; font-family: Courier New; resize: none;}
291
+.site-demo-laytpl div span{display: inline-block; text-align: center; background: #101010; color: #fff;}
292
+.site-demo-tplres{margin: 10px 0; text-align: center}
293
+.site-demo-tplres .site-demo-tplh2,
294
+.site-demo-tplres .site-demo-tplview{display: inline-block; width: 50%;}
295
+.site-demo-tplres h2{padding: 15px; background: #e2e2e2;}
296
+.site-demo-tplres h3{font-weight: 700;}
297
+.site-demo-tplres div{padding: 14px; border: 1px solid #e2e2e2; text-align: left;}
298
+
299
+.site-demo-upload,
300
+.site-demo-upload img{width: 200px; height: 200px; border-radius: 100%;}
301
+.site-demo-upload{position: relative; background: #e2e2e2;}
302
+.site-demo-upload .site-demo-upbar{position: absolute; top: 50%; left: 50%; margin: -18px 0 0 -56px;}
303
+.site-demo-upload .layui-upload-button{background-color: rgba(0,0,0,.2); color: rgba(255,255,255,1);}
304
+
305
+.site-demo-util{position: relative; width: 300px;}
306
+.site-demo-util img{width: 300px; border-radius: 100%;}
307
+.site-demo-util span{position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #333; cursor: pointer;}
308
+@-webkit-keyframes demo-fengjie {
309
+    0% {-webkit-filter: blur(0); opacity: 1; background: #fff; height: 300px; border-radius: 100%;}
310
+    80% {-webkit-filter: blur(50px);  opacity: 0.95;}
311
+    100% {-webkit-filter: blur(20px); opacity: 0; background: #fff;}
312
+}
313
+@keyframes demo-fengjie {
314
+    0% {filter: blur(0); opacity: 1; background: #fff; height: 300px; border-radius: 100%;}
315
+    80% {filter: blur(50px);  opacity: 0.95;}
316
+    100% {filter: blur(20px); opacity: 0; background: #fff;}
317
+}
318
+.site-demo-fengjie{-webkit-animation-name: demo-fengjie; animation-name: demo-fengjie; -webkit-animation-duration: 5s; animation-duration: 5s;}
319
+
320
+.layui-layout-admin .site-demo-body{top: 106px;}
321
+.site-demo-title{position: fixed; left: 200px; right: 0; top: 65px;}
322
+.site-demo-code{position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: none; padding: 10px; resize: none; font-size: 12px; background-color: #F7FBFF; color: #881280; font-family: Courier New;}
323
+
324
+.site-demo-overflow{overflow: hidden;}
325
+
326
+/* 鍏跺畠 */
327
+#trans-tooltip,
328
+#tip-arrow-bottom,
329
+#tip-arrow-top{display: none !important;}
330
+
331
+
332
+/* 鐙珛缁勪欢 涓� 涓婚〉 */
333
+.alone{text-align: center; background-color: #009688; color: #fff; font-weight: 300; transition: all .3s; -webkit-transition: all .3s;}
334
+.alone:hover{background-color: #5FB878;}
335
+.alone a{display: block; padding: 50px 20px; color: #fff; font-size: 30px;}
336
+.alone a cite{display: block; padding-top: 10px; font-size: 14px;}
337
+
338
+
339
+.alone-banner{height: 190px; text-align: center; font-weight: 300; background-color: #009688; color:#fff;}
340
+.alone-banner h1{padding-top: 60px; line-height: 32px; font-size: 30px; font-weight: 300;}
341
+.alone-banner p{padding-top: 20px; color: #e2e2e2; color: rgba(255,255,255,.8);}
342
+
343
+.alone-nav .layui-tab-title li{margin-right: 30px; padding: 0; color: #666;}
344
+.alone-nav .layui-tab-title li a{  padding: 0 20px;}
345
+
346
+.alone-download{margin: 30px 0;}
347
+.alone-download .layui-btn{margin-right: 10px;}
348
+.alone-download span{display: inline-block; line-height: 44px; padding-right: 20px;}
349
+.alone-download span em{color: #999;}
350
+
351
+.alone-title{margin-top: 20px;}
352
+
353
+.alone-download-btn{text-align: center; margin-top: 50px; font-size: 0;}
354
+.alone-download-btn .layui-btn{position: relative; width: 206px; height: 60px; line-height: 60px; font-size: 26px; font-weight: 300;}
355
+.alone-download-btn .layui-btn+.layui-btn{margin: 0;}
356
+.alone-download-btn .alone-download-right{margin-left: 20px !important; border-color: #009688; background: none; color: #009688;}
357
+.alone-download-btn .layui-btn img{position: relative; top: -3px; width: 118px;}
358
+
359
+
360
+
361
+/* 閫傞厤澶氳澶� */
362
+@media screen and (max-width: 750px) {
363
+    .layui-main{width: auto; margin: 0 10px;}
364
+    .logo,
365
+    .header-demo .logo{left: 10px;}
366
+    .component{display: none}
367
+
368
+    .header .layui-nav-child{left: auto; right: 0;}
369
+    .site-demo-overflow{overflow: auto;}
370
+
371
+    .site-nav-layim{display: none !important;}
372
+    .header .layui-nav .layui-nav-item{margin: 0;}
373
+    .header .layui-nav .layui-nav-item a{padding: 0 20px;}
374
+    .header .layui-nav .layui-nav-item[pc]{display: none;}
375
+    .header .layui-nav .layui-nav-item[mobile]{display: inline-block;}
376
+    .site-banner{height: 300px;}
377
+    .site-banner-bg{background-size: cover;}
378
+    .site-zfj{height: 100px; padding-top: 5px;}
379
+    .site-zfj i{top: 10px; width: 100px; height: 100px; margin-left: -50px; font-size: 100px;}
380
+    .site-desc{background-size: 70%; margin: 0;}
381
+    .site-desc cite{display: none;}
382
+    .site-download{margin-top: 0; }
383
+    .site-download a{height: 40px; line-height: 40px; padding: 0 25px 0 60px; border-radius: 30px; color: #fff; font-size: 16px;}
384
+    .site-download a cite{left: 20px;}
385
+    .site-banner-other{bottom: 10px;}
386
+
387
+    .site-idea{margin: 20px 0;}
388
+    .site-idea li{margin: 0 0 20px 0; width: 100%; height: auto; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;}
389
+    .site-hengfu img{max-width: 100%}
390
+
391
+    .site-block .layui-form{margin-right: 0;}
392
+
393
+    .layui-layer-dir{display: none;}
394
+    .site-tree{position: fixed; top: 0; bottom: 0; min-height: 0; overflow: auto; z-index: 1000; left: -260px; background-color: #fff;  transition: all .3s; -webkit-transition: all .3s;}
395
+    .site-content{width: 100%; padding: 0; overflow: auto;}
396
+    .site-content img{max-width: 100%;}
397
+    .site-tree-mobile{display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width: 50px; height: 50px; line-height: 50px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;}
398
+    .site-home .site-tree-mobile{display: none!important;}
399
+    .site-mobile .site-tree-mobile{display: none !important;}
400
+    .site-mobile .site-tree{left: 0;}
401
+    .site-mobile .site-mobile-shade{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 999;}
402
+    .site-tree-mobile i{font-size: 20px;}
403
+    .layui-code-view{-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
404
+
405
+    .layui-layout-admin .layui-side{position: fixed; top: 0; left: -260px; transition: all .3s; -webkit-transition: all .3s; z-index: 10000;}
406
+    .layui-body{position: static; bottom: 0; left: 0;}
407
+    .site-mobile .layui-side{left: 0;}
408
+    .site-mobile .layui-side-child{top: 50%; left: 200px; height: 300px; margin-top: -100px;}
409
+
410
+    body .layui-layout-admin .footer-demo{position: static; height: auto; line-height: 30px;}
411
+    .footer-demo p{height: auto;}
412
+
413
+    .site-demo-area,
414
+    .site-demo-editor,
415
+    .site-demo-result,
416
+    .site-demo-editor textarea,
417
+    .site-demo-result iframe{position: static; width: 100%;}
418
+    .site-demo-editor textarea{height: 350px;}
419
+    .site-demo-zanzhu{display: none;}
420
+    .site-demo-btn{bottom: auto; top: 370px;}
421
+    .site-demo-result iframe{height: 500px;}
422
+
423
+    .site-demo-laytpl textarea, .site-demo-laytpl div span{margin: 0;}
424
+    .site-demo-tplres .site-demo-tplh2, .site-demo-tplres .site-demo-tplview{width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;}
425
+
426
+    .site-demo-title{position: static; left: 0;}
427
+    body .layui-layout-admin .site-demo{}
428
+    .site-demo-code{position: static; height: 350px;}
429
+}
430
+
431
+

+ 171 - 0
src/main/resources/static/css/public.css

@@ -0,0 +1,171 @@
1
+/*公共样式*/
2
+.childrenBody{ padding:10px;}
3
+.layui-table-view{ margin:0 !important;}
4
+.magb0{margin-bottom:0 !important;}
5
+.magt0{ margin-top:0 !important;}
6
+.magt3{ margin-top:3px !important;}
7
+.magt10{ margin-top:10px !important;}
8
+.magb15{ margin-bottom:15px !important;}
9
+.magt30{ margin-top:30px !important;}
10
+.layui-left{text-align:left;}
11
+.layui-block{ width:100% !important;}
12
+.layui-center{text-align:center;}
13
+.layui-right{text-align:right;}
14
+.layui-elem-quote.title{ padding:10px 15px; margin-bottom:0;}
15
+.layui-bg-white{ background-color:#fff !important;}
16
+.border{ border:1px solid #e6e6e6 !important; padding:10px; border-top:none;}
17
+.main_btn .layui-btn{ margin:2px 5px 2px 0;}
18
+.layui-timeline-axis{ left:-4px;}
19
+.layui-elem-quote{ word-break: break-all;}
20
+.icons li,.icons li:hover,.loginBody .seraph,.loginBody .seraph:hover,.loginBody .layui-form-item.layui-input-focus label,.loginBody .layui-form-item label,.loginBody .layui-form-item.layui-input-focus input,.loginBody .layui-form-item input{transition: all 0.3s ease-in-out;-webkit-transition: all 0.3s ease-in-out;}
21
+.icons li:hover i,.icons li i{transition: font-size 0.3s ease-in-out;-webkit-transition: font-size 0.3s ease-in-out;}
22
+.loginBody .layui-input-focus .layui-input::-webkit-input-placeholder{transition: color 0.2s linear 0.2s;-webkit-transition: color 0.2s linear 0.2s;}
23
+.loginBody .layui-input-focus .layui-input::-moz-placeholder{transition: color 0.2s linear 0.2s;}
24
+.loginBody .layui-input-focus .layui-input:-ms-input-placeholder{transition: color 0.2s linear 0.2s;}
25
+.loginBody .layui-input-focus .layui-input::placeholder{transition: color 0.2s linear 0.2s;-webkit-transition: color 0.2s linear 0.2s;}
26
+/*后台首页*/
27
+.panel_box{ margin-bottom:5px;}
28
+.panel{ text-align:center; height:90px;}
29
+.panel_box a{display:block; border-radius:5px; overflow:hidden; height:80px; background-color:#f2f2f2 !important; }
30
+.panel_icon{ width:40%; display: inline-block; line-height:80px; float:left; position:relative; height:100%;}
31
+.panel_icon i{ font-size:40px !important; color:#fff; display: inline-block;}
32
+.panel_word{ width:60%; display: inline-block; float:right; margin:13px 0 14px; }
33
+.panel_word span{ font-size:25px; display:block; height:34px; }
34
+.panel .loginTime{ font-size:15px; color:#1E9FFF; line-height:17px;}
35
+.panel em{ font-style:normal;}
36
+.history_box{ min-height:500px; height:500px; overflow-y:scroll; padding:10px !important;}
37
+.history_box .layui-timeline .layui-timeline-item:last-child{ padding-bottom:0;}
38
+@media screen and (max-width:1200px) {
39
+    .history_box { height: auto !important; overflow-y: inherit; }
40
+}
41
+/*修改密码*/
42
+.pwdTips{ min-height:auto; margin:40px 0 15px 110px;}
43
+/*个人资料*/
44
+form input.layui-input[disabled]{ background:#f2f2f2; color:#595963!important; }
45
+.user_right{ text-align: center; }
46
+.user_right p{ margin:10px 0 25px; font-size: 12px; text-align: center; color: #FF5722;}
47
+.user_right img#userFace{ width:200px; height:200px; margin-top:20px; cursor:pointer; box-shadow:0 0 50px #44576b; }
48
+.userAddress.layui-form-item .layui-input-inline{ width:23%; }
49
+.userAddress.layui-form-item .layui-input-inline:last-child{ margin-right:0; }
50
+/*下拉多选*/
51
+.layui-form-item select[multiple]+.layui-form-select dd{ padding:0;}
52
+.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary]{ margin:0 !important; display:block; line-height:36px !important; position:relative; padding-left:26px;}
53
+.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary] span{line-height:36px !important; float:none;}
54
+.layui-form-item select[multiple]+.layui-form-select .layui-form-checkbox[lay-skin=primary] i{ position:absolute; left:10px; top:0; margin-top:9px;}
55
+.multiSelect{ line-height:normal; height:auto; padding:4px 10px; overflow:hidden;min-height:38px; margin-top:-38px; left:0; z-index:99;position:relative;background:none;}
56
+.multiSelect a{ padding:2px 5px; background:#908e8e; border-radius:2px; color:#fff; display:block; line-height:20px; height:20px; margin:2px 5px 2px 0; float:left;}
57
+.multiSelect a span{ float:left;}
58
+.multiSelect a i{ float:left; display:block; margin:2px 0 0 2px; border-radius:2px; width:8px; height:8px; background:url(../images/close.png) no-repeat center; background-size:65%; padding:4px;}
59
+.multiSelect a i:hover{ background-color:#545556;}
60
+/*404页面*/
61
+.noFind{ text-align:center; padding-top:2%;}
62
+.noFind i{ line-height:1em; font-size:12em !important; color: #393D50; display:block;}
63
+.ufo{ text-align:center; height:100%; position:relative;}
64
+.noFind .page_icon,.noFind .ufo_icon{ opacity:1; position:absolute; left:50%; transform:translateX(-50%); -ms-transform:translateX(-50%); -moz-transform:translateX(-50%); -webkit-transform:translateX(-50%); -o-transform:translateX(-50%);}
65
+.noFind .page_icon{ top:300px; animation:pageGo 0.3s ease-in 0.3s forwards; -webkit-animation:pageGo 0.3s ease-in 0.3s forwards; -o-animation:pageGo 0.3s ease-in 0.3s forwards; -moz-animation:pageGo 0.3s ease-in 0.3s forwards;}
66
+.noFind .ufo_icon{ top:100px; animation:ufo 1s ease-in 0.6s forwards; -webkit-animation:ufo 1s ease-in 0.6s forwards; -o-animation:ufo 1s ease-in 0.6s forwards; -moz-animation:ufo 1s ease-in 0.6s forwards;}
67
+.page404{ margin-top:10%; opacity:0; font-size:0; animation:page404 0.5s ease-in 1.7s forwards; -webkit-animation:page404 0.5s ease-in 1.7s forwards; -o-animation:page404 0.5s ease-in 1.7s forwards; -moz-animation:page404 0.5s ease-in 1.7s forwards;}
68
+.page404 p{ font-size: 20px; font-weight: 300; color: #999;}
69
+/*页面被吸走*/
70
+@keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top: 100px;}}
71
+@-moz-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}}
72
+@-webkit-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}}
73
+@-o-keyframes pageGo{from{font-size: 12em; top:300px;} to{font-size:0; opacity:0; top:100px}}
74
+/*ufo飞走*/
75
+@keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
76
+@-moz-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em;  top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
77
+@-webkit-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em;  top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
78
+@-o-keyframes ufo{0%{font-size: 14em; top:100px;} 20%{font-size: 12em; top:50px;} 100%{font-size:0; opacity:0; top:-100px; left:80%;}}
79
+/*404显示*/
80
+@keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
81
+@-moz-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
82
+@-webkit-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
83
+@-o-keyframes page404{from{opacity:0; font-size:2em;} to{opacity:1;font-size:2em;}}
84
+/*图标管理*/
85
+.iconsLength{ margin:0 5px;}
86
+.icons li{  margin:5px 0; text-align:center; height:120px; cursor:pointer;}
87
+.icons li i{ display:block; font-size:35px; margin:10px 0; line-height:60px; height:60px;}
88
+.icons li:hover{ background:rgba(13,10,49,.9); border-radius:5px; color:#fff;}
89
+.icons li:hover i{ font-size:50px;}
90
+#copyText{ width:0;height:0; opacity:0; position:absolute; left:-9999px; top:-9999px;}
91
+/*开发文档*/
92
+h2.method{ font-size:18px; line-height:45px; padding-left:5px;}
93
+/*登录*/
94
+.loginHtml,.loginBody{ height:100%;}
95
+.loginBody{ background:url("../images/login_bg.jpg") no-repeat center center;}
96
+.loginBody form.layui-form{ padding:0 20px; width:300px; height:335px; position:absolute; left:50%; top:50%; margin:-150px 0 0 -150px; -webkit-box-sizing:border-box;-moz-box-sizing:border-box; -o-box-sizing:border-box; box-sizing:border-box; background:#fff;-webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; box-shadow:0 0 50px #009688;}
97
+.login_face{ margin:-55px auto 20px; width:100px; height:100px; -webkit-border-radius:50%; -moz-border-radius:50%; border-radius:50%; border:5px solid #fff; overflow:hidden;box-shadow:0 0 30px #009688;}
98
+.login_face img{ width:100%;}
99
+.loginBody .layui-form-item{ position:relative;}
100
+.loginBody .layui-form-item label{ position:absolute; color:#757575; left:10px; top:9px; line-height:20px; background:#fff; padding:0 5px; font-size:14px; cursor:text;}
101
+.loginBody .layui-form-item.layui-input-focus label{ top:-10px; font-size:12px; color:#ff6700;}
102
+.loginBody .layui-form-item.layui-input-active label{ top:-10px; font-size:12px;}
103
+.loginBody .layui-input::-webkit-input-placeholder{color:#fff;}
104
+.loginBody .layui-input::-moz-placeholder{color:#fff;}
105
+.loginBody .layui-input:-ms-input-placeholder{color:#fff;}
106
+.loginBody .layui-input::placeholder{color:#fff;}
107
+.loginBody .layui-form-item.layui-input-focus input{ border-color:#ff6700 !important;}
108
+.loginBody .layui-input-focus .layui-input::-webkit-input-placeholder{color:#757575;}
109
+.loginBody .layui-input-focus .layui-input::-moz-placeholder{color:#757575;}
110
+.loginBody .layui-input-focus .layui-input:-ms-input-placeholder{color:#757575;}
111
+.loginBody .layui-input-focus .layui-input::placeholder{color:#757575;}
112
+.loginBody .seraph{ font-size:30px; text-align:center;}
113
+.loginBody .seraph.icon-qq:hover{ color:#0288d1;}
114
+.loginBody .seraph.icon-wechat:hover{ color:#00d20d;}
115
+.loginBody .seraph.icon-sina:hover{ color:#d32f2f;}
116
+.imgCode{ position:relative;}
117
+#imgCode img{ position:absolute; top:1px; right:1px; cursor:pointer;}
118
+/*用户等级*/
119
+.layui-table-view .layui-table span.seraph{ font-size:25px !important;}
120
+.vip1{ color:#994a2b;}
121
+.vip2{ color:#899396;}
122
+.vip3{ color:#bd6a08;}
123
+.vip4{ color:#a3b8c4;}
124
+.vip5{ color:#63c3ea;}
125
+.vip6{ color:#b563ed;}
126
+.vip7{ color:#ff9831;}
127
+.vip8{ color:#A757A8;}
128
+.vip9{ color:#0ff;}
129
+.vip10{ color:#f00;}
130
+/*新闻添加*/
131
+.layui-elem-quote .layui-inline{ margin:3px 0;}
132
+.category .layui-form-checkbox{ margin:5px 0;}
133
+.border .layui-form-item{ margin-bottom:10px;}
134
+.border .layui-form-label{ width:50px;}
135
+.border .layui-form-label i{ position:absolute; top:10px; left:3px;}
136
+.border .layui-input-block{ margin-left:80px;}
137
+.thumbBox{ height:151px; overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; position:relative; text-align:center; line-height:153px;}
138
+.thumbImg{ max-width:100%; max-height:100%; border:none;}
139
+.thumbBox:after{ position:absolute; width:100%; height:100%;line-height:153px; z-index:-1; text-align:center; font-size:20px; content:"缩略图"; left:0; top:0; color:#9F9F9F;}
140
+/*图片管理*/
141
+#Images li{ width:19%; margin:0.5% 0.5%; float: left; overflow:hidden;}
142
+#Images li img{ width:100%; cursor:pointer; }
143
+#Images li .operate{ display: block; height: 40px; width:100%; background:#f4f5f9; }
144
+#Images li .operate .check{ float:left; margin-left:11px; height:18px; padding:11px 0; width:74%; position:relative;}
145
+#Images li .operate .check .layui-form-checkbox[lay-skin=primary]{ width:100%;}
146
+#Images li .operate .check .layui-form-checkbox[lay-skin=primary] span{ padding:0 5px 0 25px; width:100%; box-sizing:border-box;}
147
+#Images li .operate .check .layui-form-checkbox[lay-skin=primary] i{position:absolute; left:0; top:0;}
148
+#Images li .operate .img_del{ float:right; margin:9px 11px 0 0; font-size: 22px !important; cursor:pointer; }
149
+#Images li .operate .img_del:hover{ color:#f00; }
150
+@media screen and (max-width:1050px){#Images li{ width:24%;}}
151
+@media screen and (max-width: 750px){#Images li{ width:49%;}}
152
+@media screen and (max-width:432px){#Images li{ width:99%;}}
153
+/*系统日志*/
154
+.layui-btn-green{ background-color:#5FB878 !important;}
155
+/*友情链接*/
156
+.linkLogo{ width:80px; height:40px; overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; margin:0 auto; position:relative; text-align:center; line-height:42px;}
157
+.linkLogoImg{ max-width:90%; max-height:90%;}
158
+.linkLogo:after{ position:absolute; width:100%; height:100%;line-height:42px; z-index:-1; text-align:center; font-size:12px; content:"上传LOGO"; left:0; top:0; color:#9F9F9F;}
159
+.linksAdd .layui-form-label{ width:60px; padding-left:0;}
160
+.linksAdd .layui-input-block{ margin-left:75px;}
161
+.linksAdd .layui-input-block input{ padding:0 5px;}
162
+/*响应式*/
163
+@media screen and (max-width:450px) {
164
+    #userFaceBtn{ height: 30px;line-height: 30px; padding: 0 10px; font-size: 12px;}
165
+    .user_right img#userFace{ width:100px; height:100px; margin-top:0;}
166
+    .layui-col-xs12 .layui-form-label{ width:60px; padding-left:0;}
167
+    .layui-col-xs12 .layui-input-block,.layui-col-xs12 .layui-input-inline{ margin-left:75px;}
168
+    .layui-col-xs12 .layui-input-inline{ left:0 !important; width:auto !important;}
169
+    .noFind{ padding-top:0;}
170
+    *[pc]{ display:none;}
171
+}

+ 386 - 0
src/main/resources/static/css/ztree/awesomeStyle/awesome.css

@@ -0,0 +1,386 @@
1
+/*-------------------------------------
2
+zTree Style using fontawesome instead of images
3
+
4
+version:    1.1
5
+author:     Mike King
6
+email:      mikkelking @ hotmail . com
7
+website:    http://code.google.com/p/jquerytree/
8
+
9
+-------------------------------------*/
10
+/* Definitions ----------------------*/
11
+/* End of Definitions ---------------*/
12
+/* Imports  -------------------------*/
13
+/* End of Imports  ------------------*/
14
+.ztree * {
15
+  padding: 0;
16
+  margin: 0;
17
+  font-size: 12px;
18
+  font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif;
19
+  background-color: #af0000;
20
+}
21
+.ztree {
22
+  margin: 0;
23
+  padding: 5px;
24
+  color: #ffffff;
25
+  background-color: #af0000;
26
+}
27
+.ztree li {
28
+  padding: 0;
29
+  margin: 0;
30
+  list-style: none;
31
+  line-height: 17px;
32
+  text-align: left;
33
+  white-space: nowrap;
34
+  outline: 0;
35
+}
36
+.ztree li ul {
37
+  margin: 0px;
38
+  padding: 0 0 0 18px;
39
+}
40
+.ztree li a {
41
+  padding-right: 3px;
42
+  margin: 0;
43
+  cursor: pointer;
44
+  height: 17px;
45
+  color: #ffffff;
46
+  background-color: transparent;
47
+  text-decoration: none;
48
+  vertical-align: top;
49
+  display: inline-block;
50
+}
51
+.ztree li a input.rename {
52
+  height: 14px;
53
+  width: 80px;
54
+  padding: 0;
55
+  margin: 0;
56
+  color: #af0000;
57
+  background-color: #ffffff;
58
+  font-size: 12px;
59
+  border: 1px #585956 solid;
60
+  *border: 0px;
61
+}
62
+.ztree li a:hover {
63
+  text-decoration: underline;
64
+}
65
+.ztree li a.curSelectedNode {
66
+  padding-top: 0px;
67
+  background-color: #af4040;
68
+  color: #ffff00;
69
+  height: 17px;
70
+  opacity: 0.8;
71
+}
72
+.ztree li a.curSelectedNode_Edit {
73
+  padding-top: 0px;
74
+  background-color: transparent;
75
+  color: #ffff00;
76
+  height: 17px;
77
+  border: 1px #666 solid;
78
+  opacity: 0.8;
79
+}
80
+.ztree li a.tmpTargetNode_inner {
81
+  padding-top: 0px;
82
+  background-color: #aaa;
83
+  color: #ffff00;
84
+  height: 17px;
85
+  border: 1px #666 solid;
86
+  opacity: 0.8;
87
+  filter: alpha(opacity=80);
88
+}
89
+.ztree li span {
90
+  line-height: 17px;
91
+  margin-right: 2px;
92
+  background-color: transparent;
93
+}
94
+.ztree li span.button {
95
+  line-height: 0;
96
+  margin: 0;
97
+  padding: 0;
98
+  width: 15px;
99
+  height: 17px;
100
+  display: inline-block;
101
+  vertical-align: top;
102
+  border: 0px solid;
103
+  cursor: pointer;
104
+  outline: none;
105
+  background-color: transparent;
106
+  background-repeat: no-repeat;
107
+  background-attachment: scroll;
108
+}
109
+.ztree li span.button::before {
110
+  color: #ffffff;
111
+  font-family: FontAwesome;
112
+  padding-top: 10px;
113
+}
114
+.ztree li span.button.chk {
115
+  margin: 0px;
116
+  cursor: auto;
117
+  width: 12px;
118
+  display: inline-block;
119
+  padding-top: 10px;
120
+  padding-left: 2px;
121
+}
122
+.ztree li span.button.chk.checkbox_false_full::before {
123
+  content: "\f096";
124
+}
125
+.ztree li span.button.chk.checkbox_false_full_focus::before {
126
+  content: "\f096";
127
+  color: #ffff00;
128
+}
129
+.ztree li span.button.chk.checkbox_false_part::before {
130
+  content: "\f096";
131
+  color: #aaaaaa;
132
+}
133
+.ztree li span.button.chk.checkbox_false_part_focus::before {
134
+  content: "\f096";
135
+  color: #cad96c;
136
+}
137
+.ztree li span.button.chk.checkbox_false_disable::before {
138
+  content: "\f096";
139
+  color: #808080;
140
+}
141
+.ztree li span.button.chk.checkbox_true_full::before {
142
+  content: "\f046";
143
+}
144
+.ztree li span.button.chk.checkbox_true_full_focus::before {
145
+  content: "\f046";
146
+}
147
+.ztree li span.button.chk.checkbox_true_part::before {
148
+  content: "\f14a";
149
+}
150
+.ztree li span.button.chk.checkbox_true_part_focus::before {
151
+  content: "\f14a";
152
+  color: #ffff00;
153
+}
154
+.ztree li span.button.chk.checkbox_true_full_focus::before {
155
+  content: "\f046";
156
+  color: #ffff00;
157
+}
158
+.ztree li span.button.chk.checkbox_true_part::before {
159
+  content: "\f046";
160
+  color: #aaaaaa;
161
+}
162
+.ztree li span.button.chk.checkbox_true_part_focus::before {
163
+  content: "\f046";
164
+  color: #cad96c;
165
+}
166
+.ztree li span.button.chk.checkbox_true_disable::before {
167
+  content: "\f046";
168
+  color: #808080;
169
+}
170
+.ztree li span.button.chk.radio_false_full::before {
171
+  content: "\f10c";
172
+}
173
+.ztree li span.button.chk.radio_false_full_focus::before {
174
+  content: "\f10c";
175
+  color: #ffff00;
176
+}
177
+.ztree li span.button.chk.radio_false_part::before {
178
+  content: "\f10c";
179
+  color: #aaaaaa;
180
+}
181
+.ztree li span.button.chk.radio_false_part_focus::before {
182
+  content: "\f10c";
183
+  color: #ffff00;
184
+}
185
+.ztree li span.button.chk.radio_false_disable::before {
186
+  content: "\f1db";
187
+  color: #808080;
188
+}
189
+.ztree li span.button.chk.radio_true_full::before {
190
+  content: "\f192";
191
+}
192
+.ztree li span.button.chk.radio_true_full_focus::before {
193
+  content: "\f192";
194
+  color: #ffff00;
195
+}
196
+.ztree li span.button.chk.radio_true_part::before {
197
+  content: "\f192";
198
+  color: #aaaaaa;
199
+}
200
+.ztree li span.button.chk.radio_true_part_focus::before {
201
+  content: "\f192";
202
+  color: #aaaaaa;
203
+}
204
+.ztree li span.button.chk.radio_true_disable::before {
205
+  content: "\f1db";
206
+  color: #808080;
207
+}
208
+.ztree li span.button.switch {
209
+  width: 15px;
210
+  height: 17px;
211
+}
212
+.ztree li span.button.root_open::before {
213
+  content: "\f078";
214
+  padding-top: 10px;
215
+  padding-left: 2px;
216
+  display: inline-block;
217
+}
218
+.ztree li span.button.root_close::before {
219
+  content: "\f115";
220
+  padding-top: 10px;
221
+  padding-left: 2px;
222
+  display: inline-block;
223
+}
224
+.ztree li span.button.roots_open::before {
225
+  content: "\f078";
226
+  padding-top: 10px;
227
+  padding-left: 2px;
228
+  display: inline-block;
229
+}
230
+.ztree li span.button.roots_close::before {
231
+  content: "\f054";
232
+  padding-top: 10px;
233
+  padding-left: 2px;
234
+  display: inline-block;
235
+}
236
+.ztree li span.button.center_open::before {
237
+  content: "\f078";
238
+  padding-top: 10px;
239
+  padding-left: 2px;
240
+  display: inline-block;
241
+}
242
+.ztree li span.button.center_close::before {
243
+  content: "\f054";
244
+  padding-top: 10px;
245
+  padding-left: 2px;
246
+  display: inline-block;
247
+}
248
+.ztree li span.button.bottom_open::before {
249
+  content: "\f078";
250
+  padding-top: 10px;
251
+  padding-left: 2px;
252
+  display: inline-block;
253
+}
254
+.ztree li span.button.bottom_close::before {
255
+  content: "\f054";
256
+  padding-top: 10px;
257
+  padding-left: 2px;
258
+  display: inline-block;
259
+}
260
+.ztree li span.button.root_docu {
261
+  background: none;
262
+}
263
+.ztree li span.button.roots_docu::before {
264
+  content: "\f022";
265
+  padding-left: 2px;
266
+  display: inline-block;
267
+  color: #ffffff;
268
+}
269
+.ztree li span.button.center_docu::before {
270
+  padding-top: 10px;
271
+  padding-left: 2px;
272
+  display: inline-block;
273
+  color: #ffffff;
274
+}
275
+.ztree li span.button.bottom_docu::before {
276
+  padding-top: 10px;
277
+  padding-left: 2px;
278
+  display: inline-block;
279
+  color: #ffffff;
280
+}
281
+.ztree li span.button.noline_docu {
282
+  background: none;
283
+}
284
+.ztree li span.button.ico_open::before {
285
+  content: "\f115";
286
+  font-family: FontAwesome;
287
+  padding-top: 10px;
288
+  padding-left: 2px;
289
+  display: inline-block;
290
+  color: #ffffff;
291
+}
292
+.ztree li span.button.ico_close::before {
293
+  content: "\f114";
294
+  font-family: FontAwesome;
295
+  padding-top: 10px;
296
+  padding-left: 2px;
297
+  display: inline-block;
298
+  color: #ffffff;
299
+}
300
+.ztree li span.button.ico_docu::before {
301
+  content: "\f022";
302
+  font-family: FontAwesome;
303
+  padding-top: 10px;
304
+  padding-left: 2px;
305
+  display: inline-block;
306
+  color: #ffffff;
307
+}
308
+.ztree li span.button.edit {
309
+  margin-left: 4px;
310
+  margin-right: -1px;
311
+  vertical-align: top;
312
+  *vertical-align: middle;
313
+  padding-top: 10px;
314
+}
315
+.ztree li span.button.edit::before {
316
+  content: "\f044";
317
+  font-family: FontAwesome;
318
+}
319
+.ztree li span.button.remove {
320
+  margin-left: 4px;
321
+  margin-right: -1px;
322
+  vertical-align: top;
323
+  *vertical-align: middle;
324
+  padding-top: 10px;
325
+}
326
+.ztree li span.button.remove::before {
327
+  content: "\f1f8";
328
+  font-family: FontAwesome;
329
+}
330
+.ztree li span.button.add {
331
+  margin-left: 4px;
332
+  margin-right: -1px;
333
+  vertical-align: top;
334
+  *vertical-align: middle;
335
+  padding-top: 10px;
336
+}
337
+.ztree li span.button.add::before {
338
+  content: "\f067";
339
+  font-family: FontAwesome;
340
+}
341
+.ztree li span.button.ico_loading {
342
+  margin-right: 2px;
343
+  background: url(./img/loading.gif) no-repeat scroll 0 0 transparent;
344
+  vertical-align: top;
345
+  *vertical-align: middle;
346
+}
347
+ul.tmpTargetzTree {
348
+  background-color: #FFE6B0;
349
+  opacity: 0.8;
350
+  filter: alpha(opacity=80);
351
+}
352
+span.tmpzTreeMove_arrow {
353
+  width: 16px;
354
+  height: 17px;
355
+  display: inline-block;
356
+  padding: 0;
357
+  margin: 2px 0 0 1px;
358
+  border: 0 none;
359
+  position: absolute;
360
+  background-color: transparent;
361
+  background-attachment: scroll;
362
+}
363
+span.tmpzTreeMove_arrow::before {
364
+  content: "\f04b";
365
+  font-family: FontAwesome;
366
+  color: #ffff00;
367
+}
368
+ul.ztree.zTreeDragUL {
369
+  margin: 0;
370
+  padding: 0;
371
+  position: absolute;
372
+  width: auto;
373
+  height: auto;
374
+  overflow: hidden;
375
+  background-color: #cfcfcf;
376
+  border: 1px #ffff00 dotted;
377
+  opacity: 0.8;
378
+  filter: alpha(opacity=80);
379
+}
380
+.ztreeMask {
381
+  z-index: 10000;
382
+  background-color: #cfcfcf;
383
+  opacity: 0.0;
384
+  filter: alpha(opacity=0);
385
+  position: absolute;
386
+}

+ 146 - 0
src/main/resources/static/css/ztree/awesomeStyle/awesome.less

@@ -0,0 +1,146 @@
1
+/*-------------------------------------
2
+zTree Style using fontawesome instead of images
3
+
4
+version:    1.1
5
+author:     Mike King
6
+email:      mikkelking @ hotmail . com
7
+website:    http://code.google.com/p/jquerytree/
8
+
9
+-------------------------------------*/
10
+
11
+/* Definitions ----------------------*/
12
+@font-size: 12px;
13
+// Regular icon and text color is white, which suits any medium -> dark background 
14
+@color-normal: white;
15
+// Background color
16
+@color-bg: #af0000;
17
+// Highlight color
18
+@color-highlight: yellow;
19
+// Partially selected (checkboxes, radio buttons)
20
+@color-partial: #aaaaaa;
21
+// Partially selected and focused (checkboxes, radio buttons)
22
+@color-partfocus: #cad96c;
23
+// Disabled altogether
24
+@color-disabled: #808080;
25
+// Editing color
26
+@color-edit: yellow;
27
+@w: 15px;
28
+@h: 17px;
29
+@pad-left: 2px;
30
+@pad-top: 10px;
31
+/* End of Definitions ---------------*/
32
+
33
+/* Imports  -------------------------*/
34
+@import "fa.less";
35
+/* End of Imports  ------------------*/
36
+
37
+.ztree * {padding:0; margin:0; font-size:@font-size; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif; background-color: @color-bg;}
38
+.ztree {
39
+    margin:0; padding:5px; color:@color-normal; background-color: @color-bg;
40
+    li {
41
+        padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0;
42
+        ul { 
43
+            margin: 0px; padding:0 0 0 18px;
44
+        }
45
+        ul.line { }
46
+        a {padding-right:3px; margin:0; cursor:pointer; height:@h; color:@color-normal; background-color: transparent; 
47
+            text-decoration:none; vertical-align:top; display: inline-block;
48
+            input.rename {height:14px; width:80px; padding:0; margin:0;
49
+                          color: @color-bg; background-color: @color-normal;
50
+                        font-size:@font-size; border:1px #585956 solid; *border:0px}
51
+        }
52
+        a:hover {text-decoration:underline}
53
+        a.curSelectedNode {padding-top:0px; background-color:#af4040; color:@color-highlight; height:@h; opacity:0.8;}
54
+        a.curSelectedNode_Edit {padding-top:0px; background-color:transparent; color:@color-highlight; height:@h; border:1px #666 solid; opacity:0.8;}
55
+        a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:@color-highlight; height:@h; border:1px #666 solid;
56
+          opacity:0.8; filter:alpha(opacity=80)}
57
+        a.tmpTargetNode_prev {}
58
+        a.tmpTargetNode_next {}
59
+        span {line-height:@h; margin-right:2px; background-color:transparent;}
60
+        span.button {line-height:0; margin:0; padding: 0; width:@w; height:@h; display: inline-block; vertical-align:top;
61
+          border:0px solid; cursor: pointer;outline:none;
62
+          background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
63
+ 
64
+            &::before{color: @color-normal; font-family: FontAwesome; padding-top:@pad-top;}
65
+            &.chk { margin:0px; cursor: auto; width: 12px;
66
+                display: inline-block;padding-top:@pad-top;padding-left:@pad-left;
67
+                
68
+                &.checkbox_false_full::before {content: @fa-square-o;}
69
+                &.checkbox_false_full_focus::before {content: @fa-square-o; color:@color-highlight;}
70
+                &.checkbox_false_part::before {content: @fa-square-o;color: @color-partial;}
71
+                &.checkbox_false_part_focus::before {content: @fa-square-o; color:@color-partfocus;}
72
+                &.checkbox_false_disable::before {content: @fa-square-o; color:@color-disabled;}
73
+                &.checkbox_true_full::before {content: @fa-check-square-o;}
74
+                &.checkbox_true_full_focus::before {content: @fa-check-square-o;}
75
+                &.checkbox_true_part::before {content: @fa-check-square;}
76
+                &.checkbox_true_part_focus::before {content: @fa-check-square; color: @color-highlight}
77
+                &.checkbox_true_full_focus::before {content: @fa-check-square-o; color: @color-highlight}
78
+                &.checkbox_true_part::before {content: @fa-check-square-o;color: @color-partial}
79
+                &.checkbox_true_part_focus::before {content: @fa-check-square-o;color: @color-partfocus;}
80
+                &.checkbox_true_disable::before {content: @fa-check-square-o;color: @color-disabled}
81
+                 
82
+                &.radio_false_full::before {content: @fa-circle-o;}
83
+                &.radio_false_full_focus::before {content: @fa-circle-o;color: @color-highlight}
84
+                &.radio_false_part::before {content: @fa-circle-o;color: @color-partial}
85
+                &.radio_false_part_focus::before {content: @fa-circle-o;color: @color-highlight}
86
+                &.radio_false_disable::before {content: @fa-circle-thin;color: @color-disabled}
87
+                &.radio_true_full::before {content: @fa-dot-circle-o;}
88
+                &.radio_true_full_focus::before {content: @fa-dot-circle-o;color: @color-highlight}
89
+                &.radio_true_part::before {content: @fa-dot-circle-o;color: @color-partial}
90
+                &.radio_true_part_focus::before {content: @fa-dot-circle-o;color: @color-partial;}
91
+                &.radio_true_disable::before {content: @fa-circle-thin;color: @color-disabled}
92
+                
93
+            }
94
+            &.switch  {width:@w; height:@h}
95
+            &.root_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
96
+            &.root_close::before{content: @fa-folder-open-o;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
97
+            &.roots_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
98
+            &.roots_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
99
+            &.center_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
100
+            &.center_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
101
+            &.bottom_open::before{content: @fa-chevron-down;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}
102
+            &.bottom_close::before{content: @fa-chevron-right;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;}  
103
+            &.noline_open{}
104
+            &.noline_close{}
105
+            &.root_docu{ background:none;}
106
+            &.roots_docu::before{content: @fa-list-alt;padding-left:@pad-left;display: inline-block;color:@color-normal;}
107
+            &.center_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;}
108
+            &.bottom_docu::before{padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;}
109
+            &.noline_docu{ background:none;}
110
+    
111
+            &.ico_open::before {content: @fa-folder-open-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;}
112
+            &.ico_close::before {content: @fa-folder-o;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;}
113
+            &.ico_docu::before{content: @fa-list-alt;font-family: FontAwesome;padding-top:@pad-top;padding-left:@pad-left;display: inline-block;color:@color-normal;}
114
+            
115
+            &.edit {margin-left:4px; margin-right: -1px;  vertical-align:top; *vertical-align:middle;padding-top:@pad-top;}
116
+            &.edit::before{content: @fa-pencil-square-o;font-family: FontAwesome;}
117
+    
118
+            &.remove {margin-left:4px; margin-right: -1px;  vertical-align:top; *vertical-align:middle;padding-top:@pad-top;}
119
+            &.remove::before{content: @fa-trash;font-family: FontAwesome;}
120
+
121
+    
122
+            &.add {margin-left:4px; margin-right: -1px; vertical-align:top; *vertical-align:middle;padding-top:@pad-top;}
123
+            &.add::before{content: @fa-plus;font-family: FontAwesome;}
124
+
125
+            &.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
126
+        }
127
+
128
+    }
129
+}
130
+
131
+
132
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
133
+
134
+// this is the arrow that moves 
135
+span.tmpzTreeMove_arrow{width:16px; height:@h; display: inline-block; 
136
+                                padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
137
+                                background-color:transparent;  background-attachment: scroll;
138
+                                 }
139
+span.tmpzTreeMove_arrow::before{content: @fa-play;font-family: FontAwesome;color: @color-highlight;
140
+                                 }
141
+// outline
142
+
143
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; 
144
+             background-color:#cfcfcf; border:1px @color-highlight dotted; opacity:0.8; filter:alpha(opacity=80)}
145
+.ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
146
+

+ 480 - 0
src/main/resources/static/css/ztree/awesomeStyle/fa.less

@@ -0,0 +1,480 @@
1
+@fa-glass: "\f000";
2
+@fa-music: "\f001";
3
+@fa-search: "\f002";
4
+@fa-envelope-o: "\f003";
5
+@fa-heart: "\f004";
6
+@fa-star: "\f005";
7
+@fa-star-o: "\f006";
8
+@fa-user: "\f007";
9
+@fa-film: "\f008";
10
+@fa-th-large: "\f009";
11
+@fa-th: "\f00a";
12
+@fa-th-list: "\f00b";
13
+@fa-check: "\f00c";
14
+@fa-times: "\f00d";
15
+@fa-search-plus: "\f00e";
16
+@fa-search-minus: "\f010";
17
+@fa-power-off: "\f011";
18
+@fa-signal: "\f012";
19
+@fa-cog: "\f013";
20
+@fa-trash-o: "\f014";
21
+@fa-home: "\f015";
22
+@fa-file-o: "\f016";
23
+@fa-clock-o: "\f017";
24
+@fa-road: "\f018";
25
+@fa-download: "\f019";
26
+@fa-arrow-circle-o-down: "\f01a";
27
+@fa-arrow-circle-o-up: "\f01b";
28
+@fa-inbox: "\f01c";
29
+@fa-play-circle-o: "\f01d";
30
+@fa-repeat: "\f01e";
31
+@fa-refresh: "\f021";
32
+@fa-list-alt: "\f022";
33
+@fa-lock: "\f023";
34
+@fa-flag: "\f024";
35
+@fa-headphones: "\f025";
36
+@fa-volume-off: "\f026";
37
+@fa-volume-down: "\f027";
38
+@fa-volume-up: "\f028";
39
+@fa-qrcode: "\f029";
40
+@fa-barcode: "\f02a";
41
+@fa-tag: "\f02b";
42
+@fa-tags: "\f02c";
43
+@fa-book: "\f02d";
44
+@fa-bookmark: "\f02e";
45
+@fa-print: "\f02f";
46
+@fa-camera: "\f030";
47
+@fa-font: "\f031";
48
+@fa-bold: "\f032";
49
+@fa-italic: "\f033";
50
+@fa-text-height: "\f034";
51
+@fa-text-width: "\f035";
52
+@fa-align-left: "\f036";
53
+@fa-align-center: "\f037";
54
+@fa-align-right: "\f038";
55
+@fa-align-justify: "\f039";
56
+@fa-list: "\f03a";
57
+@fa-outdent: "\f03b";
58
+@fa-indent: "\f03c";
59
+@fa-video-camera: "\f03d";
60
+@fa-picture-o: "\f03e";
61
+@fa-pencil: "\f040";
62
+@fa-map-marker: "\f041";
63
+@fa-adjust: "\f042";
64
+@fa-tint: "\f043";
65
+@fa-pencil-square-o: "\f044";
66
+@fa-share-square-o: "\f045";
67
+@fa-check-square-o: "\f046";
68
+@fa-arrows: "\f047";
69
+@fa-step-backward: "\f048";
70
+@fa-fast-backward: "\f049";
71
+@fa-backward: "\f04a";
72
+@fa-play: "\f04b";
73
+@fa-pause: "\f04c";
74
+@fa-stop: "\f04d";
75
+@fa-forward: "\f04e";
76
+@fa-fast-forward: "\f050";
77
+@fa-step-forward: "\f051";
78
+@fa-eject: "\f052";
79
+@fa-chevron-left: "\f053";
80
+@fa-chevron-right: "\f054";
81
+@fa-plus-circle: "\f055";
82
+@fa-minus-circle: "\f056";
83
+@fa-times-circle: "\f057";
84
+@fa-check-circle: "\f058";
85
+@fa-question-circle: "\f059";
86
+@fa-info-circle: "\f05a";
87
+@fa-crosshairs: "\f05b";
88
+@fa-times-circle-o: "\f05c";
89
+@fa-check-circle-o: "\f05d";
90
+@fa-ban: "\f05e";
91
+@fa-arrow-left: "\f060";
92
+@fa-arrow-right: "\f061";
93
+@fa-arrow-up: "\f062";
94
+@fa-arrow-down: "\f063";
95
+@fa-share: "\f064";
96
+@fa-expand: "\f065";
97
+@fa-compress: "\f066";
98
+@fa-plus: "\f067";
99
+@fa-minus: "\f068";
100
+@fa-asterisk: "\f069";
101
+@fa-exclamation-circle: "\f06a";
102
+@fa-gift: "\f06b";
103
+@fa-leaf: "\f06c";
104
+@fa-fire: "\f06d";
105
+@fa-eye: "\f06e";
106
+@fa-eye-slash: "\f070";
107
+@fa-exclamation-triangle: "\f071";
108
+@fa-plane: "\f072";
109
+@fa-calendar: "\f073";
110
+@fa-random: "\f074";
111
+@fa-comment: "\f075";
112
+@fa-magnet: "\f076";
113
+@fa-chevron-up: "\f077";
114
+@fa-chevron-down: "\f078";
115
+@fa-retweet: "\f079";
116
+@fa-shopping-cart: "\f07a";
117
+@fa-folder: "\f07b";
118
+@fa-folder-open: "\f07c";
119
+@fa-arrows-v: "\f07d";
120
+@fa-arrows-h: "\f07e";
121
+@fa-bar-chart: "\f080";
122
+@fa-twitter-square: "\f081";
123
+@fa-facebook-square: "\f082";
124
+@fa-camera-retro: "\f083";
125
+@fa-key: "\f084";
126
+@fa-cogs: "\f085";
127
+@fa-comments: "\f086";
128
+@fa-thumbs-o-up: "\f087";
129
+@fa-thumbs-o-down: "\f088";
130
+@fa-star-half: "\f089";
131
+@fa-heart-o: "\f08a";
132
+@fa-sign-out: "\f08b";
133
+@fa-linkedin-square: "\f08c";
134
+@fa-thumb-tack: "\f08d";
135
+@fa-external-link: "\f08e";
136
+@fa-sign-in: "\f090";
137
+@fa-trophy: "\f091";
138
+@fa-github-square: "\f092";
139
+@fa-upload: "\f093";
140
+@fa-lemon-o: "\f094";
141
+@fa-phone: "\f095";
142
+@fa-square-o: "\f096";
143
+@fa-bookmark-o: "\f097";
144
+@fa-phone-square: "\f098";
145
+@fa-twitter: "\f099";
146
+@fa-facebook: "\f09a";
147
+@fa-github: "\f09b";
148
+@fa-unlock: "\f09c";
149
+@fa-credit-card: "\f09d";
150
+@fa-rss: "\f09e";
151
+@fa-hdd-o: "\f0a0";
152
+@fa-bullhorn: "\f0a1";
153
+@fa-bell: "\f0f3";
154
+@fa-certificate: "\f0a3";
155
+@fa-hand-o-right: "\f0a4";
156
+@fa-hand-o-left: "\f0a5";
157
+@fa-hand-o-up: "\f0a6";
158
+@fa-hand-o-down: "\f0a7";
159
+@fa-arrow-circle-left: "\f0a8";
160
+@fa-arrow-circle-right: "\f0a9";
161
+@fa-arrow-circle-up: "\f0aa";
162
+@fa-arrow-circle-down: "\f0ab";
163
+@fa-globe: "\f0ac";
164
+@fa-wrench: "\f0ad";
165
+@fa-tasks: "\f0ae";
166
+@fa-filter: "\f0b0";
167
+@fa-briefcase: "\f0b1";
168
+@fa-arrows-alt: "\f0b2";
169
+@fa-users: "\f0c0";
170
+@fa-link: "\f0c1";
171
+@fa-cloud: "\f0c2";
172
+@fa-flask: "\f0c3";
173
+@fa-scissors: "\f0c4";
174
+@fa-files-o: "\f0c5";
175
+@fa-paperclip: "\f0c6";
176
+@fa-floppy-o: "\f0c7";
177
+@fa-square: "\f0c8";
178
+@fa-bars: "\f0c9";
179
+@fa-list-ul: "\f0ca";
180
+@fa-list-ol: "\f0cb";
181
+@fa-strikethrough: "\f0cc";
182
+@fa-underline: "\f0cd";
183
+@fa-table: "\f0ce";
184
+@fa-magic: "\f0d0";
185
+@fa-truck: "\f0d1";
186
+@fa-pinterest: "\f0d2";
187
+@fa-pinterest-square: "\f0d3";
188
+@fa-google-plus-square: "\f0d4";
189
+@fa-google-plus: "\f0d5";
190
+@fa-money: "\f0d6";
191
+@fa-caret-down: "\f0d7";
192
+@fa-caret-up: "\f0d8";
193
+@fa-caret-left: "\f0d9";
194
+@fa-caret-right: "\f0da";
195
+@fa-columns: "\f0db";
196
+@fa-sort: "\f0dc";
197
+@fa-sort-desc: "\f0dd";
198
+@fa-sort-asc: "\f0de";
199
+@fa-envelope: "\f0e0";
200
+@fa-linkedin: "\f0e1";
201
+@fa-undo: "\f0e2";
202
+@fa-gavel: "\f0e3";
203
+@fa-tachometer: "\f0e4";
204
+@fa-comment-o: "\f0e5";
205
+@fa-comments-o: "\f0e6";
206
+@fa-bolt: "\f0e7";
207
+@fa-sitemap: "\f0e8";
208
+@fa-umbrella: "\f0e9";
209
+@fa-clipboard: "\f0ea";
210
+@fa-lightbulb-o: "\f0eb";
211
+@fa-exchange: "\f0ec";
212
+@fa-cloud-download: "\f0ed";
213
+@fa-cloud-upload: "\f0ee";
214
+@fa-user-md: "\f0f0";
215
+@fa-stethoscope: "\f0f1";
216
+@fa-suitcase: "\f0f2";
217
+@fa-bell-o: "\f0a2";
218
+@fa-coffee: "\f0f4";
219
+@fa-cutlery: "\f0f5";
220
+@fa-file-text-o: "\f0f6";
221
+@fa-building-o: "\f0f7";
222
+@fa-hospital-o: "\f0f8";
223
+@fa-ambulance: "\f0f9";
224
+@fa-medkit: "\f0fa";
225
+@fa-fighter-jet: "\f0fb";
226
+@fa-beer: "\f0fc";
227
+@fa-h-square: "\f0fd";
228
+@fa-plus-square: "\f0fe";
229
+@fa-angle-double-left: "\f100";
230
+@fa-angle-double-right: "\f101";
231
+@fa-angle-double-up: "\f102";
232
+@fa-angle-double-down: "\f103";
233
+@fa-angle-left: "\f104";
234
+@fa-angle-right: "\f105";
235
+@fa-angle-up: "\f106";
236
+@fa-angle-down: "\f107";
237
+@fa-desktop: "\f108";
238
+@fa-laptop: "\f109";
239
+@fa-tablet: "\f10a";
240
+@fa-mobile: "\f10b";
241
+@fa-circle-o: "\f10c";
242
+@fa-quote-left: "\f10d";
243
+@fa-quote-right: "\f10e";
244
+@fa-spinner: "\f110";
245
+@fa-circle: "\f111";
246
+@fa-reply: "\f112";
247
+@fa-github-alt: "\f113";
248
+@fa-folder-o: "\f114";
249
+@fa-folder-open-o: "\f115";
250
+@fa-smile-o: "\f118";
251
+@fa-frown-o: "\f119";
252
+@fa-meh-o: "\f11a";
253
+@fa-gamepad: "\f11b";
254
+@fa-keyboard-o: "\f11c";
255
+@fa-flag-o: "\f11d";
256
+@fa-flag-checkered: "\f11e";
257
+@fa-terminal: "\f120";
258
+@fa-code: "\f121";
259
+@fa-reply-all: "\f122";
260
+@fa-star-half-o: "\f123";
261
+@fa-location-arrow: "\f124";
262
+@fa-crop: "\f125";
263
+@fa-code-fork: "\f126";
264
+@fa-chain-broken: "\f127";
265
+@fa-question: "\f128";
266
+@fa-info: "\f129";
267
+@fa-exclamation: "\f12a";
268
+@fa-superscript: "\f12b";
269
+@fa-subscript: "\f12c";
270
+@fa-eraser: "\f12d";
271
+@fa-puzzle-piece: "\f12e";
272
+@fa-microphone: "\f130";
273
+@fa-microphone-slash: "\f131";
274
+@fa-shield: "\f132";
275
+@fa-calendar-o: "\f133";
276
+@fa-fire-extinguisher: "\f134";
277
+@fa-rocket: "\f135";
278
+@fa-maxcdn: "\f136";
279
+@fa-chevron-circle-left: "\f137";
280
+@fa-chevron-circle-right: "\f138";
281
+@fa-chevron-circle-up: "\f139";
282
+@fa-chevron-circle-down: "\f13a";
283
+@fa-html5: "\f13b";
284
+@fa-css3: "\f13c";
285
+@fa-anchor: "\f13d";
286
+@fa-unlock-alt: "\f13e";
287
+@fa-bullseye: "\f140";
288
+@fa-ellipsis-h: "\f141";
289
+@fa-ellipsis-v: "\f142";
290
+@fa-rss-square: "\f143";
291
+@fa-play-circle: "\f144";
292
+@fa-ticket: "\f145";
293
+@fa-minus-square: "\f146";
294
+@fa-minus-square-o: "\f147";
295
+@fa-level-up: "\f148";
296
+@fa-level-down: "\f149";
297
+@fa-check-square: "\f14a";
298
+@fa-pencil-square: "\f14b";
299
+@fa-external-link-square: "\f14c";
300
+@fa-share-square: "\f14d";
301
+@fa-compass: "\f14e";
302
+@fa-caret-square-o-down: "\f150";
303
+@fa-caret-square-o-up: "\f151";
304
+@fa-caret-square-o-right: "\f152";
305
+@fa-eur: "\f153";
306
+@fa-gbp: "\f154";
307
+@fa-usd: "\f155";
308
+@fa-inr: "\f156";
309
+@fa-jpy: "\f157";
310
+@fa-rub: "\f158";
311
+@fa-krw: "\f159";
312
+@fa-btc: "\f15a";
313
+@fa-file: "\f15b";
314
+@fa-file-text: "\f15c";
315
+@fa-sort-alpha-asc: "\f15d";
316
+@fa-sort-alpha-desc: "\f15e";
317
+@fa-sort-amount-asc: "\f160";
318
+@fa-sort-amount-desc: "\f161";
319
+@fa-sort-numeric-asc: "\f162";
320
+@fa-sort-numeric-desc: "\f163";
321
+@fa-thumbs-up: "\f164";
322
+@fa-thumbs-down: "\f165";
323
+@fa-youtube-square: "\f166";
324
+@fa-youtube: "\f167";
325
+@fa-xing: "\f168";
326
+@fa-xing-square: "\f169";
327
+@fa-youtube-play: "\f16a";
328
+@fa-dropbox: "\f16b";
329
+@fa-stack-overflow: "\f16c";
330
+@fa-instagram: "\f16d";
331
+@fa-flickr: "\f16e";
332
+@fa-adn: "\f170";
333
+@fa-bitbucket: "\f171";
334
+@fa-bitbucket-square: "\f172";
335
+@fa-tumblr: "\f173";
336
+@fa-tumblr-square: "\f174";
337
+@fa-long-arrow-down: "\f175";
338
+@fa-long-arrow-up: "\f176";
339
+@fa-long-arrow-left: "\f177";
340
+@fa-long-arrow-right: "\f178";
341
+@fa-apple: "\f179";
342
+@fa-windows: "\f17a";
343
+@fa-android: "\f17b";
344
+@fa-linux: "\f17c";
345
+@fa-dribbble: "\f17d";
346
+@fa-skype: "\f17e";
347
+@fa-foursquare: "\f180";
348
+@fa-trello: "\f181";
349
+@fa-female: "\f182";
350
+@fa-male: "\f183";
351
+@fa-gittip: "\f184";
352
+@fa-sun-o: "\f185";
353
+@fa-moon-o: "\f186";
354
+@fa-archive: "\f187";
355
+@fa-bug: "\f188";
356
+@fa-vk: "\f189";
357
+@fa-weibo: "\f18a";
358
+@fa-renren: "\f18b";
359
+@fa-pagelines: "\f18c";
360
+@fa-stack-exchange: "\f18d";
361
+@fa-arrow-circle-o-right: "\f18e";
362
+@fa-arrow-circle-o-left: "\f190";
363
+@fa-caret-square-o-left: "\f191";
364
+@fa-dot-circle-o: "\f192";
365
+@fa-wheelchair: "\f193";
366
+@fa-vimeo-square: "\f194";
367
+@fa-try: "\f195";
368
+@fa-plus-square-o: "\f196";
369
+@fa-space-shuttle: "\f197";
370
+@fa-slack: "\f198";
371
+@fa-envelope-square: "\f199";
372
+@fa-wordpress: "\f19a";
373
+@fa-openid: "\f19b";
374
+@fa-university: "\f19c";
375
+@fa-graduation-cap: "\f19d";
376
+@fa-yahoo: "\f19e";
377
+@fa-google: "\f1a0";
378
+@fa-reddit: "\f1a1";
379
+@fa-reddit-square: "\f1a2";
380
+@fa-stumbleupon-circle: "\f1a3";
381
+@fa-stumbleupon: "\f1a4";
382
+@fa-delicious: "\f1a5";
383
+@fa-digg: "\f1a6";
384
+@fa-pied-piper: "\f1a7";
385
+@fa-pied-piper-alt: "\f1a8";
386
+@fa-drupal: "\f1a9";
387
+@fa-joomla: "\f1aa";
388
+@fa-language: "\f1ab";
389
+@fa-fax: "\f1ac";
390
+@fa-building: "\f1ad";
391
+@fa-child: "\f1ae";
392
+@fa-paw: "\f1b0";
393
+@fa-spoon: "\f1b1";
394
+@fa-cube: "\f1b2";
395
+@fa-cubes: "\f1b3";
396
+@fa-behance: "\f1b4";
397
+@fa-behance-square: "\f1b5";
398
+@fa-steam: "\f1b6";
399
+@fa-steam-square: "\f1b7";
400
+@fa-recycle: "\f1b8";
401
+@fa-car: "\f1b9";
402
+@fa-taxi: "\f1ba";
403
+@fa-tree: "\f1bb";
404
+@fa-spotify: "\f1bc";
405
+@fa-deviantart: "\f1bd";
406
+@fa-soundcloud: "\f1be";
407
+@fa-database: "\f1c0";
408
+@fa-file-pdf-o: "\f1c1";
409
+@fa-file-word-o: "\f1c2";
410
+@fa-file-excel-o: "\f1c3";
411
+@fa-file-powerpoint-o: "\f1c4";
412
+@fa-file-image-o: "\f1c5";
413
+@fa-file-archive-o: "\f1c6";
414
+@fa-file-audio-o: "\f1c7";
415
+@fa-file-video-o: "\f1c8";
416
+@fa-file-code-o: "\f1c9";
417
+@fa-vine: "\f1ca";
418
+@fa-codepen: "\f1cb";
419
+@fa-jsfiddle: "\f1cc";
420
+@fa-life-ring: "\f1cd";
421
+@fa-circle-o-notch: "\f1ce";
422
+@fa-rebel: "\f1d0";
423
+@fa-empire: "\f1d1";
424
+@fa-git-square: "\f1d2";
425
+@fa-git: "\f1d3";
426
+@fa-hacker-news: "\f1d4";
427
+@fa-tencent-weibo: "\f1d5";
428
+@fa-qq: "\f1d6";
429
+@fa-weixin: "\f1d7";
430
+@fa-paper-plane: "\f1d8";
431
+@fa-paper-plane-o: "\f1d9";
432
+@fa-history: "\f1da";
433
+@fa-circle-thin: "\f1db";
434
+@fa-header: "\f1dc";
435
+@fa-paragraph: "\f1dd";
436
+@fa-sliders: "\f1de";
437
+@fa-share-alt: "\f1e0";
438
+@fa-share-alt-square: "\f1e1";
439
+@fa-bomb: "\f1e2";
440
+@fa-futbol-o: "\f1e3";
441
+@fa-tty: "\f1e4";
442
+@fa-binoculars: "\f1e5";
443
+@fa-plug: "\f1e6";
444
+@fa-slideshare: "\f1e7";
445
+@fa-twitch: "\f1e8";
446
+@fa-yelp: "\f1e9";
447
+@fa-newspaper-o: "\f1ea";
448
+@fa-wifi: "\f1eb";
449
+@fa-calculator: "\f1ec";
450
+@fa-paypal: "\f1ed";
451
+@fa-google-wallet: "\f1ee";
452
+@fa-cc-visa: "\f1f0";
453
+@fa-cc-mastercard: "\f1f1";
454
+@fa-cc-discover: "\f1f2";
455
+@fa-cc-amex: "\f1f3";
456
+@fa-cc-paypal: "\f1f4";
457
+@fa-cc-stripe: "\f1f5";
458
+@fa-bell-slash: "\f1f6";
459
+@fa-bell-slash-o: "\f1f7";
460
+@fa-trash: "\f1f8";
461
+@fa-copyright: "\f1f9";
462
+@fa-at: "\f1fa";
463
+@fa-eyedropper: "\f1fb";
464
+@fa-paint-brush: "\f1fc";
465
+@fa-birthday-cake: "\f1fd";
466
+@fa-area-chart: "\f1fe";
467
+@fa-pie-chart: "\f200";
468
+@fa-line-chart: "\f201";
469
+@fa-lastfm: "\f202";
470
+@fa-lastfm-square: "\f203";
471
+@fa-toggle-off: "\f204";
472
+@fa-toggle-on: "\f205";
473
+@fa-bicycle: "\f206";
474
+@fa-bus: "\f207";
475
+@fa-ioxhost: "\f208";
476
+@fa-angellist: "\f209";
477
+@fa-cc: "\f20a";
478
+@fa-ils: "\f20b";
479
+@fa-meanpath: "\f20c";
480
+

BIN=BIN
src/main/resources/static/css/ztree/awesomeStyle/img/loading.gif


+ 33 - 0
src/main/resources/static/css/ztree/demo.css

@@ -0,0 +1,33 @@
1
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
2
+	margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
3
+body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
4
+h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
5
+h1 {font-size: 24px;line-height: 34px;text-align: center;}
6
+h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
7
+h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;}
8
+a {color:#3C6E31;text-decoration: underline;}
9
+a:hover {background-color:#3C6E31;color:white;}
10
+input.radio {margin: 0 2px 0 8px;}
11
+input.radio.first {margin-left:0;}
12
+input.empty {color: lightgray;}
13
+code {color: #2f332a;}
14
+.highlight_red {color:#A60000;}
15
+.highlight_green {color:#A7F43D;}
16
+li {list-style: circle;font-size: 12px;}
17
+li.title {list-style: none;}
18
+ul.list {margin-left: 17px;}
19
+
20
+div.content_wrap {width: 600px;height:380px;}
21
+div.content_wrap div.left{float: left;width: 250px;}
22
+div.content_wrap div.right{float: right;width: 340px;}
23
+div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
24
+
25
+ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
26
+ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
27
+ul.log.small {height:45px;}
28
+ul.log li {color: #666666;list-style: none;padding-left: 10px;}
29
+ul.log li.dark {background-color: #E3E3E3;}
30
+
31
+/* ruler */
32
+div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
33
+div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}

BIN=BIN
src/main/resources/static/css/ztree/metroStyle/img/line_conn.png


BIN=BIN
src/main/resources/static/css/ztree/metroStyle/img/loading.gif


BIN=BIN
src/main/resources/static/css/ztree/metroStyle/img/metro.gif


BIN=BIN
src/main/resources/static/css/ztree/metroStyle/img/metro.png


+ 96 - 0
src/main/resources/static/css/ztree/metroStyle/metroStyle.css

@@ -0,0 +1,96 @@
1
+/*-------------------------------------
2
+zTree Style
3
+
4
+version:    3.4
5
+author:     Hunter.z
6
+email:      hunter.z@263.net
7
+website:    http://code.google.com/p/jquerytree/
8
+
9
+-------------------------------------*/
10
+
11
+.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
12
+.ztree {margin:0; padding:5px; color:#333}
13
+.ztree li{padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0}
14
+.ztree li ul{ margin:0; padding:0 0 0 18px}
15
+.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;}
16
+
17
+.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block}
18
+.ztree li a:hover {text-decoration:underline}
19
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;}
20
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;}
21
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid;
22
+  opacity:0.8; filter:alpha(opacity=80)}
23
+.ztree li a.tmpTargetNode_prev {}
24
+.ztree li a.tmpTargetNode_next {}
25
+.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
26
+  font-size:12px; border:1px #585956 solid; *border:0px}
27
+.ztree li span {line-height:21px; margin-right:2px}
28
+.ztree li span.button {line-height:0; margin:0; padding: 0; width:21px; height:21px; display: inline-block; vertical-align:middle;
29
+  border:0 none; cursor: pointer;outline:none;
30
+  background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
31
+  background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
32
+
33
+.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto}
34
+.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;}
35
+.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;}
36
+.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;}
37
+.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;}
38
+.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;}
39
+.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;}
40
+.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;}
41
+.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;}
42
+.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;}
43
+.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;}
44
+.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;}
45
+.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;}
46
+.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;}
47
+.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;}
48
+.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;}
49
+.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;}
50
+.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;}
51
+.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;}
52
+.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;}
53
+.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;}
54
+
55
+.ztree li span.button.switch {width:21px; height:21px}
56
+.ztree li span.button.root_open{background-position:-105px -63px}
57
+.ztree li span.button.root_close{background-position:-126px -63px}
58
+.ztree li span.button.roots_open{background-position: -105px 0;}
59
+.ztree li span.button.roots_close{background-position: -126px 0;}
60
+.ztree li span.button.center_open{background-position: -105px -21px;}
61
+.ztree li span.button.center_close{background-position: -126px -21px;}
62
+.ztree li span.button.bottom_open{background-position: -105px -42px;}
63
+.ztree li span.button.bottom_close{background-position: -126px -42px;}
64
+.ztree li span.button.noline_open{background-position: -105px -84px;}
65
+.ztree li span.button.noline_close{background-position: -126px -84px;}
66
+.ztree li span.button.root_docu{ background:none;}
67
+.ztree li span.button.roots_docu{background-position: -84px 0;}
68
+.ztree li span.button.center_docu{background-position: -84px -21px;}
69
+.ztree li span.button.bottom_docu{background-position: -84px -42px;}
70
+.ztree li span.button.noline_docu{ background:none;}
71
+
72
+.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle}
73
+.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle}
74
+.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle}
75
+.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle}
76
+.ztree li span.button.edit:hover {
77
+  background-position: -168px -21px;
78
+}
79
+.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle}
80
+.ztree li span.button.remove:hover {
81
+  background-position: -168px -42px;
82
+}
83
+.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle}
84
+.ztree li span.button.add:hover {
85
+  background-position: -168px 0;
86
+}
87
+.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
88
+
89
+ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
90
+
91
+span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
92
+    background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
93
+    background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")}
94
+
95
+ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
96
+.ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}

BIN=BIN
src/main/resources/static/css/ztree/zTreeStyle/img/diy/1_close.png


+ 0 - 0
src/main/resources/static/css/ztree/zTreeStyle/img/diy/1_open.png


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio