diff --git a/gradle/gradle.properties b/gradle/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..e0864ab94940070b1a3d0d7b3fa3a9cbc7a58428 --- /dev/null +++ b/gradle/gradle.properties @@ -0,0 +1,6 @@ +org.gradle.parallel=true +org.gradle.daemon=true +org.gradle.configureondemand=true +org.gradle.caching=true +org.gradle.jvmargs=-Xmx2048M +org.gradle.encoding=UTF-8 \ No newline at end of file diff --git a/gradle/java-spring-01/build.gradle b/gradle/java-spring-01/build.gradle index 668688f792c56b697630711f98b6672dbc3ddc08..a405dc48b219c6bd6c1c2222bf7420b05f2946b0 100644 --- a/gradle/java-spring-01/build.gradle +++ b/gradle/java-spring-01/build.gradle @@ -29,6 +29,7 @@ repositories { } dependencies { + implementation 'cn.afterturn:easypoi-spring-boot-starter:4.2.0' implementation 'com.github.xiaoymin:knife4j-spring-boot-starter:2.0.5' implementation("org.minbox.framework:api-boot-starter-rate-limiter") implementation("org.minbox.framework:api-boot-starter-quartz") diff --git a/gradle/java-spring-01/src/main/java/com/example/javaspring01/auths/package-info.java b/gradle/java-spring-01/src/main/java/com/example/javaspring01/auths/package-info.java deleted file mode 100644 index c705ef220137f66d84b556e6e99e5c517692fb40..0000000000000000000000000000000000000000 --- a/gradle/java-spring-01/src/main/java/com/example/javaspring01/auths/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.example.javaspring01.auths; \ No newline at end of file diff --git a/gradle/java-spring-01/src/main/java/com/example/javaspring01/base/package-info.java b/gradle/java-spring-01/src/main/java/com/example/javaspring01/base/package-info.java deleted file mode 100644 index 747559cf0e14b8664e5807927a3690392af4b3b7..0000000000000000000000000000000000000000 --- a/gradle/java-spring-01/src/main/java/com/example/javaspring01/base/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.example.javaspring01.base; \ No newline at end of file diff --git a/gradle/java-spring-01/src/main/java/com/example/javaspring01/commons/package-info.java b/gradle/java-spring-01/src/main/java/com/example/javaspring01/commons/package-info.java deleted file mode 100644 index 6438e0f8d9efcd8cec8e6d0f5352b24ecfecbc7b..0000000000000000000000000000000000000000 --- a/gradle/java-spring-01/src/main/java/com/example/javaspring01/commons/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.example.javaspring01.commons; \ No newline at end of file diff --git a/gradle/java-spring-01/src/main/java/com/example/javaspring01/members/package-info.java b/gradle/java-spring-01/src/main/java/com/example/javaspring01/members/package-info.java deleted file mode 100644 index cc786477e9b79970e20d15fe31974c80efb7e3ff..0000000000000000000000000000000000000000 --- a/gradle/java-spring-01/src/main/java/com/example/javaspring01/members/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.example.javaspring01.members; \ No newline at end of file diff --git a/gradle/java-spring-01/src/main/java/com/example/javaspring01/orders/package-info.java b/gradle/java-spring-01/src/main/java/com/example/javaspring01/orders/package-info.java deleted file mode 100644 index c5b0ed19fd6e27d64cc1894505f5edc6f61d9ebf..0000000000000000000000000000000000000000 --- a/gradle/java-spring-01/src/main/java/com/example/javaspring01/orders/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.example.javaspring01.orders; \ No newline at end of file diff --git a/gradle/java-spring-01/src/main/java/com/example/javaspring01/prices/package-info.java b/gradle/java-spring-01/src/main/java/com/example/javaspring01/prices/package-info.java deleted file mode 100644 index 18a4fbc05b84fc0b71bdb25bee7b20c83f5272a2..0000000000000000000000000000000000000000 --- a/gradle/java-spring-01/src/main/java/com/example/javaspring01/prices/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.example.javaspring01.prices; \ No newline at end of file diff --git a/gradle/kotlin-spring-01/build.gradle.kts b/gradle/kotlin-spring-01/build.gradle.kts index f8151e87e1259c6ea148cc1b12139d2d87f74ead..0ae9def07da984f8c9ad2bfac388ea5f87a214ae 100644 --- a/gradle/kotlin-spring-01/build.gradle.kts +++ b/gradle/kotlin-spring-01/build.gradle.kts @@ -35,6 +35,7 @@ repositories { } dependencies { + implementation("cn.afterturn:easypoi-spring-boot-starter:4.2.0") implementation("com.github.xiaoymin:knife4j-spring-boot-starter:2.0.5") implementation("org.minbox.framework:api-boot-starter-rate-limiter") implementation("org.minbox.framework:api-boot-starter-quartz") diff --git a/maven/kotlin-spring-01/.gitignore b/gradle/spring-mvc-resolver/.gitignore similarity index 77% rename from maven/kotlin-spring-01/.gitignore rename to gradle/spring-mvc-resolver/.gitignore index 549e00a2a96fa9d7c5dbc9859664a78d980158c2..84695dca6f17aa4b4a227875433580b67ad91a29 100644 --- a/maven/kotlin-spring-01/.gitignore +++ b/gradle/spring-mvc-resolver/.gitignore @@ -1,8 +1,9 @@ HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ ### STS ### .apt_generated @@ -18,6 +19,9 @@ target/ *.iws *.iml *.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ ### NetBeans ### /nbproject/private/ @@ -25,9 +29,6 @@ target/ /dist/ /nbdist/ /.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ ### VS Code ### .vscode/ diff --git a/gradle/spring-mvc-resolver/build.gradle b/gradle/spring-mvc-resolver/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..e4b1318352318e563ff1b92849b2bbe2f3d4e01c --- /dev/null +++ b/gradle/spring-mvc-resolver/build.gradle @@ -0,0 +1,41 @@ +plugins { + id 'org.springframework.boot' version '2.3.4.RELEASE' + id 'io.spring.dependency-management' version '1.0.10.RELEASE' + id 'java' +} + +group = 'com.example' +version = '0.0.1-SNAPSHOT' +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-aop' + implementation 'org.apache.commons:commons-lang3:3.11' + implementation 'cn.hutool:hutool-all:5.4.3' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter' + compileOnly 'org.projectlombok:lombok' + developmentOnly 'org.springframework.boot:spring-boot-devtools' + annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' + annotationProcessor 'org.projectlombok:lombok' + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + implementation(platform('ai.ylyue:yue-library-dependencies:2.1.0')) +} + +test { + useJUnitPlatform() +} diff --git a/gradle/spring-mvc-resolver/gradle.properties b/gradle/spring-mvc-resolver/gradle.properties new file mode 100644 index 0000000000000000000000000000000000000000..e0864ab94940070b1a3d0d7b3fa3a9cbc7a58428 --- /dev/null +++ b/gradle/spring-mvc-resolver/gradle.properties @@ -0,0 +1,6 @@ +org.gradle.parallel=true +org.gradle.daemon=true +org.gradle.configureondemand=true +org.gradle.caching=true +org.gradle.jvmargs=-Xmx2048M +org.gradle.encoding=UTF-8 \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/gradle/wrapper/gradle-wrapper.jar b/gradle/spring-mvc-resolver/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f Binary files /dev/null and b/gradle/spring-mvc-resolver/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/spring-mvc-resolver/gradle/wrapper/gradle-wrapper.properties b/gradle/spring-mvc-resolver/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000000000000000000000000000000000..12d38de6a487379bb3664c6ac06e21443d977e2e --- /dev/null +++ b/gradle/spring-mvc-resolver/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradle/spring-mvc-resolver/gradlew b/gradle/spring-mvc-resolver/gradlew new file mode 100644 index 0000000000000000000000000000000000000000..8f8904743c007a1542d0047be84912b7aa15279f --- /dev/null +++ b/gradle/spring-mvc-resolver/gradlew @@ -0,0 +1,184 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ]; do + ls=$(ls -ld "$PRG") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' >/dev/null; then + PRG="$link" + else + PRG=$(dirname "$PRG")"/$link" + fi +done +SAVED="$(pwd)" +cd "$(dirname \"$PRG\")/" >/dev/null +APP_HOME="$(pwd -P)" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=$(basename "$0") + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn() { + echo "$*" +} + +die() { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$(uname)" in +CYGWIN*) + cygwin=true + ;; +Darwin*) + darwin=true + ;; +MINGW*) + msys=true + ;; +NONSTOP*) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ]; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ]; then + MAX_FD_LIMIT=$(ulimit -H -n) + if [ $? -eq 0 ]; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ]; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ]; then + APP_HOME=$(cygpath --path --mixed "$APP_HOME") + CLASSPATH=$(cygpath --path --mixed "$CLASSPATH") + + JAVACMD=$(cygpath --unix "$JAVACMD") + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=$(find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null) + SEP="" + for dir in $ROOTDIRSRAW; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ]; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@"; do + CHECK=$(echo "$arg" | egrep -c "$OURCYGPATTERN" -) + CHECK2=$(echo "$arg" | egrep -c "^-") ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ]; then ### Added a condition + eval $(echo args$i)=$(cygpath --path --ignore --mixed "$arg") + else + eval $(echo args$i)="\"$arg\"" + fi + i=$(expr $i + 1) + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save() { + for i; do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/"; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradle/spring-mvc-resolver/gradlew.bat b/gradle/spring-mvc-resolver/gradlew.bat new file mode 100644 index 0000000000000000000000000000000000000000..107acd32c4e687021ef32db511e8a206129b88ec --- /dev/null +++ b/gradle/spring-mvc-resolver/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/gradle/spring-mvc-resolver/settings.gradle b/gradle/spring-mvc-resolver/settings.gradle new file mode 100644 index 0000000000000000000000000000000000000000..7d82b85f5fc290293cd80a9d769c192ae1724970 --- /dev/null +++ b/gradle/spring-mvc-resolver/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'spring-mvc-resolver' diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/SpringMvcResolverApplication.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/SpringMvcResolverApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..ddd54cd57350cd737b065be229428aeab69baae9 --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/SpringMvcResolverApplication.java @@ -0,0 +1,13 @@ +package com.example.springmvcresolver; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringMvcResolverApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringMvcResolverApplication.class, args); + } + +} diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/configuration/BaseConfiguration.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/configuration/BaseConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..2972bc36719d407343b83bd4071a727ebd1337ed --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/configuration/BaseConfiguration.java @@ -0,0 +1,13 @@ +package com.example.springmvcresolver.configuration; + +import org.springframework.context.annotation.Configuration; + +/** + * @program: spring-mvc-resolver + * @description: + * @author: yuane + * @create: 2020-09-22 14:00 + */ +@Configuration +public class BaseConfiguration { +} \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/controller/TestController.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/controller/TestController.java new file mode 100644 index 0000000000000000000000000000000000000000..e1eb6e597be2424d0ebeb30718328a3c5e0550c1 --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/controller/TestController.java @@ -0,0 +1,39 @@ +package com.example.springmvcresolver.controller; + +import com.example.springmvcresolver.resolver.annotation.UnEscapeHtml; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.*; + +/** + * @program: spring-mvc-resolver + * @description: + * @author: yuane + * @create: 2020-09-22 13:54 + */ +@RestController +public class TestController { + @GetMapping("/value/{value}") + public String value(@UnEscapeHtml @PathVariable String value) { + return value; + } + + @GetMapping(value = "/value/get") + public String value2(@UnEscapeHtml String value) { + return value; + } + + @PostMapping("/value/") + public String value3(@UnEscapeHtml @RequestBody String value) { + return value; + } + + @PostMapping(value = "/value/form", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public String value4(@UnEscapeHtml String value) { + return value; + } + + @PostMapping(value = "/value/form", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE) + public String value5(@UnEscapeHtml String value) { + return value; + } +} \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/ResolverConfiguration.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/ResolverConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..ba6637d096bb8002a6ef5001ebf0e7d2130b75bb --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/ResolverConfiguration.java @@ -0,0 +1,23 @@ +package com.example.springmvcresolver.resolver; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.method.support.HandlerMethodArgumentResolver; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; + +import java.util.List; + +/** + * @program: spring-mvc-resolver + * @description: + * @author: yuane + * @create: 2020-09-22 14:00 + */ +@Configuration +public class ResolverConfiguration extends WebMvcConfigurationSupport { + @Override + protected void addArgumentResolvers(List argumentResolvers) { + argumentResolvers.add(new UnEscapeHtmlArgumentResolver()); + super.addArgumentResolvers(argumentResolvers); + } + +} \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/UnEscapeHtmlArgumentResolver.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/UnEscapeHtmlArgumentResolver.java new file mode 100644 index 0000000000000000000000000000000000000000..b29a1ee6ae503222cf8653797997718ce77955ba --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/UnEscapeHtmlArgumentResolver.java @@ -0,0 +1,43 @@ +package com.example.springmvcresolver.resolver; + +import cn.hutool.core.util.EscapeUtil; +import cn.hutool.extra.servlet.ServletUtil; +import com.example.springmvcresolver.resolver.annotation.UnEscapeHtml; +import org.apache.commons.lang3.StringEscapeUtils; +import org.springframework.core.MethodParameter; +import org.springframework.web.bind.support.WebDataBinderFactory; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.servlet.mvc.method.annotation.ServletRequestMethodArgumentResolver; + +import javax.servlet.http.HttpServletRequest; +import java.util.Map; + +/** + * @program: spring-mvc-resolver + * @description: + * @author: yuane + * @create: 2020-09-22 13:50 + */ +public class UnEscapeHtmlArgumentResolver extends ServletRequestMethodArgumentResolver { + @Override + public boolean supportsParameter(MethodParameter parameter) { + return (parameter.hasMethodAnnotation(UnEscapeHtml.class) || parameter.hasParameterAnnotation(UnEscapeHtml.class)); + } + + @SuppressWarnings("ConstantConditions") + @Override + public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { + Class parameterType = parameter.getParameterType(); + if (String.class.isAssignableFrom(parameterType)) { + HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class); + Map map = ServletUtil.getParamMap(request); + for (Map.Entry entry : map.entrySet()) { + map.put(entry.getKey(), StringEscapeUtils.unescapeHtml4(entry.getValue())); + } + return map; + } + return super.resolveArgument(parameter, mavContainer, webRequest, binderFactory); + } + +} \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/UnEscapeJsonViewRequestBodyAdvice.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/UnEscapeJsonViewRequestBodyAdvice.java new file mode 100644 index 0000000000000000000000000000000000000000..d2c614f442117f9e3f8aca3f06aad10ebeb6d8ee --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/UnEscapeJsonViewRequestBodyAdvice.java @@ -0,0 +1,43 @@ +package com.example.springmvcresolver.resolver; + +import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.EscapeUtil; +import cn.hutool.json.JSONUtil; +import com.example.springmvcresolver.resolver.annotation.UnEscapeHtml; +import org.apache.commons.lang3.StringEscapeUtils; +import org.springframework.core.MethodParameter; +import org.springframework.http.HttpInputMessage; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.MappingJacksonInputMessage; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.mvc.method.annotation.JsonViewRequestBodyAdvice; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; +import java.util.Map; + +/** + * @program: spring-mvc-resolver + * @description: + * @author: yuane + * @create: 2020-09-22 13:54 + */ +//@RestControllerAdvice +public class UnEscapeJsonViewRequestBodyAdvice extends JsonViewRequestBodyAdvice { + @Override + public boolean supports(MethodParameter methodParameter, Type targetType, Class> converterType) { + return super.supports(methodParameter, targetType, converterType) && methodParameter.hasParameterAnnotation(UnEscapeHtml.class); + } + + @Override + public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter methodParameter, Type targetType, Class> selectedConverterType) throws IOException { + InputStream body = inputMessage.getBody(); + String read = IoUtil.read(body, StandardCharsets.UTF_8); + read = StringEscapeUtils.unescapeHtml4(read); + return super.beforeBodyRead(new MappingJacksonInputMessage(new ByteArrayInputStream(read.getBytes()), inputMessage.getHeaders()), methodParameter, targetType, selectedConverterType); + } +} \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/annotation/UnEscapeHtml.java b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/annotation/UnEscapeHtml.java new file mode 100644 index 0000000000000000000000000000000000000000..e6c33fbe2489912509940a309334efc00a531847 --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/java/com/example/springmvcresolver/resolver/annotation/UnEscapeHtml.java @@ -0,0 +1,15 @@ +package com.example.springmvcresolver.resolver.annotation; + +import java.lang.annotation.*; + +/** + * @program: spring-mvc-resolver + * @description: + * @author: yuane + * @create: 2020-09-22 13:51 + */ +@Target({ElementType.METHOD, ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface UnEscapeHtml { +} \ No newline at end of file diff --git a/gradle/spring-mvc-resolver/src/main/resources/application.properties b/gradle/spring-mvc-resolver/src/main/resources/application.properties new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/gradle/spring-mvc-resolver/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/gradle/spring-mvc-resolver/src/test/java/com/example/springmvcresolver/SpringMvcResolverApplicationTests.java b/gradle/spring-mvc-resolver/src/test/java/com/example/springmvcresolver/SpringMvcResolverApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..d3b099f2f1473578edc2c7688d1b03124d803e28 --- /dev/null +++ b/gradle/spring-mvc-resolver/src/test/java/com/example/springmvcresolver/SpringMvcResolverApplicationTests.java @@ -0,0 +1,13 @@ +package com.example.springmvcresolver; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class SpringMvcResolverApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/maven/kotlin-spring-01/.mvn/wrapper/MavenWrapperDownloader.java b/maven/kotlin-spring-01/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index a45eb6ba269cd38f8965cef786729790945d9537..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if (mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if (mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if (!outputFile.getParentFile().exists()) { - if (!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/maven/kotlin-spring-01/.mvn/wrapper/maven-wrapper.jar b/maven/kotlin-spring-01/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 2cc7d4a55c0cd0092912bf49ae38b3a9e3fd0054..0000000000000000000000000000000000000000 Binary files a/maven/kotlin-spring-01/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/maven/kotlin-spring-01/.mvn/wrapper/maven-wrapper.properties b/maven/kotlin-spring-01/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 642d572ce90e5085986bdd9c9204b9404f028084..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/maven/kotlin-spring-01/mvnw b/maven/kotlin-spring-01/mvnw deleted file mode 100644 index 3c8a5537314954d53ec2fb774b34fe5d5a5f253a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/mvnw +++ /dev/null @@ -1,322 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ]; then - - if [ -f /etc/mavenrc ]; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ]; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false -darwin=false -mingw=false -case "$(uname)" in -CYGWIN*) cygwin=true ;; -MINGW*) mingw=true ;; -Darwin*) - darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="$(/usr/libexec/java_home)" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ]; then - if [ -r /etc/gentoo-release ]; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -if [ -z "$M2_HOME" ]; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ]; do - ls=$(ls -ld "$PRG") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' >/dev/null; then - PRG="$link" - else - PRG="$(dirname "$PRG")/$link" - fi - done - - saveddir=$(pwd) - - M2_HOME=$(dirname "$PRG")/.. - - # make it fully qualified - M2_HOME=$(cd "$M2_HOME" && pwd) - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=$(cygpath --unix "$M2_HOME") - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw; then - [ -n "$M2_HOME" ] && - M2_HOME="$( ( - cd "$M2_HOME" - pwd - ))" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="$( ( - cd "$JAVA_HOME" - pwd - ))" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr \"$javaExecutable\" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! $(expr "$readLink" : '\([^ ]*\)') = "no" ]; then - if $darwin; then - javaHome="$(dirname \"$javaExecutable\")" - javaExecutable="$(cd \"$javaHome\" && pwd -P)/javac" - else - javaExecutable="$(readlink -f \"$javaExecutable\")" - fi - javaHome="$(dirname \"$javaExecutable\")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ]; then - if [ -n "$JAVA_HOME" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="$(which java)" - fi -fi - -if [ ! -x "$JAVACMD" ]; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ]; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ]; then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ]; do - if [ -d "$wdir"/.mvn ]; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$( - cd "$wdir/.." - pwd - ) - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' <"$1")" - fi -} - -BASE_DIR=$(find_maven_basedir "$(pwd)") -if [ -z "$BASE_DIR" ]; then - exit 1 -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in wrapperUrl) - jarUrl="$value" - break - ;; - esac - done <"$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi - - if command -v wget >/dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl >/dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=$(cygpath --path --windows "$M2_HOME") - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/maven/kotlin-spring-01/mvnw.cmd b/maven/kotlin-spring-01/mvnw.cmd deleted file mode 100644 index c8d43372c986d97911cdc21bd87e0cbe3d83bdda..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% diff --git a/maven/kotlin-spring-01/pom.xml b/maven/kotlin-spring-01/pom.xml deleted file mode 100644 index edc63bbf58d075c98512379d91f7b422d3e16359..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/pom.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.3.4.RELEASE - - - com.example - kotlin-spring-01 - 0.0.1-SNAPSHOT - kotlin-spring-01 - Demo project for Spring Boot - - - 1.8 - 1.4.10 - - - - - cn.hutool - hutool-all - 5.4.3 - - - tk.mybatis - mapper-spring-boot-starter - 2.1.5 - - - org.mybatis - mybatis - - - org.mybatis - mybatis-spring - - - - - com.baomidou - mybatis-plus-boot-starter - 3.4.0 - - - org.mybatis - mybatis - - - org.mybatis - mybatis-spring - - - - - com.github.pagehelper - pagehelper-spring-boot-starter - 1.3.0 - - - com.github.jsqlparser - jsqlparser - - - - - com.gitee.denger - mybatis-example-ext - 1.0.2 - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-cache - - - org.springframework.boot - spring-boot-starter-hateoas - - - org.springframework.boot - spring-boot-starter-jooq - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-validation - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-web-services - - - com.fasterxml.jackson.module - jackson-module-kotlin - - - org.jetbrains.kotlin - kotlin-reflect - - - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 2.1.3 - - - - org.springframework.boot - spring-boot-devtools - runtime - true - - - mysql - mysql-connector-java - runtime - - - org.springframework.boot - spring-boot-configuration-processor - true - - - org.projectlombok - lombok - true - - - org.mapstruct - mapstruct - 1.4.0.CR1 - - - org.mapstruct - mapstruct-jdk8 - 1.4.0.CR1 - - - org.mapstruct - mapstruct-processor - 1.4.0.CR1 - - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - - - ${project.name} - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin - - - org.codehaus.mojo - versions-maven-plugin - - - org.springframework.boot - spring-boot-maven-plugin - - - package - - - repackage - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - - - kapt - - kapt - - - - src/main/kotlin - - - - org.mapstruct - mapstruct-processor - 1.4.0.CR1 - - - org.projectlombok - lombok - - - - - - - - -Xjsr305=strict - - - spring - jpa - - - - - org.jetbrains.kotlin - kotlin-maven-allopen - ${kotlin.version} - - - org.jetbrains.kotlin - kotlin-maven-noarg - ${kotlin.version} - - - org.mapstruct - mapstruct-processor - 1.4.0.CR1 - - - org.projectlombok - lombok - ${lombok.version} - - - - - - - diff --git a/maven/kotlin-spring-01/sqls/db.sql b/maven/kotlin-spring-01/sqls/db.sql deleted file mode 100644 index b33eccdce8c03bb44afe6aa147ca8a9d2ff8a962..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/sqls/db.sql +++ /dev/null @@ -1,104 +0,0 @@ -create table if not exists customers -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - name_pin_yin varchar(255) null, - name_pin_yin_simple varchar(255) null, - age int null, - type varchar(255) null, - id_card_no char(18) null -); - -create table if not exists devices -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - code varchar(255) null, - name varchar(255) null, - type varchar(255) null, - file_path varchar(255) null -); - -create table if not exists orders -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - order_no varchar(255) null, - type varchar(255) null, - customer_id bigint null, - total_price decimal(10, 2) null -); - -create table if not exists permissions -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - description varchar(255) null -); - -create table if not exists prices -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - type varchar(255) null, - price decimal(10, 2) null, - state varchar(255) null -); - -create table if not exists roles -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - description varchar(255) null -); - -create table if not exists users -( - id bigint auto_increment - primary key, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - username varchar(255) null, - name varchar(255) null, - password varchar(255) null, - version int null, - is_delete int null, - state varchar(255) null -); - diff --git a/maven/kotlin-spring-01/sqls/sqls/db.sql b/maven/kotlin-spring-01/sqls/sqls/db.sql deleted file mode 100644 index 3217b86b26d1e1c691d2f0ab101966dbdf943671..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/sqls/sqls/db.sql +++ /dev/null @@ -1,159 +0,0 @@ -create table if not exists customers -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - name_pin_yin varchar(255) null, - name_pin_yin_simple varchar(255) null, - age int null, - type varchar(255) null, - id_card_no char(18) null, - contact_number varchar(20) null, - bind_phone varchar(20) null, - state varchar(255) null -); - -create table if not exists customers_consume_records -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - customer_id bigint null, - customer_name varchar(255) null, - order_id bigint null, - order_no varchar(20) null, - amount_of_consumption decimal(10, 2) null, - bind_phone varchar(20) null, - state varchar(255) null -); - -create table if not exists device_orders_records -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - device_id bigint null, - device_code varchar(255) null, - order_id bigint null, - order_no varchar(20) null, - customer_id bigint null, - customer_name varchar(255) null -); - -create table if not exists devices -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - code varchar(255) null, - name varchar(255) null, - type varchar(255) null, - file_path varchar(255) null, - state varchar(255) null -); - -create table if not exists order_items -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - order_id bigint null, - unit_price decimal(10, 2) null, - sale_unit varchar(255) null, - usage_amount decimal(10, 2) null, - total_price decimal(10, 2) null -); - -create table if not exists orders -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - order_no varchar(255) null, - type varchar(255) null, - customer_id bigint null, - total_price decimal(10, 2) null -); - -create table if not exists permissions -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - description varchar(255) null -); - -create table if not exists prices -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - type varchar(255) null, - price decimal(10, 2) null, - state varchar(255) null -); - -create table if not exists roles -( - id bigint null, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - version int null, - is_delete int null, - name varchar(255) null, - description varchar(255) null -); - -create table if not exists users -( - id bigint auto_increment - primary key, - create_date datetime null, - update_date datetime null, - creator varchar(255) null, - updater varchar(255) null, - username varchar(255) null, - name varchar(255) null, - password varchar(255) null, - version int null, - is_delete int null, - state varchar(255) null -); - diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/KotlinSpring01Application.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/KotlinSpring01Application.kt deleted file mode 100644 index 5e3a0ee581f8dda9e051ad261d9da12959717639..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/KotlinSpring01Application.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01 - -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.runApplication - - -@SpringBootApplication -class KotlinSpring01Application { - -} - -fun main(args: Array) { - runApplication(*args) -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IPermissionsController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IPermissionsController.kt deleted file mode 100644 index 9a37e475039f6befd7a9e7c95a8744a67f6b99dd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IPermissionsController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.commons.controller.ICommonsController -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/permissions") -interface IPermissionsController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IRolesController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IRolesController.kt deleted file mode 100644 index aef6e26deff9b92ada70825460b81fe903cd7a26..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IRolesController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.commons.controller.ICommonsController -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/roles") -interface IRolesController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IUsersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IUsersController.kt deleted file mode 100644 index 789c482a82a8eb2f8372e19a817a4f9e8059b961..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/IUsersController.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.commons.controller.ICommonsController -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/users") -interface IUsersController : ICommonsController { - @GetMapping("/{id}/detail") - fun getDetail(@PathVariable("id") id: Long): Users? - - @GetMapping("/{id}/brief") - fun getBrief(@PathVariable("id") id: Long): Users? - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/PermissionsController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/PermissionsController.kt deleted file mode 100644 index 1c6cfd1d4396037fad3f4f480f96d2ca6267080c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/PermissionsController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.auths.service.service.IPermissionsService -import com.example.kotlinspring01.commons.controller.CommonsController -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - -@RestController -class PermissionsController(val PermissionsService: IPermissionsService) : CommonsController(PermissionsService), IPermissionsController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/RolesController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/RolesController.kt deleted file mode 100644 index 759e6edb8338951ef4f6d344be8c1fef2177319f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/RolesController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.auths.service.service.IRolesService -import com.example.kotlinspring01.commons.controller.CommonsController -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - -@RestController -class RolesController(val rolesService: IRolesService) : CommonsController(rolesService), IRolesController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/UsersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/UsersController.kt deleted file mode 100644 index 9ed2c57246e58e30888bf59ac963a7097be05cef..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/controller/UsersController.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.auths.service.service.IUsersService -import com.example.kotlinspring01.commons.controller.CommonsController -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - -@RestController -class UsersController(val usersService: IUsersService) : CommonsController(usersService), IUsersController { - override fun getDetail(id: Long): Users? = usersService.getDetailById(id) - - override fun getBrief(id: Long): Users? = usersService.get(id) -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/enumerate/UserStatesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/enumerate/UserStatesEnum.kt deleted file mode 100644 index c543e19b1afbc90cc612552265ce942e36e103ad..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/enumerate/UserStatesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.auths.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class UserStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - VALID(0, "有效"), - INVALID(1, "无效"); - - - companion object { - @JsonCreator - fun getItem(code: String): UserStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IPermissionsMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IPermissionsMapper.kt deleted file mode 100644 index c06b77e173c5cd655e91267e56cb64ca784ae38d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IPermissionsMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.mapper - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IPermissionsMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IRolesMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IRolesMapper.kt deleted file mode 100644 index 2db19f7c923228bd19f4110f94badb429fba0368..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IRolesMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.mapper - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IRolesMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IUsersMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IUsersMapper.kt deleted file mode 100644 index 6ac4cf8be40eaae7c8c795e879078d81743e8ccd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IUsersMapper.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.mapper - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IUsersMapper : ICommonsMapper { - fun selectUsernameById(id: Long): String? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Permissions.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Permissions.kt deleted file mode 100644 index 6d034b033b198fe173a75d57efb0ceadfc5138da..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Permissions.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import java.util.* -import javax.persistence.Entity - -@Entity -class Permissions : CommonsPojo() { - var name: String? = null - var description: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsQuery.kt deleted file mode 100644 index 2c9f0760552d9023bec6d3cb4409f0f35f3fe4a6..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsQuery.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - -class PermissionsQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var name: String? = null -} - diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsVo.kt deleted file mode 100644 index 2c66f4ac08ed7275d08c45ba3207e512f10cd532..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsVo.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import java.util.* - -class PermissionsVo : CommonsVoPojo() { - var description: String? = null - - var name: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Roles.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Roles.kt deleted file mode 100644 index 5dcc9a34a0d548dbcc4a91a495689d6f53505322..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Roles.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import java.util.* - -class Roles : CommonsPojo() { - - var name: String? = null - var description: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesQuery.kt deleted file mode 100644 index 2cd9d0f81167e68b7b7bca21dbd1cf28d0775da0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesQuery.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - -class RolesQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var name: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesVo.kt deleted file mode 100644 index 3bf37e7e80b9edd8024f7598f648093229cea365..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesVo.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import java.util.* - -class RolesVo : CommonsVoPojo() { - var permissionsVo: List? = null - var description: String? = null - var name: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Users.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Users.kt deleted file mode 100644 index 13d9619b6ac8a989016ff1ce3f7bee4dec0a8dc7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Users.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import java.util.* -import javax.persistence.Entity - -@Entity -open class Users : CommonsPojo() { - var username: String? = null - var name: String? = null - var password: String? = null - var state: UserStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersAos.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersAos.kt deleted file mode 100644 index 4d542aa847b201371540980b6ade86710e1421df..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersAos.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.fasterxml.jackson.annotation.JsonIgnore -import java.util.* - -sealed class UsersAos : Users() { - - - open class UserAo : UsersAos() { - val stateCode: Int? - get() { - return state?.code - } - val stateName: String? - get() { - return state?.name - } - - } - - class UserRoleAo : UserAo() { - var roles: List? = null - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersQuery.kt deleted file mode 100644 index 1abdd7ce6a54e5db521d79b754b62101ef6ce5b9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersQuery.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - -class UsersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var username: String? = null - - @AndLike - var name: String? = null - - @AndEqualTo - var state: UserStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersVo.kt deleted file mode 100644 index 778b842a0b60db16046c5133744c5145ab8d394c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersVo.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import java.util.* - -class UsersVo : CommonsVoPojo() { - var roles: List? = null - var password: String? = null - var name: String? = null - var username: String? = null - var state: UserStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IPermissionsConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IPermissionsConverter.kt deleted file mode 100644 index ccd56e9a9cc7ab1fae069f2ef22ef44fa0b7b4dc..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IPermissionsConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.converter - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IPermissionsConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IRolesConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IRolesConverter.kt deleted file mode 100644 index 95b9dbd1f150931b6fa6ec084595f99d8b82c88c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IRolesConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.converter - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IRolesConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IUsersConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IUsersConverter.kt deleted file mode 100644 index 2fbfa3cea0c0c5e34d8de834b2386342dc2a35fc..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IUsersConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.auths.service.converter - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersAos -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IUsersConverter : ICommonsConverter { - fun ao(users: Users?): UsersAos.UserAo? - fun userRoleAo(users: Users?): UsersAos.UserRoleAo? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDao.kt deleted file mode 100644 index 40f145debd599bc407deb3c89390d3c1b963104c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.commons.service.dao.ICommonsDao - -interface IPermissionsDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDaoImpl.kt deleted file mode 100644 index aad88ec8e3071d4246a7a828fd9db4e8b1f99f2e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.mapper.IPermissionsMapper -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import org.jooq.DSLContext -import org.springframework.stereotype.Service - -@Service -class IPermissionsDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), IPermissionsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDao.kt deleted file mode 100644 index 9e1053e49b615569d3ced63e585cc754bbeaa82f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.commons.service.dao.ICommonsDao - -interface IRolesDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDaoImpl.kt deleted file mode 100644 index ae14588da2b782e54da1065d0f6bf9420db1a508..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.mapper.IRolesMapper -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import org.jooq.DSLContext -import org.springframework.stereotype.Service - -@Service -class IRolesDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), IRolesDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDao.kt deleted file mode 100644 index 4ec74c0915084772a62dbdd7ebe0d526b7bb10c2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDao.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.commons.service.dao.ICommonsDao - -interface IUsersDao : ICommonsDao { - fun getAllMapById(id: Long): Map? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDaoImpl.kt deleted file mode 100644 index 672713e61e154d2a571598f4d830bed550869ad8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDaoImpl.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.mapper.IUsersMapper -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import org.jooq.DSLContext -import org.jooq.impl.DSL -import org.springframework.stereotype.Service - -@Service -class IUsersDaoImpl( - dslContext: DSLContext -) : ICommonsDaoImpl( - dslContext -), IUsersDao { - override fun getAllMapById(id: Long): Map? { - return dslContext.selectFrom(DSL.table("users")).where(DSL.field("id").eq(id)).fetchOneMap() - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsService.kt deleted file mode 100644 index 09fa9b9b645248a1119b49cddf42ebdb5d9e6808..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -interface IPermissionsService : ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsServiceImpl.kt deleted file mode 100644 index f7168227cbc65a3803c1baceb794dffde7cf5a9a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsServiceImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.auths.service.converter.IPermissionsConverter -import com.example.kotlinspring01.auths.service.dao.IPermissionsDao -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import org.springframework.stereotype.Service - -@Service -class IPermissionsServiceImpl(override val daoService: IPermissionsDao, override val converter: IPermissionsConverter) : ICommonsServiceImpl(daoService, converter), IPermissionsService { - override fun queryWrapper(q: PermissionsQuery): Wrapper? { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesService.kt deleted file mode 100644 index e9330851eb5bf759b6f15aed87dc94b0ec080e47..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -interface IRolesService : ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesServiceImpl.kt deleted file mode 100644 index a76823212ab291757ec694f5b6aa0f9e3ca7bbc1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesServiceImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.auths.service.converter.IRolesConverter -import com.example.kotlinspring01.auths.service.dao.IRolesDao -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import org.springframework.stereotype.Service - -@Service -class IRolesServiceImpl(override val daoService: IRolesDao, override val converter: IRolesConverter) : ICommonsServiceImpl(daoService, converter), IRolesService { - override fun queryWrapper(q: RolesQuery): Wrapper? { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersService.kt deleted file mode 100644 index 8c3f45d169033a298ca5b5b02c9957b5d0389f8d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersService.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -interface IUsersService : ICommonsService { - fun getDetailById(id: Long): Users? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersServiceImpl.kt deleted file mode 100644 index c0fa07eb63df3d2d0ab80ce21467db6ae2b9722a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersServiceImpl.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import cn.hutool.core.util.ObjectUtil -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.auths.service.converter.IRolesConverter -import com.example.kotlinspring01.auths.service.converter.IUsersConverter -import com.example.kotlinspring01.auths.service.dao.IRolesDao -import com.example.kotlinspring01.auths.service.dao.IUsersDao -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import org.springframework.stereotype.Service - - -@Service -class IUsersServiceImpl(override val daoService: IUsersDao, override val converter: IUsersConverter, val rolesDao: IRolesDao, val rolesConverter: IRolesConverter) : ICommonsServiceImpl(daoService, converter), IUsersService { - override fun queryWrapper(q: UsersQuery): Wrapper? { - val wrapper = QueryWrapper(Users()) - wrapper.like(ObjectUtil.isNotEmpty(q.name), "name", q.name) - return wrapper - } - - override fun getDetailById(id: Long): Users? { - val users = daoService.getById(id) - val userRoleAo = converter.userRoleAo(users) - val listByIds: MutableList? = rolesDao.listByIds(listOf(userRoleAo!!.id)) - userRoleAo.roles = listByIds - return userRoleAo - } - - override fun get(id: Long): Users? { - val users = super.get(id) - return converter.ao(users) - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/configuration/WebMvcParamsConverterConfigurer.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/configuration/WebMvcParamsConverterConfigurer.kt deleted file mode 100644 index 8e0d4cef8f80fcde9f8e79d96616fe6664da27a5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/configuration/WebMvcParamsConverterConfigurer.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.example.kotlinspring01.base.configuration - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.databind.SerializationFeature -import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.core.convert.converter.Converter -import org.springframework.core.convert.converter.ConverterFactory -import org.springframework.format.FormatterRegistry -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer - - -@Configuration -class WebMvcParamsConverterConfigurer : WebMvcConfigurer { - @Bean - fun customizer(): Jackson2ObjectMapperBuilderCustomizer? { - return Jackson2ObjectMapperBuilderCustomizer { builder: Jackson2ObjectMapperBuilder -> - builder.featuresToEnable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) - } - } - - override fun addFormatters(registry: FormatterRegistry) { - registry.addConverterFactory(StringValueToBaseEnumConverterFactory()) -// registry.addConverterFactory(IntCodeToBaseEnumConverterFactory()) - - } - - class StringValueToBaseEnumConverterFactory : ConverterFactory { - override fun getConverter(targetType: Class): StringValueToBaseEnumConverter { - if (!targetType.isEnum) { - throw UnsupportedOperationException("只支持转换到枚举类型") - } - return StringValueToBaseEnumConverter(targetType) - } - - inner class StringValueToBaseEnumConverter(private val enumType: Class) : Converter { - override fun convert(s: String): T? { - for (t in enumType.enumConstants) { - if (s == t!!.getStringValue() || s == t.getIntCode().toString() || s.toLowerCase() == t.getStringName()!!.toLowerCase()) { - return t - } - } - return null - } - } - } - - class IntCodeToBaseEnumConverterFactory : ConverterFactory { - override fun getConverter(targetType: Class): IntCodeToBaseEnumConverter { - if (!targetType.isEnum) { - throw UnsupportedOperationException("只支持转换到枚举类型") - } - return IntCodeToBaseEnumConverter(targetType) - } - - inner class IntCodeToBaseEnumConverter(private val enumType: Class) : Converter { - override fun convert(s: Int): T? { - for (t in enumType.enumConstants) { - if (s == t!!.getIntCode()) { - return t - } - } - return null - } - } - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/controller/BaseController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/controller/BaseController.kt deleted file mode 100644 index 294a9777acf7b7b7faa2ac531b0ed898c1d30a68..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/controller/BaseController.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.example.kotlinspring01.base.controller - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import com.example.kotlinspring01.base.service.service.IBaseService -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestBody -import java.io.Serializable - -abstract class BaseController, V : BaseVoPojo, Q : BaseQueryPojo, ID : Serializable, S : IBaseService>(private val baseService: S) : IBaseController { - // @PostMapping - override fun insert(@RequestBody t: V) = baseService.insert(t) - - // @PutMapping - override fun update(@RequestBody t: V) = baseService.update(t) - - // @DeleteMapping("/{id}") - override fun delete(@PathVariable("id") id: List) = baseService.delete(id) - - - // @GetMapping("/{id}") - override fun get(@PathVariable("id") id: ID) = baseService.get(id) - - // @GetMapping - override fun list(q: Q): List? = baseService.list(q) - - override fun query(q: Q): List? = baseService.query(q) -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/controller/IBaseController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/controller/IBaseController.kt deleted file mode 100644 index 9c183d153e9728a1daa1a4c96dc9dbd94f24ffbe..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/controller/IBaseController.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.example.kotlinspring01.base.controller - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import org.springframework.web.bind.annotation.* -import java.io.Serializable - -interface IBaseController, V : BaseVoPojo, Q : BaseQueryPojo, ID : Serializable> { - @PostMapping - fun insert(@RequestBody t: V): Boolean - - @PutMapping - fun update(@RequestBody t: V): Boolean - - @DeleteMapping("/{id}") - fun delete(@PathVariable("id") id: List): Boolean - - @GetMapping("/{id}") - fun get(@PathVariable("id") id: ID): T? - - @GetMapping(value = arrayOf("", "/list")) - fun list(q: Q): List? - - @GetMapping("/query") - fun query(q: Q): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/enumerate/IBaseEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/enumerate/IBaseEnum.kt deleted file mode 100644 index 9a7ffe1e589ae966de67c0eca794633074f9d47c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/enumerate/IBaseEnum.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.base.enumerate - -interface IBaseEnum { - fun getStringValue(): String? - fun getIntCode(): Int? - fun getStringName(): String? - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/mapper/IBaseMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/mapper/IBaseMapper.kt deleted file mode 100644 index df1610a030110d681b097bb3c06ed434b70b3340..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/mapper/IBaseMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.base.mapper - -import com.baomidou.mybatisplus.core.mapper.BaseMapper -import tk.mybatis.mapper.annotation.RegisterMapper -import tk.mybatis.mapper.common.Mapper - -@RegisterMapper -interface IBaseMapper : BaseMapper, Mapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BasePojo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BasePojo.kt deleted file mode 100644 index c89c70303705f810a80db0607fa1f01a9515fb65..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BasePojo.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import java.io.Serializable -import javax.persistence.Id -import javax.persistence.MappedSuperclass - -@MappedSuperclass -open class BasePojo { - @Id - open var id: ID? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseQueryPojo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseQueryPojo.kt deleted file mode 100644 index da181475ca0540af0694d2b366a2cc15221863e1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseQueryPojo.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndIn -import lombok.Data -import tk.mybatis.mapper.entity.Example -import java.io.Serializable - -@Data -open class BaseQueryPojo, ID : Serializable> : BasePojo(), MybatisExampleForTk { - @AndEqualTo - override var id: ID? = null - - @AndIn(property = "id") - var ids: List? = null - var page: Int = 1 - var limit: Int = 20 - var order: String? = null - var orderType: String? = null - - - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseVoPojo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseVoPojo.kt deleted file mode 100644 index 0a511a0e802619a49344366c2155f7e99894a565..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseVoPojo.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import java.io.Serializable - -open class BaseVoPojo : BasePojo() { - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/converter/IBaseConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/converter/IBaseConverter.kt deleted file mode 100644 index 90e79c8408b9e33a8dfe5873071b0cfce0f5bd08..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/converter/IBaseConverter.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.base.service.converter - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import org.mapstruct.MappingTarget -import java.io.Serializable - -interface IBaseConverter, VO : BaseVoPojo, ID : Serializable> { - fun convert(vo: VO): PO - fun copy(vo: VO, @MappingTarget po: PO) -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDao.kt deleted file mode 100644 index f2ad2bc479ef0bae78eea5fea1d7e833509060e9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDao.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.base.service.dao - -import com.baomidou.mybatisplus.extension.service.IService -import com.example.kotlinspring01.base.pojo.BasePojo -import tk.mybatis.mapper.entity.Example -import java.io.Serializable - -interface IBaseDao, ID : Serializable> : IService { - fun updateSelective(t: T): Boolean - fun updateByExample(t: T, e: Example): Boolean - fun update(t: T): Boolean - fun updateSelectiveByExample(t: T, e: Example): Boolean - fun selectByExample(e: Example): MutableList? - fun selectOneByExample(e: Example): T? - fun deleteByIds(id: List): Boolean - fun deleteById(id: ID): Boolean -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDaoImpl.kt deleted file mode 100644 index 58b225bd4c890af4167d5fdf2462677a41f6111b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDaoImpl.kt +++ /dev/null @@ -1,51 +0,0 @@ -package com.example.kotlinspring01.base.service.dao - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl -import com.example.kotlinspring01.base.mapper.IBaseMapper -import com.example.kotlinspring01.base.pojo.BasePojo -import org.jooq.DSLContext -import org.springframework.transaction.annotation.Transactional -import tk.mybatis.mapper.entity.Example -import java.io.Serializable - -@Transactional -abstract class IBaseDaoImpl, ID : Serializable, M : IBaseMapper>( - protected val dslContext: DSLContext -) : ServiceImpl(), IBaseDao { - override fun deleteById(id: ID): Boolean { - return removeById(id) - } - - override fun deleteByIds(id: List): Boolean { - return removeByIds(id) - } - - override fun update(t: T): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByPrimaryKey(t)) - } - - override fun updateSelective(t: T): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByPrimaryKeySelective(t)) - } - - override fun updateByExample(t: T, e: Example): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByExample(t, e)) - } - - override fun updateSelectiveByExample(t: T, e: Example): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByExampleSelective(t, e)) - } - - override fun selectByExample(e: Example): MutableList? { - return baseMapper.selectByExample(e) - } - - override fun selectOneByExample(e: Example): T? { - return baseMapper.selectOneByExample(e) - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseService.kt deleted file mode 100644 index 09f7b418487337281cde742cd8190767310a6c77..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseService.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.base.service.service - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import java.io.Serializable - -interface IBaseService, V : BaseVoPojo, Q : BaseQueryPojo, ID : Serializable> { - fun insert(t: V): Boolean - fun update(t: V): Boolean - fun delete(id: List): Boolean - fun get(id: ID): T? - fun list(q: Q): List? - fun query(q: Q): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseServiceImpl.kt deleted file mode 100644 index eef2e88dfeb40cbad8fcf8d0e9e31f748a0919b9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseServiceImpl.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.example.kotlinspring01.base.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.extension.plugins.pagination.Page -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import com.example.kotlinspring01.base.service.converter.IBaseConverter -import com.example.kotlinspring01.base.service.dao.IBaseDao -import com.github.pagehelper.PageHelper -import org.springframework.transaction.annotation.Transactional -import java.io.Serializable - -@Transactional -abstract class IBaseServiceImpl, V : BaseVoPojo, Q : BaseQueryPojo, ID : Serializable, S : IBaseDao, C : IBaseConverter>( - val daoService: S, - val converter: C -) : IBaseService { - abstract fun queryWrapper(q: Q): Wrapper? - override fun insert(t: V): Boolean { - val convert = converter.convert(t) - return daoService.save(convert) - } - - override fun update(v: V): Boolean { - val t = daoService.getById(v.id) - converter.copy(v, t) - return daoService.updateById(t) - } - - override fun list(q: Q): List? { - PageHelper.startPage(q.page, q.limit, false) - return daoService.selectByExample(q.toExample()) - } - - override fun query(q: Q): List? { - val page = Page(q.page.toLong(), q.limit.toLong(), 0, false) - return daoService.page(page, queryWrapper(q)).records - } - - override fun delete(id: List): Boolean { - return daoService.removeByIds(id) - } - - override fun get(id: ID): T? { - return daoService.getById(id) - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/CreateDate.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/CreateDate.kt deleted file mode 100644 index 0b8f89f12ecf3779310913ba89d27a65281310af..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/CreateDate.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.commons.configuration.mybatis.annotation - -@Target(AnnotationTarget.FIELD) -@Retention(AnnotationRetention.RUNTIME) -annotation class CreateDate { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/UpdateDate.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/UpdateDate.kt deleted file mode 100644 index 6c913599eae3e19c34ac66cff0c6fc5e9c0e1b07..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/UpdateDate.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.commons.configuration.mybatis.annotation - -@Target(AnnotationTarget.FIELD) -@Retention(AnnotationRetention.RUNTIME) -annotation class UpdateDate { - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/interceptor/CreateUpdateTimeInterceptor.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/interceptor/CreateUpdateTimeInterceptor.kt deleted file mode 100644 index 2827dea1c2bfa29b4d8db1d02eef960583266430..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/interceptor/CreateUpdateTimeInterceptor.kt +++ /dev/null @@ -1,87 +0,0 @@ -package com.example.kotlinspring01.commons.configuration.mybatis.interceptor - -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.CreateDate -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.UpdateDate -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import org.apache.ibatis.executor.Executor -import org.apache.ibatis.mapping.MappedStatement -import org.apache.ibatis.mapping.SqlCommandType -import org.apache.ibatis.plugin.Interceptor -import org.apache.ibatis.plugin.Intercepts -import org.apache.ibatis.plugin.Invocation -import org.apache.ibatis.plugin.Signature -import org.apache.ibatis.reflection.MetaObject -import org.springframework.stereotype.Component -import java.lang.reflect.Field -import java.util.* - -@Component -@Intercepts( - Signature(type = Executor::class, method = "update", args = arrayOf(MappedStatement::class, Any::class)) -) -class CreateUpdateTimeInterceptor : Interceptor, MetaObjectHandler { - override fun intercept(invocation: Invocation?): Any { - val mappedStatement = invocation!!.args[0] as MappedStatement - val sqlCommandType = mappedStatement.sqlCommandType - val any = invocation.args[1] as Any - val fields = getAllField(any) - when (sqlCommandType) { - SqlCommandType.INSERT -> { - if (any !is CommonsPojo) { - fields?.find { field -> field.isAnnotationPresent(CreateDate::class.java) }?.also { field -> - field.isAccessible = true - field.set(any, Date()) - } - fields?.find { field -> field.isAnnotationPresent(UpdateDate::class.java) }?.also { field -> - field.isAccessible = true - field.set(any, Date()) - } - } else { - any.createDate = Date() - any.updateDate = Date() - } - } - SqlCommandType.UPDATE -> { - when (any) { - is Map<*, *> -> { - val commonsPojo = any["param1"] as? CommonsPojo - commonsPojo?.updateDate = Date() - } - !is CommonsPojo -> { - fields?.find { field -> field.isAnnotationPresent(UpdateDate::class.java) }?.also { field -> - field.isAccessible = true - field.set(any, Date()) - } - } - else -> { - any.updateDate = Date() - } - } - } - - else -> { - } - } - return invocation.proceed() - } - - private fun getAllField(`object`: Any): List? { - var type: Class? = `object`.javaClass - val declaredFields: Array? = type?.declaredFields - var fields: List? = declaredFields?.toMutableList() - while (type?.superclass.also { type = it } != null) { - fields = type?.declaredFields?.toMutableList().let { it?.let, List?> { fields?.plus(it) } } - } - return fields - } - - override fun insertFill(metaObject: MetaObject?) { - strictInsertFill(metaObject, "createDate", Date::class.java, Date()) - strictInsertFill(metaObject, "updateDate", Date::class.java, Date()) - } - - override fun updateFill(metaObject: MetaObject?) { - strictUpdateFill(metaObject, "updateDate", Date::class.java, Date()) - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/controller/CommonsController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/controller/CommonsController.kt deleted file mode 100644 index f19a2e083c944148e079f224d59cc09e19283115..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/controller/CommonsController.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.commons.controller - -import com.example.kotlinspring01.base.controller.BaseController -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.commons.service.service.ICommonsService -import org.springframework.web.bind.annotation.DeleteMapping - -abstract class CommonsController, S : ICommonsService>(private val commonsService: S) : BaseController(commonsService), ICommonsController { - @DeleteMapping("/{id}/logic") - override fun logicDelete(id: List) { - return commonsService.logicDelete(id) - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/controller/ICommonsController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/controller/ICommonsController.kt deleted file mode 100644 index 81f84ce3537bcf39a79c209b51b3f6adf9f8d510..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/controller/ICommonsController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.commons.controller - -import com.example.kotlinspring01.base.controller.IBaseController -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import org.springframework.web.bind.annotation.DeleteMapping - -interface ICommonsController> : IBaseController { - @DeleteMapping("/{id}/logic") - fun logicDelete(id: List) -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/mapper/ICommonsMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/mapper/ICommonsMapper.kt deleted file mode 100644 index 4c2d0bd8b1a9cfa44ad3087844801ffff5506dbf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/mapper/ICommonsMapper.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.kotlinspring01.commons.mapper - -import com.example.kotlinspring01.base.mapper.IBaseMapper as BaseMapperBase - -interface ICommonsMapper : BaseMapperBase \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsPojo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsPojo.kt deleted file mode 100644 index ea5833ddb3b9f336ff56e42240f3dffc80890ce8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsPojo.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.kotlinspring01.commons.pojo - -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.CreateDate -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.UpdateDate -import java.util.* -import javax.persistence.MappedSuperclass -import com.example.kotlinspring01.base.pojo.BasePojo as BasePojoBase - -@MappedSuperclass -abstract class CommonsPojo : BasePojoBase() { - @CreateDate - var createDate: Date? = null - - @UpdateDate - var updateDate: Date? = null - var creator: String? = null - var updater: String? = null - - -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsQueryPojo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsQueryPojo.kt deleted file mode 100644 index a837807e16e750e86e3f582d6dab96ba783014de..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsQueryPojo.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.kotlinspring01.commons.pojo - -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.gitee.denger.mybatis.example.ext.annotation.AndGreaterThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLessThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import java.util.* - -open class CommonsQueryPojo : BaseQueryPojo() { - @AndLike - var creator: String? = null - - @AndGreaterThanOrEqualTo(property = "createDate") - var createDate1: Date? = null - - @AndLessThanOrEqualTo(property = "createDate") - var createDate2: Date? = null - - -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsVoPojo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsVoPojo.kt deleted file mode 100644 index cdc16011738ef8d68231554a5ebeecf9ddd5d833..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsVoPojo.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.commons.pojo - -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import java.util.* - -open class CommonsVoPojo : BaseVoPojo() { - var createDate: Date? = null - var updateDate: Date? = null - var creator: String? = null - var updater: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/converter/ICommonsConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/converter/ICommonsConverter.kt deleted file mode 100644 index b5b9114a6b93a20007d3568e65b1e83b1e873991..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/converter/ICommonsConverter.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.commons.service.converter - -import com.example.kotlinspring01.base.service.converter.IBaseConverter -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo - -interface ICommonsConverter : IBaseConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDao.kt deleted file mode 100644 index 2311b855e02c332bc5122d54d790a82277d6abb8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.commons.service.dao - -import com.example.kotlinspring01.base.service.dao.IBaseDao -import com.example.kotlinspring01.commons.pojo.CommonsPojo - -interface ICommonsDao : IBaseDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDaoImpl.kt deleted file mode 100644 index 08ade70ca9354f9af1442dac2ec27e78e0c204f2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDaoImpl.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.commons.service.dao - -import com.example.kotlinspring01.base.service.dao.IBaseDaoImpl -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import org.jooq.DSLContext - - -abstract class ICommonsDaoImpl>( - override val dslContext: DSLContext -) : IBaseDaoImpl( - dslContext -), ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsService.kt deleted file mode 100644 index adf1df3b603660802f569205ad48bfd3fab7a714..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsService.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.commons.service.service - -import com.example.kotlinspring01.base.service.service.IBaseService -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo - -interface ICommonsService> : IBaseService { - fun logicDelete(id: List) -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsServiceImpl.kt deleted file mode 100644 index 7ca6dab70e3f992dfc3f38ce2db3dc721f467ed0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsServiceImpl.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.example.kotlinspring01.commons.service.service - -import com.example.kotlinspring01.base.service.service.IBaseServiceImpl -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import org.springframework.transaction.annotation.Transactional -import java.util.* - -@Transactional -abstract class ICommonsServiceImpl, S : ICommonsDao, C : ICommonsConverter>(daoService: S, converter: C) : IBaseServiceImpl(daoService, converter), ICommonsService { - override fun logicDelete(id: List) { - daoService.deleteByIds(id) - } - -// override fun insert(t: V): Boolean { -// t.createDate = Date() -// t.updateDate = Date() -// return super.insert(t) -// } -// -// override fun update(v: V): Boolean { -// v.updateDate = Date() -// return super.update(v) -// } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersController.kt deleted file mode 100644 index 09a2938ff5cfb167f54cb498b5feeaae2138d04a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.customers.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo -import com.example.kotlinspring01.customers.service.service.ICustomersService -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - - -@RestController -class CustomersController(val service: ICustomersService) : CommonsController(service), ICustomersController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersController.kt deleted file mode 100644 index 7cc43d8de6617825f26d4a737be50488f4958e15..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.customers.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/customers") -interface ICustomersController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerStatesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerStatesEnum.kt deleted file mode 100644 index c8a2478f661d9dc366170b97718a24e68ec7b80c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerStatesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.customers.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class CustomerStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - ENABLE(0, "启用"), - DISABLE(1, "停用"), - ABNORMAL(20, "异常"); - - companion object { - @JsonCreator - fun getItem(code: String): CustomerStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerTypesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerTypesEnum.kt deleted file mode 100644 index 64954ceca82fb61c58b0198abfb27b23bb8a3af0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerTypesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.customers.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class CustomerTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - GENERAL_USER(0, "普通用户"), - VIP_USER(1, "VIP用户"), - VVIP_USER(2, "高级VIP会员"); - - companion object { - @JsonCreator - fun getItem(code: String): CustomerTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersMapper.kt deleted file mode 100644 index 9b8d75d48946032ac69515cafee4979948c557bf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.customers.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.customers.pojo.Customers -import org.apache.ibatis.annotations.Mapper - - -@Mapper -interface ICustomersMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/Customers.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/Customers.kt deleted file mode 100644 index 6f8cccbff4b9b91795dfa7a24de84a373b3b552c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/Customers.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import cn.hutool.extra.pinyin.PinyinUtil -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.customers.enumerate.CustomerStatesEnum -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum -import javax.persistence.Entity - - -@Entity -open class Customers : CommonsPojo() { - var name: String? = null - var namePinYin: String? = null - set(value) { - field = value ?: PinyinUtil.getPinyin(name, "") ?: "" - } - var namePinYinSimple: String? = null - set(value) { - field = value ?: PinyinUtil.getFirstLetter(name, "") ?: "" - } - var age: Int? = null - var type: CustomerTypesEnum? = null - var idCardNo: String? = null - var contactNumber: String? = null - var bindPhone: String? = null - set(value) { - field = value ?: contactNumber ?: "" - } - var state: CustomerStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersAos.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersAos.kt deleted file mode 100644 index 03936b6b6c2575ba4ba484d303e58c4aef01f383..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersAos.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.customers.enumerate.CustomerStatesEnum -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum -import java.util.* - -sealed class CustomersAos : Customers() { - - class CustomerAo : CustomersAos() { - val typeName: String? - get() = type?.name - val typeCode - get() = type?.code - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersQuery.kt deleted file mode 100644 index 6d5e47b1dbffd624dd26993fe1ff5e62205b525b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersQuery.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndGreaterThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLessThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - - -class CustomersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var type: CustomerTypesEnum? = null - - @AndLessThanOrEqualTo(property = "age") - var age2: Int? = null - - @AndGreaterThanOrEqualTo(property = "age") - var age1: Int? = null - - @AndLike - var name: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersVo.kt deleted file mode 100644 index 07ff960c5ea258fd74b5498c72c1dcf10785a5d5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersVo.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.customers.enumerate.CustomerStatesEnum -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum -import java.util.* - -class CustomersVo : CommonsVoPojo() { - - var name: String? = null - var age: Int? = null - var type: CustomerTypesEnum? = null - var idCardNo: String? = null - var state: CustomerStatesEnum? = null - var namePinYin: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConverter.kt deleted file mode 100644 index 5ce4e3b424d8610a603c89f53557769b4829b5be..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.customers.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersAos -import com.example.kotlinspring01.customers.pojo.CustomersVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface ICustomersConverter : ICommonsConverter { - fun ao(customers: Customers?): CustomersAos.CustomerAo? - fun aos(customers: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDao.kt deleted file mode 100644 index 7d01241f6f7da1c2076488f6c60f26413845e72e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.customers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.customers.pojo.Customers - - -interface ICustomersDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDaoImpl.kt deleted file mode 100644 index c4db8b51c05a0a5365bd6501050146b6a79155b8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDaoImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.customers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.customers.mapper.ICustomersMapper -import com.example.kotlinspring01.customers.pojo.Customers -import org.jooq.DSLContext -import org.springframework.stereotype.Service - - -@Service -class ICustomersDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), ICustomersDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersService.kt deleted file mode 100644 index a9be56363b1786f41dfb67d0729e1e83ac5ebbd4..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.customers.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo - -interface ICustomersService : ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersServiceImpl.kt deleted file mode 100644 index 6cebf34396fc1f430796bd81b9f68a2327f0b8ea..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersServiceImpl.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.example.kotlinspring01.customers.service.service - -import cn.hutool.core.util.ObjectUtil -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersAos -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo -import com.example.kotlinspring01.customers.service.converter.ICustomersConverter -import com.example.kotlinspring01.customers.service.dao.ICustomersDao -import org.springframework.stereotype.Service - -@Service -class ICustomersServiceImpl(override val daoService: ICustomersDao, override val converter: ICustomersConverter) : ICommonsServiceImpl(daoService, converter), ICustomersService { - override fun get(id: Long): Customers? { - val customers = super.get(id) - return converter.ao(customers) - } - - override fun list(q: CustomersQuery): List? { - val list = super.list(q) - return converter.aos(list) - } - - override fun queryWrapper(q: CustomersQuery): Wrapper? { - val wrapper = LambdaQueryWrapper() - wrapper.eq(ObjectUtil.isNotEmpty(q.id), Customers::id, q.id) - wrapper.`in`(ObjectUtil.isNotEmpty(q.ids), Customers::id, q.ids) - return wrapper - } -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/controller/CustomersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/controller/CustomersController.kt deleted file mode 100644 index 0e4e9e68eba879a9e1f1af3bbf1c1d1c5aee652d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/controller/CustomersController.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.cutomers.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.cutomers.pojo.Customers -import com.example.kotlinspring01.cutomers.pojo.CustomersQuery -import com.example.kotlinspring01.cutomers.pojo.CustomersVo -import com.example.kotlinspring01.cutomers.service.service.ICustomersService -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - - -@RestController -@RequestMapping("/customers") -class CustomersController(val service: ICustomersService) : CommonsController(service), ICustomersController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/controller/ICustomersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/controller/ICustomersController.kt deleted file mode 100644 index c4f40a7d8e49fd7fa3bd93d11dd28ec5681e2db9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/controller/ICustomersController.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.cutomers.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.cutomers.pojo.Customers -import com.example.kotlinspring01.cutomers.pojo.CustomersQuery -import com.example.kotlinspring01.cutomers.pojo.CustomersVo - - -interface ICustomersController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/enumerate/CustomerTypesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/enumerate/CustomerTypesEnum.kt deleted file mode 100644 index 6a4474f8479b020fde512a1337e14f86f4ef353e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/enumerate/CustomerTypesEnum.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.example.kotlinspring01.cutomers.enumerate - -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class CustomerTypesEnum(val code: Int, @JsonValue val value: String) { - GENERAL_USER(0, "普通用户"), - VIP_USER(1, "VIP用户"), - VVIP_USER(2, "高级VIP会员"); - - companion object { - @JsonCreator - fun getItem(int: Int): CustomerTypesEnum? { - for (customerTypesEnum in values()) { - if (customerTypesEnum.code == int) { - return customerTypesEnum - } - } - return null - } - } - - override fun toString(): String { - return this.value - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/mapper/ICustomersMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/mapper/ICustomersMapper.kt deleted file mode 100644 index 8e4dfd89dacb952583eae378469099b5e0bc4938..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/mapper/ICustomersMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.cutomers.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.cutomers.pojo.Customers -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface ICustomersMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/Customers.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/Customers.kt deleted file mode 100644 index 0c3d5e36a89af8af588c3a47d0a54c6b652030e2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/Customers.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.example.kotlinspring01.cutomers.pojo - -import com.baomidou.mybatisplus.annotation.TableField -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.cutomers.enumerate.CustomerTypesEnum -import lombok.Data -import org.apache.ibatis.type.EnumTypeHandler -import org.apache.ibatis.type.JdbcType -import tk.mybatis.mapper.annotation.ColumnType -import java.util.* -import javax.persistence.Column -import javax.persistence.Entity - -//@Data -@Entity -class Customers : CommonsPojo { - var name: String? - var age: Int? - var type: CustomerTypesEnum? - var idCardNo: String? - - constructor(id: Long?, createDate: Date?, updateDate: Date?, creator: String?, updater: String?, name: String?, age: Int?, type: CustomerTypesEnum?, idCardNo: String?) : super( - id, - createDate, - updateDate, - creator, - updater - ) { - this.name = name - this.age = age - this.type = type - this.idCardNo = idCardNo - } - - constructor() : this(null, null, null, null, null, null, null, null, null) - -// constructor() : this(null, null, null, null, null, null, null, null) -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersAo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersAo.kt deleted file mode 100644 index 208648f71b33b166ed73a51bbce76fc78bb86ac5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersAo.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.example.kotlinspring01.cutomers.pojo - -import com.example.kotlinspring01.cutomers.enumerate.CustomerTypesEnum -import com.fasterxml.jackson.annotation.JsonIgnore -import lombok.Data -import java.util.* - -@Data -data class CustomersAo( - override var id: Long?, - override var createDate: Date?, - override var updateDate: Date?, - override var creator: String?, - override var updater: String?, - override var name: String?, - override var age: Int?, - override var type: CustomerTypesEnum? -) : Customers( - id, - createDate, - updateDate, - creator, - updater, - name, - age, - type -) { -// var typeName = type?.let { CustomerTypesEnum.getItem(it)?.toString() } - - constructor() : this(null, null, null, null, null, null, null, null) - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersQuery.kt deleted file mode 100644 index ce4e5663ec6897c7339e40fbea3db253af8f1905..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersQuery.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.example.kotlinspring01.cutomers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.cutomers.enumerate.CustomerTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndGreaterThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLessThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import lombok.Data -import tk.mybatis.mapper.entity.Example -import java.util.* - -//@Data -class CustomersQuery : CommonsQueryPojo, MybatisExampleForTk { - @AndEqualTo - var type: CustomerTypesEnum? - - @AndLessThanOrEqualTo(property = "age") - var age2: Int? - - @AndGreaterThanOrEqualTo(property = "age") - var age1: Int? - - @AndLike - var name: String? - - constructor() : this(null, null, null, null, null, null, null, null, null, null, null) - - constructor(page: Int?, limit: Int?, id: Long?, ids: List?, createDate1: Date?, createDate2: Date?, creator: String?, name: String?, age1: Int?, age2: Int?, type: CustomerTypesEnum?) : super( - page, - limit, - id, - ids, - createDate1, - createDate2, - creator - ) { - this.type = type - this.age2 = age2 - this.age1 = age1 - this.name = name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersVo.kt deleted file mode 100644 index 1677c05ddc8246401789fb652d3048603a941b78..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/pojo/CustomersVo.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.kotlinspring01.cutomers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.cutomers.enumerate.CustomerTypesEnum -import lombok.Data -import java.util.* - -//@Data -class CustomersVo : CommonsVoPojo { -// constructor() : this(null, null, null, null, null, null, null, null) - - var name: String? - var age: Int? - var type: CustomerTypesEnum? - var idCardNo: String? - - constructor() : this(null, null, null, null, null, null, null, null, null) - - constructor(id: Long?, createDate: Date?, updateDate: Date?, creator: String?, updater: String?, name: String?, age: Int?, type: CustomerTypesEnum?, idCardNo: String?) : super( - id, - createDate, - updateDate, - creator, - updater - ) { - this.name = name - this.age = age - this.type = type - this.idCardNo = idCardNo - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/converter/ICustomersConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/converter/ICustomersConverter.kt deleted file mode 100644 index 047f43530dffa6eebe4ac3b8b87924e94936d746..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/converter/ICustomersConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.cutomers.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.cutomers.pojo.Customers -import com.example.kotlinspring01.cutomers.pojo.CustomersVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface ICustomersConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/dao/ICustomersDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/dao/ICustomersDao.kt deleted file mode 100644 index 76696e8e3490969b320d846380c3252f8cd425ef..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/dao/ICustomersDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.cutomers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.cutomers.pojo.Customers - - -interface ICustomersDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/dao/ICustomersDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/dao/ICustomersDaoImpl.kt deleted file mode 100644 index aa7ff9bb6501e8ac0960bbcc1ba1ce88bcf38d91..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/dao/ICustomersDaoImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.cutomers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.cutomers.mapper.ICustomersMapper -import com.example.kotlinspring01.cutomers.pojo.Customers -import org.jooq.DSLContext -import org.springframework.stereotype.Service - - -@Service -class ICustomersDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), ICustomersDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/service/ICustomersService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/service/ICustomersService.kt deleted file mode 100644 index 5892ca933a47cea0c1aa058fc90c0e6b76833b80..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/service/ICustomersService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.cutomers.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.cutomers.pojo.Customers -import com.example.kotlinspring01.cutomers.pojo.CustomersQuery -import com.example.kotlinspring01.cutomers.pojo.CustomersVo - -interface ICustomersService:ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/service/ICustomersServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/service/ICustomersServiceImpl.kt deleted file mode 100644 index d0db0f07a62081432e81014f6773bf04398edb36..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/cutomers/service/service/ICustomersServiceImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.cutomers.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.cutomers.pojo.Customers -import com.example.kotlinspring01.cutomers.pojo.CustomersQuery -import com.example.kotlinspring01.cutomers.pojo.CustomersVo -import com.example.kotlinspring01.cutomers.service.converter.ICustomersConverter -import com.example.kotlinspring01.cutomers.service.dao.ICustomersDao -import org.springframework.stereotype.Service - -@Service -class ICustomersServiceImpl(override val daoService: ICustomersDao, override val converter: ICustomersConverter) : ICommonsServiceImpl(daoService, converter), ICustomersService { -// override fun get(id: Long): Customers? { -// val customers = super.get(id) -// return converter.convertToAo(customers) -// } -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/controller/DevicesController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/controller/DevicesController.kt deleted file mode 100644 index 54af6f5fe9f40254f3cd74ecffa66b65947feb5a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/controller/DevicesController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.devices.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo -import com.example.kotlinspring01.devices.service.service.IDevicesService -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - - -@RestController -class DevicesController(val service: IDevicesService) : CommonsController(service), IDevicesController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/controller/IDevicesController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/controller/IDevicesController.kt deleted file mode 100644 index e0b815eb06a87d33ff1d44be9b1e2e1f9b4d8efe..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/controller/IDevicesController.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.devices.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo -import org.springframework.web.bind.annotation.RequestMapping - - -@RequestMapping("/devices") -interface IDevicesController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceTypesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceTypesEnum.kt deleted file mode 100644 index f2ffc074abc0824e994cf7bfd52173cf327dee8d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceTypesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.devices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class DeviceTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - INDOOR_EQUIPMENT(0, "室内设备"), - OUTDOOR_EQUIPMENT(1, "室外设备"); - - - companion object { - @JsonCreator - fun getItem(code: String): DeviceTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDevicesMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDevicesMapper.kt deleted file mode 100644 index c31d978fd0095f60776763ccf0105bf550ad796f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDevicesMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.devices.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.devices.pojo.Devices -import org.apache.ibatis.annotations.Mapper - - -@Mapper -interface IDevicesMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/Devices.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/Devices.kt deleted file mode 100644 index 58e80b4edfa1db03d72348e889f548c4d62b800f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/Devices.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.devices.enumerate.DeviceTypesEnum -import java.util.* -import javax.persistence.Entity - - -@Entity -class Devices : CommonsPojo() { - var code: String? = null - var name: String? = null - var type: DeviceTypesEnum? = null - var filePath: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesQuery.kt deleted file mode 100644 index bdc8e53ba71734e950432d2c656bcea7531d0fc2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesQuery.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.devices.enumerate.DeviceTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - - -class DevicesQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var type: DeviceTypesEnum? = null - - @AndLike - var name: String? = null - - @AndLike - var code: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesVo.kt deleted file mode 100644 index ccb925a136fedc3dd40bea35c402991ecb791959..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesVo.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.devices.enumerate.DeviceTypesEnum -import java.util.* - -class DevicesVo : CommonsVoPojo() { - var code: String? = null - var name: String? = null - var type: DeviceTypesEnum? = null - var filePath: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDevicesConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDevicesConverter.kt deleted file mode 100644 index b56082bbc15997c269d6a12b855f8a6928b2aae5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDevicesConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.devices.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IDevicesConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDao.kt deleted file mode 100644 index fb729fc297847f0abf47a4e563c8749c957e9ae3..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.devices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.devices.pojo.Devices - - -interface IDevicesDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDaoImpl.kt deleted file mode 100644 index 0beb3bac158021c0da92fbceeb83823c64232f1a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDaoImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.devices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.devices.mapper.IDevicesMapper -import com.example.kotlinspring01.devices.pojo.Devices -import org.jooq.DSLContext -import org.springframework.stereotype.Service - - -@Service -class IDevicesDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), IDevicesDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesService.kt deleted file mode 100644 index 35118a6784dc4da4c87dd17f2c1890479ca999fd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.devices.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo - -interface IDevicesService : ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesServiceImpl.kt deleted file mode 100644 index ef29cb21bebc7802aee02ee0a53c87fad9c67af1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesServiceImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.devices.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo -import com.example.kotlinspring01.devices.service.converter.IDevicesConverter -import com.example.kotlinspring01.devices.service.dao.IDevicesDao -import org.springframework.stereotype.Service - -@Service -class IDevicesServiceImpl(override val daoService: IDevicesDao, override val converter: IDevicesConverter) : ICommonsServiceImpl(daoService, converter), IDevicesService { - override fun queryWrapper(q: DevicesQuery): Wrapper? { - TODO("Not yet implemented") - } -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/controller/IOrdersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/controller/IOrdersController.kt deleted file mode 100644 index c6f3b4b69952b891b330e051526ec503af5ca140..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/controller/IOrdersController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.orders.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/orders") -interface IOrdersController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/controller/OrdersController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/controller/OrdersController.kt deleted file mode 100644 index 80b74214c8a9535aaef583c25798329cf272f788..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/controller/OrdersController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.orders.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo -import com.example.kotlinspring01.orders.service.service.IOrdersService -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - - -@RestController -class OrdersController(val service: IOrdersService) : CommonsController(service), IOrdersController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderStatesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderStatesEnum.kt deleted file mode 100644 index f9af9ae472f49833887fdec6f33a03c821b40a5b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderStatesEnum.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.example.kotlinspring01.orders.enumurate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class OrderStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - PLACE_AN_ORDER(100, "下单"), - USING(200, "使用中"), - APPOINTMENT_WAITING_FOR_USE(300, "预约等待使用"), - END_USE(400, "结束使用"), - PAYMENTS(501, "支付中"), - PAID(502, "已支付"), - CANCEL_PAYMENT(503, "取消支付"), - ORDER_COMPLETED(600, "订单完成"), - CANCEL_ORDER(700, "订单取消"), - CUSTOMER_CANCEL_ORDER(701, "客户取消订单"), - APPOINTMENT_OVERTIME_TO_CANCEL_THE_ORDER(702, "预约超时,取消订单"), - ORDER_EXCEPTION(800, "订单异常"), - ; - - companion object { - @JsonCreator - fun getItem(code: String): OrderStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderTypesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderTypesEnum.kt deleted file mode 100644 index 12fbc51b575e82dadf2b517d491759edcaacdd78..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderTypesEnum.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.example.kotlinspring01.orders.enumurate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class OrderTypesEnum(val code: Int, @JsonValue val value: String, val operation: String) : IBaseEnum { - NORMAL_ORDER(0, "普通订单", "normalOrderOperation"), - RESERVATION_ORDER(1, "预约订单", "reservationOrderOperation") - ; - - companion object { - @JsonCreator - fun getItem(code: String): OrderTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IPricesMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IPricesMapper.kt deleted file mode 100644 index 92abadb16bd265e953c95f735f6df9678da7d698..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IPricesMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.orders.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.orders.pojo.Orders -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IOrdersMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/Orders.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/Orders.kt deleted file mode 100644 index b24f162060f4c3d40e954658f554a6ae7144a7de..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/Orders.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import java.math.BigDecimal -import java.util.* - -open class Orders : CommonsPojo() { - var orderNo: String? = null - var type: OrderTypesEnum? = null - var customerId: Long? = null - var totalOrders: BigDecimal? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersAos.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersAos.kt deleted file mode 100644 index 9ce5c61cae757d4c4045a6d130708d38d2427b0c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersAos.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import java.math.BigDecimal -import java.util.* - -sealed class OrdersAos : Orders() { - class OrdersAo : OrdersAos() { - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersQuery.kt deleted file mode 100644 index ca6f0f0e81003b22ec07733061223046b2ec4b05..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersQuery.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - -class OrdersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var oderNo: String? = null - - @AndEqualTo - var type: OrderTypesEnum? = null - - @AndEqualTo - var customerId: Long? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersVo.kt deleted file mode 100644 index a237abf55edda06280f0be8a15076ef8c1cb436d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersVo.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import java.math.BigDecimal -import java.util.* - -class OrdersVo : CommonsVoPojo() { - var orderNo: String? = null - var type: OrderTypesEnum? = null - var customerId: Long? = null - var totalOrders: BigDecimal? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/converter/IOrdersConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/converter/IOrdersConverter.kt deleted file mode 100644 index f829236c183771b14c5b371068845efd64c873d0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/converter/IOrdersConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.orders.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersAos -import com.example.kotlinspring01.orders.pojo.OrdersVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IOrdersConverter : ICommonsConverter { - fun ao(orders: Orders?): OrdersAos.OrdersAo? - fun aos(orders: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDao.kt deleted file mode 100644 index 9ab479e1614a45f760dac4ad58cf1736923280d7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.orders.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.orders.pojo.Orders - - -interface IOrdersDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDaoImpl.kt deleted file mode 100644 index 76e03e93f2a33e168b857354ecb1242d35c24bcf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDaoImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.orders.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.orders.mapper.IOrdersMapper -import com.example.kotlinspring01.orders.pojo.Orders -import org.jooq.DSLContext -import org.springframework.stereotype.Service - - -@Service -class IOrdersDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), IOrdersDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersService.kt deleted file mode 100644 index 8cf5f57a56ead9d90464d54d0b61c84e97b0aa2f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.orders.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo - -interface IOrdersService : ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersServiceImpl.kt deleted file mode 100644 index ab842f2c64828826fa233d91612f47db4a776898..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersServiceImpl.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.example.kotlinspring01.orders.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo -import com.example.kotlinspring01.orders.service.converter.IOrdersConverter -import com.example.kotlinspring01.orders.service.dao.IOrdersDao -import org.springframework.stereotype.Service - -@Service -class IOrdersServiceImpl(override val daoService: IOrdersDao, override val converter: IOrdersConverter) : ICommonsServiceImpl(daoService, converter), IOrdersService { - override fun get(id: Long): Orders? { - val orders = super.get(id) - return converter.ao(orders) - } - - override fun list(q: OrdersQuery): List? { - val list = super.list(q) - return converter.aos(list) - } - - override fun queryWrapper(q: OrdersQuery): Wrapper? { - TODO("Not yet implemented") - } -} diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/controller/IPricesController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/controller/IPricesController.kt deleted file mode 100644 index 898f3fcd5f5aa59558f45907d77a262604f81677..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/controller/IPricesController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.prices.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/prices") -interface IPricesController : ICommonsController diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/controller/PricesController.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/controller/PricesController.kt deleted file mode 100644 index 3b85e92f19b8093934a5c1df2987ef53baec2ce1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/controller/PricesController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.prices.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo -import com.example.kotlinspring01.prices.service.service.IPricesService -import org.springframework.web.bind.annotation.RequestMapping -import org.springframework.web.bind.annotation.RestController - - -@RestController -class PricesController(val service: IPricesService) : CommonsController(service), IPricesController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceStatesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceStatesEnum.kt deleted file mode 100644 index f486fba82ae146e0b32cffeb0b552f0080141324..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceStatesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.prices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class PriceStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - ENABLE(0, "启用"), - DISABLE(1, "停用") - ; - - companion object { - @JsonCreator - fun getItem(code: String): PriceStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceTypesEnum.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceTypesEnum.kt deleted file mode 100644 index 3880c814c0d01ec26055ac83fd5668af757730c2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceTypesEnum.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.example.kotlinspring01.prices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class PriceTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - WATER(0, "水费"), - TIME(1, "时间"), - ELECTRICITY(2, "电费"); - - companion object { - @JsonCreator - fun getItem(code: String): PriceTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/mapper/IPricesMapper.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/mapper/IPricesMapper.kt deleted file mode 100644 index 26101323af906ba1ae968d4220fa0bdbb9a81495..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/mapper/IPricesMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.prices.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.prices.pojo.Prices -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IPricesMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/Prices.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/Prices.kt deleted file mode 100644 index 81b2a4ec1b126130ef8eae206b0dc2679b66d892..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/Prices.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import java.math.BigDecimal -import java.util.* - - -open class Prices : CommonsPojo() { - var name: String? = null - var type: PriceTypesEnum? = null - var price: BigDecimal? = null - var state: PriceStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesAos.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesAos.kt deleted file mode 100644 index 86074978fabecde37ec73afdfb4ed047cb885e61..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesAos.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import java.math.BigDecimal -import java.util.* - -sealed class PricesAos : Prices() { - - - class PricesAo : PricesAos() { - val typeCode: Int? - get() { - return type?.code - } - val typeName: String? - get() { - return type?.name - } - val stateCode: Int? - get() { - return state?.code - } - val stateName: String? - get() { - return state?.name - } - - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesQuery.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesQuery.kt deleted file mode 100644 index 0e6d9ed01f526ddfc4a50b382703c4151de93198..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesQuery.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example -import java.util.* - - -class PricesQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var type: PriceTypesEnum? = null - - @AndEqualTo - var state: PriceStatesEnum? = null - - @AndLike - var name: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesVo.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesVo.kt deleted file mode 100644 index 5586fc7191c9b159ff0c9c1bca1765e4cb989e3a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesVo.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import java.math.BigDecimal -import java.util.* - -class PricesVo : CommonsVoPojo() { - - var name: String? = null - var type: PriceTypesEnum? = null - var price: BigDecimal? = null - var state: PriceStatesEnum? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/converter/IPricesConverter.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/converter/IPricesConverter.kt deleted file mode 100644 index c9848cefb84644c207883177ea468305fa2d6cbb..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/converter/IPricesConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.prices.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesAos -import com.example.kotlinspring01.prices.pojo.PricesVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IPricesConverter : ICommonsConverter { - fun ao(prices: Prices?): PricesAos.PricesAo? - fun aos(prices: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDao.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDao.kt deleted file mode 100644 index fc4456f22f7c6ddfdd7876e003fde45746655e04..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.prices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.prices.pojo.Prices - - -interface IPricesDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDaoImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDaoImpl.kt deleted file mode 100644 index 1a472638d3a55dd39b560b1df81c9454619c6c4c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDaoImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.prices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.prices.mapper.IPricesMapper -import com.example.kotlinspring01.prices.pojo.Prices -import org.jooq.DSLContext -import org.springframework.stereotype.Service - - -@Service -class IPricesDaoImpl(dslContext: DSLContext) : ICommonsDaoImpl(dslContext), IPricesDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesService.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesService.kt deleted file mode 100644 index a8d699fbcaabb327e8dfd3346ecf45c64e603004..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.prices.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo - -interface IPricesService : ICommonsService { -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesServiceImpl.kt b/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesServiceImpl.kt deleted file mode 100644 index 9c8b403776e3e52cdb52b9e5daeee03a3e5198be..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesServiceImpl.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.example.kotlinspring01.prices.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo -import com.example.kotlinspring01.prices.service.converter.IPricesConverter -import com.example.kotlinspring01.prices.service.dao.IPricesDao -import org.springframework.stereotype.Service - -@Service -class IPricesServiceImpl(override val daoService: IPricesDao, override val converter: IPricesConverter) : ICommonsServiceImpl(daoService, converter), IPricesService { - override fun get(id: Long): Prices? { - val prices = super.get(id) - return converter.ao(prices) - } - - override fun list(q: PricesQuery): List? { - val list = super.list(q) - return converter.aos(list) - } - - override fun queryWrapper(q: PricesQuery): Wrapper? { - TODO("Not yet implemented") - } -} diff --git a/maven/kotlin-spring-01/src/main/resources/application.yml b/maven/kotlin-spring-01/src/main/resources/application.yml deleted file mode 100644 index 6899489313c82518d0853febbf61c01a3a103ad7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/resources/application.yml +++ /dev/null @@ -1,39 +0,0 @@ -mybatis: - mapper-locations: classpath*:mappers/*.xml -mybatis-plus: - mapper-locations: ${mybatis.mapper-locations} -mapper: - enum-as-simple-type: true -spring: - datasource: - username: root - password: root - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/kotlin_spring_01?serverTimezone=Asia/Shanghai - druid: - share-prepared-statements: true - filter: - stat: - slow-sql-millis: 1 - log-slow-sql: true - security: - user: - password: admin - name: admin - jackson: - date-format: yyyy-MM-dd HH:mm:ss.SSS - time-zone: GMT+8 - locale: zh_CN - mvc: - format: - date: yyyy-MM-dd - date-time: yyyy-MM-dd HH:mm:ss - time: HH:mm:ss - locale: zh_CN -logging: - level: - root: error - com.example.kotlinspring01: debug - web: debug -server: - port: 8000 diff --git a/maven/kotlin-spring-01/src/main/resources/mappers/IUsersMapper.xml b/maven/kotlin-spring-01/src/main/resources/mappers/IUsersMapper.xml deleted file mode 100644 index c3df17a7f0ca736dc4285236dcce2b05ebfe32d9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/main/resources/mappers/IUsersMapper.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/KotlinSpring01Application.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/KotlinSpring01Application.kt deleted file mode 100644 index b3ee0cb753ac7b4b186b6961c96e3196a378d1a0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/KotlinSpring01Application.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01 - -import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.boot.runApplication - - -@SpringBootApplication -class KotlinSpring01Application - -fun main(args: Array) { - runApplication(*args) -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IPermissionsController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IPermissionsController.kt deleted file mode 100644 index 9a37e475039f6befd7a9e7c95a8744a67f6b99dd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IPermissionsController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.commons.controller.ICommonsController -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/permissions") -interface IPermissionsController : ICommonsController diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IRolesController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IRolesController.kt deleted file mode 100644 index aef6e26deff9b92ada70825460b81fe903cd7a26..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IRolesController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.commons.controller.ICommonsController -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/roles") -interface IRolesController : ICommonsController diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IUsersController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IUsersController.kt deleted file mode 100644 index 789c482a82a8eb2f8372e19a817a4f9e8059b961..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/IUsersController.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.commons.controller.ICommonsController -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/users") -interface IUsersController : ICommonsController { - @GetMapping("/{id}/detail") - fun getDetail(@PathVariable("id") id: Long): Users? - - @GetMapping("/{id}/brief") - fun getBrief(@PathVariable("id") id: Long): Users? - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/PermissionsController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/PermissionsController.kt deleted file mode 100644 index af5fa04a8ac67136ae92ffc64b54ba0bbf0abd59..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/PermissionsController.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.auths.service.service.IPermissionsService -import com.example.kotlinspring01.commons.controller.CommonsController -import org.springframework.web.bind.annotation.RestController - -@RestController -class PermissionsController(service: IPermissionsService) : CommonsController(service), IPermissionsController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/RolesController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/RolesController.kt deleted file mode 100644 index 03fefddf30690a599370972678a4a1d673091365..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/RolesController.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.auths.service.service.IRolesService -import com.example.kotlinspring01.commons.controller.CommonsController -import org.springframework.web.bind.annotation.RestController - -@RestController -class RolesController(rolesService: IRolesService) : CommonsController(rolesService), IRolesController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/UsersController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/UsersController.kt deleted file mode 100644 index 85c76949c653cd6b2e3af29864e96a7617dfc8a9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/controller/UsersController.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.auths.controller - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.auths.service.service.IUsersService -import com.example.kotlinspring01.commons.controller.CommonsController -import org.springframework.web.bind.annotation.RestController - -@RestController -class UsersController(val usersService: IUsersService) : CommonsController(usersService), IUsersController { - override fun getDetail(id: Long): Users? = usersService.getDetailById(id) - - override fun getBrief(id: Long): Users? = usersService.get(id) -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/enumerate/UserStatesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/enumerate/UserStatesEnum.kt deleted file mode 100644 index c543e19b1afbc90cc612552265ce942e36e103ad..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/enumerate/UserStatesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.auths.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class UserStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - VALID(0, "有效"), - INVALID(1, "无效"); - - - companion object { - @JsonCreator - fun getItem(code: String): UserStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IPermissionsMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IPermissionsMapper.kt deleted file mode 100644 index c06b77e173c5cd655e91267e56cb64ca784ae38d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IPermissionsMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.mapper - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IPermissionsMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IRolesMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IRolesMapper.kt deleted file mode 100644 index 2db19f7c923228bd19f4110f94badb429fba0368..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IRolesMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.mapper - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IRolesMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IUsersMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IUsersMapper.kt deleted file mode 100644 index 6ac4cf8be40eaae7c8c795e879078d81743e8ccd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/mapper/IUsersMapper.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.mapper - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IUsersMapper : ICommonsMapper { - fun selectUsernameById(id: Long): String? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Permissions.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Permissions.kt deleted file mode 100644 index 2b40a7e6205861fcbc76574b4c0ba926f5735ad9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Permissions.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo - - -class Permissions : CommonsPojo() { - var name: String? = null - var description: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsQuery.kt deleted file mode 100644 index a9c33de5819827b35052948a15ab6c1dd6fb775e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsQuery.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class PermissionsQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var name: String? = null -} - diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsVo.kt deleted file mode 100644 index 0ba1d4366fcd22441ba8ca3b13fbfe107bdd34ee..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/PermissionsVo.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo - -class PermissionsVo : CommonsVoPojo() { - var description: String? = null - - var name: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Roles.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Roles.kt deleted file mode 100644 index bcc3e27b55c450ee2d2d9c5b5488f327d495e6b9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Roles.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo - -class Roles : CommonsPojo() { - - var name: String? = null - var description: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesQuery.kt deleted file mode 100644 index e506f7003fcb10804492b737269258ad6744c15c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesQuery.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class RolesQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var name: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesVo.kt deleted file mode 100644 index 8aa168803c78f055385b704d313550f13aec5ac0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/RolesVo.kt +++ /dev/null @@ -1,13 +0,0 @@ -@file:Suppress("unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused") - -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo - -class RolesVo : CommonsVoPojo() { - var permissionsVo: List? = null - var description: String? = null - var name: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Users.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Users.kt deleted file mode 100644 index 04bd3d92c029054f84f4f0b76ca903cd78deb008..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/Users.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.example.kotlinspring01.commons.pojo.CommonsPojo - - -open class Users : CommonsPojo() { - var username: String? = null - var name: String? = null - var password: String? = null - var state: UserStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersAos.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersAos.kt deleted file mode 100644 index 741eb11d1d8294863ef0891dcbac79828f52d717..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersAos.kt +++ /dev/null @@ -1,24 +0,0 @@ -@file:Suppress("unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused") - -package com.example.kotlinspring01.auths.pojo - -sealed class UsersAos : Users() { - - - open class UserAo : UsersAos() { - val stateCode: Int? - get() { - return state?.code - } - val stateName: String? - get() { - return state?.name - } - - } - - class UserRoleAo : UserAo() { - var roles: List? = null - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersQuery.kt deleted file mode 100644 index 598ff068791f5cd1368358b0d590fe7bcdbb6bcd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersQuery.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class UsersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var username: String? = null - - @AndLike - var name: String? = null - - @AndEqualTo - var state: UserStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersVo.kt deleted file mode 100644 index 14647696e26449a8adf602cd8cde2ac4603eceb1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/pojo/UsersVo.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.auths.pojo - -import com.example.kotlinspring01.auths.enumerate.UserStatesEnum -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo - -class UsersVo : CommonsVoPojo() { - var roles: List? = null - var password: String? = null - var name: String? = null - var username: String? = null - var state: UserStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IPermissionsConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IPermissionsConverter.kt deleted file mode 100644 index ccd56e9a9cc7ab1fae069f2ef22ef44fa0b7b4dc..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IPermissionsConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.converter - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IPermissionsConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IRolesConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IRolesConverter.kt deleted file mode 100644 index 95b9dbd1f150931b6fa6ec084595f99d8b82c88c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IRolesConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.converter - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IRolesConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IUsersConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IUsersConverter.kt deleted file mode 100644 index 2fbfa3cea0c0c5e34d8de834b2386342dc2a35fc..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/converter/IUsersConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.auths.service.converter - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersAos -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IUsersConverter : ICommonsConverter { - fun ao(users: Users?): UsersAos.UserAo? - fun userRoleAo(users: Users?): UsersAos.UserRoleAo? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDao.kt deleted file mode 100644 index 40f145debd599bc407deb3c89390d3c1b963104c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.commons.service.dao.ICommonsDao - -interface IPermissionsDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDaoImpl.kt deleted file mode 100644 index f14652c4d213119e4186b2eb7bc0f8b393669c39..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IPermissionsDaoImpl.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.mapper.IPermissionsMapper -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import org.springframework.stereotype.Service - -@Service -class IPermissionsDaoImpl : ICommonsDaoImpl(), IPermissionsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDao.kt deleted file mode 100644 index 9e1053e49b615569d3ced63e585cc754bbeaa82f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.commons.service.dao.ICommonsDao - -interface IRolesDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDaoImpl.kt deleted file mode 100644 index 9c10e335200f3c8e636e253d04b99c20434d9c9a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IRolesDaoImpl.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.mapper.IRolesMapper -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import org.springframework.stereotype.Service - -@Service -class IRolesDaoImpl : ICommonsDaoImpl(), IRolesDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDao.kt deleted file mode 100644 index f2efa9990e785caf111812edda895294668de9cd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.commons.service.dao.ICommonsDao - -interface IUsersDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDaoImpl.kt deleted file mode 100644 index 4c1a9b48130d4f1e04756c94f061c7185f6d7e43..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/dao/IUsersDaoImpl.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.auths.service.dao - -import com.example.kotlinspring01.auths.mapper.IUsersMapper -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import org.springframework.stereotype.Service - -@Service -class IUsersDaoImpl : ICommonsDaoImpl(), IUsersDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsService.kt deleted file mode 100644 index f48cba7461de867768524b2aa365d2f04c956faf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -interface IPermissionsService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsServiceImpl.kt deleted file mode 100644 index 7d508ac113da4ece60111720fa713397f853e02a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IPermissionsServiceImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.auths.pojo.Permissions -import com.example.kotlinspring01.auths.pojo.PermissionsQuery -import com.example.kotlinspring01.auths.pojo.PermissionsVo -import com.example.kotlinspring01.auths.service.converter.IPermissionsConverter -import com.example.kotlinspring01.auths.service.dao.IPermissionsDao -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class IPermissionsServiceImpl(override val daoService: IPermissionsDao, override val converter: IPermissionsConverter) : ICommonsServiceImpl(daoService, converter), IPermissionsService { - override fun queryWrapper(q: PermissionsQuery): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeDelete(id: List) { - - } - - override fun beforeSave(v: PermissionsVo) { - - } - - override fun beforeUpdate(v: PermissionsVo) { - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesService.kt deleted file mode 100644 index caa8a3f092fe7a5de515f33f2c00176d9c78cfc0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -interface IRolesService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesServiceImpl.kt deleted file mode 100644 index 901b1d70f64140dcbd4439307850c0b72ded3c1c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IRolesServiceImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import cn.hutool.core.util.ObjectUtil -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.RolesQuery -import com.example.kotlinspring01.auths.pojo.RolesVo -import com.example.kotlinspring01.auths.service.converter.IRolesConverter -import com.example.kotlinspring01.auths.service.dao.IRolesDao -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class IRolesServiceImpl(override val daoService: IRolesDao, override val converter: IRolesConverter) : ICommonsServiceImpl(daoService, converter), IRolesService { - override fun queryWrapper(q: RolesQuery): Wrapper? { - val query = Wrappers.query() - query.like(ObjectUtil.isNotEmpty(q.name), "name", q.name) - return query - } - - override fun beforeSave(v: RolesVo) { - - } - - override fun beforeUpdate(v: RolesVo) { - - } - - override fun beforeDelete(id: List) { - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersService.kt deleted file mode 100644 index 8c3f45d169033a298ca5b5b02c9957b5d0389f8d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersService.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -interface IUsersService : ICommonsService { - fun getDetailById(id: Long): Users? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersServiceImpl.kt deleted file mode 100644 index 2527e38a606a72c33ad35cc61dea6b99be3c9199..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/auths/service/service/IUsersServiceImpl.kt +++ /dev/null @@ -1,52 +0,0 @@ -package com.example.kotlinspring01.auths.service.service - -import cn.hutool.core.util.ObjectUtil -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper -import com.example.kotlinspring01.auths.pojo.Roles -import com.example.kotlinspring01.auths.pojo.Users -import com.example.kotlinspring01.auths.pojo.UsersQuery -import com.example.kotlinspring01.auths.pojo.UsersVo -import com.example.kotlinspring01.auths.service.converter.IUsersConverter -import com.example.kotlinspring01.auths.service.dao.IRolesDao -import com.example.kotlinspring01.auths.service.dao.IUsersDao -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import org.slf4j.LoggerFactory -import org.springframework.stereotype.Service - - -@Suppress("SpringJavaInjectionPointsAutowiringInspection", "DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class IUsersServiceImpl(override val daoService: IUsersDao, override val converter: IUsersConverter, val rolesDao: IRolesDao) : ICommonsServiceImpl(daoService, converter), IUsersService { - private val logger = LoggerFactory.getLogger(this.javaClass) - override fun queryWrapper(q: UsersQuery): Wrapper? { - val wrapper = QueryWrapper(Users()) - wrapper.like(ObjectUtil.isNotEmpty(q.name), "name", q.name) - return wrapper - } - - override fun getDetailById(id: Long): Users? { - val users = daoService.getById(id) - val userRoleAo = converter.userRoleAo(users) - val listByIds: MutableList? = rolesDao.listByIds(listOf(userRoleAo!!.id)) - userRoleAo.roles = listByIds - return userRoleAo - } - - override fun get(id: Long): Users? { - val users = super.get(id) - return converter.ao(users) - } - - override fun beforeSave(v: UsersVo) { - - } - - override fun beforeUpdate(v: UsersVo) { - - } - - override fun beforeDelete(id: List) { - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/configuration/BaseConfiguration.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/configuration/BaseConfiguration.kt deleted file mode 100644 index a0f24fdf7ccac939da741333873a57dec0b467e3..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/configuration/BaseConfiguration.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.base.configuration - -import cn.hutool.extra.spring.EnableSpringUtil -import org.springframework.cache.annotation.EnableCaching -import org.springframework.context.annotation.Configuration - -@Configuration -@EnableSpringUtil -@EnableCaching -class BaseConfiguration \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/configuration/WebMvcParamsConverterConfigurer.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/configuration/WebMvcParamsConverterConfigurer.kt deleted file mode 100644 index 2f282b7f1d66f8eb2f14444143b59c506ea86fcc..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/configuration/WebMvcParamsConverterConfigurer.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.example.kotlinspring01.base.configuration - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.databind.SerializationFeature -import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer -import org.springframework.context.annotation.Bean -import org.springframework.context.annotation.Configuration -import org.springframework.core.convert.converter.Converter -import org.springframework.core.convert.converter.ConverterFactory -import org.springframework.format.FormatterRegistry -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer - - -@Configuration -class WebMvcParamsConverterConfigurer : WebMvcConfigurer { - @Bean - fun customizer(): Jackson2ObjectMapperBuilderCustomizer? { - return Jackson2ObjectMapperBuilderCustomizer { builder: Jackson2ObjectMapperBuilder -> - builder.featuresToEnable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) - } - } - - override fun addFormatters(registry: FormatterRegistry) { - registry.addConverterFactory(StringValueToBaseEnumConverterFactory()) -// registry.addConverterFactory(IntCodeToBaseEnumConverterFactory()) - - } - - class StringValueToBaseEnumConverterFactory : ConverterFactory { - override fun getConverter(targetType: Class): StringValueToBaseEnumConverter { - if (!targetType.isEnum) { - throw UnsupportedOperationException("只支持转换到枚举类型") - } - return StringValueToBaseEnumConverter(targetType) - } - - inner class StringValueToBaseEnumConverter(private val enumType: Class) : Converter { - override fun convert(s: String): T? { - for (t in enumType.enumConstants) { - if (s == t!!.getStringValue() || s == t.getIntCode().toString() || s.toLowerCase() == t.getStringName()!!.toLowerCase()) { - return t - } - } - return null - } - } - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/controller/BaseController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/controller/BaseController.kt deleted file mode 100644 index 99ede9d3c18315cc88f73995e532741b265057b5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/controller/BaseController.kt +++ /dev/null @@ -1,41 +0,0 @@ -@file:Suppress("MVCPathVariableInspection", "MVCPathVariableInspection") - -package com.example.kotlinspring01.base.controller - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import com.example.kotlinspring01.base.pojo.IPage -import com.example.kotlinspring01.base.service.service.IBaseService -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestBody -import java.io.Serializable - -abstract class BaseController, V : BasePojo, Q : BaseQueryPojo, ID : Serializable, S : IBaseService>(private val baseService: S) : IBaseController { - // @PostMapping - override fun insert(@RequestBody t: V) = baseService.insert(t) - - // @PutMapping - override fun update(@RequestBody t: V) = baseService.update(t) - - // @DeleteMapping("/{id}") - override fun delete(@PathVariable("id") id: List) = baseService.delete(id) - - - // @GetMapping("/{id}") - override fun get(@PathVariable("id") id: ID) = baseService.get(id) - - override fun queryOne(q: Q): T? = baseService.queryOne(q) - // @GetMapping - override fun queryList(q: Q): List? = baseService.queryList(q) - - override fun queryPage(q: Q): IPage? { - return baseService.queryPage(q) - } - override fun queryOneCustom(q: Q): T? { - return baseService.queryOneCustom(q) - } - override fun queryListCustom(q: Q): List? = baseService.queryListCustom(q) - - override fun queryPageCustomer(q: Q): IPage? = baseService.queryPageCustom(q) -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/controller/IBaseController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/controller/IBaseController.kt deleted file mode 100644 index 8d14eecc9d757f6eb8ccc90ae17f552a326616f8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/controller/IBaseController.kt +++ /dev/null @@ -1,42 +0,0 @@ -package com.example.kotlinspring01.base.controller - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.BaseVoPojo -import com.example.kotlinspring01.base.pojo.IPage -import org.springframework.http.MediaType -import org.springframework.web.bind.annotation.* -import java.io.Serializable - -interface IBaseController, V : BasePojo, Q : BaseQueryPojo, ID : Serializable> { - @PostMapping(consumes = [MediaType.APPLICATION_JSON_VALUE], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun insert(@RequestBody t: V): Boolean - - @PutMapping(consumes = [MediaType.APPLICATION_JSON_VALUE], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun update(@RequestBody t: V): Boolean - - @DeleteMapping("/{id}", produces = [MediaType.APPLICATION_JSON_VALUE]) - fun delete(@PathVariable("id") id: List): Boolean - - @GetMapping("/{id}", produces = [MediaType.APPLICATION_JSON_VALUE]) - fun get(@PathVariable("id") id: ID): T? - - @GetMapping(value = ["/query/one"], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun queryOne(q: Q): T? - - @GetMapping(value = ["/query/list"], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun queryList(q: Q): List? - - @GetMapping(value = ["/query/page"], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun queryPage(q: Q): IPage? - - @GetMapping("query/one/custom", produces = [MediaType.APPLICATION_JSON_VALUE]) - fun queryOneCustom(q: Q): T? - - @GetMapping(value = ["/query/list/custom"], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun queryListCustom(q: Q): List? - - @GetMapping(value = ["/query/page/custom"], produces = [MediaType.APPLICATION_JSON_VALUE]) - fun queryPageCustomer(q: Q): IPage? - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/enumerate/IBaseEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/enumerate/IBaseEnum.kt deleted file mode 100644 index 9a7ffe1e589ae966de67c0eca794633074f9d47c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/enumerate/IBaseEnum.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.base.enumerate - -interface IBaseEnum { - fun getStringValue(): String? - fun getIntCode(): Int? - fun getStringName(): String? - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/mapper/IBaseMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/mapper/IBaseMapper.kt deleted file mode 100644 index df1610a030110d681b097bb3c06ed434b70b3340..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/mapper/IBaseMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.base.mapper - -import com.baomidou.mybatisplus.core.mapper.BaseMapper -import tk.mybatis.mapper.annotation.RegisterMapper -import tk.mybatis.mapper.common.Mapper - -@RegisterMapper -interface IBaseMapper : BaseMapper, Mapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BasePojo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BasePojo.kt deleted file mode 100644 index c89c70303705f810a80db0607fa1f01a9515fb65..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BasePojo.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import java.io.Serializable -import javax.persistence.Id -import javax.persistence.MappedSuperclass - -@MappedSuperclass -open class BasePojo { - @Id - open var id: ID? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseQueryPojo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseQueryPojo.kt deleted file mode 100644 index cae9ea3825e4903e56ba468d24e24e8c5ec23c16..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseQueryPojo.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndIn -import tk.mybatis.mapper.entity.Example -import java.io.Serializable - - -open class BaseQueryPojo, ID : Serializable> : BasePojo(), MybatisExampleForTk { - var page: Int = 1 - var limit: Int = 20 - var order: String? = null - var orderType: String? = null - - @AndEqualTo - override var id: ID? = null - - @AndIn(property = "id") - var ids: List? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseVoPojo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseVoPojo.kt deleted file mode 100644 index e1408c2172f693dadb844472d162a21a3c59f7d3..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/BaseVoPojo.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import java.io.Serializable - -open class BaseVoPojo : BasePojo() \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/IPage.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/IPage.kt deleted file mode 100644 index 16d14b4cdc753712d1ed1dce5bc8833b238258a7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/pojo/IPage.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.base.pojo - -import com.baomidou.mybatisplus.core.metadata.IPage -import com.github.pagehelper.PageInfo - -data class IPage(val list: List?, val total: Long = 0) { - constructor(pageInfo: PageInfo) : this(pageInfo.list, pageInfo.total) - constructor(iPage: IPage) : this(iPage.records, iPage.total) - -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/converter/IBaseConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/converter/IBaseConverter.kt deleted file mode 100644 index 086ba2dcea1e58c89fb825a8b115245b7d94fa1f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/converter/IBaseConverter.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.base.service.converter - -import com.example.kotlinspring01.base.pojo.BasePojo -import org.mapstruct.MappingTarget -import java.io.Serializable - -interface IBaseConverter, VO : BasePojo, ID : Serializable> { - fun convert(vo: VO): PO - fun copy(vo: VO, @MappingTarget po: PO) -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDao.kt deleted file mode 100644 index f2ad2bc479ef0bae78eea5fea1d7e833509060e9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDao.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.kotlinspring01.base.service.dao - -import com.baomidou.mybatisplus.extension.service.IService -import com.example.kotlinspring01.base.pojo.BasePojo -import tk.mybatis.mapper.entity.Example -import java.io.Serializable - -interface IBaseDao, ID : Serializable> : IService { - fun updateSelective(t: T): Boolean - fun updateByExample(t: T, e: Example): Boolean - fun update(t: T): Boolean - fun updateSelectiveByExample(t: T, e: Example): Boolean - fun selectByExample(e: Example): MutableList? - fun selectOneByExample(e: Example): T? - fun deleteByIds(id: List): Boolean - fun deleteById(id: ID): Boolean -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDaoImpl.kt deleted file mode 100644 index 1735da1515961abc29951160e50e4b8ca5068593..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/dao/IBaseDaoImpl.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.example.kotlinspring01.base.service.dao - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl -import com.example.kotlinspring01.base.mapper.IBaseMapper -import com.example.kotlinspring01.base.pojo.BasePojo -import org.springframework.transaction.annotation.Transactional -import tk.mybatis.mapper.entity.Example -import java.io.Serializable - -@Transactional -abstract class IBaseDaoImpl, ID : Serializable, M : IBaseMapper> : ServiceImpl(), IBaseDao { - override fun deleteById(id: ID): Boolean { - return removeById(id) - } - - override fun deleteByIds(id: List): Boolean { - return removeByIds(id) - } - - override fun update(t: T): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByPrimaryKey(t)) - } - - override fun updateSelective(t: T): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByPrimaryKeySelective(t)) - } - - override fun updateByExample(t: T, e: Example): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByExample(t, e)) - } - - override fun updateSelectiveByExample(t: T, e: Example): Boolean { - @Suppress("DEPRECATION") - return retBool(baseMapper.updateByExampleSelective(t, e)) - } - - override fun selectByExample(e: Example): MutableList? { - return baseMapper.selectByExample(e) - } - - override fun selectOneByExample(e: Example): T? { - return baseMapper.selectOneByExample(e) - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseService.kt deleted file mode 100644 index 63bc0c89f1743b53dfdd9aada8599dae47dffef6..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseService.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.example.kotlinspring01.base.service.service - -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.IPage -import java.io.Serializable - -interface IBaseService, V : BasePojo, Q : BaseQueryPojo, ID : Serializable> { - fun insert(t: V): Boolean - fun update(t: V): Boolean - fun delete(id: List): Boolean - fun get(id: ID): T? - fun queryOne(q: Q): T? - fun queryList(q: Q): List? - fun queryPage(q: Q): IPage? - fun queryOneCustom(q: Q): T? - fun queryListCustom(q: Q): List? - fun queryPageCustom(q: Q): IPage? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseServiceImpl.kt deleted file mode 100644 index a0ecefee0470e3d391c2811ccce6ad506b042b20..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/base/service/service/IBaseServiceImpl.kt +++ /dev/null @@ -1,78 +0,0 @@ -package com.example.kotlinspring01.base.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.extension.plugins.pagination.Page -import com.example.kotlinspring01.base.pojo.BasePojo -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.example.kotlinspring01.base.pojo.IPage -import com.example.kotlinspring01.base.service.converter.IBaseConverter -import com.example.kotlinspring01.base.service.dao.IBaseDao -import com.github.pagehelper.PageHelper -import com.github.pagehelper.PageInfo -import org.springframework.transaction.annotation.Transactional -import java.io.Serializable - -@Transactional -abstract class IBaseServiceImpl, V : BasePojo, Q : BaseQueryPojo, ID : Serializable, S : IBaseDao, C : IBaseConverter>( - val daoService: S, - val converter: C -) : IBaseService { - abstract fun queryWrapper(q: Q): Wrapper? - abstract fun beforeSave(v: V) - abstract fun beforeUpdate(v: V) - - @Throws(Exception::class) - abstract fun beforeDelete(id: List) - - override fun insert(v: V): Boolean { - beforeSave(v) - val convert = converter.convert(v) - return daoService.save(convert) - } - - override fun update(v: V): Boolean { - beforeUpdate(v) - val t = daoService.getById(v.id) - converter.copy(v, t) - return daoService.updateById(t) - } - - override fun delete(id: List): Boolean { - beforeDelete(id) - return daoService.removeByIds(id) - } - - override fun queryOne(q: Q): T? { - return daoService.selectOneByExample(q.toExample()) - } - - override fun queryList(q: Q): List? { - PageHelper.startPage(q.page, q.limit, false) - return daoService.selectByExample(q.toExample()) - } - - override fun queryPage(q: Q): IPage? { - PageHelper.startPage(q.page, q.limit) - return IPage(PageInfo(daoService.selectByExample(q.toExample()))) - } - - override fun queryOneCustom(q: Q): T? { - return daoService.getOne(queryWrapper(q)) - } - - override fun queryListCustom(q: Q): List? { - val page = Page(q.page.toLong(), q.limit.toLong(), 0, false) - return daoService.page(page, queryWrapper(q)).records - } - - override fun queryPageCustom(q: Q): IPage? { - val page = Page(q.page.toLong(), q.limit.toLong()) - return IPage(daoService.page(page, queryWrapper(q))) - } - - - override fun get(id: ID): T? { - return daoService.getById(id) - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/CreateDate.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/CreateDate.kt deleted file mode 100644 index ed7fbbde898352761ad4c2c507c23f0e8be3f991..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/CreateDate.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.kotlinspring01.commons.configuration.mybatis.annotation - -@Target(AnnotationTarget.FIELD) -@Retention(AnnotationRetention.RUNTIME) -annotation class CreateDate \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/UpdateDate.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/UpdateDate.kt deleted file mode 100644 index a73394296412b0fa2e490131596d15fe89c2a147..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/annotation/UpdateDate.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.kotlinspring01.commons.configuration.mybatis.annotation - -@Target(AnnotationTarget.FIELD) -@Retention(AnnotationRetention.RUNTIME) -annotation class UpdateDate \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/interceptor/CreateUpdateTimeInterceptor.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/interceptor/CreateUpdateTimeInterceptor.kt deleted file mode 100644 index 2827dea1c2bfa29b4d8db1d02eef960583266430..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/configuration/mybatis/interceptor/CreateUpdateTimeInterceptor.kt +++ /dev/null @@ -1,87 +0,0 @@ -package com.example.kotlinspring01.commons.configuration.mybatis.interceptor - -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.CreateDate -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.UpdateDate -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import org.apache.ibatis.executor.Executor -import org.apache.ibatis.mapping.MappedStatement -import org.apache.ibatis.mapping.SqlCommandType -import org.apache.ibatis.plugin.Interceptor -import org.apache.ibatis.plugin.Intercepts -import org.apache.ibatis.plugin.Invocation -import org.apache.ibatis.plugin.Signature -import org.apache.ibatis.reflection.MetaObject -import org.springframework.stereotype.Component -import java.lang.reflect.Field -import java.util.* - -@Component -@Intercepts( - Signature(type = Executor::class, method = "update", args = arrayOf(MappedStatement::class, Any::class)) -) -class CreateUpdateTimeInterceptor : Interceptor, MetaObjectHandler { - override fun intercept(invocation: Invocation?): Any { - val mappedStatement = invocation!!.args[0] as MappedStatement - val sqlCommandType = mappedStatement.sqlCommandType - val any = invocation.args[1] as Any - val fields = getAllField(any) - when (sqlCommandType) { - SqlCommandType.INSERT -> { - if (any !is CommonsPojo) { - fields?.find { field -> field.isAnnotationPresent(CreateDate::class.java) }?.also { field -> - field.isAccessible = true - field.set(any, Date()) - } - fields?.find { field -> field.isAnnotationPresent(UpdateDate::class.java) }?.also { field -> - field.isAccessible = true - field.set(any, Date()) - } - } else { - any.createDate = Date() - any.updateDate = Date() - } - } - SqlCommandType.UPDATE -> { - when (any) { - is Map<*, *> -> { - val commonsPojo = any["param1"] as? CommonsPojo - commonsPojo?.updateDate = Date() - } - !is CommonsPojo -> { - fields?.find { field -> field.isAnnotationPresent(UpdateDate::class.java) }?.also { field -> - field.isAccessible = true - field.set(any, Date()) - } - } - else -> { - any.updateDate = Date() - } - } - } - - else -> { - } - } - return invocation.proceed() - } - - private fun getAllField(`object`: Any): List? { - var type: Class? = `object`.javaClass - val declaredFields: Array? = type?.declaredFields - var fields: List? = declaredFields?.toMutableList() - while (type?.superclass.also { type = it } != null) { - fields = type?.declaredFields?.toMutableList().let { it?.let, List?> { fields?.plus(it) } } - } - return fields - } - - override fun insertFill(metaObject: MetaObject?) { - strictInsertFill(metaObject, "createDate", Date::class.java, Date()) - strictInsertFill(metaObject, "updateDate", Date::class.java, Date()) - } - - override fun updateFill(metaObject: MetaObject?) { - strictUpdateFill(metaObject, "updateDate", Date::class.java, Date()) - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/controller/CommonsController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/controller/CommonsController.kt deleted file mode 100644 index 66fcd89f5efb7d5591c88ba6a7a97166883c4cc0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/controller/CommonsController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.commons.controller - -import com.example.kotlinspring01.base.controller.BaseController -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.commons.service.service.ICommonsService - -abstract class CommonsController, S : ICommonsService>(private val commonsService: S) : BaseController(commonsService), ICommonsController { - override fun logicDelete(id: List) { - return commonsService.logicDelete(id) - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/controller/ICommonsController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/controller/ICommonsController.kt deleted file mode 100644 index 5068012a48cca3a3b1daef2e3a15fb1368ef436e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/controller/ICommonsController.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.commons.controller - -import com.example.kotlinspring01.base.controller.IBaseController -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import org.springframework.web.bind.annotation.DeleteMapping -import org.springframework.web.bind.annotation.PathVariable - -interface ICommonsController> : IBaseController { - @DeleteMapping("/{id}/logic") - fun logicDelete(@PathVariable("id") id: List) -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/mapper/ICommonsMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/mapper/ICommonsMapper.kt deleted file mode 100644 index 4c2d0bd8b1a9cfa44ad3087844801ffff5506dbf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/mapper/ICommonsMapper.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.kotlinspring01.commons.mapper - -import com.example.kotlinspring01.base.mapper.IBaseMapper as BaseMapperBase - -interface ICommonsMapper : BaseMapperBase \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsPojo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsPojo.kt deleted file mode 100644 index ea5833ddb3b9f336ff56e42240f3dffc80890ce8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsPojo.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.kotlinspring01.commons.pojo - -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.CreateDate -import com.example.kotlinspring01.commons.configuration.mybatis.annotation.UpdateDate -import java.util.* -import javax.persistence.MappedSuperclass -import com.example.kotlinspring01.base.pojo.BasePojo as BasePojoBase - -@MappedSuperclass -abstract class CommonsPojo : BasePojoBase() { - @CreateDate - var createDate: Date? = null - - @UpdateDate - var updateDate: Date? = null - var creator: String? = null - var updater: String? = null - - -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsQueryPojo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsQueryPojo.kt deleted file mode 100644 index a837807e16e750e86e3f582d6dab96ba783014de..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsQueryPojo.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.example.kotlinspring01.commons.pojo - -import com.example.kotlinspring01.base.pojo.BaseQueryPojo -import com.gitee.denger.mybatis.example.ext.annotation.AndGreaterThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLessThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import java.util.* - -open class CommonsQueryPojo : BaseQueryPojo() { - @AndLike - var creator: String? = null - - @AndGreaterThanOrEqualTo(property = "createDate") - var createDate1: Date? = null - - @AndLessThanOrEqualTo(property = "createDate") - var createDate2: Date? = null - - -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsVoPojo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsVoPojo.kt deleted file mode 100644 index c6869cf034e733ea303ba917a8c5d1e582cffdea..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/pojo/CommonsVoPojo.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.example.kotlinspring01.commons.pojo - -open class CommonsVoPojo : CommonsPojo() \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/resources/service/ResourceStoreService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/resources/service/ResourceStoreService.kt deleted file mode 100644 index 359fba1bf2e5aac702783858401fe594387be9af..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/resources/service/ResourceStoreService.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.example.kotlinspring01.commons.resources.service - -import org.minbox.framework.api.boot.oss.ApiBootOssService -import org.minbox.framework.resource.ResourceStoreDelegate -import org.springframework.stereotype.Service - -@Service -class ResourceStoreService(val ossService: ApiBootOssService) : ResourceStoreDelegate { - override fun loadResourceUrl(sourceFieldValue: String?, resourceType: String?): MutableList { - TODO() - } - - override fun addResource(sourceFieldValue: String?, resourceType: String?, resourceUrls: MutableList?) { - TODO() - } - - override fun deleteResource(sourceFieldValue: String?, resourceType: String?) { - TODO() - } - - override fun updateResource(sourceFieldValue: String?, resourceType: String?, resourceUrls: MutableList?) { - TODO() - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/converter/ICommonsConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/converter/ICommonsConverter.kt deleted file mode 100644 index 979796bff7ee161e8cc2d0bfa53467866cdba2f7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/converter/ICommonsConverter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.commons.service.converter - -import com.example.kotlinspring01.base.service.converter.IBaseConverter -import com.example.kotlinspring01.commons.pojo.CommonsPojo - -interface ICommonsConverter : IBaseConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDao.kt deleted file mode 100644 index 2311b855e02c332bc5122d54d790a82277d6abb8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.commons.service.dao - -import com.example.kotlinspring01.base.service.dao.IBaseDao -import com.example.kotlinspring01.commons.pojo.CommonsPojo - -interface ICommonsDao : IBaseDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDaoImpl.kt deleted file mode 100644 index 71d3acd8417e301f3f63bbf4f6c25feffbf68235..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/dao/ICommonsDaoImpl.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.commons.service.dao - -import com.example.kotlinspring01.base.service.dao.IBaseDaoImpl -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.commons.pojo.CommonsPojo - - -abstract class ICommonsDaoImpl> : IBaseDaoImpl(), ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsService.kt deleted file mode 100644 index 35c83094f07583d67e4d979abc825d5d765be4d2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsService.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.commons.service.service - -import com.example.kotlinspring01.base.service.service.IBaseService -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo - -interface ICommonsService> : IBaseService { - fun logicDelete(id: List) -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsServiceImpl.kt deleted file mode 100644 index f6147c85ecc340f92edd59e9b5cf9f2049a03eff..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/commons/service/service/ICommonsServiceImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.example.kotlinspring01.commons.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.base.service.service.IBaseServiceImpl -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import org.springframework.transaction.annotation.Transactional - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES") -@Transactional -abstract class ICommonsServiceImpl, S : ICommonsDao, C : ICommonsConverter>(daoService: S, converter: C) : IBaseServiceImpl(daoService, converter), ICommonsService { - override fun logicDelete(id: List) { - daoService.deleteByIds(id) - } - - override fun queryWrapper(q: Q): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeSave(v: V) { - - } - - override fun beforeUpdate(v: V) { - - } - - override fun beforeDelete(id: List) { - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersConsumeRecordsController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersConsumeRecordsController.kt deleted file mode 100644 index 7dcf7bd156b64a857d73bb89b05b11326e72d2d1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersConsumeRecordsController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.customers.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsQuery -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsVo -import com.example.kotlinspring01.customers.service.service.ICustomersConsumeRecordsService -import org.springframework.web.bind.annotation.RestController - - -@RestController -class CustomersConsumeRecordsController(val service: ICustomersConsumeRecordsService) : CommonsController(service), ICustomersConsumeRecordsController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersController.kt deleted file mode 100644 index 389768df25b69dc9cb7491d84ce9d3447e8a74da..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/CustomersController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.customers.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo -import com.example.kotlinspring01.customers.service.service.ICustomersService -import org.springframework.web.bind.annotation.RestController - - -@RestController -class CustomersController(val service: ICustomersService) : CommonsController(service), ICustomersController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersConsumeRecordsController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersConsumeRecordsController.kt deleted file mode 100644 index 7d6a0f51eb4c242db53c14f84e64774e329f19a1..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersConsumeRecordsController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.customers.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsQuery -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsVo -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/customers/consume/record") -interface ICustomersConsumeRecordsController : ICommonsController diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersController.kt deleted file mode 100644 index 7cc43d8de6617825f26d4a737be50488f4958e15..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/controller/ICustomersController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.customers.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/customers") -interface ICustomersController : ICommonsController diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerStatesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerStatesEnum.kt deleted file mode 100644 index c8a2478f661d9dc366170b97718a24e68ec7b80c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerStatesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.customers.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class CustomerStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - ENABLE(0, "启用"), - DISABLE(1, "停用"), - ABNORMAL(20, "异常"); - - companion object { - @JsonCreator - fun getItem(code: String): CustomerStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerTypesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerTypesEnum.kt deleted file mode 100644 index 64954ceca82fb61c58b0198abfb27b23bb8a3af0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/enumerate/CustomerTypesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.customers.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class CustomerTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - GENERAL_USER(0, "普通用户"), - VIP_USER(1, "VIP用户"), - VVIP_USER(2, "高级VIP会员"); - - companion object { - @JsonCreator - fun getItem(code: String): CustomerTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersConsumeRecordsMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersConsumeRecordsMapper.kt deleted file mode 100644 index e23446c4df1801404dea67a9adb50b64c1fda5fa..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersConsumeRecordsMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.customers.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import org.apache.ibatis.annotations.Mapper - - -@Mapper -interface ICustomersConsumeRecordsMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersMapper.kt deleted file mode 100644 index 9b8d75d48946032ac69515cafee4979948c557bf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/mapper/ICustomersMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.customers.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.customers.pojo.Customers -import org.apache.ibatis.annotations.Mapper - - -@Mapper -interface ICustomersMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/Customers.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/Customers.kt deleted file mode 100644 index 7eb34aa320335aa34c4e535c3c4c1779f6af3767..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/Customers.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("MemberVisibilityCanBePrivate") - -package com.example.kotlinspring01.customers.pojo - -import cn.hutool.extra.pinyin.PinyinUtil -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.customers.enumerate.CustomerStatesEnum -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum - - -open class Customers : CommonsPojo() { - var name: String? = null - var namePinYin: String? = null - set(value) { - field = value ?: PinyinUtil.getPinyin(name, "") ?: "" - } - var namePinYinSimple: String? = null - set(value) { - field = value ?: PinyinUtil.getFirstLetter(name, "") ?: "" - } - var age: Int? = null - var type: CustomerTypesEnum? = null - var idCardNo: String? = null - var contactNumber: String? = null - var bindPhone: String? = null - set(value) { - field = value ?: contactNumber ?: "" - } - var state: CustomerStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersAos.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersAos.kt deleted file mode 100644 index 15ad75eaebfdf8c88c2f71c229ef15e4575d3100..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersAos.kt +++ /dev/null @@ -1,12 +0,0 @@ -@file:Suppress("unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused", "unused") - -package com.example.kotlinspring01.customers.pojo - -sealed class CustomersAos : Customers() { - - class CustomerAo : CustomersAos() { - val typeName: String? = type?.name - val typeCode = type?.code - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecords.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecords.kt deleted file mode 100644 index d57df7e787a041c7ede17ccb705bbc847bdf31c0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecords.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import java.math.BigDecimal - -class CustomersConsumeRecords : CommonsPojo() { - var customerId: Long? = null - var customerName: String? = null - var orderId: Long? = null - var orderNo: String? = null - var amountOfConsumption: BigDecimal? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecordsQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecordsQuery.kt deleted file mode 100644 index 7c2eea829b9611930fbc0976dfa86fa0ec58994e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecordsQuery.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class CustomersConsumeRecordsQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var customerId: Long? = null - - @AndLike - var customerName: String? = null - - @AndEqualTo - var orderId: Long? = null - - @AndLike - var orderNo: String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecordsVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecordsVo.kt deleted file mode 100644 index b67b411eff3ce35d10971fb78a6d5bfd5f0eabdc..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersConsumeRecordsVo.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import java.math.BigDecimal - -class CustomersConsumeRecordsVo : CommonsVoPojo() { - var customerId: Long? = null - var customerName: String? = null - var orderId: Long? = null - var orderNo: String? = null - var amountOfConsumption: BigDecimal? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersQuery.kt deleted file mode 100644 index 2ba319456eabbde2ebe50ade046d971af60006a5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersQuery.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndGreaterThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLessThanOrEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - - -class CustomersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var type: CustomerTypesEnum? = null - - @AndLessThanOrEqualTo(property = "age") - var age2: Int? = null - - @AndGreaterThanOrEqualTo(property = "age") - var age1: Int? = null - - @AndLike - var name: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersVo.kt deleted file mode 100644 index 8265bd2fb13de1582ffc30c22ccf58ccb68da25d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/pojo/CustomersVo.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.example.kotlinspring01.customers.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.customers.enumerate.CustomerStatesEnum -import com.example.kotlinspring01.customers.enumerate.CustomerTypesEnum - -class CustomersVo : CommonsVoPojo() { - var name: String? = null - var namePinYin: String? = null - var namePinYinSimple: String? = null - var age: Int? = null - var type: CustomerTypesEnum? = null - var idCardNo: String? = null - var contactNumber: String? = null - var bindPhone: String? = null - var state: CustomerStatesEnum? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConsumeRecordsConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConsumeRecordsConverter.kt deleted file mode 100644 index 5d5fe0c9f4f1cfb0346d5c986a013402354f61b2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConsumeRecordsConverter.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.customers.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersAos -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface ICustomersConsumeRecordsConverter : ICommonsConverter { - fun ao(customers: Customers?): CustomersAos.CustomerAo? - fun aos(customers: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConverter.kt deleted file mode 100644 index 5ce4e3b424d8610a603c89f53557769b4829b5be..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/converter/ICustomersConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.customers.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersAos -import com.example.kotlinspring01.customers.pojo.CustomersVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface ICustomersConverter : ICommonsConverter { - fun ao(customers: Customers?): CustomersAos.CustomerAo? - fun aos(customers: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersConsumeRecordsDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersConsumeRecordsDao.kt deleted file mode 100644 index f8810cd326dfb1d3ef2dd61edf8c179249b34fa9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersConsumeRecordsDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.customers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords - - -interface ICustomersConsumeRecordsDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersConsumeRecordsDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersConsumeRecordsDaoImpl.kt deleted file mode 100644 index 914bc293257ed03aaffb1bbfa58081f047e4a8dd..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersConsumeRecordsDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.customers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.customers.mapper.ICustomersConsumeRecordsMapper -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import org.springframework.stereotype.Service - - -@Service -class ICustomersConsumeRecordsDaoImpl : ICommonsDaoImpl(), ICustomersConsumeRecordsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDao.kt deleted file mode 100644 index 7d01241f6f7da1c2076488f6c60f26413845e72e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.customers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.customers.pojo.Customers - - -interface ICustomersDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDaoImpl.kt deleted file mode 100644 index 07a0877ef310f80b54b65f4e1158855ff51a8c9b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/dao/ICustomersDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.customers.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.customers.mapper.ICustomersMapper -import com.example.kotlinspring01.customers.pojo.Customers -import org.springframework.stereotype.Service - - -@Service -class ICustomersDaoImpl : ICommonsDaoImpl(), ICustomersDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersConsumeRecordsService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersConsumeRecordsService.kt deleted file mode 100644 index efdcf2f54e179c8f5c1b4382c2895c4c40b0005c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersConsumeRecordsService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.customers.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsQuery -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsVo - -interface ICustomersConsumeRecordsService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersConsumeRecordsServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersConsumeRecordsServiceImpl.kt deleted file mode 100644 index 972f6966896435c239e6a5151b56fbf4236c0980..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersConsumeRecordsServiceImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -package com.example.kotlinspring01.customers.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecords -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsQuery -import com.example.kotlinspring01.customers.pojo.CustomersConsumeRecordsVo -import com.example.kotlinspring01.customers.service.converter.ICustomersConsumeRecordsConverter -import com.example.kotlinspring01.customers.service.dao.ICustomersConsumeRecordsDao -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class ICustomersConsumeRecordsServiceImpl(override val daoService: ICustomersConsumeRecordsDao, override val converter: ICustomersConsumeRecordsConverter) : ICommonsServiceImpl(daoService, converter), ICustomersConsumeRecordsService { - override fun queryWrapper(q: CustomersConsumeRecordsQuery): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeDelete(id: List) { - - } - - override fun beforeSave(v: CustomersConsumeRecordsVo) { - - } - - override fun beforeUpdate(v: CustomersConsumeRecordsVo) { - - } -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersService.kt deleted file mode 100644 index 619845f1142234ebb6e0b2be08f100a49e58292f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.customers.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo - -interface ICustomersService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersServiceImpl.kt deleted file mode 100644 index 2af5976ea374e7a06e25441aae0035047d7064f7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/customers/service/service/ICustomersServiceImpl.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.example.kotlinspring01.customers.service.service - -import cn.hutool.core.util.ObjectUtil -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.customers.pojo.Customers -import com.example.kotlinspring01.customers.pojo.CustomersAos -import com.example.kotlinspring01.customers.pojo.CustomersQuery -import com.example.kotlinspring01.customers.pojo.CustomersVo -import com.example.kotlinspring01.customers.service.converter.ICustomersConverter -import com.example.kotlinspring01.customers.service.dao.ICustomersDao -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class ICustomersServiceImpl(override val daoService: ICustomersDao, override val converter: ICustomersConverter) : ICommonsServiceImpl(daoService, converter), ICustomersService { - override fun get(id: Long): Customers? { - val customers = super.get(id) - return converter.ao(customers) - } - - override fun queryList(q: CustomersQuery): List? { - val list = super.queryList(q) - return converter.aos(list) - } - - override fun queryWrapper(q: CustomersQuery): Wrapper? { - val wrapper = LambdaQueryWrapper() - wrapper.eq(ObjectUtil.isNotEmpty(q.id), Customers::id, q.id) - wrapper.`in`(ObjectUtil.isNotEmpty(q.ids), Customers::id, q.ids) - return wrapper - } - - override fun beforeSave(v: CustomersVo) { - - } - - override fun beforeUpdate(v: CustomersVo) { - - } - - override fun beforeDelete(id: List) { - - } -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/controller/DevicesController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/controller/DevicesController.kt deleted file mode 100644 index 6c627df0272e0b27aa7216e5bb142d92999d5b24..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/controller/DevicesController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.devices.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo -import com.example.kotlinspring01.devices.service.service.IDevicesService -import org.springframework.web.bind.annotation.RestController - - -@RestController -class DevicesController(val service: IDevicesService) : CommonsController(service), IDevicesController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/controller/IDevicesController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/controller/IDevicesController.kt deleted file mode 100644 index e0b815eb06a87d33ff1d44be9b1e2e1f9b4d8efe..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/controller/IDevicesController.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.devices.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo -import org.springframework.web.bind.annotation.RequestMapping - - -@RequestMapping("/devices") -interface IDevicesController : ICommonsController diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceOrderRecordStatesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceOrderRecordStatesEnum.kt deleted file mode 100644 index 957c0a24ce0ce3aea011716a56fe74a0086db08e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceOrderRecordStatesEnum.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.example.kotlinspring01.devices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class DeviceOrderRecordStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - PLACE_AN_ORDER(100, "下单"), - USING(200, "使用中"), - APPOINTMENT_WAITING_FOR_USE(300, "预约等待使用"), - END_USE(400, "结束使用"), - PAYMENTS(501, "支付中"), - PAID(502, "已支付"), - CANCEL_PAYMENT(503, "取消支付"), - ORDER_COMPLETED(600, "订单完成"), - CANCEL_ORDER(700, "订单取消"), - CUSTOMER_CANCEL_ORDER(701, "客户取消订单"), - APPOINTMENT_OVERTIME_TO_CANCEL_THE_ORDER(702, "预约超时,取消订单"), - ORDER_EXCEPTION(800, "订单异常"), - ; - - companion object { - @JsonCreator - fun getItem(code: String): DeviceOrderRecordStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceStatesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceStatesEnum.kt deleted file mode 100644 index 28179d81d863a94a74cb3eaf0922f7712e14f648..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceStatesEnum.kt +++ /dev/null @@ -1,37 +0,0 @@ -package com.example.kotlinspring01.devices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class DeviceStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - ENABLE(0, "启用"), - DISABLE(1, "停用"), - STANDBY(20, "待机中"), - USING(21, "使用中") - ; - - companion object { - @JsonCreator - fun getItem(code: String): DeviceStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceTypesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceTypesEnum.kt deleted file mode 100644 index f2ffc074abc0824e994cf7bfd52173cf327dee8d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/enumerate/DeviceTypesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.devices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class DeviceTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - INDOOR_EQUIPMENT(0, "室内设备"), - OUTDOOR_EQUIPMENT(1, "室外设备"); - - - companion object { - @JsonCreator - fun getItem(code: String): DeviceTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDeviceOrdersRecordMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDeviceOrdersRecordMapper.kt deleted file mode 100644 index ab515c1494170709e629979242f64ecaaa80bae3..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDeviceOrdersRecordMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.devices.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecords -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IDeviceOrdersRecordMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDevicesMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDevicesMapper.kt deleted file mode 100644 index c31d978fd0095f60776763ccf0105bf550ad796f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/mapper/IDevicesMapper.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.devices.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.devices.pojo.Devices -import org.apache.ibatis.annotations.Mapper - - -@Mapper -interface IDevicesMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecords.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecords.kt deleted file mode 100644 index bd415d8d09b03657595adb49f89bd7b78c80408b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecords.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -//device_orders_records -class DeviceOrdersRecords : CommonsPojo() { - var deviceId: Long? = null - var deviceCode: String? = null - var orderId: Long? = null - var orderNo: String? = null - var customerId: Long? = null - var customerName: String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecordsQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecordsQuery.kt deleted file mode 100644 index d9f18ab540356b24aaee115d37fa7bab714c516d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecordsQuery.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class DeviceOrdersRecordsQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var deviceId: Long? = null - - @AndLike - var deviceCode: String? = null - - @AndEqualTo - var orderId: Long? = null - - @AndLike - var orderNo: String? = null - - @AndEqualTo - var customerId: Long? = null - - @AndLike - var customerName: String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecordsVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecordsVo.kt deleted file mode 100644 index 61056db224508ffc32459bbfcdbd977723315ba2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DeviceOrdersRecordsVo.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo - -class DeviceOrdersRecordsVo : CommonsVoPojo() { - var deviceId: Long? = null - var deviceCode: String? = null - var orderId: Long? = null - var orderNo: String? = null - var customerId: Long? = null - var customerName: String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/Devices.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/Devices.kt deleted file mode 100644 index 9bb79ad8e02609502da8b57e90c12a0833deb162..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/Devices.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.devices.enumerate.DeviceStatesEnum -import com.example.kotlinspring01.devices.enumerate.DeviceTypesEnum - - -open class Devices : CommonsPojo() { - var code: String? = null - var name: String? = null - var type: DeviceTypesEnum? = null - var filePath: String? = null - var state: DeviceStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesAos.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesAos.kt deleted file mode 100644 index 495166c0c95e78fab805b0c2a4f29d85f7c5da59..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesAos.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -sealed class DevicesAos : Devices() { - - class DevicesAo : DevicesAos() { - val typeCode: Int? = type?.code - val typeName: String? = type?.name - val stateCode: Int? = state?.code - val stateName: String? = state?.name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesQuery.kt deleted file mode 100644 index 1a26cae64fc4d105fb4a40e74dd6abceb90bd965..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesQuery.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.devices.enumerate.DeviceTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - - -class DevicesQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var type: DeviceTypesEnum? = null - - @AndLike - var name: String? = null - - @AndLike - var code: String? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesVo.kt deleted file mode 100644 index 7635da3da3b7e1369d4062749cb4189109fbf568..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/pojo/DevicesVo.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.devices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.devices.enumerate.DeviceStatesEnum -import com.example.kotlinspring01.devices.enumerate.DeviceTypesEnum - -class DevicesVo : CommonsVoPojo() { - var code: String? = null - var name: String? = null - var type: DeviceTypesEnum? = null - var filePath: String? = null - var state: DeviceStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDeviceOrdersRecordsConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDeviceOrdersRecordsConverter.kt deleted file mode 100644 index b8d8f77cb27f6a5db3db28f3a66ce87f152b7cce..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDeviceOrdersRecordsConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.devices.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecords -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecordsVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IDeviceOrdersRecordsConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDevicesConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDevicesConverter.kt deleted file mode 100644 index b56082bbc15997c269d6a12b855f8a6928b2aae5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/converter/IDevicesConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.devices.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IDevicesConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDeviceOrdersRecordsDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDeviceOrdersRecordsDao.kt deleted file mode 100644 index 0cc823eafddb620c9a2c2074ada93d1ad796107d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDeviceOrdersRecordsDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.devices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecords - - -interface IDeviceOrdersRecordsDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDeviceOrdersRecordsDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDeviceOrdersRecordsDaoImpl.kt deleted file mode 100644 index d69acf10dbc2abed83e183bf25e02ccab3a6b80c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDeviceOrdersRecordsDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.devices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.devices.mapper.IDeviceOrdersRecordMapper -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecords -import org.springframework.stereotype.Service - - -@Service -class IDeviceOrdersRecordsDaoImpl : ICommonsDaoImpl(), IDeviceOrdersRecordsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDao.kt deleted file mode 100644 index fb729fc297847f0abf47a4e563c8749c957e9ae3..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.devices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.devices.pojo.Devices - - -interface IDevicesDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDaoImpl.kt deleted file mode 100644 index d7006af1d07269c0796926068ffcbcf4eb05574b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/dao/IDevicesDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.devices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.devices.mapper.IDevicesMapper -import com.example.kotlinspring01.devices.pojo.Devices -import org.springframework.stereotype.Service - - -@Service -class IDevicesDaoImpl : ICommonsDaoImpl(), IDevicesDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDeviceOrdersRecordsService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDeviceOrdersRecordsService.kt deleted file mode 100644 index b1bf38747f8f6be4db02ed0930771972d6add6ce..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDeviceOrdersRecordsService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.devices.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecords -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecordsQuery -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecordsVo - -interface IDeviceOrdersRecordsService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDeviceOrdersRecordsServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDeviceOrdersRecordsServiceImpl.kt deleted file mode 100644 index ffe9164eeb708d909eeefe9fc0e46b20a5b3e73d..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDeviceOrdersRecordsServiceImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.kotlinspring01.devices.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecords -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecordsQuery -import com.example.kotlinspring01.devices.pojo.DeviceOrdersRecordsVo -import com.example.kotlinspring01.devices.service.converter.IDeviceOrdersRecordsConverter -import com.example.kotlinspring01.devices.service.dao.IDeviceOrdersRecordsDao -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class IDeviceOrdersRecordsServiceImpl(override val daoService: IDeviceOrdersRecordsDao, override val converter: IDeviceOrdersRecordsConverter) : ICommonsServiceImpl(daoService, converter), IDeviceOrdersRecordsService { - override fun queryWrapper(q: DeviceOrdersRecordsQuery): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeSave(v: DeviceOrdersRecordsVo) { - - } - - override fun beforeUpdate(v: DeviceOrdersRecordsVo) { - - } - - override fun beforeDelete(id: List) { - - } -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesService.kt deleted file mode 100644 index ddc5cf655b50f7803ada612c7406e7b7ff16a228..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.devices.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo - -interface IDevicesService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesServiceImpl.kt deleted file mode 100644 index 143175a994f8f65ed7357aaecbc38765de168eba..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/devices/service/service/IDevicesServiceImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.example.kotlinspring01.devices.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.devices.pojo.Devices -import com.example.kotlinspring01.devices.pojo.DevicesQuery -import com.example.kotlinspring01.devices.pojo.DevicesVo -import com.example.kotlinspring01.devices.service.converter.IDevicesConverter -import com.example.kotlinspring01.devices.service.dao.IDevicesDao -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class IDevicesServiceImpl(override val daoService: IDevicesDao, override val converter: IDevicesConverter) : ICommonsServiceImpl(daoService, converter), IDevicesService { - override fun queryWrapper(q: DevicesQuery): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeSave(v: DevicesVo) { - - } - - override fun beforeUpdate(v: DevicesVo) { - - } - - override fun beforeDelete(id: List) { - - } -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/enumurate/MemberTypesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/enumurate/MemberTypesEnum.kt deleted file mode 100644 index bff7cfc80bc8004b0b315bccbc5380653246a742..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/enumurate/MemberTypesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.members.enumurate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class MemberTypesEnum(val code: Int, @JsonValue val value: String, val strategy: String) : IBaseEnum { - ORDINARY_MEMBER(0, "普通会员","ordinaryMember"), - FIRST_LEVEL_MEMBER(1, "一级会员", "firstLevelMember"); - - - companion object { - @JsonCreator - fun getItem(code: String): MemberTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/mapper/IMembersMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/mapper/IMembersMapper.kt deleted file mode 100644 index a86595e26717526d772b11f5455f83c948dd09a3..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/mapper/IMembersMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.members.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.members.pojo.Members -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IMembersMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/Members.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/Members.kt deleted file mode 100644 index 3be77b661db616f8026894f8c7625411d08fac9f..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/Members.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.members.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.members.enumurate.MemberTypesEnum - -class Members : CommonsPojo() { - var serialNumber:String? = null - var type: MemberTypesEnum? = null - var customerId:Long? = null - var customerName:String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/MembersQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/MembersQuery.kt deleted file mode 100644 index 9b4c9b11eb5f9285f02f00706c64e02295487665..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/MembersQuery.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.example.kotlinspring01.members.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.members.enumurate.MemberTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class MembersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var serialNumber: String? = null - - @AndEqualTo(property = "serialNumber") - var code: String? = null - - @AndEqualTo - var type: MemberTypesEnum? = null - - @AndEqualTo - var customerId: Long? = null - - @AndLike - var customerName: String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/MembersVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/MembersVo.kt deleted file mode 100644 index 2b22851960221ef0359f95e840654ee0a23415f9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/pojo/MembersVo.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.members.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.members.enumurate.MemberTypesEnum - -class MembersVo : CommonsVoPojo() { - var serialNumber:String? = null - var type: MemberTypesEnum? = null - var customerId:Long? = null - var customerName:String? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/service/converter/IMembersConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/service/converter/IMembersConverter.kt deleted file mode 100644 index 54fadf2e29c12bc6a8be92eb3e0297dfa1e8e3f9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/members/service/converter/IMembersConverter.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.members.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.members.pojo.Members -import com.example.kotlinspring01.members.pojo.MembersVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IMembersConverter : ICommonsConverter \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/controller/IOrdersController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/controller/IOrdersController.kt deleted file mode 100644 index 03978c13368eb088b4a841de29d964937415f680..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/controller/IOrdersController.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.kotlinspring01.orders.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.orders.pojo.OrderItems -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.PathVariable -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/orders") -interface IOrdersController : ICommonsController { - @GetMapping("/{id}/items") - fun getItems(@PathVariable("id") id: Long?): List? -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/controller/OrdersController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/controller/OrdersController.kt deleted file mode 100644 index 1b258ab94bb74fb67f207ab4d65968d71eee90be..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/controller/OrdersController.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.example.kotlinspring01.orders.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.orders.pojo.OrderItems -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo -import com.example.kotlinspring01.orders.service.service.IOrdersService -import org.springframework.web.bind.annotation.RestController - - -@RestController -class OrdersController(val service: IOrdersService) : CommonsController(service), IOrdersController { - - override fun getItems(id: Long?): List? { - return service.getItemsByOrderId(id) - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderStatesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderStatesEnum.kt deleted file mode 100644 index f9af9ae472f49833887fdec6f33a03c821b40a5b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderStatesEnum.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.example.kotlinspring01.orders.enumurate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class OrderStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - PLACE_AN_ORDER(100, "下单"), - USING(200, "使用中"), - APPOINTMENT_WAITING_FOR_USE(300, "预约等待使用"), - END_USE(400, "结束使用"), - PAYMENTS(501, "支付中"), - PAID(502, "已支付"), - CANCEL_PAYMENT(503, "取消支付"), - ORDER_COMPLETED(600, "订单完成"), - CANCEL_ORDER(700, "订单取消"), - CUSTOMER_CANCEL_ORDER(701, "客户取消订单"), - APPOINTMENT_OVERTIME_TO_CANCEL_THE_ORDER(702, "预约超时,取消订单"), - ORDER_EXCEPTION(800, "订单异常"), - ; - - companion object { - @JsonCreator - fun getItem(code: String): OrderStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderTypesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderTypesEnum.kt deleted file mode 100644 index 17335561123d557371bdfad26224e45a120b54a8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/enumurate/OrderTypesEnum.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.example.kotlinspring01.orders.enumurate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class OrderTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - NORMAL_ORDER(0, "普通订单"), - RESERVATION_ORDER(1, "预约订单") - ; - - companion object { - @JsonCreator - fun getItem(code: String): OrderTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IOrderItemsMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IOrderItemsMapper.kt deleted file mode 100644 index 037f9e255f0da1c43f11156a86f23f397e7a523c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IOrderItemsMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.orders.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.orders.pojo.OrderItems -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IOrderItemsMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IOrdersMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IOrdersMapper.kt deleted file mode 100644 index 92abadb16bd265e953c95f735f6df9678da7d698..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/mapper/IOrdersMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.orders.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.orders.pojo.Orders -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IOrdersMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrderItems.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrderItems.kt deleted file mode 100644 index 12b296fd6fb0d8d18af2df09194a1169f50099b5..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrderItems.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import java.math.BigDecimal - - -open class OrderItems : CommonsPojo() { - var orderId: Long? = null - var unitPrice: BigDecimal? = null - var salesUnit: String? = null - var usageAmount: BigDecimal? = null - var totalPrice: BigDecimal? = null -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/Orders.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/Orders.kt deleted file mode 100644 index 53e3df11345d4fccf813c1674a47b7ace3123972..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/Orders.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import java.math.BigDecimal - -open class Orders : CommonsPojo() { - var orderNo: String? = null - var type: OrderTypesEnum? = null - var customerId: Long? = null - var totalOrders: BigDecimal? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersAos.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersAos.kt deleted file mode 100644 index 1df5fdf192c1212b3eb70fbd21154cda7afdcd9c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersAos.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -sealed class OrdersAos : Orders() { - open class OrdersAo : OrdersAos() - - open class OrdersWithItemsAo : OrdersAo() { - var items: List? = null - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersQuery.kt deleted file mode 100644 index a69658e8f4a570994f457e3b8d8522c38d4320f9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersQuery.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - -class OrdersQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndLike - var oderNo: String? = null - - @AndEqualTo - var type: OrderTypesEnum? = null - - @AndEqualTo - var customerId: Long? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersVo.kt deleted file mode 100644 index 0ae27f476b9ac8f3651ac3327fb55b60aa687298..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/pojo/OrdersVo.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.orders.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.orders.enumurate.OrderTypesEnum -import java.math.BigDecimal - -class OrdersVo : CommonsVoPojo() { - var orderNo: String? = null - var type: OrderTypesEnum? = null - var customerId: Long? = null - var totalOrders: BigDecimal? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/converter/IOrdersConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/converter/IOrdersConverter.kt deleted file mode 100644 index f829236c183771b14c5b371068845efd64c873d0..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/converter/IOrdersConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.orders.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersAos -import com.example.kotlinspring01.orders.pojo.OrdersVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IOrdersConverter : ICommonsConverter { - fun ao(orders: Orders?): OrdersAos.OrdersAo? - fun aos(orders: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrderItemsDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrderItemsDao.kt deleted file mode 100644 index 359ff1f0a090c702cac0653c20a06ca57aa63d4a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrderItemsDao.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.kotlinspring01.orders.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.orders.pojo.OrderItems - -interface IOrderItemsDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrderItemsDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrderItemsDaoImpl.kt deleted file mode 100644 index 86f94d9c27d8e640435fe294ee922d847e6e5ed4..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrderItemsDaoImpl.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.example.kotlinspring01.orders.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.orders.mapper.IOrderItemsMapper -import com.example.kotlinspring01.orders.pojo.OrderItems -import org.springframework.stereotype.Service - -@Service -class IOrderItemsDaoImpl : ICommonsDaoImpl(), IOrderItemsDao diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDao.kt deleted file mode 100644 index 9ab479e1614a45f760dac4ad58cf1736923280d7..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.orders.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.orders.pojo.Orders - - -interface IOrdersDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDaoImpl.kt deleted file mode 100644 index bad5f3cc7488bd4eac7c720189bf6df30e7f90bb..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/dao/IOrdersDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.orders.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.orders.mapper.IOrdersMapper -import com.example.kotlinspring01.orders.pojo.Orders -import org.springframework.stereotype.Service - - -@Service -class IOrdersDaoImpl : ICommonsDaoImpl(), IOrdersDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersService.kt deleted file mode 100644 index 739839d5ed7ef975d9a94583b6cfa16318e9ce1a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersService.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.kotlinspring01.orders.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.orders.pojo.OrderItems -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo - -interface IOrdersService : ICommonsService { - fun getItemsByOrderId(id: Long?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersServiceImpl.kt deleted file mode 100644 index c95496734b424d4a4b636cfd1243560cfe8c5eeb..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/orders/service/service/IOrdersServiceImpl.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.example.kotlinspring01.orders.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.orders.pojo.OrderItems -import com.example.kotlinspring01.orders.pojo.Orders -import com.example.kotlinspring01.orders.pojo.OrdersQuery -import com.example.kotlinspring01.orders.pojo.OrdersVo -import com.example.kotlinspring01.orders.service.converter.IOrdersConverter -import com.example.kotlinspring01.orders.service.dao.IOrderItemsDao -import com.example.kotlinspring01.orders.service.dao.IOrdersDao -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES", "SpringJavaInjectionPointsAutowiringInspection") -@Service -class IOrdersServiceImpl(val itemsDao: IOrderItemsDao, override val daoService: IOrdersDao, override val converter: IOrdersConverter) : ICommonsServiceImpl(daoService, converter), IOrdersService { - - override fun getItemsByOrderId(id: Long?): List? { - return itemsDao.lambdaQuery().eq(OrderItems::orderId, id).list() - } - - override fun get(id: Long): Orders? { - val orders = super.get(id) - return converter.ao(orders) - } - - override fun queryList(q: OrdersQuery): List? { - val list = super.queryList(q) - return converter.aos(list) - } - - override fun queryWrapper(q: OrdersQuery): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeSave(v: OrdersVo) { - - } - - override fun beforeUpdate(v: OrdersVo) { - - } - - override fun beforeDelete(id: List) { - - } -} diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/controller/IPricesController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/controller/IPricesController.kt deleted file mode 100644 index 898f3fcd5f5aa59558f45907d77a262604f81677..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/controller/IPricesController.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.prices.controller - -import com.example.kotlinspring01.commons.controller.ICommonsController -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo -import org.springframework.web.bind.annotation.RequestMapping - -@RequestMapping("/prices") -interface IPricesController : ICommonsController diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/controller/PricesController.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/controller/PricesController.kt deleted file mode 100644 index 09a39133d740793014519be9a0be3f24712c0b6e..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/controller/PricesController.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.example.kotlinspring01.prices.controller - -import com.example.kotlinspring01.commons.controller.CommonsController -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo -import com.example.kotlinspring01.prices.service.service.IPricesService -import org.springframework.web.bind.annotation.RestController - - -@RestController -class PricesController(val service: IPricesService) : CommonsController(service), IPricesController \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceStatesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceStatesEnum.kt deleted file mode 100644 index f486fba82ae146e0b32cffeb0b552f0080141324..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceStatesEnum.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.example.kotlinspring01.prices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class PriceStatesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - ENABLE(0, "启用"), - DISABLE(1, "停用") - ; - - companion object { - @JsonCreator - fun getItem(code: String): PriceStatesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceTypesEnum.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceTypesEnum.kt deleted file mode 100644 index 3880c814c0d01ec26055ac83fd5668af757730c2..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/enumerate/PriceTypesEnum.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.example.kotlinspring01.prices.enumerate - -import com.example.kotlinspring01.base.enumerate.IBaseEnum -import com.fasterxml.jackson.annotation.JsonCreator -import com.fasterxml.jackson.annotation.JsonValue - -enum class PriceTypesEnum(val code: Int, @JsonValue val value: String) : IBaseEnum { - WATER(0, "水费"), - TIME(1, "时间"), - ELECTRICITY(2, "电费"); - - companion object { - @JsonCreator - fun getItem(code: String): PriceTypesEnum? { - for (enum in values()) { - if (enum.code.toString() == code || enum.value == code || enum.name.toLowerCase() == code.toLowerCase()) { - return enum - } - } - return null - } - } - - override fun getStringValue(): String? { - return value - } - - override fun getIntCode(): Int? { - return code - } - - override fun getStringName(): String? { - return name - } - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/mapper/IPricesMapper.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/mapper/IPricesMapper.kt deleted file mode 100644 index 26101323af906ba1ae968d4220fa0bdbb9a81495..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/mapper/IPricesMapper.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.prices.mapper - -import com.example.kotlinspring01.commons.mapper.ICommonsMapper -import com.example.kotlinspring01.prices.pojo.Prices -import org.apache.ibatis.annotations.Mapper - -@Mapper -interface IPricesMapper : ICommonsMapper \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/Prices.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/Prices.kt deleted file mode 100644 index 63ce9d648ca862f3af4c0420557a82538c6375c8..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/Prices.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsPojo -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import java.math.BigDecimal - - -open class Prices : CommonsPojo() { - var name: String? = null - var type: PriceTypesEnum? = null - var price: BigDecimal? = null - var state: PriceStatesEnum? = null - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesAos.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesAos.kt deleted file mode 100644 index 453db7b93fec8df505ae44bec50d77e9c1c38460..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesAos.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -sealed class PricesAos : Prices() { - - - class PricesAo : PricesAos() { - val typeCode: Int? = type?.code - val typeName: String? = type?.name - val stateCode: Int? = state?.code - val stateName: String? = state?.name - - - } -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesQuery.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesQuery.kt deleted file mode 100644 index 5f51e6b3a7c1ff416dd8aa399ef803309b761bdf..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesQuery.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsQueryPojo -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import com.gitee.denger.mybatis.example.ext.MybatisExampleForTk -import com.gitee.denger.mybatis.example.ext.annotation.AndEqualTo -import com.gitee.denger.mybatis.example.ext.annotation.AndLike -import tk.mybatis.mapper.entity.Example - - -class PricesQuery : CommonsQueryPojo(), MybatisExampleForTk { - @AndEqualTo - var type: PriceTypesEnum? = null - - @AndEqualTo - var state: PriceStatesEnum? = null - - @AndLike - var name: String? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesVo.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesVo.kt deleted file mode 100644 index f18e2d498b8adf3c68e3a45412319b1b75684deb..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/pojo/PricesVo.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.example.kotlinspring01.prices.pojo - -import com.example.kotlinspring01.commons.pojo.CommonsVoPojo -import com.example.kotlinspring01.prices.enumerate.PriceStatesEnum -import com.example.kotlinspring01.prices.enumerate.PriceTypesEnum -import java.math.BigDecimal - -class PricesVo : CommonsVoPojo() { - - var name: String? = null - var type: PriceTypesEnum? = null - var price: BigDecimal? = null - var state: PriceStatesEnum? = null - - -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/converter/IPricesConverter.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/converter/IPricesConverter.kt deleted file mode 100644 index c9848cefb84644c207883177ea468305fa2d6cbb..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/converter/IPricesConverter.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01.prices.service.converter - -import com.example.kotlinspring01.commons.service.converter.ICommonsConverter -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesAos -import com.example.kotlinspring01.prices.pojo.PricesVo -import org.mapstruct.Mapper - -@Mapper(componentModel = "spring") -interface IPricesConverter : ICommonsConverter { - fun ao(prices: Prices?): PricesAos.PricesAo? - fun aos(prices: List?): List? -} \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDao.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDao.kt deleted file mode 100644 index fc4456f22f7c6ddfdd7876e003fde45746655e04..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDao.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.example.kotlinspring01.prices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDao -import com.example.kotlinspring01.prices.pojo.Prices - - -interface IPricesDao : ICommonsDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDaoImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDaoImpl.kt deleted file mode 100644 index 894ecb0cd6296bc2c40119ad84547e4b1e973c3b..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/dao/IPricesDaoImpl.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.example.kotlinspring01.prices.service.dao - -import com.example.kotlinspring01.commons.service.dao.ICommonsDaoImpl -import com.example.kotlinspring01.prices.mapper.IPricesMapper -import com.example.kotlinspring01.prices.pojo.Prices -import org.springframework.stereotype.Service - - -@Service -class IPricesDaoImpl : ICommonsDaoImpl(), IPricesDao \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesService.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesService.kt deleted file mode 100644 index 5046d964c01d29ceaeceb030ca8e6d7e8b663b6c..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesService.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.example.kotlinspring01.prices.service.service - -import com.example.kotlinspring01.commons.service.service.ICommonsService -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo - -interface IPricesService : ICommonsService \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesServiceImpl.kt b/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesServiceImpl.kt deleted file mode 100644 index 0cd6abc083f0f7603c7c7d773262cf5b4d68b72a..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/kotlin/com/example/kotlinspring01/prices/service/service/IPricesServiceImpl.kt +++ /dev/null @@ -1,43 +0,0 @@ -@file:Suppress("SpringJavaInjectionPointsAutowiringInspection") - -package com.example.kotlinspring01.prices.service.service - -import com.baomidou.mybatisplus.core.conditions.Wrapper -import com.baomidou.mybatisplus.core.toolkit.Wrappers -import com.example.kotlinspring01.commons.service.service.ICommonsServiceImpl -import com.example.kotlinspring01.prices.pojo.Prices -import com.example.kotlinspring01.prices.pojo.PricesQuery -import com.example.kotlinspring01.prices.pojo.PricesVo -import com.example.kotlinspring01.prices.service.converter.IPricesConverter -import com.example.kotlinspring01.prices.service.dao.IPricesDao -import org.springframework.stereotype.Service - -@Suppress("DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES") -@Service -class IPricesServiceImpl(override val daoService: IPricesDao, override val converter: IPricesConverter) : ICommonsServiceImpl(daoService, converter), IPricesService { - override fun get(id: Long): Prices? { - val prices = super.get(id) - return converter.ao(prices) - } - - override fun queryList(q: PricesQuery): List? { - val list = super.queryList(q) - return converter.aos(list) - } - - override fun queryWrapper(q: PricesQuery): Wrapper? { - return Wrappers.emptyWrapper() - } - - override fun beforeSave(v: PricesVo) { - - } - - override fun beforeUpdate(v: PricesVo) { - - } - - override fun beforeDelete(id: List) { - - } -} diff --git a/maven/kotlin-spring-01/src/src/main/resources/application.yml b/maven/kotlin-spring-01/src/src/main/resources/application.yml deleted file mode 100644 index 8c5a21fac92e6997f710e8023984574fe6f76306..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/resources/application.yml +++ /dev/null @@ -1,43 +0,0 @@ -mybatis: - mapper-locations: classpath*:mappers/*.xml - configuration: - cache-enabled: true -mybatis-plus: - mapper-locations: ${mybatis.mapper-locations} - configuration: - cache-enabled: true -mapper: - enum-as-simple-type: true -spring: - datasource: - username: root - password: root - driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/kotlin_spring_01?serverTimezone=Asia/Shanghai - security: - user: - password: admin - name: admin - jackson: - date-format: yyyy-MM-dd HH:mm:ss.SSS - time-zone: GMT+8 - locale: zh_CN - mvc: - format: - date: yyyy-MM-dd - date-time: yyyy-MM-dd HH:mm:ss - time: HH:mm:ss - locale: zh_CN - cache: - type: ehcache - ehcache: - config: classpath:ehcache.xml -logging: - level: - root: info - web: debug - file: - name: kotlin_spring_01.log -server: - port: 8000 - diff --git a/maven/kotlin-spring-01/src/src/main/resources/ehcache.xml b/maven/kotlin-spring-01/src/src/main/resources/ehcache.xml deleted file mode 100644 index e188ad496c6e18def8103ac615c541ea29e6ed06..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/resources/ehcache.xml +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/maven/kotlin-spring-01/src/src/main/resources/mappers/IUsersMapper.xml b/maven/kotlin-spring-01/src/src/main/resources/mappers/IUsersMapper.xml deleted file mode 100644 index c3df17a7f0ca736dc4285236dcce2b05ebfe32d9..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/main/resources/mappers/IUsersMapper.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/maven/kotlin-spring-01/src/src/test/kotlin/com/example/kotlinspring01/KotlinSpring01ApplicationTests.kt b/maven/kotlin-spring-01/src/src/test/kotlin/com/example/kotlinspring01/KotlinSpring01ApplicationTests.kt deleted file mode 100644 index 391d299a0fa406491f3a97cac129b76ccb471e53..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/src/test/kotlin/com/example/kotlinspring01/KotlinSpring01ApplicationTests.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01 - -import org.junit.jupiter.api.Test -import org.springframework.boot.test.context.SpringBootTest - -@SpringBootTest -class KotlinSpring01ApplicationTests { - - @Test - fun contextLoads() { - } - -} diff --git a/maven/kotlin-spring-01/src/test/kotlin/com/example/kotlinspring01/KotlinSpring01ApplicationTests.kt b/maven/kotlin-spring-01/src/test/kotlin/com/example/kotlinspring01/KotlinSpring01ApplicationTests.kt deleted file mode 100644 index 391d299a0fa406491f3a97cac129b76ccb471e53..0000000000000000000000000000000000000000 --- a/maven/kotlin-spring-01/src/test/kotlin/com/example/kotlinspring01/KotlinSpring01ApplicationTests.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.kotlinspring01 - -import org.junit.jupiter.api.Test -import org.springframework.boot.test.context.SpringBootTest - -@SpringBootTest -class KotlinSpring01ApplicationTests { - - @Test - fun contextLoads() { - } - -}