commit 6e631464b0850e4fb4b494b0739175320eed2d4a Author: wangjinlei <751475802@qq.com> Date: Tue Dec 21 15:40:52 2021 +0800 1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000..a45eb6b --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,118 @@ +/* + * Copyright 2007-present the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + + private static final String WRAPPER_VERSION = "0.5.6"; + /** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ + private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" + + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + + /** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ + private static final String MAVEN_WRAPPER_PROPERTIES_PATH = + ".mvn/wrapper/maven-wrapper.properties"; + + /** + * Path where the maven-wrapper.jar will be saved to. + */ + private static final String MAVEN_WRAPPER_JAR_PATH = + ".mvn/wrapper/maven-wrapper.jar"; + + /** + * Name of the property which should be used to override the default download url for the wrapper. + */ + private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + + public static void main(String args[]) { + System.out.println("- Downloader started"); + File baseDirectory = new File(args[0]); + System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + + // If the maven-wrapper.properties exists, read it and check if it contains a custom + // wrapperUrl parameter. + File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); + String url = DEFAULT_DOWNLOAD_URL; + if (mavenWrapperPropertyFile.exists()) { + FileInputStream mavenWrapperPropertyFileInputStream = null; + try { + mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); + Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); + url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); + } catch (IOException e) { + System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); + } finally { + try { + if (mavenWrapperPropertyFileInputStream != null) { + mavenWrapperPropertyFileInputStream.close(); + } + } catch (IOException e) { + // Ignore ... + } + } + } + System.out.println("- Downloading from: " + url); + + File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); + if (!outputFile.getParentFile().exists()) { + if (!outputFile.getParentFile().mkdirs()) { + System.out.println( + "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); + } + } + System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); + try { + downloadFileFromURL(url, outputFile); + System.out.println("Done"); + System.exit(0); + } catch (Throwable e) { + System.out.println("- Error downloading"); + e.printStackTrace(); + System.exit(1); + } + } + + private static void downloadFileFromURL(String urlString, File destination) throws Exception { + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + String username = System.getenv("MVNW_USERNAME"); + char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + URL website = new URL(urlString); + ReadableByteChannel rbc; + rbc = Channels.newChannel(website.openStream()); + FileOutputStream fos = new FileOutputStream(destination); + fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); + fos.close(); + rbc.close(); + } + +} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..2cc7d4a Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..abd303b --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-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/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF new file mode 100644 index 0000000..481810d --- /dev/null +++ b/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: com.example.ts_obj.TsObjApplication + diff --git a/hs_err_pid15044.log b/hs_err_pid15044.log new file mode 100644 index 0000000..4952f93 --- /dev/null +++ b/hs_err_pid15044.log @@ -0,0 +1,192 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 268435456 bytes for Failed to commit area from 0x0000000701000000 to 0x0000000711000000 of length 268435456. +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# This output file may be truncated or incomplete. +# +# Out of Memory Error (./src/hotspot/os/windows/os_windows.cpp:3311), pid=15044, tid=16008 +# +# JRE version: (11.0.12+7) (build ) +# Java VM: OpenJDK 64-Bit Server VM (11.0.12+7-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: C:\Users\ADMINI~1\AppData\Local\Temp\surefire10008181636460670627\surefirebooter13783129684859538853.jar C:\Users\Administrator\AppData\Local\Temp\surefire10008181636460670627 2021-12-15T16-43-37_878-jvmRun1 surefire5134485466816359046tmp surefire_014976020681817024045tmp + +Host: Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz, 12 cores, 15G, Windows 10 , 64 bit Build 19041 (10.0.19041.292) +Time: Wed Dec 15 16:43:38 2021 中国标准时间 elapsed time: 0.011488 seconds (0d 0h 0m 0s) + +--------------- T H R E A D --------------- + +Current thread (0x000001ba3a5ae000): JavaThread "Unknown thread" [_thread_in_vm, id=16008, stack(0x00000024a5100000,0x00000024a5200000)] + +Stack: [0x00000024a5100000,0x00000024a5200000] +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x601d7a] +V [jvm.dll+0x78b45e] +V [jvm.dll+0x78cb2f] +V [jvm.dll+0x78d1f3] +V [jvm.dll+0x24bc58] +V [jvm.dll+0x5fef1a] +V [jvm.dll+0x5f39d5] +V [jvm.dll+0x3038fc] +V [jvm.dll+0x303782] +V [jvm.dll+0x3084a6] +V [jvm.dll+0x34d5ff] +V [jvm.dll+0x34d030] +V [jvm.dll+0x2e0a08] +V [jvm.dll+0x2e1b66] +V [jvm.dll+0x7667e7] +V [jvm.dll+0x767f6f] +V [jvm.dll+0x35a389] +V [jvm.dll+0x749870] +V [jvm.dll+0x3c1fbf] +V [jvm.dll+0x3c4491] +C [jli.dll+0x5207] +C [ucrtbase.dll+0x21542] +C [KERNEL32.DLL+0x16fd4] +C [ntdll.dll+0x4cec1] + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x000001ba3830e9d0, length=0, elements={ +} + +Java Threads: ( => current thread ) + +Other Threads: + 0x000001ba3a5c3000 GCTaskThread "GC Thread#0" [stack: 0x00000024a5200000,0x00000024a5300000] [id=1844] + 0x000001ba3a61f000 ConcurrentGCThread "G1 Main Marker" [stack: 0x00000024a5300000,0x00000024a5400000] [id=2152] + 0x000001ba3a622000 ConcurrentGCThread "G1 Conc#0" [stack: 0x00000024a5400000,0x00000024a5500000] [id=14136] + +[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc404b00d7] + +VM state:not at safepoint (not fully initialized) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000001ba3a5ab090] Heap_lock - owner thread: 0x000001ba3a5ae000 + +Heap address: 0x0000000701000000, size: 4080 MB, Compressed Oops mode: Non-zero based: 0x0000000701000000 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 0 + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (0 events): +No events + +Events (1 events): +Event: 0.008 Loaded shared library C:\Users\Administrator\.jdks\corretto-11.0.12\bin\zip.dll + + +Dynamic libraries: +0x00007ff61b6f0000 - 0x00007ff61b6fd000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\java.exe +0x00007ffc6ebb0000 - 0x00007ffc6eda5000 C:\windows\SYSTEM32\ntdll.dll +0x00007ffc6cc20000 - 0x00007ffc6ccdd000 C:\windows\System32\KERNEL32.DLL +0x00007ffc6c950000 - 0x00007ffc6cc17000 C:\windows\System32\KERNELBASE.dll +0x00007ffc6c850000 - 0x00007ffc6c950000 C:\windows\System32\ucrtbase.dll +0x00007ffc67600000 - 0x00007ffc67617000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\jli.dll +0x00007ffc67930000 - 0x00007ffc67949000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\VCRUNTIME140.dll +0x00007ffc6cdf0000 - 0x00007ffc6cf90000 C:\windows\System32\USER32.dll +0x00007ffc6c820000 - 0x00007ffc6c842000 C:\windows\System32\win32u.dll +0x00007ffc6d0a0000 - 0x00007ffc6d0ca000 C:\windows\System32\GDI32.dll +0x00007ffc6c450000 - 0x00007ffc6c55a000 C:\windows\System32\gdi32full.dll +0x00007ffc6c380000 - 0x00007ffc6c41d000 C:\windows\System32\msvcp_win.dll +0x00007ffc57960000 - 0x00007ffc57bfa000 C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1_none_b555e41d4684ddec\COMCTL32.dll +0x00007ffc6ea30000 - 0x00007ffc6eace000 C:\windows\System32\msvcrt.dll +0x00007ffc6cf90000 - 0x00007ffc6cfc0000 C:\windows\System32\IMM32.DLL +0x00007ffc40d20000 - 0x00007ffc40dbb000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\msvcp140.dll +0x00007ffc401c0000 - 0x00007ffc40d1a000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\server\jvm.dll +0x00007ffc6e6c0000 - 0x00007ffc6e76a000 C:\windows\System32\ADVAPI32.dll +0x00007ffc6ead0000 - 0x00007ffc6eb6b000 C:\windows\System32\sechost.dll +0x00007ffc6d7e0000 - 0x00007ffc6d903000 C:\windows\System32\RPCRT4.dll +0x00007ffc6cfc0000 - 0x00007ffc6cfc8000 C:\windows\System32\PSAPI.DLL +0x00007ffc3b350000 - 0x00007ffc3b359000 C:\windows\SYSTEM32\WSOCK32.dll +0x00007ffc6d970000 - 0x00007ffc6d9db000 C:\windows\System32\WS2_32.dll +0x00007ffc6bea0000 - 0x00007ffc6beaa000 C:\windows\SYSTEM32\VERSION.dll +0x00007ffc5f230000 - 0x00007ffc5f257000 C:\windows\SYSTEM32\WINMM.dll +0x00007ffc6a230000 - 0x00007ffc6a243000 C:\windows\SYSTEM32\kernel.appcore.dll +0x00007ffc5ad50000 - 0x00007ffc5ad60000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\verify.dll +0x00007ffc58520000 - 0x00007ffc58704000 C:\windows\SYSTEM32\DBGHELP.DLL +0x00007ffc582d0000 - 0x00007ffc582fc000 C:\windows\SYSTEM32\dbgcore.DLL +0x00007ffc6c300000 - 0x00007ffc6c37f000 C:\windows\System32\bcryptPrimitives.dll +0x00007ffc4e2b0000 - 0x00007ffc4e2d8000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\java.dll +0x00007ffc5a390000 - 0x00007ffc5a39a000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\jimage.dll +0x00007ffc462d0000 - 0x00007ffc462e7000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\zip.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Users\Administrator\.jdks\corretto-11.0.12\bin;C:\windows\SYSTEM32;C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1_none_b555e41d4684ddec;C:\Users\Administrator\.jdks\corretto-11.0.12\bin\server + +VM Arguments: +java_command: C:\Users\ADMINI~1\AppData\Local\Temp\surefire10008181636460670627\surefirebooter13783129684859538853.jar C:\Users\Administrator\AppData\Local\Temp\surefire10008181636460670627 2021-12-15T16-43-37_878-jvmRun1 surefire5134485466816359046tmp surefire_014976020681817024045tmp +java_class_path (initial): C:\Users\ADMINI~1\AppData\Local\Temp\surefire10008181636460670627\surefirebooter13783129684859538853.jar +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 3 {product} {ergonomic} + uint G1ConcRefinementThreads = 10 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 268435456 {product} {ergonomic} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 4278190080 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 5836300 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122910970 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122910970 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + bool UseCompressedClassPointers = true {lp64_product} {ergonomic} + bool UseCompressedOops = true {lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags + #1: stderr all=off uptime,level,tags + +Environment Variables: +PATH=E:\vm\bin\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\HP\Common\HPDestPlgIn\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;D:\putty\;C:\Program Files\nodejs\;D:\phpstudy_pro\Extensions\php\php7.3.4nts;C:\ProgramData\ComposerSetup\bin;C:\Program Files\python;C:\Program Files\python\Scripts;;D:\BtSoft\panel\script;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\HP\Common\HPDestPlgIn\;D:\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin;E:\IntelliJ IDEA 2021.1.2\bin; +USERNAME=Administrator +OS=Windows_NT +PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 3, GenuineIntel + + + +--------------- S Y S T E M --------------- + +OS: Windows 10 , 64 bit Build 19041 (10.0.19041.292) +OS uptime: 0 days 7:46 hours + +CPU:total 12 (initial active 12) (6 cores per cpu, 2 threads per core) family 6 model 165 stepping 3 microcode 0xcc, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma + +Memory: 4k page, system-wide physical 16315M (2805M free) +TotalPageFile size 23890M (AvailPageFile size 127M) +current process WorkingSet (physical memory assigned to process): 10M, peak: 10M +current process commit charge ("private bytes"): 64M, peak: 320M + +vm_info: OpenJDK 64-Bit Server VM (11.0.12+7-LTS) for windows-amd64 JRE (11.0.12+7-LTS), built on Jul 13 2021 17:58:36 by "Administrator" with unknown MS VC++:1916 + +END. diff --git a/hs_err_pid18240.log b/hs_err_pid18240.log new file mode 100644 index 0000000..974928d --- /dev/null +++ b/hs_err_pid18240.log @@ -0,0 +1,192 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 268435456 bytes for Failed to commit area from 0x0000000701000000 to 0x0000000711000000 of length 268435456. +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# This output file may be truncated or incomplete. +# +# Out of Memory Error (./src/hotspot/os/windows/os_windows.cpp:3311), pid=18240, tid=17724 +# +# JRE version: (11.0.12+7) (build ) +# Java VM: OpenJDK 64-Bit Server VM (11.0.12+7-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: C:\Users\ADMINI~1\AppData\Local\Temp\surefire7037757628362963651\surefirebooter1583124104524680295.jar C:\Users\Administrator\AppData\Local\Temp\surefire7037757628362963651 2021-12-15T16-42-38_168-jvmRun1 surefire2885657478469464408tmp surefire_012374327702175078940tmp + +Host: Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz, 12 cores, 15G, Windows 10 , 64 bit Build 19041 (10.0.19041.292) +Time: Wed Dec 15 16:42:38 2021 中国标准时间 elapsed time: 0.022441 seconds (0d 0h 0m 0s) + +--------------- T H R E A D --------------- + +Current thread (0x00000217c0229800): JavaThread "Unknown thread" [_thread_in_vm, id=17724, stack(0x000000a127600000,0x000000a127700000)] + +Stack: [0x000000a127600000,0x000000a127700000] +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x601d7a] +V [jvm.dll+0x78b45e] +V [jvm.dll+0x78cb2f] +V [jvm.dll+0x78d1f3] +V [jvm.dll+0x24bc58] +V [jvm.dll+0x5fef1a] +V [jvm.dll+0x5f39d5] +V [jvm.dll+0x3038fc] +V [jvm.dll+0x303782] +V [jvm.dll+0x3084a6] +V [jvm.dll+0x34d5ff] +V [jvm.dll+0x34d030] +V [jvm.dll+0x2e0a08] +V [jvm.dll+0x2e1b66] +V [jvm.dll+0x7667e7] +V [jvm.dll+0x767f6f] +V [jvm.dll+0x35a389] +V [jvm.dll+0x749870] +V [jvm.dll+0x3c1fbf] +V [jvm.dll+0x3c4491] +C [jli.dll+0x5207] +C [ucrtbase.dll+0x21542] +C [KERNEL32.DLL+0x16fd4] +C [ntdll.dll+0x4cec1] + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x00000217be0f2580, length=0, elements={ +} + +Java Threads: ( => current thread ) + +Other Threads: + 0x00000217c0241800 GCTaskThread "GC Thread#0" [stack: 0x000000a127700000,0x000000a127800000] [id=4564] + 0x00000217c029f000 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000a127800000,0x000000a127900000] [id=17452] + 0x00000217c02a2000 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000a127900000,0x000000a127a00000] [id=15480] + +[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffc404b00d7] + +VM state:not at safepoint (not fully initialized) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x00000217c0226840] Heap_lock - owner thread: 0x00000217c0229800 + +Heap address: 0x0000000701000000, size: 4080 MB, Compressed Oops mode: Non-zero based: 0x0000000701000000 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 0 + +GC Heap History (0 events): +No events + +Deoptimization events (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (0 events): +No events + +Events (1 events): +Event: 0.008 Loaded shared library C:\Users\Administrator\.jdks\corretto-11.0.12\bin\zip.dll + + +Dynamic libraries: +0x00007ff61b6f0000 - 0x00007ff61b6fd000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\java.exe +0x00007ffc6ebb0000 - 0x00007ffc6eda5000 C:\windows\SYSTEM32\ntdll.dll +0x00007ffc6cc20000 - 0x00007ffc6ccdd000 C:\windows\System32\KERNEL32.DLL +0x00007ffc6c950000 - 0x00007ffc6cc17000 C:\windows\System32\KERNELBASE.dll +0x00007ffc6c850000 - 0x00007ffc6c950000 C:\windows\System32\ucrtbase.dll +0x00007ffc67600000 - 0x00007ffc67617000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\jli.dll +0x00007ffc67930000 - 0x00007ffc67949000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\VCRUNTIME140.dll +0x00007ffc6cdf0000 - 0x00007ffc6cf90000 C:\windows\System32\USER32.dll +0x00007ffc6c820000 - 0x00007ffc6c842000 C:\windows\System32\win32u.dll +0x00007ffc6d0a0000 - 0x00007ffc6d0ca000 C:\windows\System32\GDI32.dll +0x00007ffc6c450000 - 0x00007ffc6c55a000 C:\windows\System32\gdi32full.dll +0x00007ffc6c380000 - 0x00007ffc6c41d000 C:\windows\System32\msvcp_win.dll +0x00007ffc57960000 - 0x00007ffc57bfa000 C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1_none_b555e41d4684ddec\COMCTL32.dll +0x00007ffc6ea30000 - 0x00007ffc6eace000 C:\windows\System32\msvcrt.dll +0x00007ffc6cf90000 - 0x00007ffc6cfc0000 C:\windows\System32\IMM32.DLL +0x00007ffc40d20000 - 0x00007ffc40dbb000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\msvcp140.dll +0x00007ffc401c0000 - 0x00007ffc40d1a000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\server\jvm.dll +0x00007ffc6e6c0000 - 0x00007ffc6e76a000 C:\windows\System32\ADVAPI32.dll +0x00007ffc6ead0000 - 0x00007ffc6eb6b000 C:\windows\System32\sechost.dll +0x00007ffc6d7e0000 - 0x00007ffc6d903000 C:\windows\System32\RPCRT4.dll +0x00007ffc6cfc0000 - 0x00007ffc6cfc8000 C:\windows\System32\PSAPI.DLL +0x00007ffc5f230000 - 0x00007ffc5f257000 C:\windows\SYSTEM32\WINMM.dll +0x00007ffc3b350000 - 0x00007ffc3b359000 C:\windows\SYSTEM32\WSOCK32.dll +0x00007ffc6d970000 - 0x00007ffc6d9db000 C:\windows\System32\WS2_32.dll +0x00007ffc6bea0000 - 0x00007ffc6beaa000 C:\windows\SYSTEM32\VERSION.dll +0x00007ffc6a230000 - 0x00007ffc6a243000 C:\windows\SYSTEM32\kernel.appcore.dll +0x00007ffc5ad50000 - 0x00007ffc5ad60000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\verify.dll +0x00007ffc58520000 - 0x00007ffc58704000 C:\windows\SYSTEM32\DBGHELP.DLL +0x00007ffc582d0000 - 0x00007ffc582fc000 C:\windows\SYSTEM32\dbgcore.DLL +0x00007ffc6c300000 - 0x00007ffc6c37f000 C:\windows\System32\bcryptPrimitives.dll +0x00007ffc4e2b0000 - 0x00007ffc4e2d8000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\java.dll +0x00007ffc5a390000 - 0x00007ffc5a39a000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\jimage.dll +0x00007ffc462d0000 - 0x00007ffc462e7000 C:\Users\Administrator\.jdks\corretto-11.0.12\bin\zip.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Users\Administrator\.jdks\corretto-11.0.12\bin;C:\windows\SYSTEM32;C:\windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1_none_b555e41d4684ddec;C:\Users\Administrator\.jdks\corretto-11.0.12\bin\server + +VM Arguments: +java_command: C:\Users\ADMINI~1\AppData\Local\Temp\surefire7037757628362963651\surefirebooter1583124104524680295.jar C:\Users\Administrator\AppData\Local\Temp\surefire7037757628362963651 2021-12-15T16-42-38_168-jvmRun1 surefire2885657478469464408tmp surefire_012374327702175078940tmp +java_class_path (initial): C:\Users\ADMINI~1\AppData\Local\Temp\surefire7037757628362963651\surefirebooter1583124104524680295.jar +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 3 {product} {ergonomic} + uint G1ConcRefinementThreads = 10 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 268435456 {product} {ergonomic} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 4278190080 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 5836300 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122910970 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122910970 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + bool UseCompressedClassPointers = true {lp64_product} {ergonomic} + bool UseCompressedOops = true {lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags + #1: stderr all=off uptime,level,tags + +Environment Variables: +PATH=E:\vm\bin\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\HP\Common\HPDestPlgIn\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;D:\putty\;C:\Program Files\nodejs\;D:\phpstudy_pro\Extensions\php\php7.3.4nts;C:\ProgramData\ComposerSetup\bin;C:\Program Files\python;C:\Program Files\python\Scripts;;D:\BtSoft\panel\script;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\HP\Common\HPDestPlgIn\;D:\Microsoft VS Code\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin;E:\IntelliJ IDEA 2021.1.2\bin; +USERNAME=Administrator +OS=Windows_NT +PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 3, GenuineIntel + + + +--------------- S Y S T E M --------------- + +OS: Windows 10 , 64 bit Build 19041 (10.0.19041.292) +OS uptime: 0 days 7:45 hours + +CPU:total 12 (initial active 12) (6 cores per cpu, 2 threads per core) family 6 model 165 stepping 3 microcode 0xcc, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma + +Memory: 4k page, system-wide physical 16315M (2809M free) +TotalPageFile size 23890M (AvailPageFile size 136M) +current process WorkingSet (physical memory assigned to process): 10M, peak: 10M +current process commit charge ("private bytes"): 64M, peak: 320M + +vm_info: OpenJDK 64-Bit Server VM (11.0.12+7-LTS) for windows-amd64 JRE (11.0.12+7-LTS), built on Jul 13 2021 17:58:36 by "Administrator" with unknown MS VC++:1916 + +END. diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..a16b543 --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + if [ -n "$MVNW_REPOURL" ]; then + jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + else + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + fi + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + if $cygwin; then + wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + fi + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget "$jarUrl" -O "$wrapperJarPath" + else + wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl -o "$wrapperJarPath" "$jarUrl" -f + else + curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + fi + + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaClass=`cygpath --path --windows "$javaClass"` + fi + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..c8d4337 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + +FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/out/artifacts/ts_obj_jar/ts_obj.jar b/out/artifacts/ts_obj_jar/ts_obj.jar new file mode 100644 index 0000000..12ec477 Binary files /dev/null and b/out/artifacts/ts_obj_jar/ts_obj.jar differ diff --git a/output.docx b/output.docx new file mode 100644 index 0000000..e0bb4ef Binary files /dev/null and b/output.docx differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..9e56000 --- /dev/null +++ b/pom.xml @@ -0,0 +1,112 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.5.5 + + + com.example + ts_obj + 0.0.1-SNAPSHOT + ts_obj + Demo project for Spring Boot + + 11 + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.2.0 + + + + mysql + mysql-connector-java + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + com.deepoove + poi-tl + 1.10.2 + + + org.apache.poi + poi + 4.1.2 + + + org.apache.poi + poi-ooxml + 4.1.2 + + + org.apache.poi + poi-scratchpad + 4.1.2 + + + + + + + + + + + + + + + com.alibaba + fastjson + 1.2.47 + + + org.jetbrains + annotations + RELEASE + compile + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..481810d --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: com.example.ts_obj.TsObjApplication + diff --git a/src/main/java/com/example/ts_obj/TsObjApplication.java b/src/main/java/com/example/ts_obj/TsObjApplication.java new file mode 100644 index 0000000..4ceed4c --- /dev/null +++ b/src/main/java/com/example/ts_obj/TsObjApplication.java @@ -0,0 +1,15 @@ +package com.example.ts_obj; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +@MapperScan("com.example.*.dao") +public class TsObjApplication { + + public static void main(String[] args) { + SpringApplication.run(TsObjApplication.class, args); + } + +} diff --git a/src/main/java/com/example/ts_obj/Util/PicUtil.java b/src/main/java/com/example/ts_obj/Util/PicUtil.java new file mode 100644 index 0000000..a1cf705 --- /dev/null +++ b/src/main/java/com/example/ts_obj/Util/PicUtil.java @@ -0,0 +1,87 @@ +package com.example.ts_obj.Util; + +import org.apache.poi.hwpf.model.PicturesTable; +import org.apache.poi.hwpf.usermodel.Picture; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; + +import org.apache.poi.hwpf.HWPFDocument; +import org.apache.poi.hwpf.usermodel.CharacterRun; +import org.apache.poi.hwpf.usermodel.Range; + +public class PicUtil { + private PicturesTable picturesTable; + private Set output = new HashSet(); + private Map lookup; + private List nonU1based; + private List all; + private int pn = 0; + + public PicUtil(HWPFDocument doc) { + picturesTable = doc.getPicturesTable(); + all = picturesTable.getAllPictures(); + + // Build the Offset-Picture lookup map + lookup = new HashMap(); + for (Picture p : all) { + lookup.put(p.getStartOffset(), p); + } + + // Work out which Pictures aren't referenced by + // a \u0001 in the main text + // These are \u0008 escher floating ones, ones + // found outside the normal text, and who + // knows what else... + nonU1based = new ArrayList(); + nonU1based.addAll(all); + Range r = doc.getRange(); + for (int i = 0; i < r.numCharacterRuns(); i++) { + CharacterRun cr = r.getCharacterRun(i); + if (picturesTable.hasPicture(cr)) { + Picture p = getFor(cr); + int at = nonU1based.indexOf(p); + nonU1based.set(at, null); + } + } + } + + private boolean hasPicture(CharacterRun cr) { + return picturesTable.hasPicture(cr); + } + + private void recordOutput(Picture picture) { + output.add(picture); + } + + private boolean hasOutput(Picture picture) { + return output.contains(picture); + } + + private int pictureNumber(Picture picture) { + return all.indexOf(picture) + 1; + } + + public Picture getFor(CharacterRun cr) { + return lookup.get(cr.getPicOffset()); + } + + /** + * Return the next unclaimed one, used towards the end + */ + private Picture nextUnclaimed() { + Picture p = null; + while (pn < nonU1based.size()) { + p = nonU1based.get(pn); + pn++; + if (p != null) + return p; + } + return null; + } +} diff --git a/src/main/java/com/example/ts_obj/Util/Util.java b/src/main/java/com/example/ts_obj/Util/Util.java new file mode 100644 index 0000000..4c1019c --- /dev/null +++ b/src/main/java/com/example/ts_obj/Util/Util.java @@ -0,0 +1,67 @@ +package com.example.ts_obj.Util; + +import org.apache.poi.hwpf.extractor.WordExtractor; +import org.apache.poi.xwpf.extractor.XWPFWordExtractor; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +@Component +public class Util { + + public static String doc2String(FileInputStream fs) throws IOException { + StringBuilder result = new StringBuilder(); + WordExtractor re = new WordExtractor(fs); + result.append(re.getText()); + re.close(); + return result.toString(); + } + + public static String docReader(File file) throws IOException { + String frag = ""; + if(file.getName().endsWith(".doc")){ + frag = doc2String(new FileInputStream(file)); + }else{ + frag = docx2String(new FileInputStream(file)); + } + return frag; + } + + public static String docx2String(FileInputStream fs) throws IOException{ + StringBuilder result = new StringBuilder(); + XWPFDocument xdoc = new XWPFDocument(fs); + XWPFWordExtractor extractor = new XWPFWordExtractor(xdoc); + result.append(extractor.getText()); + fs.close(); + return result.toString(); + } + + public static boolean HasDigit(String content) { + boolean flag = false; + Pattern p = Pattern.compile(".*\\d+.*"); + Matcher m = p.matcher(content); + if (m.matches()) { + flag = true; + } + return flag; + } + + public static String getFileSuffix(MultipartFile file) { + if (file == null) { + return null; + } + String fileName = file.getOriginalFilename(); + int suffixIndex = fileName.lastIndexOf("."); + if (suffixIndex == -1) { // 鏃犲悗缂 + return null; + } else { // 瀛樺湪鍚庣紑 + return fileName.substring(suffixIndex, fileName.length()); + } + } +} diff --git a/src/main/java/com/example/ts_obj/Util/VerifyCodeUtils.java b/src/main/java/com/example/ts_obj/Util/VerifyCodeUtils.java new file mode 100644 index 0000000..cecc559 --- /dev/null +++ b/src/main/java/com/example/ts_obj/Util/VerifyCodeUtils.java @@ -0,0 +1,260 @@ +package com.example.ts_obj.Util; + +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Arrays; +import java.util.Random; + +import javax.imageio.ImageIO; + +public class VerifyCodeUtils{ + + //浣跨敤鍒癆lgerian瀛椾綋锛岀郴缁熼噷娌℃湁鐨勮瘽闇瑕佸畨瑁呭瓧浣擄紝瀛椾綋鍙樉绀哄ぇ鍐欙紝鍘绘帀浜1,0,i,o鍑犱釜瀹规槗娣锋穯鐨勫瓧绗 + public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ"; + private static Random random = new Random(); + + + /** + * 浣跨敤绯荤粺榛樿瀛楃婧愮敓鎴愰獙璇佺爜 + * @param verifySize 楠岃瘉鐮侀暱搴 + * @return + */ + public static String generateVerifyCode(int verifySize){ + return generateVerifyCode(verifySize, VERIFY_CODES); + } + /** + * 浣跨敤鎸囧畾婧愮敓鎴愰獙璇佺爜 + * @param verifySize 楠岃瘉鐮侀暱搴 + * @param sources 楠岃瘉鐮佸瓧绗︽簮 + * @return + */ + public static String generateVerifyCode(int verifySize, String sources){ + if(sources == null || sources.length() == 0){ + sources = VERIFY_CODES; + } + int codesLen = sources.length(); + Random rand = new Random(System.currentTimeMillis()); + StringBuilder verifyCode = new StringBuilder(verifySize); + for(int i = 0; i < verifySize; i++){ + verifyCode.append(sources.charAt(rand.nextInt(codesLen-1))); + } + return verifyCode.toString(); + } + + /** + * 鐢熸垚闅忔満楠岃瘉鐮佹枃浠,骞惰繑鍥為獙璇佺爜鍊 + * @param w + * @param h + * @param outputFile + * @param verifySize + * @return + * @throws IOException + */ + public static String outputVerifyImage(int w, int h, File outputFile, int verifySize) throws IOException{ + String verifyCode = generateVerifyCode(verifySize); + outputImage(w, h, outputFile, verifyCode); + return verifyCode; + } + + /** + * 杈撳嚭闅忔満楠岃瘉鐮佸浘鐗囨祦,骞惰繑鍥為獙璇佺爜鍊 + * @param w + * @param h + * @param os + * @param verifySize + * @return + * @throws IOException + */ + public static String outputVerifyImage(int w, int h, OutputStream os, int verifySize) throws IOException{ + String verifyCode = generateVerifyCode(verifySize); + outputImage(w, h, os, verifyCode); + return verifyCode; + } + + /** + * 鐢熸垚鎸囧畾楠岃瘉鐮佸浘鍍忔枃浠 + * @param w + * @param h + * @param outputFile + * @param code + * @throws IOException + */ + public static void outputImage(int w, int h, File outputFile, String code) throws IOException{ + if(outputFile == null){ + return; + } + File dir = outputFile.getParentFile(); + if(!dir.exists()){ + dir.mkdirs(); + } + try{ + outputFile.createNewFile(); + FileOutputStream fos = new FileOutputStream(outputFile); + outputImage(w, h, fos, code); + fos.close(); + } catch(IOException e){ + throw e; + } + } + + /** + * 杈撳嚭鎸囧畾楠岃瘉鐮佸浘鐗囨祦 + * @param w + * @param h + * @param os + * @param code + * @throws IOException + */ + public static void outputImage(int w, int h, OutputStream os, String code) throws IOException{ + int verifySize = code.length(); + BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); + Random rand = new Random(); + Graphics2D g2 = image.createGraphics(); + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); + Color[] colors = new Color[5]; + Color[] colorSpaces = new Color[] { Color.WHITE, Color.CYAN, + Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA, Color.ORANGE, + Color.PINK, Color.YELLOW }; + float[] fractions = new float[colors.length]; + for(int i = 0; i < colors.length; i++){ + colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)]; + fractions[i] = rand.nextFloat(); + } + Arrays.sort(fractions); + + g2.setColor(Color.GRAY);// 璁剧疆杈规鑹 + g2.fillRect(0, 0, w, h); + + Color c = getRandColor(200, 250); + g2.setColor(c);// 璁剧疆鑳屾櫙鑹 + g2.fillRect(0, 2, w, h-4); + + //缁樺埗骞叉壈绾 + Random random = new Random(); + g2.setColor(getRandColor(160, 200));// 璁剧疆绾挎潯鐨勯鑹 + for (int i = 0; i < 20; i++) { + int x = random.nextInt(w - 1); + int y = random.nextInt(h - 1); + int xl = random.nextInt(6) + 1; + int yl = random.nextInt(12) + 1; + g2.drawLine(x, y, x + xl + 40, y + yl + 20); + } + + // 娣诲姞鍣偣 + float yawpRate = 0.1f;// 鍣0鐜 + int area = (int) (yawpRate * w * h); + for (int i = 0; i < area; i++) { + int x = random.nextInt(w); + int y = random.nextInt(h); + int rgb = getRandomIntColor(); + image.setRGB(x, y, rgb); + } + + shear(g2, w, h, c);// 浣垮浘鐗囨壄鏇 + + g2.setColor(getRandColor(100, 160)); + int fontSize = h-4; + Font font = new Font("Algerian", Font.ITALIC, fontSize); + g2.setFont(font); + char[] chars = code.toCharArray(); + for(int i = 0; i < verifySize; i++){ + AffineTransform affine = new AffineTransform(); + affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1), (w / verifySize) * i + fontSize/2, h/2); + g2.setTransform(affine); + g2.drawChars(chars, i, 1, ((w-10) / verifySize) * i + 5, h/2 + fontSize/2 - 10); + } + + g2.dispose(); + ImageIO.write(image, "jpg", os); + } + + private static Color getRandColor(int fc, int bc) { + if (fc > 255) + fc = 255; + if (bc > 255) + bc = 255; + int r = fc + random.nextInt(bc - fc); + int g = fc + random.nextInt(bc - fc); + int b = fc + random.nextInt(bc - fc); + return new Color(r, g, b); + } + + private static int getRandomIntColor() { + int[] rgb = getRandomRgb(); + int color = 0; + for (int c : rgb) { + color = color << 8; + color = color | c; + } + return color; + } + + private static int[] getRandomRgb() { + int[] rgb = new int[3]; + for (int i = 0; i < 3; i++) { + rgb[i] = random.nextInt(255); + } + return rgb; + } + + private static void shear(Graphics g, int w1, int h1, Color color) { + shearX(g, w1, h1, color); + shearY(g, w1, h1, color); + } + + private static void shearX(Graphics g, int w1, int h1, Color color) { + + int period = random.nextInt(2); + + boolean borderGap = true; + int frames = 1; + int phase = random.nextInt(2); + + for (int i = 0; i < h1; i++) { + double d = (double) (period >> 1) + * Math.sin((double) i / (double) period + + (6.2831853071795862D * (double) phase) + / (double) frames); + g.copyArea(0, i, w1, 1, (int) d, 0); + if (borderGap) { + g.setColor(color); + g.drawLine((int) d, i, 0, i); + g.drawLine((int) d + w1, i, w1, i); + } + } + + } + + private static void shearY(Graphics g, int w1, int h1, Color color) { + + int period = random.nextInt(40) + 10; // 50; + + boolean borderGap = true; + int frames = 20; + int phase = 7; + for (int i = 0; i < w1; i++) { + double d = (double) (period >> 1) + * Math.sin((double) i / (double) period + + (6.2831853071795862D * (double) phase) + / (double) frames); + g.copyArea(i, 0, 1, h1, 0, (int) d); + if (borderGap) { + g.setColor(color); + g.drawLine(i, (int) d, i, 0); + g.drawLine(i, (int) d + h1, i, h1); + } + + } + + } +} + diff --git a/src/main/java/com/example/ts_obj/bean/ReturnCodeAndMsgEnum.java b/src/main/java/com/example/ts_obj/bean/ReturnCodeAndMsgEnum.java new file mode 100644 index 0000000..ad9e44e --- /dev/null +++ b/src/main/java/com/example/ts_obj/bean/ReturnCodeAndMsgEnum.java @@ -0,0 +1,37 @@ +package com.example.ts_obj.bean; + +public enum ReturnCodeAndMsgEnum { + Success(0, "ok"), + No_Data(10001, "no data"), + SYSTEM_ERROR(10004, "system error"); + + private String msg; + private int code; + + private ReturnCodeAndMsgEnum(int code, String msg) { + this.code = code; + this.msg = msg; + } + + public static ReturnCodeAndMsgEnum getByCode(int code) { + ReturnCodeAndMsgEnum[] var1 = values(); + int var2 = var1.length; + + for(int var3 = 0; var3 < var2; ++var3) { + ReturnCodeAndMsgEnum aiTypeEnum = var1[var3]; + if (aiTypeEnum.code == code) { + return aiTypeEnum; + } + } + + return Success; + } + + public String getMsg() { + return this.msg; + } + + public int getCode() { + return this.code; + } +} diff --git a/src/main/java/com/example/ts_obj/bean/ReturnValue.java b/src/main/java/com/example/ts_obj/bean/ReturnValue.java new file mode 100644 index 0000000..cf43f1d --- /dev/null +++ b/src/main/java/com/example/ts_obj/bean/ReturnValue.java @@ -0,0 +1,73 @@ +package com.example.ts_obj.bean; + +import java.io.Serializable; + +public class ReturnValue implements Serializable { + private int ret; + private String msg; + private T data; + + public ReturnValue() { + this.ret = 0; + this.msg = ""; + this.data = null; + } + + public ReturnValue(int retCode, String msg, T data) { + this.ret = 0; + this.msg = ""; + this.data = null; + this.ret = retCode; + this.data = data; + this.msg = msg; + } + + public ReturnValue(int retCode, String msg) { + this.ret = 0; + this.msg = ""; + this.data = null; + this.ret = retCode; + this.msg = msg; + } + + public ReturnValue(ReturnCodeAndMsgEnum codeAndMsg) { + this(codeAndMsg.getCode(), codeAndMsg.getMsg(), null); + } + + public ReturnValue(ReturnCodeAndMsgEnum codeAndMsg, T data) { + this(codeAndMsg.getCode(), codeAndMsg.getMsg(), data); + } + + public int getRet() { + return ret; + } + + public void setRet(int ret) { + this.ret = ret; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + @Override + public String toString() { + return "ReturnValue{" + + "ret=" + ret + + ", msg='" + msg + '\'' + + ", data=" + data + + '}'; + } +} diff --git a/src/main/java/com/example/ts_obj/config/InterceptorConf.java b/src/main/java/com/example/ts_obj/config/InterceptorConf.java new file mode 100644 index 0000000..a2b0464 --- /dev/null +++ b/src/main/java/com/example/ts_obj/config/InterceptorConf.java @@ -0,0 +1,48 @@ +package com.example.ts_obj.config; + +import com.example.ts_obj.interceptor.UserInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class InterceptorConf implements WebMvcConfigurer { + + @Bean + public InterceptorConf getMyWebMvcConfig(){ + InterceptorConf myWebMvcConfig = new InterceptorConf() { +// @Override +// public void addViewControllers(ViewControllerRegistry registry) { +// registry.addViewController("/").setViewName("alogin"); +// registry.addViewController("/login").setViewName("alogin"); +// registry.addViewController("/main.html").setViewName("dashboard"); +// } + //娉ㄥ唽鎷︽埅鍣 + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(new UserInterceptor()).addPathPatterns("/user/**") + .excludePathPatterns("/login","/swagger-ui.html","/user/login"); + } + }; + return myWebMvcConfig; + } + + @Override + public void addCorsMappings(CorsRegistry registry) { + //娣诲姞鏄犲皠璺緞 + registry.addMapping("/**") + //鏄惁鍙戦丆ookie + .allowCredentials(true) + //璁剧疆鏀捐鍝簺鍘熷鍩 SpringBoot2.4.4涓嬩綆鐗堟湰浣跨敤.allowedOrigins("*") + .allowedOriginPatterns("*") + //鏀捐鍝簺璇锋眰鏂瑰紡 + .allowedMethods(new String[]{"GET", "POST", "PUT", "DELETE"}) + //.allowedMethods("*") //鎴栬呮斁琛屽叏閮 + //鏀捐鍝簺鍘熷璇锋眰澶撮儴淇℃伅 + .allowedHeaders("*") + //鏆撮湶鍝簺鍘熷璇锋眰澶撮儴淇℃伅 + .exposedHeaders("*"); + } +} diff --git a/src/main/java/com/example/ts_obj/config/Swagger2Conf.java b/src/main/java/com/example/ts_obj/config/Swagger2Conf.java new file mode 100644 index 0000000..0c2a4bb --- /dev/null +++ b/src/main/java/com/example/ts_obj/config/Swagger2Conf.java @@ -0,0 +1,31 @@ +package com.example.ts_obj.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@Configuration +@EnableSwagger2 +public class Swagger2Conf { + + @Bean + public Docket getUserDocket(){ + ApiInfo apiInfo=new ApiInfoBuilder() + .title("鎺掔増绯荤粺api")//api鏍囬 + .description("鎺掔増绯荤粺鍏ㄦ爤鎺ュ彛")//api鎻忚堪 + .version("1.0.0")//鐗堟湰鍙 + .build(); + return new Docket(DocumentationType.SWAGGER_2)//鏂囨。绫诲瀷锛坰wagger2锛 + .apiInfo(apiInfo)//璁剧疆鍖呭惈鍦╦son ResourceListing鍝嶅簲涓殑api鍏冧俊鎭 + .select()//鍚姩鐢ㄤ簬api閫夋嫨鐨勬瀯寤哄櫒 + .apis(RequestHandlerSelectors.basePackage("com.example.ts_obj.controller"))//鎵弿鎺ュ彛鐨勫寘 + .paths(PathSelectors.any())//璺緞杩囨护鍣紙鎵弿鎵鏈夎矾寰勶級 + .build(); + } +} diff --git a/src/main/java/com/example/ts_obj/controller/TypesetController.java b/src/main/java/com/example/ts_obj/controller/TypesetController.java new file mode 100644 index 0000000..615bc60 --- /dev/null +++ b/src/main/java/com/example/ts_obj/controller/TypesetController.java @@ -0,0 +1,593 @@ +package com.example.ts_obj.controller; + +import com.alibaba.fastjson.JSON; +import com.deepoove.poi.XWPFTemplate; +import com.deepoove.poi.config.Configure; +import com.deepoove.poi.config.ConfigureBuilder; +import com.deepoove.poi.data.*; +import com.deepoove.poi.data.style.Style; +import com.deepoove.poi.policy.NumberingRenderPolicy; +import com.deepoove.poi.policy.ParagraphRenderPolicy; +import com.deepoove.poi.policy.TableRenderPolicy; +import com.example.ts_obj.Util.Util; +import com.example.ts_obj.bean.ReturnCodeAndMsgEnum; +import com.example.ts_obj.bean.ReturnValue; +import com.example.ts_obj.entity.Typeset; +import com.example.ts_obj.entity.TypesetInfo; +import com.example.ts_obj.entity.TypesetInfoReference; +import com.example.ts_obj.entity.User; +import com.example.ts_obj.service.TypesetService; +import com.example.ts_obj.service.UserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.poi.openxml4j.util.ZipSecureFile; +import org.apache.poi.xwpf.usermodel.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.*; + +@RestController +@RequestMapping("/typeset") +@Api(value = "鎺掔増鐩稿叧鎿嶄綔") +public class TypesetController { + + private final static Logger logger = LoggerFactory.getLogger(UserController.class); + +// private String BASE_DIR="d:/upload/"; + private String BASE_DIR="/home/wwwroot/ts.tmrjournals.com/upload/"; + @Autowired + private TypesetService typesetservice; + + @Autowired + private UserService userservice; + + @ApiOperation(value = "娣诲姞鎺掔増瀹炰緥") + @PostMapping("/addtypeset") + public ReturnValue addTypeset(String title,Long userid,String journal,String jabbr,String stage,String website, + String received_date,String accepted_date,String doi, + String little_author,String info_type){ + //娣诲姞涓昏鏁版嵁妯″瀷 + Typeset ts = new Typeset(); + ts.setArticleFile(""); + ts.setTitle(title); + ts.setCtime(System.currentTimeMillis()/1000); + ts.setUserId(userid); + typesetservice.addTypeset(ts); + //娣诲姞info鏁版嵁 + TypesetInfo ti = new TypesetInfo(); + ti.setTypesetId(ts.getTypesetId()); + ti.setJournal(journal); + ti.setStage(stage); + ti.setWebsite(website); + ti.setReceived_date(received_date); + ti.setAccepted_date(accepted_date); + ti.setDoi(doi); + ti.setJabbr(jabbr); + ti.setLittle_author(little_author); + ti.setInfo_type(info_type); + ti.setMainText(""); + ti.setAbstractText(""); +// System.out.println(ti.toString()); +// +// Integer res = 1; + + Integer res = typesetservice.addTypesetInfo(ti); + if(res>0){ + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + }else{ + return new ReturnValue(ReturnCodeAndMsgEnum.SYSTEM_ERROR); + } + } + + @ApiOperation(value = "淇敼瀹炰緥淇℃伅") + @PostMapping("/editTitle") + public ReturnValue editTypesetTitle(Long typesetId,String title,String journal,String jabbr,String stage,String website, + String received_date,String accepted_date,String doi, + String little_author,String info_type){ + typesetservice.editTypesetTitle(typesetId,title,journal,jabbr,stage,website,received_date,accepted_date,doi,little_author,info_type); + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "鑾峰彇鎺掔増瀹炰緥璇︽儏") + @PostMapping("/gettypesetdetail") + public ReturnValue getTypesetDetail(Long typesetId){ + Map ts = typesetservice.getTypesetDetail(typesetId); + return new ReturnValue(ReturnCodeAndMsgEnum.Success,ts); + } + + + @ApiOperation(value = "淇敼鎺掔増") + @PostMapping("/editTypesetRefer") + public ReturnValue editTypesetRefer(Long typesetInfoReferenceId,String title){ + typesetservice.editTypesetReference(typesetInfoReferenceId,title); + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "缂栬緫鎺掔増info淇℃伅") + @PostMapping("/edittypesetinfo") + public ReturnValue editTypeset(Long typesetId,String abstractText,String mainText,String info_type, + String info_title,String author,String authorAddress,String authorContribution, + String doi,String keywords,Byte info_state,String traditon,String topic, + String authorCorresponding,String authorCorrespondingEmail,String little_author, + String acknowledgment,String received_date,String accepted_date,String online_date,String abbreviation + ){ + TypesetInfo ti = new TypesetInfo(); + ti.setTypesetId(typesetId); + ti.setAbstractText(abstractText.trim()); + ti.setMainText(mainText.trim()); + ti.setInfo_type(info_type.trim()); + ti.setInfo_title(info_title.trim()); + ti.setAuthor(author.trim()); + ti.setAuthorAddress(authorAddress.trim()); + ti.setAuthorContribution(authorContribution.trim()); + ti.setDoi(doi.trim()); + ti.setKeywords(keywords.trim()); + ti.setInfo_state(info_state); + ti.setTraditon(traditon.trim()); + ti.setTopic(topic.trim()); + ti.setAuthorCorresponding(authorCorresponding.trim()); + ti.setAuthorCorrespondingEmail(authorCorrespondingEmail); + ti.setLittle_author(little_author.trim()); + ti.setAcknowledgment(acknowledgment.trim()); + ti.setReceived_date(received_date.trim()); + ti.setAccepted_date(accepted_date.trim()); + ti.setOnline_date(online_date.trim()); + ti.setAbbreviation(abbreviation.trim()); + Integer res = typesetservice.editTypesetInfo(ti); + if(res>0){ + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + }else{ + return new ReturnValue(ReturnCodeAndMsgEnum.SYSTEM_ERROR); + } + } + + @ApiOperation(value = "鑾峰彇鎺掔増瀹炰緥鍒楄〃") + @PostMapping("/gettypesetlist") + public ReturnValue getTypesetList(Long userid,Long currentPage,Long pageSize){ + Long startIndex = (currentPage-1)*pageSize; + List ts = typesetservice.getTypesetListByUserId(userid,startIndex,pageSize); + Long count = typesetservice.getTypesetListCountByUserId(userid); + Map re = new HashMap(); + re.put("list",ts); + re.put("count",count); + return new ReturnValue(ReturnCodeAndMsgEnum.Success,re); + } + + @ApiOperation(value = "娣诲姞鎺掔増鐨勫紩鐢ㄦ枃鐚") + @PostMapping("/addRederence") + public ReturnValue addTypesetReference(@RequestBody List tir){ + for (TypesetInfoReference t:tir) { + typesetservice.addTypesetInfoReference(t); + } + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "鍒犻櫎鍙傝冩枃鐚産yid") + @PostMapping("/delTypesetReferById") + public ReturnValue delTypesetReferById(Long typeset_info_reference_id){ + typesetservice.delById(typeset_info_reference_id); + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "璇诲彇鏂囦欢") + @PostMapping("readdoc") + public ReturnValue myDocReader(String filename) { + +// String filename = "300641ce-cb9b-4a41-b5d9-de7028e46b171639634304222.docx"; + + ArrayList al = new ArrayList(); + try { + File file = new File(this.BASE_DIR+filename); + FileInputStream fis = new FileInputStream(file); + XWPFDocument xdoc = new XWPFDocument(fis); + List list = xdoc.getParagraphs(); +// Boolean bold = false; + for (XWPFParagraph para : list) { +// ArrayList cac_al = new ArrayList();//鍔犵矖 +// ArrayList cac_it = new ArrayList();//鏂滀綋 +// String cache = para.getText().trim(); + String cache = ""; +// if(cache.trim().toUpperCase().equals("ABSTRACT")){ +// bold = true; +// } + List runs = para.getRuns(); + for (XWPFRun r:runs){ +// if(!bold){ +// break; +// } + String cach = ""; + + if(r.getText(0)==null){ + continue; + } + + if(r.isItalic()&&r.isBold()){ + cach = ""+r.getText(0)+""; + }else if(r.isItalic()){ + cach = ""+r.getText(0)+""; + }else if(r.isBold()){ + cach = ""+r.getText(0)+""; + }else{ + cach = r.getText(0); + } + +// System.out.println(cach); + +// if(r.isItalic()&&r.getText(0)!=null){ +// cach = ""+r.getText(0)+""; +//// cac_it.add(r.getText(0)); +// } +// if(r.isBold()&&r.getText(0)!=null){ +// cach = ""+cach+""; +//// cac_al.add(r.getText(0)); +// } +// + cache += cach; + } +// for(Object cc:cac_al){ +// cache = cache.replace(cc.toString(),""+cc.toString()+""); +// } +// for(Object ii:cac_it){ +// cache = cache.replace(ii.toString(),""+ii.toString()+""); +// } + al.add(cache); + } + } catch (Exception e) { + e.getStackTrace(); + } + return new ReturnValue(ReturnCodeAndMsgEnum.Success,al); + } + + + @PostMapping("/mytest") + public ReturnValue mytest(Long typesetId){ + try { + Map m = typesetservice.getTypesetDetail(typesetId); + Typeset t = (Typeset) m.get("info"); + TypesetInfo ti = t.getU_typeset_info(); + String main = ti.getMainText(); + List l = JSON.parseArray(main,String.class); + for (String s:l){ + System.out.println(s); + } +// System.out.println(main); +// List l = (List) JSON.parseObject(main); +// System.out.println(l); + }catch (Exception e){ + logger.error(e.getMessage()); + } + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "娓呯┖寮曠敤鏂囩尞") + @PostMapping("/emptyForRefer") + public ReturnValue emptyForRefer(Long typesetId){ + typesetservice.emptyForRefer(typesetId); + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "鑾峰彇鐢熸垚鐨刣ocx") + @PostMapping("/getDocx") + public ReturnValue getDocx(Long typesetId) throws IOException { + Map m = typesetservice.getTypesetDetail(typesetId); + Map frag = new HashMap(); + Typeset t = (Typeset)m.get("info"); + TypesetInfo ti = t.getU_typeset_info(); + List refList = (List)m.get("refers"); + ZipSecureFile.setMinInflateRatio(-1.0d); + User user = userservice.getUser(t.getUserId()); + HashMap map = new HashMap(); + map.put("type",ti.getInfo_type().toUpperCase()); + map.put("journaltitle",ti.getJournal()); + map.put("stage",ti.getStage()); + map.put("doi",ti.getDoi()); + map.put("topic",ti.getTopic()); + map.put("articletitle",ti.getInfo_title().replace("","").replace("","").replace("","").replace("","")); + map.put("author",ti.getAuthor().replace("","").replace("","").replace("","").replace("","")); + map.put("authoraddress",ti.getAuthorAddress().replace("","").replace("","").replace("","").replace("","")); + map.put("corresponding",ti.getAuthorCorresponding().replace("","").replace("","").replace("","").replace("","")); + map.put("coremail",ti.getAuthorCorrespondingEmail().replace("","").replace("","").replace("","").replace("","")); + map.put("website",ti.getWebsite()); + if(ti.getAuthorContribution().equals("")){ + map.put("contributions",false); + }else{ + HashMap map1 = new HashMap(); + map1.put("author_contribution",ti.getAuthorContribution()); + map.put("contributions",map1); + } + if(ti.getAcknowledgment().equals("")){ + map.put("acknowledgment",false); + }else{ + HashMap map2 = new HashMap(); + map2.put("acknowledgment_content",ti.getAcknowledgment()); + map.put("acknowledgment",map2); + } + map.put("abbreviation",ti.getAbbreviation()); + map.put("citation",(ti.getLittle_author()+". "+ti.getInfo_title()+". "+ti.getJabbr()+". "+ti.getStage()+". doi: "+ti.getDoi()+".").replace("","").replace("","").replace("","").replace("","")); + map.put("exeditor",user.getAccount()); + SimpleDateFormat sdf = new SimpleDateFormat("dd MMMM yyyy",Locale.ENGLISH); + if(ti.getReceived_date().toString().equals("")){ + map.put("received_date",ti.getReceived_date()); + }else{ + map.put("received_date",sdf.format(new Date(Long.valueOf(ti.getReceived_date())))); + } +// map.put("received_date",sdf.format(new Date(Long.valueOf(ti.getReceived_date())))); + if(ti.getAccepted_date().toString().equals("")){ + map.put("accept_date",ti.getAccepted_date()); + }else{ + map.put("accept_date",sdf.format(new Date(Long.valueOf(ti.getAccepted_date())))); + } +// map.put("accept_date",sdf.format(new Date(Long.valueOf(ti.getAccepted_date())))); + if(ti.getOnline_date().toString().equals("")){ + map.put("online_date",ti.getOnline_date()); + }else{ + map.put("online_date",sdf.format(new Date(Long.valueOf(ti.getOnline_date())))); + } + map.put("ye",ti.getStage().substring(0,4)); +// map.put("abstract",ti.getAbstractText().replace("","").replace("","")); + map.put("abstract",this.crowStr(ti.getAbstractText())); + map.put("keywords",ti.getKeywords().replace("","").replace("","")); + map.put("img", this.BASE_DIR+"p1.png"); + + Configure config = Configure.builder().bind("content", new ParagraphRenderPolicy()). + bind("abstract",new ParagraphRenderPolicy()). + build(); +// ParagraphRenderData pds = new ParagraphRenderData(); +// Style sss1 = new Style(); +// Style sss2 = new Style(); +// sss1.setBold(true); +// sss1.setItalic(true); +// sss2.setItalic(true); +// pds.addText(new TextRenderData("nininini",sss1)); +// pds.addText(new TextRenderData("wowowowo",sss2)); +// map.put("keywords",pds); + //part2 + String main = ti.getMainText(); + List l = JSON.parseArray(main,String.class); + ArrayList mainArr = new ArrayList(); + for (String s:l){ + Map cache = new HashMap(); + ParagraphRenderData capd = this.crowStr(s); + cache.put("content",capd); +// if(s.indexOf("")>=0){ +// s = s.replace("","").replace("",""); +// Style sty = new Style(); +// sty.setBold(true); +// cache.put("content", new TextRenderData(s,sty)); +// }else{ +// cache.put("content",s); +// } + + mainArr.add(cache); + } + map.put("main",mainArr); + + //part3 +// ArrayList refArr = new ArrayList(); +// Integer bh = 0; +// for(TypesetInfoReference tif: refList){ +// Map cache = new HashMap(); +// String cache_ref = ""; +// if(Util.HasDigit(tif.getRefer_title().substring(0,5))||tif.getRefer_title().trim().toUpperCase().equals("REFERENCE")){ +// cache_ref = tif.getRefer_title().replace("","").replace("",""); +// }else{ +// cache_ref = (++bh).toString()+tif.getRefer_title().replace("","").replace("",""); +// } +// cache.put("refercontent",cache_ref); +// refArr.add(cache); +// } +// map.put("reference",refArr); + + //娴嬭瘯 + List refsl = new ArrayList(); + for(TypesetInfoReference tif: refList){ + String tttt = tif.getRefer_title().replace("","").replace("","").replace("","").replace("","").trim().toUpperCase(); + if(tttt.equals("REFERENCE")||tttt.equals("REFERENCES")){ + continue; + } + ParagraphRenderData chc_pd = new ParagraphRenderData(); + + Style chch = new Style(); + chch.setFontFamily("Charis SIL"); + chch.setFontSize(7.5); + String tgh_title = tif.getRefer_title().replace("","").replace("","").replace("","").replace("",""); + chc_pd.addText(new TextRenderData(tgh_title,chch)); + refsl.add(chc_pd); + } + + map.put("refs",new NumberingRenderData(NumberingFormat.DECIMAL,refsl)); + + String myTemplate = ""; + //纭畾浣跨敤鐨勬ā鏉 + if(ti.getInfo_type().toUpperCase().equals("COMMENT")||ti.getInfo_type().toUpperCase().equals("NEWS")){ + myTemplate = "template2.docx"; + }else{ + myTemplate = "template1.docx"; + } + + XWPFTemplate template = XWPFTemplate.compile(this.BASE_DIR+myTemplate,config).render(map); + try { + Date date = new Date(); + String dirpath=this.BASE_DIR+new SimpleDateFormat("yyyyMMdd").format(date); + //濡傛灉涓嶅瓨鍦,鍒涘缓鏂囦欢澶 + File f = new File(dirpath); + if(!f.exists()){ + f.mkdirs(); + } + String goFileName = System.currentTimeMillis()+".docx"; + frag.put("file",new SimpleDateFormat("yyyyMMdd").format(date)+"/"+goFileName); + template.writeAndClose(new FileOutputStream(dirpath+"/"+goFileName)); + } catch (IOException e) { + e.printStackTrace(); + } + + return new ReturnValue(ReturnCodeAndMsgEnum.Success,frag); + } + + + private ParagraphRenderData crowStr(String s){ + ParagraphRenderData p = new ParagraphRenderData(); + if(s.indexOf("")>=0){ + s = s.replace("","").replace("",""); + } + Integer bs = s.indexOf(""); + Integer is = s.indexOf(""); + if(bs>=0&&is>=0){//涓よ呴兘鏈 + while (s.indexOf("")>=0||s.indexOf("")>=0){ + String cache_act = ""; + if(s.indexOf("")>=0&&s.indexOf("")>=0){ + if(s.indexOf("")>s.indexOf("")){ + cache_act = "i"; + }else{ + cache_act = "b"; + } + }else if(s.indexOf("")>=0){ + cache_act = "b"; + }else{ + cache_act = "i"; + } + + if(cache_act=="b"){ + Integer cas = s.indexOf(""); + Integer cae = s.indexOf(""); + if(cas>0){ + p.addText(s.substring(0,cas)); + } + String now = s.substring(cas,cae+4); + Style ca_sty = new Style(); + if(now.indexOf("")>0){ + now = now.replace("","").replace("",""); + ca_sty.setItalic(true); + } + ca_sty.setBold(true); + p.addText(new TextRenderData(now.replace("","").replace("",""),ca_sty)); + s=s.substring(cae+4); + }else { + Integer cas = s.indexOf(""); + Integer cae = s.indexOf(""); + if(cas>0){ + p.addText(s.substring(0,cas)); + } + String now = s.substring(cas,cae+4); + Style ca_sty = new Style(); + ca_sty.setItalic(true); + p.addText(new TextRenderData(now.replace("","").replace("",""),ca_sty)); + s=s.substring(cae+4); + } + } + if(s!=""){ + p.addText(s); + } + }else if(bs>=0){//鍙湁鍔犵矖 + while (s.indexOf("")>=0){ + Integer cas = s.indexOf(""); + Integer cae = s.indexOf(""); + if(cas>0){ + p.addText(s.substring(0,cas)); + } + String now = s.substring(cas,cae+4); + Style ca_sty = new Style(); + if(now.indexOf("")>0){ + now = now.replace("","").replace("",""); + ca_sty.setItalic(true); + } + ca_sty.setBold(true); + p.addText(new TextRenderData(now.replace("","").replace("",""),ca_sty)); + s=s.substring(cae+4); + } + if(s!=""){ + p.addText(s); + } + }else if(is>=0){//鍙湁鏂滀綋 + while (s.indexOf("")>=0){ + Integer cas = s.indexOf(""); + Integer cae = s.indexOf(""); + if(cas>0){ + p.addText(s.substring(0,cas)); + } + String now = s.substring(cas,cae+4); + Style ca_sty = new Style(); + ca_sty.setItalic(true); + p.addText(new TextRenderData(now.replace("","").replace("",""),ca_sty)); + s=s.substring(cae+4); + } + if(s!=""){ + p.addText(s); + } + }else{//涓よ呴兘娌℃湁 + p.addText(s); + } + return p; + } + + @ApiOperation(value = "瀛樺偍涓婁紶杩囩殑鏂囦欢鍚") + @PostMapping("/savefilename") + public ReturnValue saveFileName(Long typesetId,String filename){ + Integer res = typesetservice.saveFileName(typesetId,filename); + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + } + + @ApiOperation(value = "涓婁紶鏂囦欢") + @PostMapping("/upload") + public ReturnValue SingleFileUpLoad(@RequestParam("myfile") MultipartFile file) { + if (file.isEmpty()) { + logger.error("file is null"); + return new ReturnValue(ReturnCodeAndMsgEnum.No_Data); + } + //鍒涘缓杈撳叆杈撳嚭娴 + InputStream inputStream = null; + OutputStream outputStream = null; + Map m = new HashMap(); + try { + //鎸囧畾涓婁紶鐨勪綅缃负 d:/upload/ + String path = this.BASE_DIR; + //鑾峰彇鏂囦欢鐨勮緭鍏ユ祦 + inputStream = file.getInputStream(); + //鑾峰彇涓婁紶鏃剁殑鏂囦欢鍚 + String fileName = file.getOriginalFilename(); + + String ext = Util.getFileSuffix(file); + //鏂扮敓鎴愭枃浠跺悕 + fileName = UUID.randomUUID().toString() + System.currentTimeMillis() + ext; + //娉ㄦ剰鏄矾寰+鏂囦欢鍚 + File targetFile = new File(path + fileName); + //濡傛灉涔嬪墠鐨 String path = "d:/upload/" 娌℃湁鍦ㄦ渶鍚庡姞 / 锛岄偅灏辫鍦 path 鍚庨潰 + "/" + //鍒ゆ柇鏂囦欢鐖剁洰褰曟槸鍚﹀瓨鍦 + if (!targetFile.getParentFile().exists()) { + //涓嶅瓨鍦ㄥ氨鍒涘缓涓涓 + targetFile.getParentFile().mkdir(); + } + //鑾峰彇鏂囦欢鐨勮緭鍑烘祦 + outputStream = new FileOutputStream(targetFile); + //鏈鍚庝娇鐢ㄨ祫婧愯闂櫒FileCopyUtils鐨刢opy鏂规硶鎷疯礉鏂囦欢 + FileCopyUtils.copy(inputStream, outputStream); + m.put("filename",fileName); + } catch (IOException e) { + e.printStackTrace(); + } finally { + //鏃犺鎴愬姛涓庡惁锛岄兘鏈夊叧闂緭鍏ヨ緭鍑烘祦 + if (inputStream != null) { + try { + inputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outputStream != null) { + try { + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + return new ReturnValue(ReturnCodeAndMsgEnum.Success,m); + } +} diff --git a/src/main/java/com/example/ts_obj/controller/UserController.java b/src/main/java/com/example/ts_obj/controller/UserController.java new file mode 100644 index 0000000..092380e --- /dev/null +++ b/src/main/java/com/example/ts_obj/controller/UserController.java @@ -0,0 +1,120 @@ +package com.example.ts_obj.controller; + +import com.example.ts_obj.Util.VerifyCodeUtils; +import com.example.ts_obj.bean.ReturnCodeAndMsgEnum; +import com.example.ts_obj.bean.ReturnValue; +import com.example.ts_obj.entity.User; +import com.example.ts_obj.service.UserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.models.Model; +import org.apache.commons.codec.digest.DigestUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.FileCopyUtils; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.io.*; +import java.time.LocalDateTime; + +@RestController +@RequestMapping("/user") +@Api(value = "鐢ㄦ埛鐩稿叧鎿嶄綔") +public class UserController { + + private final static Logger logger = LoggerFactory.getLogger(UserController.class); + + private final UserService userservice; + + @Autowired + public UserController(UserService userservice) { + this.userservice = userservice; + } + + @ApiOperation("娴嬭瘯") + @PostMapping("/test") + public String mytest(String str){ + System.out.println(str); + return str; + } + + @GetMapping("/test1") + public String test(){ + return "hello"; + } + + @ApiOperation(value = "澧炲姞鐢ㄦ埛") + @PostMapping("/insert") + public ReturnValue addUser(String account,String password,String email){ + User user = new User(); + Byte insider = 0; + Byte state = 0; + user.setAccount(account.trim()); + user.setPassword(DigestUtils.md5Hex(password.trim())); + user.setEmail(email.trim()); + user.setIsInsider(insider); + user.setState(state); + Long uid = userservice.insertUser(user); + if(uid>0){ + logger.info("add user success"); + return new ReturnValue(ReturnCodeAndMsgEnum.Success); + }else{ + logger.error("add user error"); + return new ReturnValue(ReturnCodeAndMsgEnum.SYSTEM_ERROR); + } + } + + @ApiOperation(value = "鑾峰彇鐢ㄦ埛淇℃伅") + @PostMapping("/getuser") + public ReturnValue getUser(Long userid){ + User u = userservice.getUser(userid); + return new ReturnValue(ReturnCodeAndMsgEnum.Success,u); + } + + @ApiOperation(value="楠岃瘉鐧诲綍锛岀敤鎴峰悕銆佸瘑鐮") + @PostMapping("/login") + public ReturnValue checkUser(String account,String password){ +// if (!capchar.equals(session.getAttribute("verCode"))) { +// +// } + User user = userservice.checkUser(account.trim(),DigestUtils.md5Hex(password.trim())); + if(user == null){ + return new ReturnValue(ReturnCodeAndMsgEnum.No_Data); + }else{ + return new ReturnValue(ReturnCodeAndMsgEnum.Success,user); + } + } + + + +// @RequestMapping(value = "yzm") +// public void yzm(HttpServletRequest request, HttpServletResponse response) throws IOException { +// response.setHeader("Pragma", "No-cache"); +// response.setHeader("Cache-Control", "no-cache"); +// response.setDateHeader("Expires", 0); +// response.setContentType("image/jpeg"); +// // 鐢熸垚闅忔満瀛椾覆 +// String verifyCode = VerifyCodeUtils.generateVerifyCode(4); +// // 瀛樺叆浼氳瘽session +// HttpSession session = request.getSession(true); +// // 鍒犻櫎浠ュ墠鐨 +// session.removeAttribute("verCode"); +// session.removeAttribute("codeTime"); +// session.setAttribute("verCode", verifyCode.toLowerCase()); //鐢熸垚session +// session.setAttribute("codeTime", LocalDateTime.now()); +// // 鐢熸垚鍥剧墖 +// int w = 100, h = 30; +// OutputStream out = response.getOutputStream(); +// VerifyCodeUtils.outputImage(w, h, out, verifyCode); +// } + + + +} diff --git a/src/main/java/com/example/ts_obj/dao/TypesetInfoMapper.java b/src/main/java/com/example/ts_obj/dao/TypesetInfoMapper.java new file mode 100644 index 0000000..288f8c2 --- /dev/null +++ b/src/main/java/com/example/ts_obj/dao/TypesetInfoMapper.java @@ -0,0 +1,37 @@ +package com.example.ts_obj.dao; + +import com.example.ts_obj.entity.TypesetInfo; +import com.example.ts_obj.service.TypesetInfoExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface TypesetInfoMapper { + long countByExample(TypesetInfoExample example); + + int deleteByExample(TypesetInfoExample example); + + int deleteByPrimaryKey(Integer typesetInfoId); + + int insert(TypesetInfo record); + + int insertSelective(TypesetInfo record); + + int editTypesetjsw(Long typesetId,String journal,String jabbr,String stage,String website,String received_date,String accepted_date,String doi,String little_author,String info_type); + + List selectByExample(TypesetInfoExample example); + + TypesetInfo selectByPrimaryKey(Long typesetInfoId); + + int updateByExampleSelective(@Param("record") TypesetInfo record, @Param("example") TypesetInfoExample example); + + int updateByExample(@Param("record") TypesetInfo record, @Param("example") TypesetInfoExample example); + + int updateByPrimaryKeySelective(TypesetInfo record); + + int updateByPrimaryKey(TypesetInfo record); + + int updateByTypesetId(TypesetInfo record); +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/dao/TypesetInfoReferenceMapper.java b/src/main/java/com/example/ts_obj/dao/TypesetInfoReferenceMapper.java new file mode 100644 index 0000000..2c3577e --- /dev/null +++ b/src/main/java/com/example/ts_obj/dao/TypesetInfoReferenceMapper.java @@ -0,0 +1,39 @@ +package com.example.ts_obj.dao; + +import com.example.ts_obj.entity.TypesetInfoReference; +import com.example.ts_obj.service.TypesetInfoReferenceExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface TypesetInfoReferenceMapper { + long countByExample(TypesetInfoReferenceExample example); + + int deleteByExample(TypesetInfoReferenceExample example); + + int deleteByPrimaryKey(Long typesetInfoReferenceId); + + int insert(TypesetInfoReference record); + + List selectByTypesetid(Long typesetId); + + int emptyForRefer(Long typesetId); + + int insertSelective(TypesetInfoReference record); + + List selectByExample(TypesetInfoReferenceExample example); + + TypesetInfoReference selectByPrimaryKey(Long typesetInfoReferenceId); + + int updateByExampleSelective(@Param("record") TypesetInfoReference record, @Param("example") TypesetInfoReferenceExample example); + + int updateByExample(@Param("record") TypesetInfoReference record, @Param("example") TypesetInfoReferenceExample example); + + int updateByPrimaryKeySelective(TypesetInfoReference record); + + int updateByPrimaryKey(TypesetInfoReference record); + + int updateById(Long typesetInfoReferenceId,String title); +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/dao/TypesetMapper.java b/src/main/java/com/example/ts_obj/dao/TypesetMapper.java new file mode 100644 index 0000000..7a1f128 --- /dev/null +++ b/src/main/java/com/example/ts_obj/dao/TypesetMapper.java @@ -0,0 +1,41 @@ +package com.example.ts_obj.dao; + +import com.example.ts_obj.entity.Typeset; +import com.example.ts_obj.service.TypesetExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface TypesetMapper { + long countByExample(TypesetExample example); + + Long countByUserId(Long userId); + + int deleteByExample(TypesetExample example); + + int deleteByPrimaryKey(Integer typesetId); + + int insert(Typeset record); + + int insertSelective(Typeset record); + + List selectByExample(TypesetExample example); + + List selectByUserid(Long userid,Long startIndex,Long pageSize); + + Typeset selectByPrimaryKey(Long typesetId); + + int saveFileName(Long typesetId,String filename); + + int editTypesetTitle(Long typesetId,String title); + + int updateByExampleSelective(@Param("record") Typeset record, @Param("example") TypesetExample example); + + int updateByExample(@Param("record") Typeset record, @Param("example") TypesetExample example); + + int updateByPrimaryKeySelective(Typeset record); + + int updateByPrimaryKey(Typeset record); +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/dao/UserMapper.java b/src/main/java/com/example/ts_obj/dao/UserMapper.java new file mode 100644 index 0000000..066c4a1 --- /dev/null +++ b/src/main/java/com/example/ts_obj/dao/UserMapper.java @@ -0,0 +1,35 @@ +package com.example.ts_obj.dao; + +import com.example.ts_obj.entity.User; +import com.example.ts_obj.service.UserExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface UserMapper { + long countByExample(UserExample example); + + int deleteByExample(UserExample example); + + int deleteByPrimaryKey(Long userId); + + int insert(User record); + + User selectForCheck(String account,String password); + + int insertSelective(User record); + + List selectByExample(UserExample example); + + User selectByPrimaryKey(Long userId); + + int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example); + + int updateByExample(@Param("record") User record, @Param("example") UserExample example); + + int updateByPrimaryKeySelective(User record); + + int updateByPrimaryKey(User record); +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/entity/Typeset.java b/src/main/java/com/example/ts_obj/entity/Typeset.java new file mode 100644 index 0000000..2610f89 --- /dev/null +++ b/src/main/java/com/example/ts_obj/entity/Typeset.java @@ -0,0 +1,92 @@ +package com.example.ts_obj.entity; + +import java.io.Serializable; + +/** + * u_typeset + * @author + */ +public class Typeset implements Serializable { + private Long typesetId; + + private Long userId; + + private String articleFile; + + private String title; + + private Long ctime; + + private Byte state; + + private TypesetInfo u_typeset_info; + + private static final long serialVersionUID = 1L; + + public Long getTypesetId() { + return typesetId; + } + + public void setTypesetId(Long typesetId) { + this.typesetId = typesetId; + } + + public Long getUserId() { + return userId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getArticleFile() { + return articleFile; + } + + public void setArticleFile(String articleFile) { + this.articleFile = articleFile; + } + + public Long getCtime() { + return ctime; + } + + public void setCtime(Long ctime) { + this.ctime = ctime; + } + + public Byte getState() { + return state; + } + + public void setState(Byte state) { + this.state = state; + } + + public TypesetInfo getU_typeset_info() { + return u_typeset_info; + } + + public void setU_typeset_info(TypesetInfo u_typeset_info) { + this.u_typeset_info = u_typeset_info; + } + + @Override + public String toString() { + return "Typeset{" + + "typesetId=" + typesetId + + ", userId=" + userId + + ", articleFile='" + articleFile + '\'' + + ", ctime=" + ctime + + ", state=" + state + + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/entity/TypesetInfo.java b/src/main/java/com/example/ts_obj/entity/TypesetInfo.java new file mode 100644 index 0000000..dc92f0d --- /dev/null +++ b/src/main/java/com/example/ts_obj/entity/TypesetInfo.java @@ -0,0 +1,303 @@ +package com.example.ts_obj.entity; + +import java.io.Serializable; + +/** + * u_typeset_info + * @author + */ +public class TypesetInfo implements Serializable { + private Long typesetInfoId; + + private Long typesetId; + + private String info_title; + + private String info_type; + + private String doi; + + private String topic; + + private String mainText; + + private String author; + + private String authorAddress; + + private String authorContribution; + + private String authorCorresponding; + + private String authorCorrespondingEmail; + + private String traditon; + + private String journal; + + private String jabbr; + + private String stage; + + private String little_author; + + private String website; + + private String acknowledgment; + + private String received_date; + + private String accepted_date; + + private String online_date; + + private String abbreviation; + + private String abstractText; + + private String keywords; + + private Byte info_state; + + private static final long serialVersionUID = 1L; + + public Long getTypesetInfoId() { + return typesetInfoId; + } + + public void setTypesetInfoId(Long typesetInfoId) { + this.typesetInfoId = typesetInfoId; + } + + public Long getTypesetId() { + return typesetId; + } + + public void setTypesetId(Long typesetId) { + this.typesetId = typesetId; + } + + public String getOnline_date() { + return online_date; + } + + public void setOnline_date(String online_date) { + this.online_date = online_date; + } + + public String getDoi() { + return doi; + } + + public void setDoi(String doi) { + this.doi = doi; + } + + public String getMainText() { + return mainText; + } + + public void setMainText(String mainText) { + this.mainText = mainText; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public String getAuthorAddress() { + return authorAddress; + } + + public void setAuthorAddress(String authorAddress) { + this.authorAddress = authorAddress; + } + + public String getAuthorContribution() { + return authorContribution; + } + + public void setAuthorContribution(String authorContribution) { + this.authorContribution = authorContribution; + } + + public String getTraditon() { + return traditon; + } + + public void setTraditon(String traditon) { + this.traditon = traditon; + } + + public String getAbstractText() { + return abstractText; + } + + public void setAbstractText(String abstractText) { + this.abstractText = abstractText; + } + + public String getKeywords() { + return keywords; + } + + public void setKeywords(String keywords) { + this.keywords = keywords; + } + + public String getInfo_title() { + return info_title; + } + + public String getJournal() { + return journal; + } + + public void setJournal(String journal) { + this.journal = journal; + } + + public String getStage() { + return stage; + } + + public void setStage(String stage) { + this.stage = stage; + } + + public String getLittle_author() { + return little_author; + } + + public void setLittle_author(String little_author) { + this.little_author = little_author; + } + + public String getWebsite() { + return website; + } + + public void setWebsite(String website) { + this.website = website; + } + + public void setInfo_title(String info_title) { + this.info_title = info_title; + } + + public String getInfo_type() { + return info_type; + } + + public void setInfo_type(String info_type) { + this.info_type = info_type; + } + + public Byte getInfo_state() { + return info_state; + } + + public void setInfo_state(Byte info_state) { + this.info_state = info_state; + } + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public String getAuthorCorresponding() { + return authorCorresponding; + } + + public void setAuthorCorresponding(String authorCorresponding) { + this.authorCorresponding = authorCorresponding; + } + + public String getAuthorCorrespondingEmail() { + return authorCorrespondingEmail; + } + + public void setAuthorCorrespondingEmail(String authorCorrespondingEmail) { + this.authorCorrespondingEmail = authorCorrespondingEmail; + } + + public String getAcknowledgment() { + return acknowledgment; + } + + public void setAcknowledgment(String acknowledgment) { + this.acknowledgment = acknowledgment; + } + + public String getReceived_date() { + return received_date; + } + + public void setReceived_date(String received_date) { + this.received_date = received_date; + } + + public String getAccepted_date() { + return accepted_date; + } + + public void setAccepted_date(String accepted_date) { + this.accepted_date = accepted_date; + } + + public String getJabbr() { + return jabbr; + } + + public void setJabbr(String jabbr) { + this.jabbr = jabbr; + } + + public String getAbbreviation() { + return abbreviation; + } + + public void setAbbreviation(String abbreviation) { + this.abbreviation = abbreviation; + } + + @Override + public String toString() { + return "TypesetInfo{" + + "typesetInfoId=" + typesetInfoId + + ", typesetId=" + typesetId + + ", info_title='" + info_title + '\'' + + ", info_type='" + info_type + '\'' + + ", doi='" + doi + '\'' + + ", topic='" + topic + '\'' + + ", mainText='" + mainText + '\'' + + ", author='" + author + '\'' + + ", authorAddress='" + authorAddress + '\'' + + ", authorContribution='" + authorContribution + '\'' + + ", authorCorresponding='" + authorCorresponding + '\'' + + ", authorCorrespondingEmail='" + authorCorrespondingEmail + '\'' + + ", traditon='" + traditon + '\'' + + ", journal='" + journal + '\'' + + ", jabbr='" + jabbr + '\'' + + ", stage='" + stage + '\'' + + ", little_author='" + little_author + '\'' + + ", website='" + website + '\'' + + ", acknowledgment='" + acknowledgment + '\'' + + ", received_date='" + received_date + '\'' + + ", accepted_date='" + accepted_date + '\'' + + ", online_date='" + online_date + '\'' + + ", abbreviation='" + abbreviation + '\'' + + ", abstractText='" + abstractText + '\'' + + ", keywords='" + keywords + '\'' + + ", info_state=" + info_state + + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/entity/TypesetInfoReference.java b/src/main/java/com/example/ts_obj/entity/TypesetInfoReference.java new file mode 100644 index 0000000..402502d --- /dev/null +++ b/src/main/java/com/example/ts_obj/entity/TypesetInfoReference.java @@ -0,0 +1,61 @@ +package com.example.ts_obj.entity; + +import java.io.Serializable; + +/** + * u_typeset_info_reference + * @author + */ +public class TypesetInfoReference implements Serializable { + private Long typesetInfoReferenceId; + + private Long typesetId; + + private String refer_title; + + private Byte refer_state; + + private static final long serialVersionUID = 1L; + + public Long getTypesetInfoReferenceId() { + return typesetInfoReferenceId; + } + + public void setTypesetInfoReferenceId(Long typesetInfoReferenceId) { + this.typesetInfoReferenceId = typesetInfoReferenceId; + } + + public Long getTypesetId() { + return typesetId; + } + + public void setTypesetId(Long typesetId) { + this.typesetId = typesetId; + } + + public String getRefer_title() { + return refer_title; + } + + public void setRefer_title(String refer_title) { + this.refer_title = refer_title; + } + + public Byte getRefer_state() { + return refer_state; + } + + public void setRefer_state(Byte refer_state) { + this.refer_state = refer_state; + } + + @Override + public String toString() { + return "TypesetInfoReference{" + + "typesetInfoReferenceId=" + typesetInfoReferenceId + + ", typesetId=" + typesetId + + ", refer_title='" + refer_title + '\'' + + ", refer_state=" + refer_state + + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/entity/User.java b/src/main/java/com/example/ts_obj/entity/User.java new file mode 100644 index 0000000..7931ee8 --- /dev/null +++ b/src/main/java/com/example/ts_obj/entity/User.java @@ -0,0 +1,83 @@ +package com.example.ts_obj.entity; + +import java.io.Serializable; + +/** + * u_user + * @author + */ +public class User implements Serializable { + private Long userId; + + private String account; + + private String password; + + private String email; + + private Byte isInsider; + + private Byte state; + + private static final long serialVersionUID = 1L; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Byte getIsInsider() { + return isInsider; + } + + public void setIsInsider(Byte isInsider) { + this.isInsider = isInsider; + } + + public Byte getState() { + return state; + } + + public void setState(Byte state) { + this.state = state; + } + + @Override + public String toString() { + return "User{" + + "userId=" + userId + + ", account='" + account + '\'' + + ", password='" + password + '\'' + + ", email='" + email + '\'' + + ", isInsider=" + isInsider + + ", state=" + state + + '}'; + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/interceptor/UserInterceptor.java b/src/main/java/com/example/ts_obj/interceptor/UserInterceptor.java new file mode 100644 index 0000000..9de8308 --- /dev/null +++ b/src/main/java/com/example/ts_obj/interceptor/UserInterceptor.java @@ -0,0 +1,32 @@ +package com.example.ts_obj.interceptor; + +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class UserInterceptor implements HandlerInterceptor { + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + response.setCharacterEncoding("UTF-8"); + response.setContentType("application/json;charset=utf-8"); + response.setHeader("Access-Control-Allow-Credentials","true"); + response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin")); + response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + response.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH"); + return true; + } + + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { + HandlerInterceptor.super.postHandle(request, response, handler, modelAndView); + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { + HandlerInterceptor.super.afterCompletion(request, response, handler, ex); + } +} diff --git a/src/main/java/com/example/ts_obj/service/TypesetExample.java b/src/main/java/com/example/ts_obj/service/TypesetExample.java new file mode 100644 index 0000000..f8ab72e --- /dev/null +++ b/src/main/java/com/example/ts_obj/service/TypesetExample.java @@ -0,0 +1,512 @@ +package com.example.ts_obj.service; + +import java.util.ArrayList; +import java.util.List; + +public class TypesetExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TypesetExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTypesetIdIsNull() { + addCriterion("typeset_id is null"); + return (Criteria) this; + } + + public Criteria andTypesetIdIsNotNull() { + addCriterion("typeset_id is not null"); + return (Criteria) this; + } + + public Criteria andTypesetIdEqualTo(Integer value) { + addCriterion("typeset_id =", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotEqualTo(Integer value) { + addCriterion("typeset_id <>", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdGreaterThan(Integer value) { + addCriterion("typeset_id >", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdGreaterThanOrEqualTo(Integer value) { + addCriterion("typeset_id >=", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdLessThan(Integer value) { + addCriterion("typeset_id <", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdLessThanOrEqualTo(Integer value) { + addCriterion("typeset_id <=", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdIn(List values) { + addCriterion("typeset_id in", values, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotIn(List values) { + addCriterion("typeset_id not in", values, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdBetween(Integer value1, Integer value2) { + addCriterion("typeset_id between", value1, value2, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotBetween(Integer value1, Integer value2) { + addCriterion("typeset_id not between", value1, value2, "typesetId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Integer value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Integer value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Integer value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Integer value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Integer value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Integer value1, Integer value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andArticleFileIsNull() { + addCriterion("article_file is null"); + return (Criteria) this; + } + + public Criteria andArticleFileIsNotNull() { + addCriterion("article_file is not null"); + return (Criteria) this; + } + + public Criteria andArticleFileEqualTo(String value) { + addCriterion("article_file =", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileNotEqualTo(String value) { + addCriterion("article_file <>", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileGreaterThan(String value) { + addCriterion("article_file >", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileGreaterThanOrEqualTo(String value) { + addCriterion("article_file >=", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileLessThan(String value) { + addCriterion("article_file <", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileLessThanOrEqualTo(String value) { + addCriterion("article_file <=", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileLike(String value) { + addCriterion("article_file like", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileNotLike(String value) { + addCriterion("article_file not like", value, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileIn(List values) { + addCriterion("article_file in", values, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileNotIn(List values) { + addCriterion("article_file not in", values, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileBetween(String value1, String value2) { + addCriterion("article_file between", value1, value2, "articleFile"); + return (Criteria) this; + } + + public Criteria andArticleFileNotBetween(String value1, String value2) { + addCriterion("article_file not between", value1, value2, "articleFile"); + return (Criteria) this; + } + + public Criteria andCtimeIsNull() { + addCriterion("ctime is null"); + return (Criteria) this; + } + + public Criteria andCtimeIsNotNull() { + addCriterion("ctime is not null"); + return (Criteria) this; + } + + public Criteria andCtimeEqualTo(Integer value) { + addCriterion("ctime =", value, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeNotEqualTo(Integer value) { + addCriterion("ctime <>", value, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeGreaterThan(Integer value) { + addCriterion("ctime >", value, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeGreaterThanOrEqualTo(Integer value) { + addCriterion("ctime >=", value, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeLessThan(Integer value) { + addCriterion("ctime <", value, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeLessThanOrEqualTo(Integer value) { + addCriterion("ctime <=", value, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeIn(List values) { + addCriterion("ctime in", values, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeNotIn(List values) { + addCriterion("ctime not in", values, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeBetween(Integer value1, Integer value2) { + addCriterion("ctime between", value1, value2, "ctime"); + return (Criteria) this; + } + + public Criteria andCtimeNotBetween(Integer value1, Integer value2) { + addCriterion("ctime not between", value1, value2, "ctime"); + return (Criteria) this; + } + + public Criteria andStateIsNull() { + addCriterion("`state` is null"); + return (Criteria) this; + } + + public Criteria andStateIsNotNull() { + addCriterion("`state` is not null"); + return (Criteria) this; + } + + public Criteria andStateEqualTo(Byte value) { + addCriterion("`state` =", value, "state"); + return (Criteria) this; + } + + public Criteria andStateNotEqualTo(Byte value) { + addCriterion("`state` <>", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThan(Byte value) { + addCriterion("`state` >", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThanOrEqualTo(Byte value) { + addCriterion("`state` >=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThan(Byte value) { + addCriterion("`state` <", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThanOrEqualTo(Byte value) { + addCriterion("`state` <=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateIn(List values) { + addCriterion("`state` in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateNotIn(List values) { + addCriterion("`state` not in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateBetween(Byte value1, Byte value2) { + addCriterion("`state` between", value1, value2, "state"); + return (Criteria) this; + } + + public Criteria andStateNotBetween(Byte value1, Byte value2) { + addCriterion("`state` not between", value1, value2, "state"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/service/TypesetInfoExample.java b/src/main/java/com/example/ts_obj/service/TypesetInfoExample.java new file mode 100644 index 0000000..2ec3928 --- /dev/null +++ b/src/main/java/com/example/ts_obj/service/TypesetInfoExample.java @@ -0,0 +1,1082 @@ +package com.example.ts_obj.service; + +import java.util.ArrayList; +import java.util.List; + +public class TypesetInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TypesetInfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTypesetInfoIdIsNull() { + addCriterion("typeset_info_id is null"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdIsNotNull() { + addCriterion("typeset_info_id is not null"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdEqualTo(Integer value) { + addCriterion("typeset_info_id =", value, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdNotEqualTo(Integer value) { + addCriterion("typeset_info_id <>", value, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdGreaterThan(Integer value) { + addCriterion("typeset_info_id >", value, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdGreaterThanOrEqualTo(Integer value) { + addCriterion("typeset_info_id >=", value, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdLessThan(Integer value) { + addCriterion("typeset_info_id <", value, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdLessThanOrEqualTo(Integer value) { + addCriterion("typeset_info_id <=", value, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdIn(List values) { + addCriterion("typeset_info_id in", values, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdNotIn(List values) { + addCriterion("typeset_info_id not in", values, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdBetween(Integer value1, Integer value2) { + addCriterion("typeset_info_id between", value1, value2, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoIdNotBetween(Integer value1, Integer value2) { + addCriterion("typeset_info_id not between", value1, value2, "typesetInfoId"); + return (Criteria) this; + } + + public Criteria andTypesetIdIsNull() { + addCriterion("typeset_id is null"); + return (Criteria) this; + } + + public Criteria andTypesetIdIsNotNull() { + addCriterion("typeset_id is not null"); + return (Criteria) this; + } + + public Criteria andTypesetIdEqualTo(Integer value) { + addCriterion("typeset_id =", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotEqualTo(Integer value) { + addCriterion("typeset_id <>", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdGreaterThan(Integer value) { + addCriterion("typeset_id >", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdGreaterThanOrEqualTo(Integer value) { + addCriterion("typeset_id >=", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdLessThan(Integer value) { + addCriterion("typeset_id <", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdLessThanOrEqualTo(Integer value) { + addCriterion("typeset_id <=", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdIn(List values) { + addCriterion("typeset_id in", values, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotIn(List values) { + addCriterion("typeset_id not in", values, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdBetween(Integer value1, Integer value2) { + addCriterion("typeset_id between", value1, value2, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotBetween(Integer value1, Integer value2) { + addCriterion("typeset_id not between", value1, value2, "typesetId"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andDoiIsNull() { + addCriterion("doi is null"); + return (Criteria) this; + } + + public Criteria andDoiIsNotNull() { + addCriterion("doi is not null"); + return (Criteria) this; + } + + public Criteria andDoiEqualTo(String value) { + addCriterion("doi =", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiNotEqualTo(String value) { + addCriterion("doi <>", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiGreaterThan(String value) { + addCriterion("doi >", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiGreaterThanOrEqualTo(String value) { + addCriterion("doi >=", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiLessThan(String value) { + addCriterion("doi <", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiLessThanOrEqualTo(String value) { + addCriterion("doi <=", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiLike(String value) { + addCriterion("doi like", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiNotLike(String value) { + addCriterion("doi not like", value, "doi"); + return (Criteria) this; + } + + public Criteria andDoiIn(List values) { + addCriterion("doi in", values, "doi"); + return (Criteria) this; + } + + public Criteria andDoiNotIn(List values) { + addCriterion("doi not in", values, "doi"); + return (Criteria) this; + } + + public Criteria andDoiBetween(String value1, String value2) { + addCriterion("doi between", value1, value2, "doi"); + return (Criteria) this; + } + + public Criteria andDoiNotBetween(String value1, String value2) { + addCriterion("doi not between", value1, value2, "doi"); + return (Criteria) this; + } + + public Criteria andMainTextIsNull() { + addCriterion("main_text is null"); + return (Criteria) this; + } + + public Criteria andMainTextIsNotNull() { + addCriterion("main_text is not null"); + return (Criteria) this; + } + + public Criteria andMainTextEqualTo(String value) { + addCriterion("main_text =", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextNotEqualTo(String value) { + addCriterion("main_text <>", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextGreaterThan(String value) { + addCriterion("main_text >", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextGreaterThanOrEqualTo(String value) { + addCriterion("main_text >=", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextLessThan(String value) { + addCriterion("main_text <", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextLessThanOrEqualTo(String value) { + addCriterion("main_text <=", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextLike(String value) { + addCriterion("main_text like", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextNotLike(String value) { + addCriterion("main_text not like", value, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextIn(List values) { + addCriterion("main_text in", values, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextNotIn(List values) { + addCriterion("main_text not in", values, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextBetween(String value1, String value2) { + addCriterion("main_text between", value1, value2, "mainText"); + return (Criteria) this; + } + + public Criteria andMainTextNotBetween(String value1, String value2) { + addCriterion("main_text not between", value1, value2, "mainText"); + return (Criteria) this; + } + + public Criteria andAuthorIsNull() { + addCriterion("author is null"); + return (Criteria) this; + } + + public Criteria andAuthorIsNotNull() { + addCriterion("author is not null"); + return (Criteria) this; + } + + public Criteria andAuthorEqualTo(String value) { + addCriterion("author =", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotEqualTo(String value) { + addCriterion("author <>", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorGreaterThan(String value) { + addCriterion("author >", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorGreaterThanOrEqualTo(String value) { + addCriterion("author >=", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorLessThan(String value) { + addCriterion("author <", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorLessThanOrEqualTo(String value) { + addCriterion("author <=", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorLike(String value) { + addCriterion("author like", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotLike(String value) { + addCriterion("author not like", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorIn(List values) { + addCriterion("author in", values, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotIn(List values) { + addCriterion("author not in", values, "author"); + return (Criteria) this; + } + + public Criteria andAuthorBetween(String value1, String value2) { + addCriterion("author between", value1, value2, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotBetween(String value1, String value2) { + addCriterion("author not between", value1, value2, "author"); + return (Criteria) this; + } + + public Criteria andAuthorAddressIsNull() { + addCriterion("author_address is null"); + return (Criteria) this; + } + + public Criteria andAuthorAddressIsNotNull() { + addCriterion("author_address is not null"); + return (Criteria) this; + } + + public Criteria andAuthorAddressEqualTo(String value) { + addCriterion("author_address =", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressNotEqualTo(String value) { + addCriterion("author_address <>", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressGreaterThan(String value) { + addCriterion("author_address >", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressGreaterThanOrEqualTo(String value) { + addCriterion("author_address >=", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressLessThan(String value) { + addCriterion("author_address <", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressLessThanOrEqualTo(String value) { + addCriterion("author_address <=", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressLike(String value) { + addCriterion("author_address like", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressNotLike(String value) { + addCriterion("author_address not like", value, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressIn(List values) { + addCriterion("author_address in", values, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressNotIn(List values) { + addCriterion("author_address not in", values, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressBetween(String value1, String value2) { + addCriterion("author_address between", value1, value2, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorAddressNotBetween(String value1, String value2) { + addCriterion("author_address not between", value1, value2, "authorAddress"); + return (Criteria) this; + } + + public Criteria andAuthorContributionIsNull() { + addCriterion("author_contribution is null"); + return (Criteria) this; + } + + public Criteria andAuthorContributionIsNotNull() { + addCriterion("author_contribution is not null"); + return (Criteria) this; + } + + public Criteria andAuthorContributionEqualTo(String value) { + addCriterion("author_contribution =", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionNotEqualTo(String value) { + addCriterion("author_contribution <>", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionGreaterThan(String value) { + addCriterion("author_contribution >", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionGreaterThanOrEqualTo(String value) { + addCriterion("author_contribution >=", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionLessThan(String value) { + addCriterion("author_contribution <", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionLessThanOrEqualTo(String value) { + addCriterion("author_contribution <=", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionLike(String value) { + addCriterion("author_contribution like", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionNotLike(String value) { + addCriterion("author_contribution not like", value, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionIn(List values) { + addCriterion("author_contribution in", values, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionNotIn(List values) { + addCriterion("author_contribution not in", values, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionBetween(String value1, String value2) { + addCriterion("author_contribution between", value1, value2, "authorContribution"); + return (Criteria) this; + } + + public Criteria andAuthorContributionNotBetween(String value1, String value2) { + addCriterion("author_contribution not between", value1, value2, "authorContribution"); + return (Criteria) this; + } + + public Criteria andTraditonIsNull() { + addCriterion("traditon is null"); + return (Criteria) this; + } + + public Criteria andTraditonIsNotNull() { + addCriterion("traditon is not null"); + return (Criteria) this; + } + + public Criteria andTraditonEqualTo(String value) { + addCriterion("traditon =", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonNotEqualTo(String value) { + addCriterion("traditon <>", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonGreaterThan(String value) { + addCriterion("traditon >", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonGreaterThanOrEqualTo(String value) { + addCriterion("traditon >=", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonLessThan(String value) { + addCriterion("traditon <", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonLessThanOrEqualTo(String value) { + addCriterion("traditon <=", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonLike(String value) { + addCriterion("traditon like", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonNotLike(String value) { + addCriterion("traditon not like", value, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonIn(List values) { + addCriterion("traditon in", values, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonNotIn(List values) { + addCriterion("traditon not in", values, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonBetween(String value1, String value2) { + addCriterion("traditon between", value1, value2, "traditon"); + return (Criteria) this; + } + + public Criteria andTraditonNotBetween(String value1, String value2) { + addCriterion("traditon not between", value1, value2, "traditon"); + return (Criteria) this; + } + + public Criteria andAbstractTextIsNull() { + addCriterion("abstract_text is null"); + return (Criteria) this; + } + + public Criteria andAbstractTextIsNotNull() { + addCriterion("abstract_text is not null"); + return (Criteria) this; + } + + public Criteria andAbstractTextEqualTo(String value) { + addCriterion("abstract_text =", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextNotEqualTo(String value) { + addCriterion("abstract_text <>", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextGreaterThan(String value) { + addCriterion("abstract_text >", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextGreaterThanOrEqualTo(String value) { + addCriterion("abstract_text >=", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextLessThan(String value) { + addCriterion("abstract_text <", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextLessThanOrEqualTo(String value) { + addCriterion("abstract_text <=", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextLike(String value) { + addCriterion("abstract_text like", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextNotLike(String value) { + addCriterion("abstract_text not like", value, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextIn(List values) { + addCriterion("abstract_text in", values, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextNotIn(List values) { + addCriterion("abstract_text not in", values, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextBetween(String value1, String value2) { + addCriterion("abstract_text between", value1, value2, "abstractText"); + return (Criteria) this; + } + + public Criteria andAbstractTextNotBetween(String value1, String value2) { + addCriterion("abstract_text not between", value1, value2, "abstractText"); + return (Criteria) this; + } + + public Criteria andKeywordsIsNull() { + addCriterion("keywords is null"); + return (Criteria) this; + } + + public Criteria andKeywordsIsNotNull() { + addCriterion("keywords is not null"); + return (Criteria) this; + } + + public Criteria andKeywordsEqualTo(String value) { + addCriterion("keywords =", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsNotEqualTo(String value) { + addCriterion("keywords <>", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsGreaterThan(String value) { + addCriterion("keywords >", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsGreaterThanOrEqualTo(String value) { + addCriterion("keywords >=", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsLessThan(String value) { + addCriterion("keywords <", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsLessThanOrEqualTo(String value) { + addCriterion("keywords <=", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsLike(String value) { + addCriterion("keywords like", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsNotLike(String value) { + addCriterion("keywords not like", value, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsIn(List values) { + addCriterion("keywords in", values, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsNotIn(List values) { + addCriterion("keywords not in", values, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsBetween(String value1, String value2) { + addCriterion("keywords between", value1, value2, "keywords"); + return (Criteria) this; + } + + public Criteria andKeywordsNotBetween(String value1, String value2) { + addCriterion("keywords not between", value1, value2, "keywords"); + return (Criteria) this; + } + + public Criteria andStateIsNull() { + addCriterion("`state` is null"); + return (Criteria) this; + } + + public Criteria andStateIsNotNull() { + addCriterion("`state` is not null"); + return (Criteria) this; + } + + public Criteria andStateEqualTo(Byte value) { + addCriterion("`state` =", value, "state"); + return (Criteria) this; + } + + public Criteria andStateNotEqualTo(Byte value) { + addCriterion("`state` <>", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThan(Byte value) { + addCriterion("`state` >", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThanOrEqualTo(Byte value) { + addCriterion("`state` >=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThan(Byte value) { + addCriterion("`state` <", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThanOrEqualTo(Byte value) { + addCriterion("`state` <=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateIn(List values) { + addCriterion("`state` in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateNotIn(List values) { + addCriterion("`state` not in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateBetween(Byte value1, Byte value2) { + addCriterion("`state` between", value1, value2, "state"); + return (Criteria) this; + } + + public Criteria andStateNotBetween(Byte value1, Byte value2) { + addCriterion("`state` not between", value1, value2, "state"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/service/TypesetInfoReferenceExample.java b/src/main/java/com/example/ts_obj/service/TypesetInfoReferenceExample.java new file mode 100644 index 0000000..b095fe3 --- /dev/null +++ b/src/main/java/com/example/ts_obj/service/TypesetInfoReferenceExample.java @@ -0,0 +1,452 @@ +package com.example.ts_obj.service; + +import java.util.ArrayList; +import java.util.List; + +public class TypesetInfoReferenceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TypesetInfoReferenceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTypesetInfoReferenceIdIsNull() { + addCriterion("typeset_info_reference_id is null"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdIsNotNull() { + addCriterion("typeset_info_reference_id is not null"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdEqualTo(Integer value) { + addCriterion("typeset_info_reference_id =", value, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdNotEqualTo(Integer value) { + addCriterion("typeset_info_reference_id <>", value, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdGreaterThan(Integer value) { + addCriterion("typeset_info_reference_id >", value, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdGreaterThanOrEqualTo(Integer value) { + addCriterion("typeset_info_reference_id >=", value, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdLessThan(Integer value) { + addCriterion("typeset_info_reference_id <", value, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdLessThanOrEqualTo(Integer value) { + addCriterion("typeset_info_reference_id <=", value, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdIn(List values) { + addCriterion("typeset_info_reference_id in", values, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdNotIn(List values) { + addCriterion("typeset_info_reference_id not in", values, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdBetween(Integer value1, Integer value2) { + addCriterion("typeset_info_reference_id between", value1, value2, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetInfoReferenceIdNotBetween(Integer value1, Integer value2) { + addCriterion("typeset_info_reference_id not between", value1, value2, "typesetInfoReferenceId"); + return (Criteria) this; + } + + public Criteria andTypesetIdIsNull() { + addCriterion("typeset_id is null"); + return (Criteria) this; + } + + public Criteria andTypesetIdIsNotNull() { + addCriterion("typeset_id is not null"); + return (Criteria) this; + } + + public Criteria andTypesetIdEqualTo(Integer value) { + addCriterion("typeset_id =", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotEqualTo(Integer value) { + addCriterion("typeset_id <>", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdGreaterThan(Integer value) { + addCriterion("typeset_id >", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdGreaterThanOrEqualTo(Integer value) { + addCriterion("typeset_id >=", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdLessThan(Integer value) { + addCriterion("typeset_id <", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdLessThanOrEqualTo(Integer value) { + addCriterion("typeset_id <=", value, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdIn(List values) { + addCriterion("typeset_id in", values, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotIn(List values) { + addCriterion("typeset_id not in", values, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdBetween(Integer value1, Integer value2) { + addCriterion("typeset_id between", value1, value2, "typesetId"); + return (Criteria) this; + } + + public Criteria andTypesetIdNotBetween(Integer value1, Integer value2) { + addCriterion("typeset_id not between", value1, value2, "typesetId"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andStateIsNull() { + addCriterion("`state` is null"); + return (Criteria) this; + } + + public Criteria andStateIsNotNull() { + addCriterion("`state` is not null"); + return (Criteria) this; + } + + public Criteria andStateEqualTo(Byte value) { + addCriterion("`state` =", value, "state"); + return (Criteria) this; + } + + public Criteria andStateNotEqualTo(Byte value) { + addCriterion("`state` <>", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThan(Byte value) { + addCriterion("`state` >", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThanOrEqualTo(Byte value) { + addCriterion("`state` >=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThan(Byte value) { + addCriterion("`state` <", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThanOrEqualTo(Byte value) { + addCriterion("`state` <=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateIn(List values) { + addCriterion("`state` in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateNotIn(List values) { + addCriterion("`state` not in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateBetween(Byte value1, Byte value2) { + addCriterion("`state` between", value1, value2, "state"); + return (Criteria) this; + } + + public Criteria andStateNotBetween(Byte value1, Byte value2) { + addCriterion("`state` not between", value1, value2, "state"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/service/TypesetService.java b/src/main/java/com/example/ts_obj/service/TypesetService.java new file mode 100644 index 0000000..887369d --- /dev/null +++ b/src/main/java/com/example/ts_obj/service/TypesetService.java @@ -0,0 +1,86 @@ +package com.example.ts_obj.service; + +import com.example.ts_obj.dao.TypesetInfoMapper; +import com.example.ts_obj.dao.TypesetInfoReferenceMapper; +import com.example.ts_obj.dao.TypesetMapper; +import com.example.ts_obj.entity.Typeset; +import com.example.ts_obj.entity.TypesetInfo; +import com.example.ts_obj.entity.TypesetInfoReference; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +public class TypesetService { + + private final TypesetMapper typesetmapper; + private final TypesetInfoMapper typesetInfomapper; + private final TypesetInfoReferenceMapper typesetInfoReferenceMapper; + + @Autowired + public TypesetService(TypesetMapper typesetmapper, TypesetInfoMapper typesetInfomapper, TypesetInfoReferenceMapper typesetInfoReferenceMapper) { + this.typesetmapper = typesetmapper; + this.typesetInfomapper = typesetInfomapper; + this.typesetInfoReferenceMapper = typesetInfoReferenceMapper; + } + + + public Integer addTypeset(Typeset ts){ + Integer res = typesetmapper.insert(ts); + return res; + } + + public Integer addTypesetInfo(TypesetInfo ti){ + return typesetInfomapper.insertSelective(ti); + } + + public Integer editTypesetInfo(TypesetInfo ti){ + return typesetInfomapper.updateByTypesetId(ti); + } + + public List getTypesetListByUserId(Long userid,Long startIndex,Long pageSize){ + return typesetmapper.selectByUserid(userid,startIndex,pageSize); + } + + public Map getTypesetDetail(Long typesetId){ + Typeset ts = typesetmapper.selectByPrimaryKey(typesetId); + List tir = typesetInfoReferenceMapper.selectByTypesetid(typesetId); + Map m = new HashMap(); + m.put("info",ts); + m.put("refers",tir); + return m; + } + + public Long getTypesetListCountByUserId(Long userid){ + return typesetmapper.countByUserId(userid); + } + + public Integer editTypesetTitle(Long typesetId,String title,String journal,String jabbr,String stage,String website,String receivedDate,String acceptedDate,String doi,String littleAuthor,String info_type){ + typesetInfomapper.editTypesetjsw(typesetId,journal,jabbr,stage,website,receivedDate,acceptedDate,doi,littleAuthor,info_type); + return typesetmapper.editTypesetTitle(typesetId,title); + } + + public Integer saveFileName(Long typesetId,String filename){ + return typesetmapper.saveFileName(typesetId,filename); + } + + public Integer addTypesetInfoReference(TypesetInfoReference tir){ + return typesetInfoReferenceMapper.insert(tir); + } + + public Integer editTypesetReference(Long typesetInfoReferenceId,String title){ + return typesetInfoReferenceMapper.updateById(typesetInfoReferenceId,title); + } + + public Integer delById(Long typeset_info_reference_id){ + return typesetInfoReferenceMapper.deleteByPrimaryKey(typeset_info_reference_id); + } + + public Integer emptyForRefer(Long typesetId){ + return typesetInfoReferenceMapper.emptyForRefer(typesetId); + } + +} diff --git a/src/main/java/com/example/ts_obj/service/UserExample.java b/src/main/java/com/example/ts_obj/service/UserExample.java new file mode 100644 index 0000000..e15bd93 --- /dev/null +++ b/src/main/java/com/example/ts_obj/service/UserExample.java @@ -0,0 +1,592 @@ +package com.example.ts_obj.service; + +import java.util.ArrayList; +import java.util.List; + +public class UserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Integer value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Integer value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Integer value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Integer value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Integer value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Integer value1, Integer value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andAccountIsNull() { + addCriterion("account is null"); + return (Criteria) this; + } + + public Criteria andAccountIsNotNull() { + addCriterion("account is not null"); + return (Criteria) this; + } + + public Criteria andAccountEqualTo(String value) { + addCriterion("account =", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotEqualTo(String value) { + addCriterion("account <>", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountGreaterThan(String value) { + addCriterion("account >", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountGreaterThanOrEqualTo(String value) { + addCriterion("account >=", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountLessThan(String value) { + addCriterion("account <", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountLessThanOrEqualTo(String value) { + addCriterion("account <=", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountLike(String value) { + addCriterion("account like", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotLike(String value) { + addCriterion("account not like", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountIn(List values) { + addCriterion("account in", values, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotIn(List values) { + addCriterion("account not in", values, "account"); + return (Criteria) this; + } + + public Criteria andAccountBetween(String value1, String value2) { + addCriterion("account between", value1, value2, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotBetween(String value1, String value2) { + addCriterion("account not between", value1, value2, "account"); + return (Criteria) this; + } + + public Criteria andPasswordIsNull() { + addCriterion("`password` is null"); + return (Criteria) this; + } + + public Criteria andPasswordIsNotNull() { + addCriterion("`password` is not null"); + return (Criteria) this; + } + + public Criteria andPasswordEqualTo(String value) { + addCriterion("`password` =", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotEqualTo(String value) { + addCriterion("`password` <>", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThan(String value) { + addCriterion("`password` >", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThanOrEqualTo(String value) { + addCriterion("`password` >=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThan(String value) { + addCriterion("`password` <", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThanOrEqualTo(String value) { + addCriterion("`password` <=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLike(String value) { + addCriterion("`password` like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotLike(String value) { + addCriterion("`password` not like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordIn(List values) { + addCriterion("`password` in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotIn(List values) { + addCriterion("`password` not in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordBetween(String value1, String value2) { + addCriterion("`password` between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotBetween(String value1, String value2) { + addCriterion("`password` not between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("email is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("email is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("email =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("email <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("email >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("email >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("email <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("email <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("email like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("email not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("email in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("email not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("email between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("email not between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andIsInsiderIsNull() { + addCriterion("is_insider is null"); + return (Criteria) this; + } + + public Criteria andIsInsiderIsNotNull() { + addCriterion("is_insider is not null"); + return (Criteria) this; + } + + public Criteria andIsInsiderEqualTo(Byte value) { + addCriterion("is_insider =", value, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderNotEqualTo(Byte value) { + addCriterion("is_insider <>", value, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderGreaterThan(Byte value) { + addCriterion("is_insider >", value, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderGreaterThanOrEqualTo(Byte value) { + addCriterion("is_insider >=", value, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderLessThan(Byte value) { + addCriterion("is_insider <", value, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderLessThanOrEqualTo(Byte value) { + addCriterion("is_insider <=", value, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderIn(List values) { + addCriterion("is_insider in", values, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderNotIn(List values) { + addCriterion("is_insider not in", values, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderBetween(Byte value1, Byte value2) { + addCriterion("is_insider between", value1, value2, "isInsider"); + return (Criteria) this; + } + + public Criteria andIsInsiderNotBetween(Byte value1, Byte value2) { + addCriterion("is_insider not between", value1, value2, "isInsider"); + return (Criteria) this; + } + + public Criteria andStateIsNull() { + addCriterion("`state` is null"); + return (Criteria) this; + } + + public Criteria andStateIsNotNull() { + addCriterion("`state` is not null"); + return (Criteria) this; + } + + public Criteria andStateEqualTo(Byte value) { + addCriterion("`state` =", value, "state"); + return (Criteria) this; + } + + public Criteria andStateNotEqualTo(Byte value) { + addCriterion("`state` <>", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThan(Byte value) { + addCriterion("`state` >", value, "state"); + return (Criteria) this; + } + + public Criteria andStateGreaterThanOrEqualTo(Byte value) { + addCriterion("`state` >=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThan(Byte value) { + addCriterion("`state` <", value, "state"); + return (Criteria) this; + } + + public Criteria andStateLessThanOrEqualTo(Byte value) { + addCriterion("`state` <=", value, "state"); + return (Criteria) this; + } + + public Criteria andStateIn(List values) { + addCriterion("`state` in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateNotIn(List values) { + addCriterion("`state` not in", values, "state"); + return (Criteria) this; + } + + public Criteria andStateBetween(Byte value1, Byte value2) { + addCriterion("`state` between", value1, value2, "state"); + return (Criteria) this; + } + + public Criteria andStateNotBetween(Byte value1, Byte value2) { + addCriterion("`state` not between", value1, value2, "state"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/example/ts_obj/service/UserService.java b/src/main/java/com/example/ts_obj/service/UserService.java new file mode 100644 index 0000000..10a22f3 --- /dev/null +++ b/src/main/java/com/example/ts_obj/service/UserService.java @@ -0,0 +1,28 @@ +package com.example.ts_obj.service; + +import com.example.ts_obj.dao.UserMapper; +import com.example.ts_obj.entity.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class UserService { + + @Autowired + private UserMapper usermapper; + + + public Long insertUser(User user){ + usermapper.insert(user); + return user.getUserId(); + } + + public User checkUser(String account,String password){ + return usermapper.selectForCheck(account,password); + } + + public User getUser(Long userid){ + return usermapper.selectByPrimaryKey(userid); + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..8dc36f9 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,25 @@ +server: + port: 8080 + +spring: + datasource: + name: ts +# url: jdbc:mysql://localhost:3306/ts?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT +# username: root +# password: root + url: jdbc:mysql://rm-2ze871g00k7k48j3635890.mysql.rds.aliyuncs.com:3306/ts?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT + username: tmrjournal + password: Wu751019 + driver-class-name: com.mysql.cj.jdbc.Driver + servlet: + multipart: + max-file-size: 10MB + max-request-size: 100MB + + +mybatis: + mapper-locations: classpath:mapper/*Mapper.xml #娉ㄦ剰锛氫竴瀹氳瀵瑰簲mapper鏄犲皠xml鏂囦欢鐨勬墍鍦ㄨ矾寰 + type-aliases-package: com.example.ts_obj.entity + +logging: + config: classpath:logback-spring.xml \ No newline at end of file diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..15a9451 --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,169 @@ + + + + + + + + Logback For Boss + + + + + + + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger-%msg%n + UTF-8 + + + + + + + + ERROR + ACCEPT + DENY + + + ${logDir}\%d{yyyyMMdd}\error.log + ${maxHistory} + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + UTF-8 + + false + false + + + + + + WARN + ACCEPT + DENY + + + ${logDir}\%d{yyyyMMdd}\warn.log + ${maxHistory} + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger-%msg%n + UTF-8 + + false + false + + + + + + INFO + ACCEPT + DENY + + + ${logDir}\%d{yyyyMMdd}\info.log + ${maxHistory} + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger-%msg%n + UTF-8 + + false + false + + + + + + DEBUG + ACCEPT + DENY + + + ${logDir}\%d{yyyyMMdd}\debug.log + ${maxHistory} + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger-%msg%n + UTF-8 + + false + false + + + + + + + ${logDir}/%d{yyyyMMdd}/boss.%d{yyyy-MM-dd}.log + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + + 10MB + + + + + + true + + 0 + + 512 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TypesetInfoMapper.xml b/src/main/resources/mapper/TypesetInfoMapper.xml new file mode 100644 index 0000000..0fb15ce --- /dev/null +++ b/src/main/resources/mapper/TypesetInfoMapper.xml @@ -0,0 +1,510 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + typeset_info_id, typeset_id, info_title, `info_type`, doi,website,topic, main_text, author, author_address, + author_contribution,author_corresponding,author_corresponding_email, traditon,journal,jabbr,stage,little_author,acknowledgment, + received_date,accepted_date,online_date,abbreviation, abstract_text, keywords, `info_state` + + + + + delete from u_typeset_info + where typeset_info_id = #{typesetInfoId,jdbcType=BIGINT} + + + delete from u_typeset_info + + + + + + insert into u_typeset_info (typeset_id, info_title, `info_type`, + doi,website,topic, main_text, author, + author_address, author_contribution,author_corresponding,author_corresponding_email, traditon, + journal,jabbr,stage,little_author,acknowledgment,received_date,accepted_date,online_date,abbreviation, + abstract_text, keywords, `info_state` + ) + values (#{typesetId,jdbcType=BIGINT}, #{info_title,jdbcType=VARCHAR}, #{info_type,jdbcType=VARCHAR}, + #{doi,jdbcType=VARCHAR},#{website,jdbcType=VARCHAR},#{topic,jdbcType=VARCHAR}, #{mainText,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, + #{authorAddress,jdbcType=VARCHAR}, #{authorContribution,jdbcType=VARCHAR},#{authorCorresponding,jdbcType=VARCHAR},#{authorCorrespondingEmail,jdbcType=VARCHAR},#{traditon,jdbcType=VARCHAR}, + #{journal,jdbcType=VARCHAR},#{jabbr,jdbcType=VARCHAR},#{stage,jdbcType=VARCHAR},#{little_author},#{acknowledgment},#{received_date},#{accepted_date},#{online_date},#{abbreviation} + #{abstractText,jdbcType=VARCHAR}, #{keywords,jdbcType=VARCHAR}, #{info_state,jdbcType=TINYINT} + ) + + + insert into u_typeset_info + + + typeset_id, + + + info_title, + + + `info_type`, + + + doi, + + + website, + + + topic, + + + main_text, + + + author, + + + author_address, + + + author_contribution, + + + author_corresponding, + + + author_corresponding_email, + + + traditon, + + + journal, + + + jabbr, + + + stage, + + + little_author, + + + acknowledgment, + + + received_date, + + + accepted_date, + + + online_date, + + + abbreviation, + + + abstract_text, + + + keywords, + + + `info_state`, + + + + + #{typesetId,jdbcType=BIGINT}, + + + #{info_title,jdbcType=VARCHAR}, + + + #{info_type,jdbcType=VARCHAR}, + + + #{doi,jdbcType=VARCHAR}, + + + #{website,jdbcType=VARCHAR}, + + + #{topic,jdbcType=VARCHAR}, + + + #{mainText,jdbcType=VARCHAR}, + + + #{author,jdbcType=VARCHAR}, + + + #{authorAddress,jdbcType=VARCHAR}, + + + #{authorContribution,jdbcType=VARCHAR}, + + + #{author_corresponding,jdbcType=VARCHAR}, + + + #{author_corresponding_email,jdbcType=VARCHAR}, + + + #{traditon,jdbcType=VARCHAR}, + + + #{journal,jdbcType=VARCHAR}, + + + #{jabbr,jdbcType=VARCHAR}, + + + #{stage,jdbcType=VARCHAR}, + + + #{little_author,jdbcType=VARCHAR}, + + + #{acknowledgment,jdbcType=VARCHAR}, + + + #{received_date,jdbcType=VARCHAR}, + + + #{accepted_date,jdbcType=VARCHAR}, + + + #{online_date,jdbcType=VARCHAR}, + + + #{abbreviation,jdbcType=VARCHAR}, + + + #{abstractText,jdbcType=VARCHAR}, + + + #{keywords,jdbcType=VARCHAR}, + + + #{info_state,jdbcType=TINYINT}, + + + + + + update u_typeset_info + + + typeset_info_id = #{record.typesetInfoId,jdbcType=BIGINT}, + + + typeset_id = #{record.typesetId,jdbcType=BIGINT}, + + + title = #{record.info_title,jdbcType=VARCHAR}, + + + `type` = #{record.info_type,jdbcType=VARCHAR}, + + + doi = #{record.doi,jdbcType=VARCHAR}, + + + main_text = #{record.mainText,jdbcType=VARCHAR}, + + + author = #{record.author,jdbcType=VARCHAR}, + + + author_address = #{record.authorAddress,jdbcType=VARCHAR}, + + + author_contribution = #{record.authorContribution,jdbcType=VARCHAR}, + + + traditon = #{record.traditon,jdbcType=VARCHAR}, + + + abstract_text = #{record.abstractText,jdbcType=VARCHAR}, + + + keywords = #{record.keywords,jdbcType=VARCHAR}, + + + `state` = #{record.info_state,jdbcType=TINYINT}, + + + + + + + + update u_typeset_info + set typeset_info_id = #{record.typesetInfoId,jdbcType=BIGINT}, + typeset_id = #{record.typesetId,jdbcType=BIGINT}, + info_title = #{record.info_title,jdbcType=VARCHAR}, + `info_type` = #{record.info_type,jdbcType=VARCHAR}, + doi = #{record.doi,jdbcType=VARCHAR}, + main_text = #{record.mainText,jdbcType=VARCHAR}, + author = #{record.author,jdbcType=VARCHAR}, + author_address = #{record.authorAddress,jdbcType=VARCHAR}, + author_contribution = #{record.authorContribution,jdbcType=VARCHAR}, + traditon = #{record.traditon,jdbcType=VARCHAR}, + abstract_text = #{record.abstractText,jdbcType=VARCHAR}, + keywords = #{record.keywords,jdbcType=VARCHAR}, + `info_state` = #{record.info_state,jdbcType=TINYINT} + + + + + + update u_typeset_info + + + typeset_id = #{typesetId,jdbcType=BIGINT}, + + + info_title = #{info_title,jdbcType=VARCHAR}, + + + `info_type` = #{info_type,jdbcType=VARCHAR}, + + + doi = #{doi,jdbcType=VARCHAR}, + + + main_text = #{mainText,jdbcType=VARCHAR}, + + + author = #{author,jdbcType=VARCHAR}, + + + author_address = #{authorAddress,jdbcType=VARCHAR}, + + + author_contribution = #{authorContribution,jdbcType=VARCHAR}, + + + traditon = #{traditon,jdbcType=VARCHAR}, + + + abstract_text = #{abstractText,jdbcType=VARCHAR}, + + + keywords = #{keywords,jdbcType=VARCHAR}, + + + `info_state` = #{info_state,jdbcType=TINYINT}, + + + where typeset_info_id = #{typesetInfoId,jdbcType=BIGINT} + + + update u_typeset_info + set typeset_id = #{typesetId,jdbcType=BIGINT}, + info_title = #{info_title,jdbcType=VARCHAR}, + `info_type` = #{info_type,jdbcType=VARCHAR}, + doi = #{doi,jdbcType=VARCHAR}, + main_text = #{mainText,jdbcType=VARCHAR}, + author = #{author,jdbcType=VARCHAR}, + author_address = #{authorAddress,jdbcType=VARCHAR}, + author_contribution = #{authorContribution,jdbcType=VARCHAR}, + traditon = #{traditon,jdbcType=VARCHAR}, + abstract_text = #{abstractText,jdbcType=VARCHAR}, + keywords = #{keywords,jdbcType=VARCHAR}, + `info_state` = #{info_state,jdbcType=TINYINT} + where typeset_info_id = #{typesetInfoId,jdbcType=BIGINT} + + + update u_typeset_info + set journal = #{journal},jabbr=#{jabbr},stage = #{stage},website = #{website},received_date = #{received_date},accepted_date= #{accepted_date},doi = #{doi},little_author=#{little_author},info_type=#{info_type} + where typeset_id = #{typesetId} + + + + update u_typeset_info + + + info_title = #{info_title,jdbcType=VARCHAR}, + + + `info_type` = #{info_type,jdbcType=VARCHAR}, + + + doi = #{doi,jdbcType=VARCHAR}, + + + website = #{website,jdbcType=VARCHAR}, + + + topic = #{topic,jdbcType=VARCHAR}, + + + main_text = #{mainText,jdbcType=VARCHAR}, + + + author = #{author,jdbcType=VARCHAR}, + + + author_address = #{authorAddress,jdbcType=VARCHAR}, + + + author_contribution = #{authorContribution,jdbcType=VARCHAR}, + + + author_corresponding = #{authorCorresponding,jdbcType=VARCHAR}, + + + author_corresponding_email = #{authorCorrespondingEmail,jdbcType=VARCHAR}, + + + traditon = #{traditon,jdbcType=VARCHAR}, + + + journal = #{journal,jdbcType=VARCHAR}, + + + jabbr = #{jabbr,jdbcType=VARCHAR}, + + + stage = #{stage,jdbcType=VARCHAR}, + + + little_author = #{little_author,jdbcType=VARCHAR}, + + + acknowledgment = #{acknowledgment,jdbcType=VARCHAR}, + + + received_date = #{received_date,jdbcType=VARCHAR}, + + + accepted_date = #{accepted_date,jdbcType=VARCHAR}, + + + online_date = #{online_date,jdbcType=VARCHAR}, + + + abbreviation = #{abbreviation,jdbcType=VARCHAR}, + + + abstract_text = #{abstractText,jdbcType=VARCHAR}, + + + keywords = #{keywords,jdbcType=VARCHAR}, + + + `info_state` = #{info_state,jdbcType=TINYINT}, + + + where typeset_id = #{typesetId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TypesetInfoReferenceMapper.xml b/src/main/resources/mapper/TypesetInfoReferenceMapper.xml new file mode 100644 index 0000000..9851d6c --- /dev/null +++ b/src/main/resources/mapper/TypesetInfoReferenceMapper.xml @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + typeset_info_reference_id, typeset_id, refer_title, `refer_state` + + + + + + delete from u_typeset_info_reference + where typeset_info_reference_id = #{typesetInfoReferenceId,jdbcType=BIGINT} + + + delete from u_typeset_info_reference + + + + + + insert into u_typeset_info_reference (typeset_id, refer_title, `refer_state` + ) + values (#{typesetId,jdbcType=BIGINT}, #{refer_title,jdbcType=VARCHAR}, #{refer_state,jdbcType=TINYINT} + ) + + + insert into u_typeset_info_reference + + + typeset_id, + + + refer_title, + + + `refer_state`, + + + + + #{typesetId,jdbcType=BIGINT}, + + + #{refer_title,jdbcType=VARCHAR}, + + + #{refer_state,jdbcType=TINYINT}, + + + + + + update u_typeset_info_reference + + + typeset_info_reference_id = #{record.typesetInfoReferenceId,jdbcType=BIGINT}, + + + typeset_id = #{record.typesetId,jdbcType=BIGINT}, + + + refer_title = #{record.refer_title,jdbcType=VARCHAR}, + + + `refer_state` = #{record.refer_state,jdbcType=TINYINT}, + + + + + + + + update u_typeset_info_reference + set typeset_info_reference_id = #{record.typesetInfoReferenceId,jdbcType=BIGINT}, + typeset_id = #{record.typesetId,jdbcType=BIGINT}, + refer_title = #{record.refer_title,jdbcType=VARCHAR}, + `refer_state` = #{record.refer_state,jdbcType=TINYINT} + + + + + + update u_typeset_info_reference + + + typeset_id = #{typesetId,jdbcType=BIGINT}, + + + refer_title = #{refer_title,jdbcType=VARCHAR}, + + + `refer_state` = #{refer_state,jdbcType=TINYINT}, + + + where typeset_info_reference_id = #{typesetInfoReferenceId,jdbcType=BIGINT} + + + update u_typeset_info_reference + set typeset_id = #{typesetId,jdbcType=BIGINT}, + refer_title = #{refer_title,jdbcType=VARCHAR}, + `refer_state` = #{refer_state,jdbcType=TINYINT} + where typeset_info_reference_id = #{typesetInfoReferenceId,jdbcType=BIGINT} + + + update u_typeset_info_reference + set refer_title = #{title,jdbcType=VARCHAR} + where typeset_info_reference_id = #{typesetInfoReferenceId} + + + update u_typeset_info_reference + set refer_state = 1 + where typeset_id = #{typesetId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/resources/mapper/TypesetMapper.xml b/src/main/resources/mapper/TypesetMapper.xml new file mode 100644 index 0000000..501e7d7 --- /dev/null +++ b/src/main/resources/mapper/TypesetMapper.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + typeset_id, user_id, article_file,title, ctime, `state` + + + insert into u_typeset (user_id, article_file, title, ctime) + values (#{userId,jdbcType=BIGINT}, #{articleFile,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT}); + + + + + + + + + + + update u_typeset + set article_file = #{filename} + where typeset_id = #{typesetId} + + + + update u_typeset + set title = #{title} + where typeset_id = #{typesetId} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml new file mode 100644 index 0000000..11cb3e8 --- /dev/null +++ b/src/main/resources/mapper/UserMapper.xml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + user_id, account, `password`, email, is_insider, `state` + + + + + + delete from u_user + where user_id = #{userId,jdbcType=BIGINT} + + + delete from u_user + + + + + + insert into u_user (account, `password`, email, + is_insider, `state`) + values (#{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, + #{isInsider,jdbcType=TINYINT}, #{state,jdbcType=TINYINT}) + + + insert into u_user + + + account, + + + `password`, + + + email, + + + is_insider, + + + `state`, + + + + + #{account,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{isInsider,jdbcType=TINYINT}, + + + #{state,jdbcType=TINYINT}, + + + + + + update u_user + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + account = #{record.account,jdbcType=VARCHAR}, + + + `password` = #{record.password,jdbcType=VARCHAR}, + + + email = #{record.email,jdbcType=VARCHAR}, + + + is_insider = #{record.isInsider,jdbcType=TINYINT}, + + + `state` = #{record.state,jdbcType=TINYINT}, + + + + + + + + update u_user + set user_id = #{record.userId,jdbcType=BIGINT}, + account = #{record.account,jdbcType=VARCHAR}, + `password` = #{record.password,jdbcType=VARCHAR}, + email = #{record.email,jdbcType=VARCHAR}, + is_insider = #{record.isInsider,jdbcType=TINYINT}, + `state` = #{record.state,jdbcType=TINYINT} + + + + + + update u_user + + + account = #{account,jdbcType=VARCHAR}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + is_insider = #{isInsider,jdbcType=TINYINT}, + + + `state` = #{state,jdbcType=TINYINT}, + + + where user_id = #{userId,jdbcType=BIGINT} + + + update u_user + set account = #{account,jdbcType=VARCHAR}, + `password` = #{password,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + is_insider = #{isInsider,jdbcType=TINYINT}, + `state` = #{state,jdbcType=TINYINT} + where user_id = #{userId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/test/java/com/example/ts_obj/TsObjApplicationTests.java b/src/test/java/com/example/ts_obj/TsObjApplicationTests.java new file mode 100644 index 0000000..3eab5fa --- /dev/null +++ b/src/test/java/com/example/ts_obj/TsObjApplicationTests.java @@ -0,0 +1,13 @@ +package com.example.ts_obj; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class TsObjApplicationTests { + + @Test + void contextLoads() { + } + +}