master
shijie 4 years ago
parent 820996e95e
commit bc29cc989e
  1. 1
      README.md
  2. 3
      WebContent/META-INF/MANIFEST.MF
  3. 372
      hs_err_pid15576.log
  4. 340
      hs_err_pid2816.log
  5. 246
      pom.xml
  6. 3591
      replay_pid15576.log
  7. 6063
      replay_pid2816.log
  8. 60
      src/main/java/com/yipin/liuwanr/AliyunOssConfig.java
  9. 22
      src/main/java/com/yipin/liuwanr/App.java
  10. 173
      src/main/java/com/yipin/liuwanr/AppConfig.java
  11. 46
      src/main/java/com/yipin/liuwanr/CORSConfig.java
  12. 74
      src/main/java/com/yipin/liuwanr/ClusterConfig.java
  13. 255
      src/main/java/com/yipin/liuwanr/Constants.java
  14. 30
      src/main/java/com/yipin/liuwanr/Demo03.java
  15. 38
      src/main/java/com/yipin/liuwanr/FastJsonRedisSerializer.java
  16. 56
      src/main/java/com/yipin/liuwanr/MAPIHttpServletRequestWrapper.java
  17. 286
      src/main/java/com/yipin/liuwanr/OfficeOnlineMethod.java
  18. 55
      src/main/java/com/yipin/liuwanr/PropertiesUtils.java
  19. 80
      src/main/java/com/yipin/liuwanr/Test.java
  20. 27
      src/main/java/com/yipin/liuwanr/TomcatConfig.java
  21. 170
      src/main/java/com/yipin/liuwanr/UserTest.java
  22. 68
      src/main/java/com/yipin/liuwanr/controller/AliyunOssController.java
  23. 28
      src/main/java/com/yipin/liuwanr/controller/AppController.java
  24. 389
      src/main/java/com/yipin/liuwanr/controller/AssesmentController.java
  25. 48
      src/main/java/com/yipin/liuwanr/controller/AssesmentRecordController.java
  26. 111
      src/main/java/com/yipin/liuwanr/controller/AttendanceController.java
  27. 82
      src/main/java/com/yipin/liuwanr/controller/BaseController.java
  28. 112
      src/main/java/com/yipin/liuwanr/controller/CityController.java
  29. 44
      src/main/java/com/yipin/liuwanr/controller/ClassController.java
  30. 577
      src/main/java/com/yipin/liuwanr/controller/CourseController.java
  31. 105
      src/main/java/com/yipin/liuwanr/controller/CoursePermissionsController.java
  32. 224
      src/main/java/com/yipin/liuwanr/controller/CustomerController.java
  33. 114
      src/main/java/com/yipin/liuwanr/controller/DemoController.java
  34. 151
      src/main/java/com/yipin/liuwanr/controller/DeviceController.java
  35. 361
      src/main/java/com/yipin/liuwanr/controller/ExperimentalClassController.java
  36. 136
      src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java
  37. 296
      src/main/java/com/yipin/liuwanr/controller/GroupController.java
  38. 107
      src/main/java/com/yipin/liuwanr/controller/MakeuplistController.java
  39. 365
      src/main/java/com/yipin/liuwanr/controller/OrderController.java
  40. 62
      src/main/java/com/yipin/liuwanr/controller/PersonalCenterController.java
  41. 170
      src/main/java/com/yipin/liuwanr/controller/PetController.java
  42. 119
      src/main/java/com/yipin/liuwanr/controller/PracticeController.java
  43. 123
      src/main/java/com/yipin/liuwanr/controller/ProfessionalArchitectureController.java
  44. 50
      src/main/java/com/yipin/liuwanr/controller/ProfessionalController.java
  45. 98
      src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java
  46. 113
      src/main/java/com/yipin/liuwanr/controller/ProvinceController.java
  47. 34
      src/main/java/com/yipin/liuwanr/controller/Response.java
  48. 154
      src/main/java/com/yipin/liuwanr/controller/SchoolController.java
  49. 147
      src/main/java/com/yipin/liuwanr/controller/ServiceConfigController.java
  50. 192
      src/main/java/com/yipin/liuwanr/controller/StaffController.java
  51. 145
      src/main/java/com/yipin/liuwanr/controller/StaffGradeController.java
  52. 149
      src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java
  53. 436
      src/main/java/com/yipin/liuwanr/controller/StuProfessionalArchitectureController.java
  54. 201
      src/main/java/com/yipin/liuwanr/controller/StudentController.java
  55. 154
      src/main/java/com/yipin/liuwanr/controller/TopicController.java
  56. 298
      src/main/java/com/yipin/liuwanr/controller/UserController.java
  57. 190
      src/main/java/com/yipin/liuwanr/controller/WopiHostContrller.java
  58. 56
      src/main/java/com/yipin/liuwanr/entity/Action.java
  59. 93
      src/main/java/com/yipin/liuwanr/entity/ApplicationPermissions.java
  60. 207
      src/main/java/com/yipin/liuwanr/entity/Assesment.java
  61. 90
      src/main/java/com/yipin/liuwanr/entity/Attendance.java
  62. 22
      src/main/java/com/yipin/liuwanr/entity/Breed.java
  63. 29
      src/main/java/com/yipin/liuwanr/entity/City.java
  64. 144
      src/main/java/com/yipin/liuwanr/entity/Comment.java
  65. 77
      src/main/java/com/yipin/liuwanr/entity/Config.java
  66. 53
      src/main/java/com/yipin/liuwanr/entity/ContractInformation.java
  67. 125
      src/main/java/com/yipin/liuwanr/entity/Course.java
  68. 56
      src/main/java/com/yipin/liuwanr/entity/CourseLink.java
  69. 102
      src/main/java/com/yipin/liuwanr/entity/CoursePermissions.java
  70. 184
      src/main/java/com/yipin/liuwanr/entity/Customer.java
  71. 204
      src/main/java/com/yipin/liuwanr/entity/Demo.java
  72. 53
      src/main/java/com/yipin/liuwanr/entity/Device.java
  73. 29
      src/main/java/com/yipin/liuwanr/entity/Discipline.java
  74. 121
      src/main/java/com/yipin/liuwanr/entity/ExperimentalClass.java
  75. 69
      src/main/java/com/yipin/liuwanr/entity/FileInfo.java
  76. 41
      src/main/java/com/yipin/liuwanr/entity/FilesResult.java
  77. 59
      src/main/java/com/yipin/liuwanr/entity/Grade.java
  78. 127
      src/main/java/com/yipin/liuwanr/entity/Group.java
  79. 73
      src/main/java/com/yipin/liuwanr/entity/ImagePart.java
  80. 31
      src/main/java/com/yipin/liuwanr/entity/Industry.java
  81. 23
      src/main/java/com/yipin/liuwanr/entity/IndustryClass.java
  82. 65
      src/main/java/com/yipin/liuwanr/entity/Makeuplist.java
  83. 145
      src/main/java/com/yipin/liuwanr/entity/Order.java
  84. 53
      src/main/java/com/yipin/liuwanr/entity/OrderVo.java
  85. 45
      src/main/java/com/yipin/liuwanr/entity/PageResult.java
  86. 181
      src/main/java/com/yipin/liuwanr/entity/PersonalCenter.java
  87. 153
      src/main/java/com/yipin/liuwanr/entity/Pet.java
  88. 102
      src/main/java/com/yipin/liuwanr/entity/PointRecord.java
  89. 60
      src/main/java/com/yipin/liuwanr/entity/Position.java
  90. 52
      src/main/java/com/yipin/liuwanr/entity/Professional.java
  91. 30
      src/main/java/com/yipin/liuwanr/entity/ProfessionalArchitecture.java
  92. 30
      src/main/java/com/yipin/liuwanr/entity/ProfessionalClass.java
  93. 186
      src/main/java/com/yipin/liuwanr/entity/Project_Management.java
  94. 21
      src/main/java/com/yipin/liuwanr/entity/Province.java
  95. 103
      src/main/java/com/yipin/liuwanr/entity/Record.java
  96. 24
      src/main/java/com/yipin/liuwanr/entity/Relationship.java
  97. 34
      src/main/java/com/yipin/liuwanr/entity/Response.java
  98. 45
      src/main/java/com/yipin/liuwanr/entity/School.java
  99. 69
      src/main/java/com/yipin/liuwanr/entity/Score.java
  100. 102
      src/main/java/com/yipin/liuwanr/entity/ServiceConfig.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,3 +1,2 @@
# liuwanr # liuwanr
服务端管理平台

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

@ -0,0 +1,372 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32744 bytes for ChunkPool::allocate
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# 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 (allocation.cpp:273), pid=15576, tid=0x0000000000004c8c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
--------------- T H R E A D ---------------
Current thread (0x000000001ab6a000): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=19596, stack(0x000000001b0c0000,0x000000001b1c0000)]
Stack: [0x000000001b0c0000,0x000000001b1c0000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Current CompileTask:
C2: 78022 5234 % 4 org.springframework.asm.ClassReader::readCode @ 71 (5089 bytes)
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0000000021428800 JavaThread "HikariPool-1 housekeeper" daemon [_thread_blocked, id=18056, stack(0x000000002c6e0000,0x000000002c7e0000)]
0x0000000021425800 JavaThread "DestroyJavaVM" [_thread_blocked, id=17412, stack(0x0000000003490000,0x0000000003590000)]
0x0000000021424800 JavaThread "http-nio-8080-Acceptor-0" daemon [_thread_in_native, id=17392, stack(0x000000002c4e0000,0x000000002c5e0000)]
0x0000000021427000 JavaThread "http-nio-8080-ClientPoller-1" daemon [_thread_in_native, id=15528, stack(0x000000002c3e0000,0x000000002c4e0000)]
0x000000002141d000 JavaThread "http-nio-8080-ClientPoller-0" daemon [_thread_in_native, id=5444, stack(0x000000002c2e0000,0x000000002c3e0000)]
0x0000000021424000 JavaThread "http-nio-8080-exec-10" daemon [_thread_blocked, id=4928, stack(0x000000002c1e0000,0x000000002c2e0000)]
0x0000000021422800 JavaThread "http-nio-8080-exec-9" daemon [_thread_blocked, id=10360, stack(0x000000002c0e0000,0x000000002c1e0000)]
0x0000000021423000 JavaThread "http-nio-8080-exec-8" daemon [_thread_blocked, id=17520, stack(0x000000002bfe0000,0x000000002c0e0000)]
0x0000000021421800 JavaThread "http-nio-8080-exec-7" daemon [_thread_blocked, id=15512, stack(0x000000002bee0000,0x000000002bfe0000)]
0x0000000021421000 JavaThread "http-nio-8080-exec-6" daemon [_thread_blocked, id=11580, stack(0x000000002bde0000,0x000000002bee0000)]
0x0000000021420000 JavaThread "http-nio-8080-exec-5" daemon [_thread_blocked, id=6548, stack(0x000000002bce0000,0x000000002bde0000)]
0x000000002141f800 JavaThread "http-nio-8080-exec-4" daemon [_thread_blocked, id=9144, stack(0x000000002bbe0000,0x000000002bce0000)]
0x000000002141e000 JavaThread "http-nio-8080-exec-3" daemon [_thread_in_native, id=7776, stack(0x000000002bae0000,0x000000002bbe0000)]
0x000000002141e800 JavaThread "http-nio-8080-exec-2" daemon [_thread_blocked, id=14460, stack(0x000000002b9e0000,0x000000002bae0000)]
0x0000000020c03800 JavaThread "http-nio-8080-exec-1" daemon [_thread_blocked, id=20024, stack(0x000000002b8e0000,0x000000002b9e0000)]
0x000000002717b800 JavaThread "NioBlockingSelector.BlockPoller-1" daemon [_thread_in_native, id=15924, stack(0x000000002b7e0000,0x000000002b8e0000)]
0x000000002717c000 JavaThread "I/O dispatcher 12" [_thread_in_native, id=17184, stack(0x000000002b4e0000,0x000000002b5e0000)]
0x000000002717a800 JavaThread "I/O dispatcher 11" [_thread_in_native, id=12408, stack(0x000000002b3e0000,0x000000002b4e0000)]
0x0000000027173000 JavaThread "I/O dispatcher 10" [_thread_in_native, id=6812, stack(0x000000002b2e0000,0x000000002b3e0000)]
0x0000000027179800 JavaThread "I/O dispatcher 9" [_thread_in_native, id=13236, stack(0x000000002b1e0000,0x000000002b2e0000)]
0x0000000027179000 JavaThread "I/O dispatcher 8" [_thread_in_native, id=18176, stack(0x000000002b0e0000,0x000000002b1e0000)]
0x0000000027171800 JavaThread "I/O dispatcher 7" [_thread_in_native, id=13044, stack(0x0000000029e60000,0x0000000029f60000)]
0x0000000027178000 JavaThread "pool-5-thread-1" [_thread_in_native, id=19500, stack(0x0000000029d60000,0x0000000029e60000)]
0x0000000027175000 JavaThread "NioSocketAcceptor-1" [_thread_in_native, id=12040, stack(0x0000000029c60000,0x0000000029d60000)]
0x0000000027176000 JavaThread "mysql-cj-abandoned-connection-cleanup" daemon [_thread_blocked, id=19876, stack(0x0000000029b60000,0x0000000029c60000)]
0x0000000027172000 JavaThread "I/O dispatcher 6" [_thread_in_native, id=1312, stack(0x0000000029a60000,0x0000000029b60000)]
0x0000000027176800 JavaThread "I/O dispatcher 5" [_thread_in_native, id=20136, stack(0x00000000276f0000,0x00000000277f0000)]
0x0000000027174800 JavaThread "I/O dispatcher 4" [_thread_in_native, id=14572, stack(0x00000000275f0000,0x00000000276f0000)]
0x000000002716d000 JavaThread "I/O dispatcher 3" [_thread_in_native, id=16156, stack(0x00000000274f0000,0x00000000275f0000)]
0x0000000027170800 JavaThread "I/O dispatcher 2" [_thread_in_native, id=344, stack(0x00000000273f0000,0x00000000274f0000)]
0x000000002716e800 JavaThread "I/O dispatcher 1" [_thread_in_native, id=5880, stack(0x00000000260e0000,0x00000000261e0000)]
0x000000002716d800 JavaThread "pool-2-thread-1" [_thread_in_native, id=17852, stack(0x0000000025fe0000,0x00000000260e0000)]
0x000000002716f000 JavaThread "container-0" [_thread_blocked, id=14840, stack(0x00000000248f0000,0x00000000249f0000)]
0x0000000020c05000 JavaThread "Catalina-utility-2" [_thread_blocked, id=15236, stack(0x00000000247f0000,0x00000000248f0000)]
0x0000000020c04000 JavaThread "Catalina-utility-1" [_thread_blocked, id=13840, stack(0x00000000246f0000,0x00000000247f0000)]
0x000000001abd7800 JavaThread "Service Thread" daemon [_thread_blocked, id=17100, stack(0x000000001b3c0000,0x000000001b4c0000)]
0x000000001ac52800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=13440, stack(0x000000001b2c0000,0x000000001b3c0000)]
0x000000001ab7e000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=6904, stack(0x000000001b1c0000,0x000000001b2c0000)]
=>0x000000001ab6a000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=19596, stack(0x000000001b0c0000,0x000000001b1c0000)]
0x000000001a023000 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=4048, stack(0x000000001a7c0000,0x000000001a8c0000)]
0x000000001a022000 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=20020, stack(0x000000001a6c0000,0x000000001a7c0000)]
0x000000001a017000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=19684, stack(0x000000001a5c0000,0x000000001a6c0000)]
0x000000001a016800 JavaThread "Attach Listener" daemon [_thread_blocked, id=12840, stack(0x000000001a4c0000,0x000000001a5c0000)]
0x0000000018650800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=13172, stack(0x000000001a3c0000,0x000000001a4c0000)]
0x0000000018631800 JavaThread "Finalizer" daemon [_thread_blocked, id=17300, stack(0x0000000019ec0000,0x0000000019fc0000)]
0x000000000368d800 JavaThread "Reference Handler" daemon [_thread_blocked, id=19712, stack(0x0000000019dc0000,0x0000000019ec0000)]
Other Threads:
0x0000000018608800 VMThread [stack: 0x0000000019cc0000,0x0000000019dc0000] [id=16136]
0x000000001ac15800 WatcherThread [stack: 0x000000001b4c0000,0x000000001b5c0000] [id=10380]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap:
PSYoungGen total 207872K, used 76838K [0x00000000d5c00000, 0x00000000e5d00000, 0x0000000100000000)
eden space 193024K, 39% used [0x00000000d5c00000,0x00000000da709a70,0x00000000e1880000)
from space 14848K, 0% used [0x00000000e1880000,0x00000000e1880000,0x00000000e2700000)
to space 17920K, 0% used [0x00000000e4b80000,0x00000000e4b80000,0x00000000e5d00000)
ParOldGen total 135680K, used 26660K [0x0000000081400000, 0x0000000089880000, 0x00000000d5c00000)
object space 135680K, 19% used [0x0000000081400000,0x0000000082e09180,0x0000000089880000)
Metaspace used 60281K, capacity 63082K, committed 63360K, reserved 1103872K
class space used 7728K, capacity 8219K, committed 8320K, reserved 1048576K
Card table byte_map: [0x0000000012c50000,0x0000000013050000] byte_map_base: 0x0000000012846000
Marking Bits: (ParMarkBitMap*) 0x0000000061673e30
Begin Bits: [0x0000000013900000, 0x00000000158b0000)
End Bits: [0x00000000158b0000, 0x0000000017860000)
Polling page: 0x00000000017f0000
CodeCache: size=245760Kb used=14236Kb max_used=14726Kb free=231523Kb
bounds [0x0000000003890000, 0x0000000004740000, 0x0000000012890000]
total_blobs=5188 nmethods=4620 adapters=488
compilation: enabled
Compilation events (10 events):
Event: 78.012 Thread 0x000000001ac52800 nmethod 5230 0x0000000003fb1650 code [0x0000000003fb17c0, 0x0000000003fb1a08]
Event: 78.015 Thread 0x000000001ab7e000 5231 4 java.util.concurrent.ConcurrentHashMap::put (8 bytes)
Event: 78.016 Thread 0x000000001ab7e000 nmethod 5231 0x00000000039c6f10 code [0x00000000039c7060, 0x00000000039c70e8]
Event: 78.017 Thread 0x000000001ac52800 5232 3 org.springframework.asm.MethodVisitor::visitVarInsn (17 bytes)
Event: 78.017 Thread 0x000000001ac52800 nmethod 5232 0x0000000003fb1190 code [0x0000000003fb1300, 0x0000000003fb1568]
Event: 78.017 Thread 0x000000001ac52800 5233 3 org.springframework.asm.Label::accept (65 bytes)
Event: 78.017 Thread 0x000000001ab6a000 5234 % 4 org.springframework.asm.ClassReader::readCode @ 71 (5089 bytes)
Event: 78.017 Thread 0x000000001ac52800 nmethod 5233 0x0000000003a1f790 code [0x0000000003a1f940, 0x0000000003a1fec8]
Event: 78.017 Thread 0x000000001ac52800 5235 3 org.springframework.beans.TypeConverterDelegate::<init> (7 bytes)
Event: 78.017 Thread 0x000000001ac52800 nmethod 5235 0x0000000003fb0cd0 code [0x0000000003fb0e40, 0x0000000003fb1070]
GC Heap History (10 events):
Event: 3.275 GC heap before
{Heap before GC invocations=10 (full 2):
PSYoungGen total 169472K, used 9720K [0x00000000d5c00000, 0x00000000e3300000, 0x0000000100000000)
eden space 159744K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000df800000)
from space 9728K, 99% used [0x00000000e0300000,0x00000000e0c7e168,0x00000000e0c80000)
to space 11264K, 0% used [0x00000000df800000,0x00000000df800000,0x00000000e0300000)
ParOldGen total 57856K, used 9805K [0x0000000081400000, 0x0000000084c80000, 0x00000000d5c00000)
object space 57856K, 16% used [0x0000000081400000,0x0000000081d93650,0x0000000084c80000)
Metaspace used 34210K, capacity 35274K, committed 35416K, reserved 1081344K
class space used 4296K, capacity 4539K, committed 4608K, reserved 1048576K
Event: 3.327 GC heap after
Heap after GC invocations=10 (full 2):
PSYoungGen total 169472K, used 0K [0x00000000d5c00000, 0x00000000e3300000, 0x0000000100000000)
eden space 159744K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000df800000)
from space 9728K, 0% used [0x00000000e0300000,0x00000000e0300000,0x00000000e0c80000)
to space 11264K, 0% used [0x00000000df800000,0x00000000df800000,0x00000000e0300000)
ParOldGen total 93696K, used 15699K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 16% used [0x0000000081400000,0x0000000082354f08,0x0000000086f80000)
Metaspace used 34210K, capacity 35274K, committed 35416K, reserved 1081344K
class space used 4296K, capacity 4539K, committed 4608K, reserved 1048576K
}
Event: 4.719 GC heap before
{Heap before GC invocations=11 (full 2):
PSYoungGen total 169472K, used 159744K [0x00000000d5c00000, 0x00000000e3300000, 0x0000000100000000)
eden space 159744K, 100% used [0x00000000d5c00000,0x00000000df800000,0x00000000df800000)
from space 9728K, 0% used [0x00000000e0300000,0x00000000e0300000,0x00000000e0c80000)
to space 11264K, 0% used [0x00000000df800000,0x00000000df800000,0x00000000e0300000)
ParOldGen total 93696K, used 15699K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 16% used [0x0000000081400000,0x0000000082354f08,0x0000000086f80000)
Metaspace used 42440K, capacity 44080K, committed 44160K, reserved 1087488K
class space used 5384K, capacity 5710K, committed 5760K, reserved 1048576K
Event: 4.728 GC heap after
Heap after GC invocations=11 (full 2):
PSYoungGen total 171008K, used 10247K [0x00000000d5c00000, 0x00000000e3400000, 0x0000000100000000)
eden space 159744K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000df800000)
from space 11264K, 90% used [0x00000000df800000,0x00000000e0201fb8,0x00000000e0300000)
to space 12800K, 0% used [0x00000000e2780000,0x00000000e2780000,0x00000000e3400000)
ParOldGen total 93696K, used 15707K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 16% used [0x0000000081400000,0x0000000082356f08,0x0000000086f80000)
Metaspace used 42440K, capacity 44080K, committed 44160K, reserved 1087488K
class space used 5384K, capacity 5710K, committed 5760K, reserved 1048576K
}
Event: 6.082 GC heap before
{Heap before GC invocations=12 (full 2):
PSYoungGen total 171008K, used 169991K [0x00000000d5c00000, 0x00000000e3400000, 0x0000000100000000)
eden space 159744K, 100% used [0x00000000d5c00000,0x00000000df800000,0x00000000df800000)
from space 11264K, 90% used [0x00000000df800000,0x00000000e0201fb8,0x00000000e0300000)
to space 12800K, 0% used [0x00000000e2780000,0x00000000e2780000,0x00000000e3400000)
ParOldGen total 93696K, used 15707K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 16% used [0x0000000081400000,0x0000000082356f08,0x0000000086f80000)
Metaspace used 50590K, capacity 52418K, committed 52736K, reserved 1095680K
class space used 6443K, capacity 6809K, committed 6912K, reserved 1048576K
Event: 6.093 GC heap after
Heap after GC invocations=12 (full 2):
PSYoungGen total 205824K, used 12771K [0x00000000d5c00000, 0x00000000e3580000, 0x0000000100000000)
eden space 193024K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e1880000)
from space 12800K, 99% used [0x00000000e2780000,0x00000000e33f8f18,0x00000000e3400000)
to space 14848K, 0% used [0x00000000e1880000,0x00000000e1880000,0x00000000e2700000)
ParOldGen total 93696K, used 17349K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 18% used [0x0000000081400000,0x00000000824f1550,0x0000000086f80000)
Metaspace used 50590K, capacity 52418K, committed 52736K, reserved 1095680K
class space used 6443K, capacity 6809K, committed 6912K, reserved 1048576K
}
Event: 14.647 GC heap before
{Heap before GC invocations=13 (full 2):
PSYoungGen total 205824K, used 190071K [0x00000000d5c00000, 0x00000000e3580000, 0x0000000100000000)
eden space 193024K, 91% used [0x00000000d5c00000,0x00000000e0924e40,0x00000000e1880000)
from space 12800K, 99% used [0x00000000e2780000,0x00000000e33f8f18,0x00000000e3400000)
to space 14848K, 0% used [0x00000000e1880000,0x00000000e1880000,0x00000000e2700000)
ParOldGen total 93696K, used 17349K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 18% used [0x0000000081400000,0x00000000824f1550,0x0000000086f80000)
Metaspace used 56331K, capacity 58996K, committed 59008K, reserved 1099776K
class space used 7298K, capacity 7800K, committed 7808K, reserved 1048576K
Event: 14.660 GC heap after
Heap after GC invocations=13 (full 2):
PSYoungGen total 207872K, used 14845K [0x00000000d5c00000, 0x00000000e5d00000, 0x0000000100000000)
eden space 193024K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e1880000)
from space 14848K, 99% used [0x00000000e1880000,0x00000000e26ff668,0x00000000e2700000)
to space 17920K, 0% used [0x00000000e4b80000,0x00000000e4b80000,0x00000000e5d00000)
ParOldGen total 93696K, used 19931K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 21% used [0x0000000081400000,0x0000000082776dd0,0x0000000086f80000)
Metaspace used 56331K, capacity 58996K, committed 59008K, reserved 1099776K
class space used 7298K, capacity 7800K, committed 7808K, reserved 1048576K
}
Event: 14.660 GC heap before
{Heap before GC invocations=14 (full 3):
PSYoungGen total 207872K, used 14845K [0x00000000d5c00000, 0x00000000e5d00000, 0x0000000100000000)
eden space 193024K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e1880000)
from space 14848K, 99% used [0x00000000e1880000,0x00000000e26ff668,0x00000000e2700000)
to space 17920K, 0% used [0x00000000e4b80000,0x00000000e4b80000,0x00000000e5d00000)
ParOldGen total 93696K, used 19931K [0x0000000081400000, 0x0000000086f80000, 0x00000000d5c00000)
object space 93696K, 21% used [0x0000000081400000,0x0000000082776dd0,0x0000000086f80000)
Metaspace used 56331K, capacity 58996K, committed 59008K, reserved 1099776K
class space used 7298K, capacity 7800K, committed 7808K, reserved 1048576K
Event: 14.760 GC heap after
Heap after GC invocations=14 (full 3):
PSYoungGen total 207872K, used 0K [0x00000000d5c00000, 0x00000000e5d00000, 0x0000000100000000)
eden space 193024K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e1880000)
from space 14848K, 0% used [0x00000000e1880000,0x00000000e1880000,0x00000000e2700000)
to space 17920K, 0% used [0x00000000e4b80000,0x00000000e4b80000,0x00000000e5d00000)
ParOldGen total 135680K, used 26660K [0x0000000081400000, 0x0000000089880000, 0x00000000d5c00000)
object space 135680K, 19% used [0x0000000081400000,0x0000000082e09180,0x0000000089880000)
Metaspace used 56331K, capacity 58996K, committed 59008K, reserved 1099776K
class space used 7298K, capacity 7800K, committed 7808K, reserved 1048576K
}
Deoptimization events (10 events):
Event: 30.672 Thread 0x000000002141e800 Uncommon trap: reason=unhandled action=none pc=0x0000000003e542d4 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 30.674 Thread 0x000000002141e800 Uncommon trap: reason=unhandled action=none pc=0x0000000003e542d4 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 30.674 Thread 0x000000002141e800 Uncommon trap: reason=unhandled action=none pc=0x0000000003e542d4 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 30.675 Thread 0x000000002141e800 Uncommon trap: reason=unhandled action=none pc=0x0000000003e542d4 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 30.675 Thread 0x000000002141e800 Uncommon trap: reason=unhandled action=none pc=0x0000000003e542d4 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 30.676 Thread 0x000000002141e800 Uncommon trap: reason=unhandled action=none pc=0x0000000003e542d4 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 30.677 Thread 0x000000002141e800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003d4bbfc method=sun.nio.cs.UTF_8$Decoder.decode([BII[C)I @ 30
Event: 30.679 Thread 0x000000002141e800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003c6cb40 method=java.util.AbstractList$Itr.next()Ljava/lang/Object; @ 14
Event: 78.014 Thread 0x000000002141e000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000042afecc method=java.lang.Class.reflectionData()Ljava/lang/Class$ReflectionData; @ 37
Event: 78.017 Thread 0x000000002141e000 Uncommon trap: reason=range_check action=none pc=0x0000000003c6ab9c method=sun.reflect.generics.parser.SignatureParser.current()C @ 34
Classes redefined (1 events):
Event: 52.381 Thread 0x0000000018608800 redefined class name=com.yipin.liuwanr.controller.CourseController, count=1
Internal exceptions (10 events):
Event: 7.128 Thread 0x0000000003599000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 323> (0x00000000de624b68) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 7.128 Thread 0x0000000003599000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 195> (0x00000000de627b40) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 7.128 Thread 0x0000000003599000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 126> (0x00000000de629f58) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 7.128 Thread 0x0000000003599000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 273> (0x00000000de62d050) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 7.128 Thread 0x0000000003599000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 325> (0x00000000de630da0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 14.573 Thread 0x0000000020c03800 Implicit null exception at 0x00000000046f709b to 0x00000000046fc599
Event: 30.072 Thread 0x0000000020c03800 Implicit null exception at 0x000000000450915e to 0x0000000004511789
Event: 30.074 Thread 0x0000000020c03800 Exception <a 'java/lang/NoSuchMethodError': java.lang.Object.lambda$thenComparing$36697e65$1(Ljava/util/Comparator;Ljava/lang/Object;Ljava/lang/Object;)I> (0x00000000d9271b80) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspo
Event: 30.615 Thread 0x000000002141e800 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 90> (0x00000000d9b78378) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 78.018 Thread 0x000000002141e000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 86> (0x00000000da6308b8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Events (10 events):
Event: 78.018 Executing VM operation: RevokeBias
Event: 78.018 Executing VM operation: RevokeBias done
Event: 78.018 Thread 0x000000002141e000 DEOPT PACKING pc=0x0000000003fb18e9 sp=0x000000002bbdb140
Event: 78.018 Thread 0x000000002141e000 DEOPT UNPACKING pc=0x00000000038d7890 sp=0x000000002bbdae80 mode 1
Event: 78.018 Thread 0x000000002141e000 DEOPT PACKING pc=0x0000000003fb18e9 sp=0x000000002bbdb140
Event: 78.018 Thread 0x000000002141e000 DEOPT UNPACKING pc=0x00000000038d7890 sp=0x000000002bbdae80 mode 1
Event: 78.018 Thread 0x000000002141e000 DEOPT PACKING pc=0x0000000003fb18e9 sp=0x000000002bbdb140
Event: 78.018 Thread 0x000000002141e000 DEOPT UNPACKING pc=0x00000000038d7890 sp=0x000000002bbdae80 mode 1
Event: 78.019 Thread 0x000000002141e000 DEOPT PACKING pc=0x0000000003fb18e9 sp=0x000000002bbdb140
Event: 78.019 Thread 0x000000002141e000 DEOPT UNPACKING pc=0x00000000038d7890 sp=0x000000002bbdae80 mode 1
Dynamic libraries:
0x00007ff68f810000 - 0x00007ff68f847000 C:\Program Files\Java\jre1.8.0_191\bin\javaw.exe
0x00007fff4ffb0000 - 0x00007fff5019d000 C:\Windows\SYSTEM32\ntdll.dll
0x00007fff4f730000 - 0x00007fff4f7e3000 C:\Windows\System32\KERNEL32.DLL
0x00007fff4cbe0000 - 0x00007fff4ce73000 C:\Windows\System32\KERNELBASE.dll
0x00007fff4fc70000 - 0x00007fff4fd13000 C:\Windows\System32\ADVAPI32.dll
0x00007fff4d7d0000 - 0x00007fff4d86e000 C:\Windows\System32\msvcrt.dll
0x00007fff4f390000 - 0x00007fff4f42e000 C:\Windows\System32\sechost.dll
0x00007fff4d510000 - 0x00007fff4d632000 C:\Windows\System32\RPCRT4.dll
0x00007fff4fd30000 - 0x00007fff4fec7000 C:\Windows\System32\USER32.dll
0x00007fff4cee0000 - 0x00007fff4cf00000 C:\Windows\System32\win32u.dll
0x00007fff4d6a0000 - 0x00007fff4d6c9000 C:\Windows\System32\GDI32.dll
0x00007fff4c070000 - 0x00007fff4c209000 C:\Windows\System32\gdi32full.dll
0x00007fff4cf80000 - 0x00007fff4d020000 C:\Windows\System32\msvcp_win.dll
0x00007fff4d0d0000 - 0x00007fff4d1ca000 C:\Windows\System32\ucrtbase.dll
0x00007fff3c5f0000 - 0x00007fff3c869000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17763.914_none_05b346b2072102f2\COMCTL32.dll
0x00007fff4d1d0000 - 0x00007fff4d4fc000 C:\Windows\System32\combase.dll
0x00007fff4cf00000 - 0x00007fff4cf7e000 C:\Windows\System32\bcryptPrimitives.dll
0x00007fff4d7a0000 - 0x00007fff4d7ce000 C:\Windows\System32\IMM32.DLL
0x0000000061a00000 - 0x0000000061ad2000 C:\Program Files\Java\jre1.8.0_191\bin\msvcr100.dll
0x0000000060e50000 - 0x00000000616f4000 C:\Program Files\Java\jre1.8.0_191\bin\server\jvm.dll
0x00007fff4fd20000 - 0x00007fff4fd28000 C:\Windows\System32\PSAPI.DLL
0x00007fff4a200000 - 0x00007fff4a209000 C:\Windows\SYSTEM32\WSOCK32.dll
0x00007fff49fc0000 - 0x00007fff49fe4000 C:\Windows\SYSTEM32\WINMM.dll
0x00007fff42090000 - 0x00007fff4209a000 C:\Windows\SYSTEM32\VERSION.dll
0x00007fff4f120000 - 0x00007fff4f18d000 C:\Windows\System32\WS2_32.dll
0x00007fff49c30000 - 0x00007fff49c5d000 C:\Windows\SYSTEM32\winmmbase.dll
0x00007fff4cb90000 - 0x00007fff4cbda000 C:\Windows\System32\cfgmgr32.dll
0x0000000060d60000 - 0x0000000060d6f000 C:\Program Files\Java\jre1.8.0_191\bin\verify.dll
0x0000000060d30000 - 0x0000000060d59000 C:\Program Files\Java\jre1.8.0_191\bin\java.dll
0x00000000619c0000 - 0x00000000619f5000 C:\Program Files\Java\jre1.8.0_191\bin\jdwp.dll
0x00000000619b0000 - 0x00000000619b8000 C:\Program Files\Java\jre1.8.0_191\bin\npt.dll
0x0000000060490000 - 0x00000000604b3000 C:\Program Files\Java\jre1.8.0_191\bin\instrument.dll
0x0000000060d10000 - 0x0000000060d26000 C:\Program Files\Java\jre1.8.0_191\bin\zip.dll
0x00007fff4dbc0000 - 0x00007fff4f0b4000 C:\Windows\System32\SHELL32.dll
0x00007fff4fed0000 - 0x00007fff4ff78000 C:\Windows\System32\shcore.dll
0x00007fff4c440000 - 0x00007fff4cb8d000 C:\Windows\System32\windows.storage.dll
0x00007fff4c040000 - 0x00007fff4c064000 C:\Windows\System32\profapi.dll
0x00007fff4bfe0000 - 0x00007fff4c03d000 C:\Windows\System32\powrprof.dll
0x00007fff4f220000 - 0x00007fff4f272000 C:\Windows\System32\shlwapi.dll
0x00007fff4bfa0000 - 0x00007fff4bfb1000 C:\Windows\System32\kernel.appcore.dll
0x00007fff4c420000 - 0x00007fff4c437000 C:\Windows\System32\cryptsp.dll
0x00000000619a0000 - 0x00000000619a9000 C:\Program Files\Java\jre1.8.0_191\bin\dt_socket.dll
0x00007fff3d460000 - 0x00007fff3d476000 C:\Windows\system32\napinsp.dll
0x00007fff3d440000 - 0x00007fff3d45a000 C:\Windows\system32\pnrpnsp.dll
0x00007fff4b780000 - 0x00007fff4b7e7000 C:\Windows\System32\mswsock.dll
0x00007fff4b4e0000 - 0x00007fff4b5a6000 C:\Windows\SYSTEM32\DNSAPI.dll
0x00007fff4d500000 - 0x00007fff4d508000 C:\Windows\System32\NSI.dll
0x00007fff4b4a0000 - 0x00007fff4b4dd000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007fff3c110000 - 0x00007fff3c11e000 C:\Windows\System32\winrnr.dll
0x00007fff487f0000 - 0x00007fff4880b000 C:\Windows\system32\NLAapi.dll
0x00007fff42120000 - 0x00007fff42135000 C:\Windows\system32\wshbth.dll
0x00007fff40ab0000 - 0x00007fff40b29000 C:\Windows\System32\fwpuclnt.dll
0x00007fff4c210000 - 0x00007fff4c236000 C:\Windows\System32\bcrypt.dll
0x00007fff40660000 - 0x00007fff4066a000 C:\Windows\System32\rasadhlp.dll
0x0000000060480000 - 0x000000006048d000 C:\Program Files\Java\jre1.8.0_191\bin\management.dll
0x0000000060cf0000 - 0x0000000060d0a000 C:\Program Files\Java\jre1.8.0_191\bin\net.dll
0x0000000060cd0000 - 0x0000000060ce1000 C:\Program Files\Java\jre1.8.0_191\bin\nio.dll
0x00007fff4b300000 - 0x00007fff4b333000 C:\Windows\system32\rsaenh.dll
0x00007fff4bea0000 - 0x00007fff4bec8000 C:\Windows\SYSTEM32\USERENV.dll
0x00007fff4b950000 - 0x00007fff4b95c000 C:\Windows\SYSTEM32\CRYPTBASE.dll
0x00007fff41df0000 - 0x00007fff41e06000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007fff42070000 - 0x00007fff4208c000 C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x0000000060c80000 - 0x0000000060ca4000 C:\Program Files\Java\jre1.8.0_191\bin\sunec.dll
VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:60430 -javaagent:C:\Users\Admin\eclipse\java-2018-09\eclipse\configuration\org.eclipse.osgi\237\0\.cp\lib\javaagent-shaded.jar -Dfile.encoding=UTF-8
java_command: com.yipin.liuwanr.App
java_class_path (initial): D:\meirenhui\new_meirenhui\liuwanr\target\classes;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.1.5.RELEASE\spring-boot-starter-web-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter\2.1.5.RELEASE\spring-boot-starter-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot\2.1.5.RELEASE\spring-boot-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.1.5.RELEASE\spring-boot-autoconfigure-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.1.5.RELEASE\spring-boot-starter-json-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.8\jackson-databind-2.9.8.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.8\jackson-datatype-jdk8-2.9.8.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.8\jackson-datatype-jsr310-2.9.8.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.8\jackson-module-parameter-names-2.9.8.jar;C:\Users\Admin\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.16.Final\hibernate-validator-6.0.16.Final.jar;C:\Users\Admin\.m2\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;C:\Users\Admin\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;C:\Users\Admin\.m2\repository\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-web\5.1.7.RELEASE\spring-web-5.1.7.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-beans\5.1.7.RELEASE\sp
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
CLASSPATH=.;C:\Program Files\Java\jdk1.8.0_191\lib;C:\Program Files\Java\jdk1.8.0_191\lib\tools.jar
PATH=C:/Program Files/Java/jre1.8.0_191/bin/server;C:/Program Files/Java/jre1.8.0_191/bin;C:/Program Files/Java/jre1.8.0_191/lib/amd64;C:\Program Files (x86)\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\Java\jdk1.8.0_191\bin;C:\Program Files\Java\jdk1.8.0_191\jre\bin;D:\nodejs\;D:\TortoiseSVN\bin;D:\apache-maven-3.6.2\bin;D:\python\Scripts\;D:\python\;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Users\Admin\AppData\Roaming\npm;C:\Users\Admin\AppData\Local\BypassRuntm;C:\Users\Admin\Desktop;
USERNAME=Admin
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 10.0 , 64 bit Build 17763 (10.0.17763.475)
CPU:total 6 (initial active 6) (6 cores per cpu, 1 threads per core) family 6 model 158 stepping 13, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, tsc, tscinvbit, bmi1, bmi2, adx
Memory: 4k page, physical 8304672k(1425060k free), swap 16693280k(896k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (25.191-b12) for windows-amd64 JRE (1.8.0_191-b12), built on Oct 6 2018 09:29:03 by "java_re" with MS VC++ 10.0 (VS2010)
time: Fri Jan 10 18:51:06 2020
elapsed time: 78 seconds (0d 0h 1m 18s)

@ -0,0 +1,340 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 3589296 bytes for Chunk::new
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# 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 (allocation.cpp:390), pid=2816, tid=0x0000000000004ce0
#
# JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
--------------- T H R E A D ---------------
Current thread (0x000000001aad4000): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=19680, stack(0x000000001b030000,0x000000001b130000)]
Stack: [0x000000001b030000,0x000000001b130000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
Current CompileTask:
C2: 4911 3783 ! 4 java.net.URLClassLoader$1::run (63 bytes)
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000001c658000 JavaThread "container-0" [_thread_blocked, id=7204, stack(0x0000000021b30000,0x0000000021c30000)]
0x000000001a04f000 JavaThread "Catalina-utility-2" [_thread_blocked, id=14440, stack(0x0000000021a30000,0x0000000021b30000)]
0x0000000024607800 JavaThread "Catalina-utility-1" [_thread_blocked, id=18364, stack(0x0000000021930000,0x0000000021a30000)]
0x000000001aa76000 JavaThread "Service Thread" daemon [_thread_blocked, id=18708, stack(0x000000001b230000,0x000000001b330000)]
0x000000001aad5000 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=2884, stack(0x000000001b130000,0x000000001b230000)]
=>0x000000001aad4000 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=19680, stack(0x000000001b030000,0x000000001b130000)]
0x000000001a928000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=10852, stack(0x000000001af30000,0x000000001b030000)]
0x0000000019e92800 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=16264, stack(0x000000001a630000,0x000000001a730000)]
0x0000000019e91800 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=16096, stack(0x000000001a530000,0x000000001a630000)]
0x00000000184ae000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=6184, stack(0x000000001a430000,0x000000001a530000)]
0x00000000184a0000 JavaThread "Attach Listener" daemon [_thread_blocked, id=3284, stack(0x000000001a330000,0x000000001a430000)]
0x0000000019e86800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=12824, stack(0x000000001a230000,0x000000001a330000)]
0x0000000018481800 JavaThread "Finalizer" daemon [_thread_blocked, id=20252, stack(0x0000000019d30000,0x0000000019e30000)]
0x00000000035dd800 JavaThread "Reference Handler" daemon [_thread_blocked, id=16852, stack(0x0000000019c30000,0x0000000019d30000)]
0x00000000034e9000 JavaThread "main" [_thread_in_vm, id=740, stack(0x0000000003330000,0x0000000003430000)]
Other Threads:
0x0000000018458800 VMThread [stack: 0x0000000019b30000,0x0000000019c30000] [id=13904]
0x000000001a9fb000 WatcherThread [stack: 0x000000001b330000,0x000000001b430000] [id=9376]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap:
PSYoungGen total 242176K, used 176643K [0x00000000d5c00000, 0x00000000eb580000, 0x0000000100000000)
eden space 229888K, 76% used [0x00000000d5c00000,0x00000000e0880c70,0x00000000e3c80000)
from space 12288K, 0% used [0x00000000e3c80000,0x00000000e3c80000,0x00000000e4880000)
to space 11776K, 0% used [0x00000000eaa00000,0x00000000eaa00000,0x00000000eb580000)
ParOldGen total 48640K, used 12976K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 26% used [0x0000000081400000,0x00000000820ac100,0x0000000084380000)
Metaspace used 43787K, capacity 45434K, committed 45520K, reserved 1089536K
class space used 5547K, capacity 5853K, committed 5888K, reserved 1048576K
Card table byte_map: [0x0000000012aa0000,0x0000000012ea0000] byte_map_base: 0x0000000012696000
Marking Bits: (ParMarkBitMap*) 0x0000000061673e30
Begin Bits: [0x0000000013750000, 0x0000000015700000)
End Bits: [0x0000000015700000, 0x00000000176b0000)
Polling page: 0x0000000001630000
CodeCache: size=245760Kb used=11354Kb max_used=12705Kb free=234405Kb
bounds [0x00000000036e0000, 0x0000000004360000, 0x00000000126e0000]
total_blobs=4036 nmethods=3565 adapters=391
compilation: enabled
Compilation events (10 events):
Event: 4.884 Thread 0x000000001aad5000 3868 2 java.lang.invoke.MethodHandles$Lookup::getDirectMethodNoSecurityManager (12 bytes)
Event: 4.884 Thread 0x000000001aad5000 nmethod 3868 0x0000000003ac9550 code [0x0000000003ac96c0, 0x0000000003ac9868]
Event: 4.884 Thread 0x000000001aad5000 3869 2 java.util.Collections::unmodifiableList (27 bytes)
Event: 4.884 Thread 0x000000001aad5000 nmethod 3869 0x0000000003a4e010 code [0x0000000003a4e1a0, 0x0000000003a4e5f8]
Event: 4.898 Thread 0x000000001aad5000 3870 2 jdk.internal.org.objectweb.asm.FieldWriter::put (472 bytes)
Event: 4.899 Thread 0x000000001aad5000 nmethod 3870 0x00000000039a7f10 code [0x00000000039a8220, 0x00000000039a8ad8]
Event: 4.901 Thread 0x000000001aad5000 3871 2 org.springframework.core.ResolvableType::forMethodParameter (50 bytes)
Event: 4.902 Thread 0x000000001aad5000 nmethod 3871 0x00000000038fb990 code [0x00000000038fbb80, 0x00000000038fbff8]
Event: 4.902 Thread 0x000000001aad5000 3872 ! 2 java.lang.invoke.MethodHandles$Lookup::canBeCached (146 bytes)
Event: 4.903 Thread 0x000000001aad5000 nmethod 3872 0x00000000038a4e50 code [0x00000000038a50c0, 0x00000000038a5c68]
GC Heap History (10 events):
Event: 1.673 GC heap before
{Heap before GC invocations=7 (full 1):
PSYoungGen total 140800K, used 5443K [0x00000000d5c00000, 0x00000000dee00000, 0x0000000100000000)
eden space 133120K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000dde00000)
from space 7680K, 70% used [0x00000000de680000,0x00000000debd0ef0,0x00000000dee00000)
to space 8192K, 0% used [0x00000000dde00000,0x00000000dde00000,0x00000000de600000)
ParOldGen total 87552K, used 3665K [0x0000000081400000, 0x0000000086980000, 0x00000000d5c00000)
object space 87552K, 4% used [0x0000000081400000,0x00000000817946d8,0x0000000086980000)
Metaspace used 21019K, capacity 21556K, committed 21628K, reserved 1069056K
class space used 2675K, capacity 2808K, committed 2816K, reserved 1048576K
Event: 1.698 GC heap after
Heap after GC invocations=7 (full 1):
PSYoungGen total 140800K, used 0K [0x00000000d5c00000, 0x00000000dee00000, 0x0000000100000000)
eden space 133120K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000dde00000)
from space 7680K, 0% used [0x00000000de680000,0x00000000de680000,0x00000000dee00000)
to space 8192K, 0% used [0x00000000dde00000,0x00000000dde00000,0x00000000de600000)
ParOldGen total 48640K, used 5775K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 11% used [0x0000000081400000,0x00000000819a3e68,0x0000000084380000)
Metaspace used 21017K, capacity 21550K, committed 21628K, reserved 1069056K
class space used 2674K, capacity 2807K, committed 2816K, reserved 1048576K
}
Event: 2.315 GC heap before
{Heap before GC invocations=8 (full 1):
PSYoungGen total 140800K, used 133120K [0x00000000d5c00000, 0x00000000dee00000, 0x0000000100000000)
eden space 133120K, 100% used [0x00000000d5c00000,0x00000000dde00000,0x00000000dde00000)
from space 7680K, 0% used [0x00000000de680000,0x00000000de680000,0x00000000dee00000)
to space 8192K, 0% used [0x00000000dde00000,0x00000000dde00000,0x00000000de600000)
ParOldGen total 48640K, used 5775K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 11% used [0x0000000081400000,0x00000000819a3e68,0x0000000084380000)
Metaspace used 28370K, capacity 29152K, committed 29440K, reserved 1075200K
class space used 3567K, capacity 3764K, committed 3840K, reserved 1048576K
Event: 2.325 GC heap after
Heap after GC invocations=8 (full 1):
PSYoungGen total 141312K, used 8190K [0x00000000d5c00000, 0x00000000e5480000, 0x0000000100000000)
eden space 133120K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000dde00000)
from space 8192K, 99% used [0x00000000dde00000,0x00000000de5ffb60,0x00000000de600000)
to space 9728K, 0% used [0x00000000e4b00000,0x00000000e4b00000,0x00000000e5480000)
ParOldGen total 48640K, used 7185K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 14% used [0x0000000081400000,0x0000000081b044b0,0x0000000084380000)
Metaspace used 28370K, capacity 29152K, committed 29440K, reserved 1075200K
class space used 3567K, capacity 3764K, committed 3840K, reserved 1048576K
}
Event: 3.319 GC heap before
{Heap before GC invocations=9 (full 1):
PSYoungGen total 141312K, used 141310K [0x00000000d5c00000, 0x00000000e5480000, 0x0000000100000000)
eden space 133120K, 100% used [0x00000000d5c00000,0x00000000dde00000,0x00000000dde00000)
from space 8192K, 99% used [0x00000000dde00000,0x00000000de5ffb60,0x00000000de600000)
to space 9728K, 0% used [0x00000000e4b00000,0x00000000e4b00000,0x00000000e5480000)
ParOldGen total 48640K, used 7185K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 14% used [0x0000000081400000,0x0000000081b044b0,0x0000000084380000)
Metaspace used 34078K, capacity 35158K, committed 35328K, reserved 1079296K
class space used 4283K, capacity 4505K, committed 4608K, reserved 1048576K
Event: 3.331 GC heap after
Heap after GC invocations=9 (full 1):
PSYoungGen total 239616K, used 9724K [0x00000000d5c00000, 0x00000000e5480000, 0x0000000100000000)
eden space 229888K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e3c80000)
from space 9728K, 99% used [0x00000000e4b00000,0x00000000e547f0a8,0x00000000e5480000)
to space 12288K, 0% used [0x00000000e3c80000,0x00000000e3c80000,0x00000000e4880000)
ParOldGen total 48640K, used 9253K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 19% used [0x0000000081400000,0x0000000081d096f0,0x0000000084380000)
Metaspace used 34078K, capacity 35158K, committed 35328K, reserved 1079296K
class space used 4283K, capacity 4505K, committed 4608K, reserved 1048576K
}
Event: 3.483 GC heap before
{Heap before GC invocations=10 (full 1):
PSYoungGen total 239616K, used 30476K [0x00000000d5c00000, 0x00000000e5480000, 0x0000000100000000)
eden space 229888K, 9% used [0x00000000d5c00000,0x00000000d7044070,0x00000000e3c80000)
from space 9728K, 99% used [0x00000000e4b00000,0x00000000e547f0a8,0x00000000e5480000)
to space 12288K, 0% used [0x00000000e3c80000,0x00000000e3c80000,0x00000000e4880000)
ParOldGen total 48640K, used 9253K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 19% used [0x0000000081400000,0x0000000081d096f0,0x0000000084380000)
Metaspace used 34865K, capacity 35932K, committed 36048K, reserved 1081344K
class space used 4378K, capacity 4606K, committed 4608K, reserved 1048576K
Event: 3.490 GC heap after
Heap after GC invocations=10 (full 1):
PSYoungGen total 242176K, used 7666K [0x00000000d5c00000, 0x00000000eb580000, 0x0000000100000000)
eden space 229888K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e3c80000)
from space 12288K, 62% used [0x00000000e3c80000,0x00000000e43fcbf0,0x00000000e4880000)
to space 11776K, 0% used [0x00000000eaa00000,0x00000000eaa00000,0x00000000eb580000)
ParOldGen total 48640K, used 9261K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 19% used [0x0000000081400000,0x0000000081d0b6f0,0x0000000084380000)
Metaspace used 34865K, capacity 35932K, committed 36048K, reserved 1081344K
class space used 4378K, capacity 4606K, committed 4608K, reserved 1048576K
}
Event: 3.490 GC heap before
{Heap before GC invocations=11 (full 2):
PSYoungGen total 242176K, used 7666K [0x00000000d5c00000, 0x00000000eb580000, 0x0000000100000000)
eden space 229888K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e3c80000)
from space 12288K, 62% used [0x00000000e3c80000,0x00000000e43fcbf0,0x00000000e4880000)
to space 11776K, 0% used [0x00000000eaa00000,0x00000000eaa00000,0x00000000eb580000)
ParOldGen total 48640K, used 9261K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 19% used [0x0000000081400000,0x0000000081d0b6f0,0x0000000084380000)
Metaspace used 34865K, capacity 35932K, committed 36048K, reserved 1081344K
class space used 4378K, capacity 4606K, committed 4608K, reserved 1048576K
Event: 3.528 GC heap after
Heap after GC invocations=11 (full 2):
PSYoungGen total 242176K, used 0K [0x00000000d5c00000, 0x00000000eb580000, 0x0000000100000000)
eden space 229888K, 0% used [0x00000000d5c00000,0x00000000d5c00000,0x00000000e3c80000)
from space 12288K, 0% used [0x00000000e3c80000,0x00000000e3c80000,0x00000000e4880000)
to space 11776K, 0% used [0x00000000eaa00000,0x00000000eaa00000,0x00000000eb580000)
ParOldGen total 48640K, used 12976K [0x0000000081400000, 0x0000000084380000, 0x00000000d5c00000)
object space 48640K, 26% used [0x0000000081400000,0x00000000820ac100,0x0000000084380000)
Metaspace used 34865K, capacity 35932K, committed 36048K, reserved 1081344K
class space used 4378K, capacity 4606K, committed 4608K, reserved 1048576K
}
Deoptimization events (10 events):
Event: 4.905 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.906 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.906 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.906 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.908 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.908 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.909 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.909 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.909 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Event: 4.910 Thread 0x00000000034e9000 Uncommon trap: reason=unhandled action=none pc=0x00000000042fbff0 method=java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; @ 44
Classes redefined (0 events):
No events
Internal exceptions (10 events):
Event: 4.039 Thread 0x00000000034e9000 Implicit null exception at 0x0000000003abae54 to 0x0000000003abb0ed
Event: 4.237 Thread 0x00000000034e9000 Exception <a 'java/io/FileNotFoundException'> (0x00000000d9dec9e8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 4.333 Thread 0x00000000034e9000 Exception <a 'java/io/FileNotFoundException'> (0x00000000da85bc50) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\prims\jni.cpp, line 709]
Event: 4.355 Thread 0x00000000034e9000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 45> (0x00000000dac75bd0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 4.355 Thread 0x00000000034e9000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 39> (0x00000000dac79490) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 4.356 Thread 0x00000000034e9000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 39> (0x00000000dac8ef50) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 4.370 Thread 0x00000000034e9000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 460> (0x00000000dade8c78) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 4.578 Thread 0x00000000034e9000 Exception <a 'java/lang/NoSuchMethodError': java.lang.Object.lambda$identity$2(Ljava/lang/Object;)Ljava/lang/Object;> (0x00000000dcbf2490) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\linkResolv
Event: 4.878 Thread 0x00000000034e9000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 39> (0x00000000e00da1c0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Event: 4.883 Thread 0x00000000034e9000 Exception <a 'java/lang/ArrayIndexOutOfBoundsException': 139> (0x00000000e01108d0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u191\11896\hotspot\src\share\vm\interpreter\interpreterRuntime.cpp, line 366]
Events (10 events):
Event: 4.909 loading class org/elasticsearch/action/support/WriteRequest
Event: 4.909 loading class org/elasticsearch/action/support/WriteRequest done
Event: 4.909 Thread 0x00000000034e9000 Uncommon trap: trap_request=0xffffffa7 fr.pc=0x00000000042fbff0
Event: 4.909 Thread 0x00000000034e9000 DEOPT PACKING pc=0x00000000042fbff0 sp=0x0000000003424ff0
Event: 4.909 Thread 0x00000000034e9000 DEOPT UNPACKING pc=0x000000000372583b sp=0x0000000003424ee8 mode 2
Event: 4.910 loading class org/elasticsearch/action/support/replication/ReplicationRequest
Event: 4.910 loading class org/elasticsearch/action/support/replication/ReplicationRequest done
Event: 4.910 Thread 0x00000000034e9000 Uncommon trap: trap_request=0xffffffa7 fr.pc=0x00000000042fbff0
Event: 4.910 Thread 0x00000000034e9000 DEOPT PACKING pc=0x00000000042fbff0 sp=0x0000000003425070
Event: 4.910 Thread 0x00000000034e9000 DEOPT UNPACKING pc=0x000000000372583b sp=0x0000000003424f68 mode 2
Dynamic libraries:
0x00007ff68f810000 - 0x00007ff68f847000 C:\Program Files\Java\jre1.8.0_191\bin\javaw.exe
0x00007fff4ffb0000 - 0x00007fff5019d000 C:\Windows\SYSTEM32\ntdll.dll
0x00007fff4f730000 - 0x00007fff4f7e3000 C:\Windows\System32\KERNEL32.DLL
0x00007fff4cbe0000 - 0x00007fff4ce73000 C:\Windows\System32\KERNELBASE.dll
0x00007fff4fc70000 - 0x00007fff4fd13000 C:\Windows\System32\ADVAPI32.dll
0x00007fff4d7d0000 - 0x00007fff4d86e000 C:\Windows\System32\msvcrt.dll
0x00007fff4f390000 - 0x00007fff4f42e000 C:\Windows\System32\sechost.dll
0x00007fff4d510000 - 0x00007fff4d632000 C:\Windows\System32\RPCRT4.dll
0x00007fff4fd30000 - 0x00007fff4fec7000 C:\Windows\System32\USER32.dll
0x00007fff4cee0000 - 0x00007fff4cf00000 C:\Windows\System32\win32u.dll
0x00007fff4d6a0000 - 0x00007fff4d6c9000 C:\Windows\System32\GDI32.dll
0x00007fff4c070000 - 0x00007fff4c209000 C:\Windows\System32\gdi32full.dll
0x00007fff4cf80000 - 0x00007fff4d020000 C:\Windows\System32\msvcp_win.dll
0x00007fff4d0d0000 - 0x00007fff4d1ca000 C:\Windows\System32\ucrtbase.dll
0x00007fff3c5f0000 - 0x00007fff3c869000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.17763.914_none_05b346b2072102f2\COMCTL32.dll
0x00007fff4d1d0000 - 0x00007fff4d4fc000 C:\Windows\System32\combase.dll
0x00007fff4cf00000 - 0x00007fff4cf7e000 C:\Windows\System32\bcryptPrimitives.dll
0x00007fff4d7a0000 - 0x00007fff4d7ce000 C:\Windows\System32\IMM32.DLL
0x0000000061a00000 - 0x0000000061ad2000 C:\Program Files\Java\jre1.8.0_191\bin\msvcr100.dll
0x0000000060e50000 - 0x00000000616f4000 C:\Program Files\Java\jre1.8.0_191\bin\server\jvm.dll
0x00007fff4fd20000 - 0x00007fff4fd28000 C:\Windows\System32\PSAPI.DLL
0x00007fff49fc0000 - 0x00007fff49fe4000 C:\Windows\SYSTEM32\WINMM.dll
0x00007fff4a200000 - 0x00007fff4a209000 C:\Windows\SYSTEM32\WSOCK32.dll
0x00007fff42090000 - 0x00007fff4209a000 C:\Windows\SYSTEM32\VERSION.dll
0x00007fff4f120000 - 0x00007fff4f18d000 C:\Windows\System32\WS2_32.dll
0x00007fff49c30000 - 0x00007fff49c5d000 C:\Windows\SYSTEM32\winmmbase.dll
0x00007fff4cb90000 - 0x00007fff4cbda000 C:\Windows\System32\cfgmgr32.dll
0x0000000060d60000 - 0x0000000060d6f000 C:\Program Files\Java\jre1.8.0_191\bin\verify.dll
0x0000000060d30000 - 0x0000000060d59000 C:\Program Files\Java\jre1.8.0_191\bin\java.dll
0x00000000619c0000 - 0x00000000619f5000 C:\Program Files\Java\jre1.8.0_191\bin\jdwp.dll
0x00000000619b0000 - 0x00000000619b8000 C:\Program Files\Java\jre1.8.0_191\bin\npt.dll
0x0000000060490000 - 0x00000000604b3000 C:\Program Files\Java\jre1.8.0_191\bin\instrument.dll
0x0000000060d10000 - 0x0000000060d26000 C:\Program Files\Java\jre1.8.0_191\bin\zip.dll
0x00007fff4dbc0000 - 0x00007fff4f0b4000 C:\Windows\System32\SHELL32.dll
0x00007fff4fed0000 - 0x00007fff4ff78000 C:\Windows\System32\shcore.dll
0x00007fff4c440000 - 0x00007fff4cb8d000 C:\Windows\System32\windows.storage.dll
0x00007fff4c040000 - 0x00007fff4c064000 C:\Windows\System32\profapi.dll
0x00007fff4bfe0000 - 0x00007fff4c03d000 C:\Windows\System32\powrprof.dll
0x00007fff4f220000 - 0x00007fff4f272000 C:\Windows\System32\shlwapi.dll
0x00007fff4bfa0000 - 0x00007fff4bfb1000 C:\Windows\System32\kernel.appcore.dll
0x00007fff4c420000 - 0x00007fff4c437000 C:\Windows\System32\cryptsp.dll
0x00000000619a0000 - 0x00000000619a9000 C:\Program Files\Java\jre1.8.0_191\bin\dt_socket.dll
0x00007fff3d460000 - 0x00007fff3d476000 C:\Windows\system32\napinsp.dll
0x00007fff3d440000 - 0x00007fff3d45a000 C:\Windows\system32\pnrpnsp.dll
0x00007fff4b780000 - 0x00007fff4b7e7000 C:\Windows\System32\mswsock.dll
0x00007fff4b4e0000 - 0x00007fff4b5a6000 C:\Windows\SYSTEM32\DNSAPI.dll
0x00007fff4d500000 - 0x00007fff4d508000 C:\Windows\System32\NSI.dll
0x00007fff4b4a0000 - 0x00007fff4b4dd000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007fff3c110000 - 0x00007fff3c11e000 C:\Windows\System32\winrnr.dll
0x00007fff487f0000 - 0x00007fff4880b000 C:\Windows\system32\NLAapi.dll
0x00007fff42120000 - 0x00007fff42135000 C:\Windows\system32\wshbth.dll
0x00007fff40ab0000 - 0x00007fff40b29000 C:\Windows\System32\fwpuclnt.dll
0x00007fff4c210000 - 0x00007fff4c236000 C:\Windows\System32\bcrypt.dll
0x00007fff40660000 - 0x00007fff4066a000 C:\Windows\System32\rasadhlp.dll
0x0000000060480000 - 0x000000006048d000 C:\Program Files\Java\jre1.8.0_191\bin\management.dll
0x0000000060cf0000 - 0x0000000060d0a000 C:\Program Files\Java\jre1.8.0_191\bin\net.dll
0x0000000060cd0000 - 0x0000000060ce1000 C:\Program Files\Java\jre1.8.0_191\bin\nio.dll
0x00007fff4b300000 - 0x00007fff4b333000 C:\Windows\system32\rsaenh.dll
0x00007fff4bea0000 - 0x00007fff4bec8000 C:\Windows\SYSTEM32\USERENV.dll
0x00007fff4b950000 - 0x00007fff4b95c000 C:\Windows\SYSTEM32\CRYPTBASE.dll
0x00007fff41df0000 - 0x00007fff41e06000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007fff42070000 - 0x00007fff4208c000 C:\Windows\SYSTEM32\dhcpcsvc.DLL
VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:60361 -javaagent:C:\Users\Admin\eclipse\java-2018-09\eclipse\configuration\org.eclipse.osgi\237\0\.cp\lib\javaagent-shaded.jar -Dfile.encoding=UTF-8
java_command: com.yipin.liuwanr.App
java_class_path (initial): D:\meirenhui\new_meirenhui\liuwanr\target\classes;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.1.5.RELEASE\spring-boot-starter-web-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter\2.1.5.RELEASE\spring-boot-starter-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot\2.1.5.RELEASE\spring-boot-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.1.5.RELEASE\spring-boot-autoconfigure-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\org\yaml\snakeyaml\1.23\snakeyaml-1.23.jar;C:\Users\Admin\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.1.5.RELEASE\spring-boot-starter-json-2.1.5.RELEASE.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.8\jackson-databind-2.9.8.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.8\jackson-datatype-jdk8-2.9.8.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.8\jackson-datatype-jsr310-2.9.8.jar;C:\Users\Admin\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.8\jackson-module-parameter-names-2.9.8.jar;C:\Users\Admin\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.16.Final\hibernate-validator-6.0.16.Final.jar;C:\Users\Admin\.m2\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;C:\Users\Admin\.m2\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;C:\Users\Admin\.m2\repository\com\fasterxml\classmate\1.4.0\classmate-1.4.0.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-web\5.1.7.RELEASE\spring-web-5.1.7.RELEASE.jar;C:\Users\Admin\.m2\repository\org\springframework\spring-beans\5.1.7.RELEASE\sp
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
CLASSPATH=.;C:\Program Files\Java\jdk1.8.0_191\lib;C:\Program Files\Java\jdk1.8.0_191\lib\tools.jar
PATH=C:/Program Files/Java/jre1.8.0_191/bin/server;C:/Program Files/Java/jre1.8.0_191/bin;C:/Program Files/Java/jre1.8.0_191/lib/amd64;C:\Program Files (x86)\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\Java\jdk1.8.0_191\bin;C:\Program Files\Java\jdk1.8.0_191\jre\bin;D:\nodejs\;D:\TortoiseSVN\bin;D:\apache-maven-3.6.2\bin;D:\python\Scripts\;D:\python\;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Users\Admin\AppData\Roaming\npm;C:\Users\Admin\AppData\Local\BypassRuntm;C:\Users\Admin\Desktop;
USERNAME=Admin
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 10.0 , 64 bit Build 17763 (10.0.17763.475)
CPU:total 6 (initial active 6) (6 cores per cpu, 1 threads per core) family 6 model 158 stepping 13, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, tsc, tscinvbit, bmi1, bmi2, adx
Memory: 4k page, physical 8304672k(1466216k free), swap 16693280k(6016k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (25.191-b12) for windows-amd64 JRE (1.8.0_191-b12), built on Oct 6 2018 09:29:03 by "java_re" with MS VC++ 10.0 (VS2010)
time: Fri Jan 10 18:48:25 2020
elapsed time: 4 seconds (0d 0h 0m 4s)

@ -0,0 +1,246 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.yipin</groupId>
<artifactId>liuwanr</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<name>Spring Boot Project</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<!--log4jdbc.log4j2.version>1.16</log4jdbc.log4j2.version -->
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.4.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>7.4.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- springcloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Edgware.RELEASE</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<!-- redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
<version>1.4.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>7.4.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.47</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.mina</groupId>
<artifactId>mina-core</artifactId>
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
<version>5.1.6</version>
</dependency>
<!--读取excel文件 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<!--导出excel文件 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<!-- mybatis分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-aspectj -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-aspectj</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-cas -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-cas</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-core -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-ehcache -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-guice -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-guice</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-quartz -->
<!-- <dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-quartz</artifactId>
<version>1.3.2</version>
</dependency> -->
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-spring -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro.tools/shiro-tools-hasher -->
<dependency>
<groupId>org.apache.shiro.tools</groupId>
<artifactId>shiro-tools-hasher</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.shiro/shiro-web -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>1.3.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
</dependencies>
<build>
<finalName>ROOT</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,60 @@
package com.yipin.liuwanr;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.aliyun.oss.OSSClient;
@Component
@PropertySource(value = "classpath:aliyun.properties")
@Configuration
public class AliyunOssConfig {
@Value("${oss.endpoint}")
private String endpoint;// oss外网访问域名
@Value("${oss.accessKeyId}")
private String accessKeyId;// oss中的密匙keyId
@Value("${oss.secretAccessKey}")
private String secretAccessKey;// oss中的密钥
@Value("${oss.bucketName}")
private String bucketName;// 仓库名称
@Value("${oss.sufferUrl}")
private String sufferUrl;
@Value("${user.userAvatars}")//用户头像
private String userAvatars;
@Bean
@Scope("prototype")
public OSSClient ossClient() {
return new OSSClient(endpoint, accessKeyId, secretAccessKey);
}
public String getEndpoint() {
return endpoint;
}
public String getAccessKeyId() {
return accessKeyId;
}
public String getSecretAccessKey() {
return secretAccessKey;
}
public String getBucketName() {
return bucketName;
}
public String getSufferUrl() {
return sufferUrl;
}
public String getUserAvatars() {
return userAvatars;
}
}

@ -0,0 +1,22 @@
package com.yipin.liuwanr;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
@SpringBootApplication
@ServletComponentScan(value = "com.yipin.liuwanr.listener")
@MapperScan("com.yipin.liuwanr.mapper")
public class App extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(App.class);
}
}

@ -0,0 +1,173 @@
package com.yipin.liuwanr;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.Credentials;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.jboss.logging.Logger;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientBuilderCustomizer;
import org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientProperties;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import com.yipin.liuwanr.tcpserver.MinaContextManager;
import com.yipin.liuwanr.tcpserver.TimeServerHandler;
import com.zaxxer.hikari.HikariDataSource;
@Configuration
public class AppConfig {
private static Logger logger = Logger.getLogger(AppConfig.class);
@Autowired
DataSourceProperties dataSourceProperties;
@Value("${spring.mina.port}")
int port;
@Value("${spring.mina.buffersize}")
int buffersize;
@Value("${spring.mina.idletime}")
int idletime;
@Bean(name = "dataSource")
@Primary
@ConfigurationProperties(prefix = "spring.datasource")
DataSource realDataSource() {
HikariDataSource dataSource = new HikariDataSource();
dataSource.setDriverClassName(this.dataSourceProperties.getDriverClassName());
dataSource.setJdbcUrl(this.dataSourceProperties.getUrl());
dataSource.setUsername(this.dataSourceProperties.getUsername());
dataSource.setPassword(this.dataSourceProperties.getPassword());
logger.info("DataSource Bean Created");
return dataSource;
}
@Bean
public SqlSessionFactoryBean sqlSessionFactory() {
SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
bean.setDataSource(realDataSource());
logger.info("SqlSessionFactoryBean Bean Created");
return bean;
}
@Bean
public HttpMessageConverters fastJsonConverters() {
FastJsonHttpMessageConverter fastJsonConverter = new FastJsonHttpMessageConverter();
FastJsonConfig fastConf = new FastJsonConfig();
fastConf.setSerializerFeatures(SerializerFeature.PrettyFormat);
List<MediaType> fastMediaTypes = new ArrayList<MediaType>();
fastMediaTypes.add(MediaType.APPLICATION_JSON);
fastJsonConverter.setSupportedMediaTypes(fastMediaTypes);
fastJsonConverter.setFastJsonConfig(fastConf);
HttpMessageConverter<?> converter = fastJsonConverter;
logger.info("MessageConverter Bean Created");
return new HttpMessageConverters(converter);
}
@Bean
public RedisSerializer<Object> redisSerializer() {
logger.info("RedisSerializer Bean Created");
return new FastJsonRedisSerializer<Object>(Object.class);
}
@Bean
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory,
RedisSerializer<Object> redisSerializer) {
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<String, Object>();
redisTemplate.setConnectionFactory(redisConnectionFactory);
// 全局开启AutoType,不建议使用
// ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
// 建议使用这种方式,小范围指定白名单
ParserConfig.getGlobalInstance().addAccept("com.yipin.liuwanr.entity.");
redisTemplate.setValueSerializer(redisSerializer);
redisTemplate.setHashValueSerializer(redisSerializer);
redisTemplate.setKeySerializer(new StringRedisSerializer());
redisTemplate.setHashKeySerializer(new StringRedisSerializer());
redisTemplate.afterPropertiesSet();
logger.info("RedisTemplate Bean Created");
return redisTemplate;
}
@Bean
public MinaContextManager minaContextManager() {
logger.info("MinaContextManager Bean Created");
MinaContextManager minaContextManager = MinaContextManager.getInstance(port, buffersize, idletime);
minaContextManager.startServer(serverHandler());
return minaContextManager;
}
// @Bean
// public FilterRegistrationBean<AuthFilter> authFilterRegistration() {
// FilterRegistrationBean<AuthFilter> registration = new FilterRegistrationBean<AuthFilter>();
// registration.setFilter(authFilter());
// registration.addUrlPatterns("/*");
// registration.setOrder(6);
// registration.setName("AuthFilter");
// logger.info("FilterRegistrationBean Bean Created");
// return registration;
// }
//
// @Bean
// AuthFilter authFilter() {
// return new AuthFilter();
// }
@Bean
TimeServerHandler serverHandler() {
return new TimeServerHandler();
}
@Bean
public RestClientBuilder elasticsearchRestClientBuilder(RestClientProperties properties,
ObjectProvider<RestClientBuilderCustomizer> builderCustomizers) {
HttpHost[] hosts = properties.getUris().stream().map(HttpHost::create).toArray(HttpHost[]::new);
RestClientBuilder builder = RestClient.builder(hosts);
PropertyMapper map = PropertyMapper.get();
map.from(properties::getUsername).whenHasText().to((username) -> {
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
Credentials credentials = new UsernamePasswordCredentials(properties.getUsername(),
properties.getPassword());
credentialsProvider.setCredentials(AuthScope.ANY, credentials);
builder.setHttpClientConfigCallback(
(httpClientBuilder) -> httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
});
builderCustomizers.orderedStream().forEach((customizer) -> customizer.customize(builder));
return builder;
}
@Bean
public RestHighLevelClient elasticsearchRestHighLevelClient(RestClientBuilder restClientBuilder) {
return new RestHighLevelClient(restClientBuilder);
}
}

@ -0,0 +1,46 @@
package com.yipin.liuwanr;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @Description 跨域配置
* @Date 2019/2/27 13:31
**/
@Configuration
public class CORSConfig {
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.addAllowedOrigin("*"); // 不限制域名访问
corsConfiguration.addAllowedHeader("*"); // 不限制Header
corsConfiguration.addAllowedMethod("*"); // 不限制Method
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", buildConfig());
return new CorsFilter(source);
}
@Bean
public WebMvcConfigurer corsConfigurer(){
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedHeaders("*")
.allowedMethods("*")
.allowedOrigins("*")
.allowCredentials(true)
.allowedMethods("GET", "POST", "DELETE", "PUT");
}
};
}
}

@ -0,0 +1,74 @@
package com.yipin.liuwanr;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisCluster;
import redis.clients.jedis.JedisPoolConfig;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@Configuration
@ConfigurationProperties(prefix = "redis.cluster")
public class ClusterConfig {
//准备几个为bean对象创建的属性
private List<String> nodes;
private Integer maxTotal;
private Integer maxIdle;
private Integer minIdle;
public List<String> getNodes() {
return nodes;
}
public void setNodes(List<String> nodes) {
this.nodes = nodes;
}
public Integer getMaxTotal() {
return maxTotal;
}
public void setMaxTotal(Integer maxTotal) {
this.maxTotal = maxTotal;
}
public Integer getMaxIdle() {
return maxIdle;
}
public void setMaxIdle(Integer maxIdle) {
this.maxIdle = maxIdle;
}
public Integer getMinIdle() {
return minIdle;
}
public void setMinIdle(Integer minIdle) {
this.minIdle = minIdle;
}
//初始化对象的方法
@Bean
public JedisCluster initCluster(){
//收集节点信息。解析nodes属性
Set<HostAndPort> info = new HashSet<>();
for (String node : nodes){
//node="132.232.8.75:800*"
String host = node.split(":")[0];
int port = Integer.parseInt(node.split(":")[1]);
info.add(new HostAndPort(host,port));
}
//连接池的属性JedisPoolConfig
JedisPoolConfig config = new JedisPoolConfig();
config.setMaxTotal(maxTotal);
config.setMaxIdle(maxIdle);
config.setMinIdle(minIdle);
return new JedisCluster(info,config);
}
}

@ -0,0 +1,255 @@
package com.yipin.liuwanr;
public class Constants {
/**登录角色权限缓存时间 分钟*/
public static final Long LOGIN_ROLE_CACHE_TIME = Long.valueOf(PropertiesUtils.getContextProperty("login.role.cache.time"));
/**教学首页最近打开应用缓存时间 分钟*/
public static final Long TEACHINGLOG_CACHE_TIME = Long.valueOf(PropertiesUtils.getContextProperty("teachinglog.cache.time"));
/**教学首页最新动态缓存时间 分钟*/
public static final Long USERDYNAMICVO_CACHE_TIME = Long.valueOf(PropertiesUtils.getContextProperty("userdynamicvo.cache.time"));
/**教学首页活跃度缓存时间 分钟*/
public static final Long TEACHINGINTEGRAL_CACHE_TIME = Long.valueOf(PropertiesUtils.getContextProperty("teachingintegral.cache.time"));
/**获取域名*/
public static final String SERVICE_DOMAIN = (String)PropertiesUtils.getContextProperty("service.domain");
/**导入用户条数*/
public static final Integer IMPORT_NUM = Integer.valueOf(PropertiesUtils.getContextProperty("import.num"));
/**获取该系统所处终端 0:云端 1:学校端*/
public static final Integer SERVICE_TERMINUS = Integer.valueOf(PropertiesUtils.getContextProperty("service.terminus"));
/**获取后台管理admin地址*/
public static final String ADMIN_WEB_PATH = (String)PropertiesUtils.getContextProperty("admin.web.path");
public static final String APP_WEB_PATH = (String)PropertiesUtils.getContextProperty("app.web.path");
/**消息队列名称*/
public static final String SERVICE_MQ_P2P = (String)PropertiesUtils.getContextProperty("service.mq.p2p.name");
public static final String SERVICE_MQ_PS = (String)PropertiesUtils.getContextProperty("service.mq.ps.name");
/**redis 连接相关配置 start********************************************/
// public static final String SERVICE_REDIS_ADDR = (String)PropertiesUtils.getContextProperty("redis.master.ip");
//
// public static final Integer SERVICE_REDIS_PORT = Integer.valueOf(PropertiesUtils.getContextProperty("redis.master.port"));
//
// public static final String SERVICE_REDIS_AUTO = (String)PropertiesUtils.getContextProperty("redis.master.auto");
//
// public static final String SERVICE_REDIS_PASSWORD = (String)PropertiesUtils.getContextProperty("redis.master.password");
//
// public static final Integer SERVICE_REDIS_MAXACTIVE = Integer.valueOf(PropertiesUtils.getContextProperty("redis.pool.maxActive"));
//
// public static final Integer SERVICE_REDIS_MAXIDEL = Integer.valueOf(PropertiesUtils.getContextProperty("redis.pool.maxIdle"));
//
// public static final Integer SERVICE_REDIS_MAXWAIT = Integer.valueOf(PropertiesUtils.getContextProperty("redis.pool.maxWait"));
//
// public static final Integer SERVICE_REDIS_TIMEOUT = Integer.valueOf(PropertiesUtils.getContextProperty("redis.pool.timeout"));
//
// public static final Boolean SERVICE_REDIS_TESTONBORROW = Boolean.valueOf(PropertiesUtils.getContextProperty("redis.pool.testOnBorrow"));
//
// public static final Boolean SERVICE_REDIS_CACHE_BUSINESS_USER = Boolean.valueOf(PropertiesUtils.getContextProperty("redis.cache.business.user"));
//
/**redis 连接相关配置 end********************************************/
/***************************ftp 连接信息****************************/
// public static final String SERVICE_SFTP_REQ_HOST = (String)PropertiesUtils.getContextProperty("sftp.req.host");
// public static final String SERVICE_SFTP_REQ_USERNAME = (String)PropertiesUtils.getContextProperty("sftp.req.username");
// public static final String SERVICE_SFTP_REQ_PASSWORD = (String)PropertiesUtils.getContextProperty("sftp.req.password");
// public static final String SERVICE_SFTP_REQ_PORT = (String)PropertiesUtils.getContextProperty("sftp.req.port");
// public static final String SERVICE_SFTP_UPLOAD_TIME = (String)PropertiesUtils.getContextProperty("sftp.upload.timer");
// public static final Integer SERVICE_SFTP_TIMEOUT = Integer.valueOf(PropertiesUtils.getContextProperty("sftp.req.timeout"));
/***************************ftp 连接信息end ****************************/
/***************************office online 连接信息 start****************************/
/**
* offic online 服务器地址
*/
public static final String OFFICE_ONLINE_HOST = (String)PropertiesUtils.getContextProperty("office.online.host");
/***************************office online 连接信息 end****************************/
/*************************初始化需要队列需要调用服务参数的参数****************/
/**usesservice*/
// public static final String CLASS_USERSERVICEI = "userService";
// public static final String METHOD_USERSERVICE_INSERTBYVO = "userService.insertByVo";
/**shoppingCartService*/
public static final String CLASS_SHOOPINGCARTSERVICE = "shoppingCartService";
public static final String METHOD_SHOOPINGCARTSERVICE_INSERTSHOOPINGCART = "shoppingCartService.insertShoppingCart";
public static final String METHOD_SHOOPINGCARTSERVICE_UPDATE = "shoppingCartService.updateShoppingCartById";
/*************************end***************************************/
/**************************文件上传************************************************/
//上传用户头像大小
public static final Integer FILE_UPLOAD_USERHEAD_SIZE = Integer.valueOf(PropertiesUtils.getContextProperty("file.upload.userhead.size"));
//上传普通文件大小
public static final Integer FILE_UPLOAD_PLAINFILE_SIZE = Integer.valueOf(PropertiesUtils.getContextProperty("file.upload.plainfile.size"));
//允许上传的文件类型
public static final String FILE_UPLOAD_AVAILABLE_TYPES = (String)PropertiesUtils.getContextProperty("file.upload.available.types");
public static final String FILE_UPLOAD_DEFAULT_DIR = (String)PropertiesUtils.getContextProperty("file.upload.default.dir");
public static final Integer DEFAULT_FILE_NAME_LENGTH = Integer.valueOf(PropertiesUtils.getContextProperty("default.file.name.length"));
//上传根目录
public static final String FILE_UPLOAD_ROOT_DIR=(String)PropertiesUtils.getContextProperty("file.upload.root.dir");
//头像
public static final String FILE_UPLOAD_USERHEAD_DIR = (String)PropertiesUtils.getContextProperty("file.upload.userhead.dir");
//头像
public static final String FILE_UPLOAD_THIRD_DIR = (String)PropertiesUtils.getContextProperty("file.upload.third.dir");
//资源
public static final String FILE_UPLOAD_RESOURCE_LIB_DIR=(String)PropertiesUtils.getContextProperty("file.upload.resource.dir");
public static final String FILE_UPLOAD_RESOURCE_AVAILABLE_TYPES = (String)PropertiesUtils.getContextProperty("file.upload.resource.available.types");
//banner
public static final String FILE_UPLOAD_BANNER_LIB_DIR=(String)PropertiesUtils.getContextProperty("file.upload.banner.dir");
//应用
public static final String FILE_UPLOAD_COURSE_LIB_DIR=(String)PropertiesUtils.getContextProperty("file.upload.course.dir");
//聊天
public static final String FILE_UPLOAD_CHAT_LIB_DIR=(String)PropertiesUtils.getContextProperty("file.upload.chat.dir");
//公告
public static final String FILE_UPLOAD_NOTICE_LIB_DIR=(String)PropertiesUtils.getContextProperty("file.upload.notice.dir");
//bbs讨论交流
public static final String FILE_UPLOAD_FORUM_LIB_DIR=(String)PropertiesUtils.getContextProperty("file.upload.forum.dir");
/***********************************end********************************************/
/**************************用户状态管理************************************************/
public static final String CLASS_USERSTATUSSERVICE = "userStatusService";
public static final String METHOD_USERSTATUSSERVICE_INSERTBYVO = "userStatusService.insertByVo";
public static final String METHOD_USERSTATUSSERVICE_DELETEBYUSERID = "userStatusService.deletebyuserid";
/**************************用户管理************************************************/
public static final String CLASS_USERINFOSERVICE = "userInfoService";
public static final String METHOD_USERINFOSERVICE_UPDATEBYID = "userInfoService.updateById";
public static final String METHOD_USERINFOSERVICE_DELETEUSERBYID = "userInfoService.deleteUserById";
public static final String METHOD_USERINFOSERVICE_ADDUSERINFOBATCH = "userInfoService.addUserInfoBatch";
public static final String METHOD_USERROLEMANAGESERVICE_INSERT = "userRoleManageService.insert";
public static final String METHOD_USERINFOSERVICE_INSERT = "userInfoService.insert";
public static final String METHOD_USERINFOSERVICE_DELETEBATCHIDS = "userInfoService.deleteBatchIds";
public static final String CLASS_USERROLEMANAGESERVICE = "userRoleManageService";
public static final String METHOD_USERROLEMANAGESERVICE_DELETEBATCHIDS = "userRoleManageService.deleteBatchIds";
public static final String METHOD_USERROLEMANAGESERVICE_UPDATEBYUSERID = "userRoleManageService.updateByuserId";
/**************************机构管理************************************************/
public static final String CLASS_SCHOOLORGSERVICE = "schoolOrgService";
public static final String METHOD_SCHOOLORGSERVICE_EXCHANGEORGORDER = "schoolOrgService.exchangeOrgOrder";
public static final String METHOD_SCHOOLORGSERVICE_UPDATEBYID = "schoolOrgService.updateById";
public static final String METHOD_SCHOOLORGSERVICE_INSERTORG = "schoolOrgService.insertOrg";
public static final String METHOD_SCHOOLORGSERVICE_DELETEBYIDANDPID = "schoolOrgService.deleteByIdAndPid";
public static final String METHOD_SCHOOLORGSERVICE_ADDORGBATCH = "schoolOrgService.addOrgBatch";
/**************************角色管理************************************************/
public static final String CLASS_ROLEMANAGESERVICE = "roleManageService";
public static final String METHOD_ROLEMANAGESERVICE_UPDATEBYID = "roleManageService.updateById";
/**************************角色权限关联管理************************************************/
public static final String CLASS_ROLEPOWERSERVICE = "rolePowerService";
public static final String METHOD_ROLEPOWERSERVICE_DELETE = "rolePowerService.delete";
public static final String METHOD_ROLEPOWERSERVICE_INSERT = "rolePowerService.insert";
/**************************banner************************************************/
public static final String CLASS_BANNERSERVICE = "bannerService";
public static final String METHOD_BANNERSERVICE_INSERT = "bannerService.insertBanner";
public static final String METHOD_BANNERSERVICE_UPDATE = "bannerService.updateBanner";
/***************************微软云服务***********************************/
public static final String STORAGE_CONNECTION_STRING = (String)PropertiesUtils.getContextProperty("service.microsoft.azure.url");
public static final String STORAGE_CONTAINER = (String) PropertiesUtils.getContextProperty("service.microsoft.azure.container");
//用户头像目录
public static final String STORAGE_USER_HEAD = PropertiesUtils.getContextProperty("service.microsoft.azure.container.user.head");
//系统 banner存储目录
// public static final String STORAGE_SYS_BANNER = PropertiesUtils.getContextProperty("service.microsoft.azure.container.sys.banner");
//
// //课程应用图片img存储目录
// public static final String STORAGE_COURSE_IMAGES = PropertiesUtils.getContextProperty("service.microsoft.azure.container.course.images");
// //课程应用project_img存储目录
// public static final String STORAGE_COURSE_PROJECT = PropertiesUtils.getContextProperty("service.microsoft.azure.container.course.project");
// //公告图片
// public static final String STORAGE_NOTICE_IMAGES = PropertiesUtils.getContextProperty("service.microsoft.azure.container.notice.images");
/***************************openfire restapi**********************************/
//服务地址
public static final String SERVICE_OPENFIRE_RESTAPI_ADDR = (String) PropertiesUtils.getContextProperty("service.openfire.restapi.addr");
//端口号
public static final Integer SERVICE_OPENFIRE_RESTAPI_PORT = Integer.valueOf(PropertiesUtils.getContextProperty("service.openfire.restapi.port"));
//认证密钥
public static final String SERVICE_OPENFIRE_RESTAPI_AUTO = (String) PropertiesUtils.getContextProperty("service.openfire.restapi.auto");
//超时时间
public static final Integer SERVICE_OPENFIRE_RESTAPI_TIMEOUT = Integer.valueOf(PropertiesUtils.getContextProperty("service.openfire.restapi.timeout"));
/***************************restapi相关配置**********************************/
//rest链接超时时间(毫秒)
public static final Integer SERVICE_REST_CONNECTTIMEOUT = Integer.valueOf(PropertiesUtils.getContextProperty("service.rest.connectTimeout"));
//rest链接响应超时时间(毫秒)
public static final Integer SERVICE_REST_SOCKETTIMEOUT = Integer.valueOf(PropertiesUtils.getContextProperty("service.rest.socketTimeout"));
//rest请求秘钥
public static final String SERVICE_REST_AUTHORIZATIONKEY = (String) PropertiesUtils.getContextProperty("service.rest.authorizationKey");
/***************************缓冲时间设置**********************************/
//聊天
public static final Integer CACHE_TIME_CHAT = Integer.valueOf(PropertiesUtils.getContextProperty("service.cache.time.chat"));
//首页banner/plan/最新应用
public static final Integer CACHE_TIME_INDEX = Integer.valueOf(PropertiesUtils.getContextProperty("service.cache.time.index"));
//应用教学--进入应用页面
public static final Integer CACHE_TIME_COURSE_TEACHING_VIEW = Integer.valueOf(PropertiesUtils.getContextProperty("service.cache.time.course.teaching.view"));
//考勤开启持续时长 默认45分钟
public static final Integer ATTENDANCE_PERSIST_MINUTES = 45;
/**************************短信配置**************************/
//产品名
public static final String SERVICE_SMS_PRODUCT = (String) PropertiesUtils.getContextProperty("service.sms.product");
//产品域名
public static final String SERVICE_SMS_DOMAIN = (String) PropertiesUtils.getContextProperty("service.sms.domain");
//accessKeyId
public static final String SERVICE_SMS_ACID = (String) PropertiesUtils.getContextProperty("service.sms.accessKeyId");
//accessKeySecret
public static final String SERVICE_SMS_ACKS = (String) PropertiesUtils.getContextProperty("service.sms.accessKeySecret");
//模板
public static final String SERVICE_SMS_TC = (String) PropertiesUtils.getContextProperty("service.sms.tc");
//url
public static final String SERVICE_SMS_URL = (String) PropertiesUtils.getContextProperty("service.sms.url");
//签名
public static final String SERVICE_SMS_SN = (String) PropertiesUtils.getContextProperty("service.sms.sn");
//超时
public static final String SERVICE_SMS_CT = (String) PropertiesUtils.getContextProperty("service.sms.ct");
/**************************邮件配置**************************/
public static final String SERVICE_MAIL_ADDR= (String) PropertiesUtils.getContextProperty("service.mail.addr");
public static final int SERVICE_MAIL_TYPE= Integer.valueOf(PropertiesUtils.getContextProperty("service.mail.type"));
public static final String SERVICE_MAIL_SUB= (String) PropertiesUtils.getContextProperty("service.mail.sub");
public static final String SERVICE_MAIL_TAG= (String) PropertiesUtils.getContextProperty("service.mail.tag");
public static final String SERVICE_MAIL_CONTEXT= (String) PropertiesUtils.getContextProperty("service.mail.context");
/**************************redis 配置*************************/
public static final String REDIS_PASSWORD= (String) PropertiesUtils.getContextProperty("jedis.password");
public static final String REDIS_HOST1= (String) PropertiesUtils.getContextProperty("jedis.host1");
public static final String REDIS_HOST2= (String) PropertiesUtils.getContextProperty("jedis.host2");
public static final String REDIS_HOST3= (String) PropertiesUtils.getContextProperty("jedis.host3");
public static final String REDIS_HOST4= (String) PropertiesUtils.getContextProperty("jedis.host4");
public static final String REDIS_HOST5= (String) PropertiesUtils.getContextProperty("jedis.host5");
public static final String REDIS_HOST6= (String) PropertiesUtils.getContextProperty("jedis.host6");
public static final String REDIS_PORT1= (String) PropertiesUtils.getContextProperty("jedis.port1");
public static final String REDIS_PORT2= (String) PropertiesUtils.getContextProperty("jedis.port2");
public static final String REDIS_PORT3= (String) PropertiesUtils.getContextProperty("jedis.port3");
public static final String REDIS_PORT4= (String) PropertiesUtils.getContextProperty("jedis.port4");
public static final String REDIS_PORT5= (String) PropertiesUtils.getContextProperty("jedis.port5");
public static final String REDIS_PORT6= (String) PropertiesUtils.getContextProperty("jedis.port6");
//word文档下载模板地址
public static final String TEMPLATE_FOLDER= (String) PropertiesUtils.getContextProperty("template.folder.url");
}

@ -0,0 +1,30 @@
package com.yipin.liuwanr;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class Demo03 {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
//注册
Class.forName("com.mysql.jdbc.Driver");
//连接
Connection connention = DriverManager.getConnection("jdbc:mysql://www.liuwanr.cn:3306/huoran", "super", "super123");
String sql = "SELECT * FROM user"; //准备sql语句
//获取Statement对象(简称:特)
Statement statement = connention.createStatement();
//执行
ResultSet resultSet = statement.executeQuery(sql);
System.out.println(resultSet);
while(resultSet.next()){
//ResultSet里面的get相关方法列号是从1开始的,切记。 System.out.println(resultSet.getInt(1)+","+resultSet.getString(2)+","+resultSet.getInt(3)+","+resultSet.getString(4));
}
//关闭(倒关)
resultSet.close();
statement.close();
connention.close();
}
}

@ -0,0 +1,38 @@
package com.yipin.liuwanr;
import java.nio.charset.Charset;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
public class FastJsonRedisSerializer<T> implements RedisSerializer<T> {
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
private Class<T> clazz;
public FastJsonRedisSerializer(Class<T> clazz) {
super();
this.clazz = clazz;
}
public byte[] serialize(T t) throws SerializationException {
if (t == null) {
return new byte[0];
}
return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET);
}
public T deserialize(byte[] bytes) throws SerializationException {
if (bytes == null || bytes.length <= 0) {
return null;
}
String str = new String(bytes, DEFAULT_CHARSET);
return (T) JSON.parseObject(str, clazz);
}
}

@ -0,0 +1,56 @@
package com.yipin.liuwanr;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import org.apache.commons.io.IOUtils;
public class MAPIHttpServletRequestWrapper extends HttpServletRequestWrapper {
private final byte[] body; // 报文
public MAPIHttpServletRequestWrapper(HttpServletRequest request) throws IOException {
super(request);
body = IOUtils.toByteArray(request.getInputStream());
}
@Override
public BufferedReader getReader() throws IOException {
return new BufferedReader(new InputStreamReader(getInputStream()));
}
@Override
public ServletInputStream getInputStream() throws IOException {
final ByteArrayInputStream bais = new ByteArrayInputStream(body);
return new ServletInputStream() {
@Override
public int read() throws IOException {
return bais.read();
}
@Override
public boolean isFinished() {
return false;
}
@Override
public boolean isReady() {
return false;
}
@Override
public void setReadListener(ReadListener arg0) {
}
};
}
}

@ -0,0 +1,286 @@
package com.yipin.liuwanr;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.lang3.StringUtils;
/**
* online处理工具类
* @ClassName: OfficeOnlineMethod
* @Description: TODO(这里用一句话描述这个类的作用)
*/
public class OfficeOnlineMethod {
private static final Map<String,String> urls;
static {
urls = new HashMap<String,String>();
urls.put("view-xls", "x/_layouts/xlviewerinternal.aspx?");
urls.put("view-xlsx", "x/_layouts/xlviewerinternal.aspx?");
//urls.put("mobileView-xls", "x/_layouts/xlviewerinternal.aspx?");
//urls.put("mobileView-xlsx", "x/_layouts/xlviewerinternal.aspx?");
urls.put("view-one", "o/onenoteframe.aspx?a=1");
urls.put("view-onetoc2", "o/onenoteframe.aspx?a=1");
urls.put("view-pot", "p/PowerPointFrame.aspx?a=1");
urls.put("view-potm", "p/PowerPointFrame.aspx?a=1");
urls.put("view-potx", "p/PowerPointFrame.aspx?a=1");
urls.put("view-ppt", "p/PowerPointFrame.aspx?a=1");
urls.put("view-pptm", "p/PowerPointFrame.aspx?a=1");
urls.put("view-pptx", "p/PowerPointFrame.aspx?a=1");
urls.put("view-doc", "wv/wordviewerframe.aspx?a=1");
urls.put("view-docm", "wv/wordviewerframe.aspx?a=1");
urls.put("view-docx", "wv/wordviewerframe.aspx?a=1");
urls.put("view-dot", "wv/wordviewerframe.aspx?a=1");
urls.put("view-dotm", "wv/wordviewerframe.aspx?a=1");
urls.put("view-dotx", "wv/wordviewerframe.aspx?a=1");
urls.put("view-pdf", "wv/wordviewerframe.aspx?PdfMode=1");
}
/**
* 获取文件资源预览地址
* @param request
* @param file 文件名
* @param path 文件路径
* @return
*/
public static String getResourceReviewUrl(HttpServletRequest request, String file,String path){
if(StringUtils.isEmpty(file)){
return null;
}
if(StringUtils.isEmpty(path)){
return null;
}
if(!path.endsWith("/")){
path = path + "/";
}
//String token = ConfigurationUtils.getMustExistsStringConfig(TOKEN_DREAMCLASS_FILE);
StringBuilder str = new StringBuilder();
//2018.11.22添加
HttpSession session = request.getSession();
String officeUrl=(String)session.getAttribute("officeInnerIp");
if(officeUrl==null||"".equals(officeUrl)){
officeUrl=Constants.OFFICE_ONLINE_HOST;//offic online 服务器地址
}
//2018.11.22结束
if(!officeUrl.endsWith("/")){
officeUrl = officeUrl + "/";
}
//文件服务器真实IP地址
//String fileUrl = "http://"+request.getLocalAddr()+":"+request.getLocalPort()+"/"+request.getLocalName();
//String fileUrl = getWebPath(request);
//此处修改为获取admin上传服务器地址(由于上传地址保存在admin服务器中)
// String fileUrl = Constants.ADMIN_WEB_PATH;
// if(fileUrl==null){//如果未配置则获取当前web地址
// fileUrl = getWebPath(request);
// }
String ext = getFileExt(file);
if(ext == null){
return null;
}
String uri = urls.get("view-"+ext);
if(uri == null){
return null;
}
//转码处理
// fileUrl = URLEncoder4UTF8(fileUrl);
path = URLEncoder4UTF8(path);
file = URLEncoder4UTF8(URLEncoder4UTF8(file));//文件名如果包含中文必须要二次转码(此处默认二次转码)
//安装officeonline规则拼接预览地址
// str.append(officeUrl).append(uri)
// .append("&WOPISrc=").append(fileUrl).append(URLEncoder4UTF8("/wopi/files")).append(path).append(file);
//.append("&access_token=").append(token);//token为安全验证口令,暂未添加
return str.toString();
}
//文件地址包含文件名时
public static String getResourceReviewUrl(HttpServletRequest request, String filePath){
if(StringUtils.isEmpty(filePath)){
return null;
}
if(filePath.endsWith("/")){
return null;
}
int last = filePath.lastIndexOf("/")+1;
String file = filePath.substring(last);
String path = filePath.substring(0, last);
return getResourceReviewUrl(request, file, path);
}
/**
* 获取文件资源下载地址
* @param request
* @param file 文件名
* @param path 文件路径
* @return
*/
public static String getResourceDownUrl(HttpServletRequest request, String file,String path){
if(StringUtils.isEmpty(file)){
return null;
}
if(StringUtils.isEmpty(path)){
return null;
}
if(!path.endsWith("/")){
path = path + "/";
}
StringBuilder str = new StringBuilder();
//文件服务器真实IP地址
//String fileUrl = "http://"+request.getLocalAddr()+":"+request.getLocalPort()+"/"+request.getLocalName();
String fileUrl = getWebPath(request);
//安装officeonline规则拼接预览地址
str.append(fileUrl).append(URLEncoder4UTF8("/wopi/files")).append(path).append(file).append("/contents");
return str.toString();
}
//文件地址包含文件名时
public static String getResourceDownUrl(HttpServletRequest request, String filePath){
if(StringUtils.isEmpty(filePath)){
return null;
}
if(filePath.endsWith("/")){
return null;
}
int last = filePath.lastIndexOf("/")+1;
String file = filePath.substring(last);
String path = filePath.substring(0, last);
return getResourceDownUrl(request, file, path);
}
/**
* getFile获取文件流
* @param path 文件真实地址
* @param response
* @return
*/
public static HttpServletResponse getFile(String path, HttpServletResponse response) {
try {
// path是指欲下载的文件的路径。
File file = new File(path);
// 取得文件名。
String filename = file.getName();
String contentType = "application/octet-stream";
// 以流的形式下载文件。
InputStream fis = new BufferedInputStream(new FileInputStream(path));
byte[] buffer = new byte[fis.available()];
fis.read(buffer);
fis.close();
// 清空response
response.reset();
// 设置response的Header
response.addHeader("Content-Disposition", "attachment;filename=" + new String(filename.getBytes("utf-8"),"ISO-8859-1"));
response.addHeader("Content-Length", "" + file.length());
OutputStream toClient = new BufferedOutputStream(response.getOutputStream());
response.setContentType(contentType);
toClient.write(buffer);
toClient.flush();
toClient.close();
//new GetFilterAction().download();
} catch (IOException ex) {
ex.printStackTrace();
}
return response;
}
/**
* 获取文件基本信息
* @param filePath 文件路径
* @return
*/
public static String checkFileInfo(String filePath) {
File file = new File(filePath);
String baseFileName = null; //文件名
String ownerId = null; //文件所有者的唯一编号
long size = 0; //文件大小,以bytes为单位
//String sha256 = null; //文件的256位bit的SHA-2编码散列内容
long version = 0; //文件版本号,文件如果被编辑,版本号也要跟着改变
if(file.exists()) {
// 取得文件名。
baseFileName = file.getName();
size = file.length();
// 取得文件的后缀名。
//String ext = baseFileName.substring(baseFileName.lastIndexOf(".") + 1);
ownerId = "admin";
//sha256 = new SHAUtils().SHA(FileUtils.readByByte(file), "SHA-256");
version = file.lastModified();
}
return "{\"BaseFileName\":\"" + baseFileName + "\",\"OwnerId\":\"" + ownerId + "\",\"Size\":\"" + size
+ "\",\"AllowExternalMarketplace\":\"" + true + "\",\"Version\":\"" + version + "\"}";
}
/**
* 获取文件后缀名
* @param fileName 文件名
* @return 文件后缀名
*/
public static String getFileExt(String fileName){
if(StringUtils.isEmpty(fileName)){
return null;
}
String ext = null;
int index = -1;
if((index = fileName.lastIndexOf(".")) > -1){
ext = fileName.substring(index+1);
ext = ext.toLowerCase();
}
return ext;
}
/**
* 获取系统web地址
* http://192.168.1.1:8080/ServletTest
* @param request
* @return
*/
public static String getWebPath(HttpServletRequest request){
StringBuffer str = request.getRequestURL();
if ("/ROOT".equals(request.getContextPath())) {
return str.substring(0, str.indexOf(request.getRequestURI()));
} else {
return str.substring(0, str.indexOf(request.getContextPath())+request.getContextPath().length());
}
}
/**
* utf8转码处理
* @Title: URLEncoder4UTF8
* @Description: TODO(这里用一句话描述这个方法的作用)
* @param @param str
* @param @return 设定文件
* @return String 返回类型
* @throws
*/
public static String URLEncoder4UTF8(String str){
try {
str = URLEncoder.encode(str, "UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return str;
}
}

@ -0,0 +1,55 @@
package com.yipin.liuwanr;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
public class PropertiesUtils extends PropertyPlaceholderConfigurer {
public static Map<String, Object> ctxPropertiesMap;
@Override
protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)
throws BeansException {
super.processProperties(beanFactoryToProcess, props);
ctxPropertiesMap = new HashMap<String, Object>();
for (Object key : props.keySet()) {
String keyStr = key.toString();
String value = props.getProperty(keyStr);
ctxPropertiesMap.put(keyStr, value);
}
}
public static String getContextProperty(String name) {
return (String)ctxPropertiesMap.get(name);
}
/*private static Properties PRO = new Properties();
static {
InputStream ins = null;
try {
ins = PropertiesUtils.class.getResourceAsStream("/config/application.properties");
PRO.load(ins);
} catch (IOException e) {
System.out.println("加载连连支付配置文件失败!");
e.printStackTrace();
} finally {
try {
ins.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static String getContextProperty(String key){
String value = PRO.getProperty(key);
return value;
}*/
}

@ -0,0 +1,80 @@
package com.yipin.liuwanr;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class Test {
public static void main(String[] args) throws Exception {
//方法一
//System.out.println((new Test()).getURLContent());
String urlStr = "http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?page=1&num=40&sort=symbol&asc=1&node=hs_a&symbol=&_s_r_a=init";
System.out.println((new Test()).getURLContent(urlStr));
}
public static String getURLContent() throws Exception {
String strURL = "http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?page=1&num=40&sort=symbol&asc=1&node=hs_a&symbol=&_s_r_a=init";
URL url = new URL(strURL);
HttpURLConnection httpConn = (HttpURLConnection)url.openConnection();
httpConn.setRequestMethod("GET");
httpConn.connect();
BufferedReader reader = new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
String line;
StringBuffer buffer = new StringBuffer();
while ((line = reader.readLine()) != null) {
buffer.append(line);
}
reader.close();
httpConn.disconnect();
System.out.println(buffer.toString());
return buffer.toString();
}
/**
* 程序中访问http数据接口
*/
public static String getURLContent(String urlStr) {
/** 网络的url地址 */
URL url = null;
/** http连接 */
HttpURLConnection httpConn = null;
/**//** 输入流 */
BufferedReader in = null;
StringBuffer sb = new StringBuffer();
try {
url = new URL(urlStr);
in = new BufferedReader(new InputStreamReader(url.openStream(), "GBK"));
String str = null;
while ((str = in.readLine()) != null) {
sb.append(str);
}
} catch (Exception ex) {
} finally {
try {
if (in != null) {
in.close();
}
} catch (IOException ex) {
}
}
String result = sb.toString();
JSONArray json = JSONArray.fromObject(result);
if (json.size()>0) {
for (int i = 0; i < json.size(); i++) {
JSONObject job = json.getJSONObject(i);
}
}
System.out.println(result);
return result;
}
}

@ -0,0 +1,27 @@
package com.yipin.liuwanr;
import javax.servlet.MultipartConfigElement;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class TomcatConfig {
@Value("${spring.servlet.multipart.maxFileSize}")
private String MaxFileSize;
@Value("${spring.servlet.multipart.maxRequestSize}")
private String MaxRequestSize;
@Bean
public MultipartConfigElement multipartConfigElement() {
MultipartConfigFactory factory = new MultipartConfigFactory();
// 单个数据大小
factory.setMaxFileSize(MaxFileSize); // KB,MB
/// 总上传数据大小
factory.setMaxRequestSize(MaxRequestSize);
return factory.createMultipartConfig();
}
}

@ -0,0 +1,170 @@
package com.yipin.liuwanr;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.zip.CRC32;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.tomcat.util.codec.binary.Base64;
import com.aliyun.oss.OSSClient;
import com.yipin.liuwanr.entity.Speed;
import com.yipin.liuwanr.helper.RandomUtil;
import com.yipin.liuwanr.helper.SensorUtil;
public class UserTest {
public static void main(String[] args) {
/*
String password = "123456789";
String encoded = encryptePassword(password);
System.out.println(RandomUtil.parsePassword(encoded));
System.out.println(RandomUtil.getMD5Bytes(password.getBytes()));
System.out.println(GetFileSign());
UploadImageTest();
testSocketServer();
System.out.println(PushHelper.updateIMUser("16a00afdb0e94ab5a2f04b3b4ad20d0b", "互动消息", "https://lwavatars.oss-cn-shenzhen.aliyuncs.com/interaction.png"));
System.out.println(PushHelper.watchIMUser("[\"16a00afdb0e94ab5a2f04b3b4ad20d0b\"]"));
*/
testStepCount();
}
public static void testStepCount(){
ArrayList<Speed> sdata = new ArrayList<Speed>();
for(int i=0;i<100;i++){
Speed s = new Speed(new Float(Math.random()*10), new Float(Math.random()*10), new Float(Math.random()*10) );
sdata.add(s);
}
System.out.println(SensorUtil.countMoves(sdata));
}
private static void UploadImageTest(){
OSSClient ossClient = new OSSClient("oss-cn-shenzhen.aliyuncs.com", "LTAIHIkGqaILObBm", "QDTxKMrfDPeJ3bsr3AqjYHwnlL6PdM");
ossClient.putObject("d814b6d1bbab4a84afcbfb765e231024","test.jpg",new File("/Users/ptdcxywzptdq/Downloads/100EOS5D/T0QtWInMhK33BexwBkE2JA.JPG"));
}
private static void testSocketServer(){
try {
// 1、创建客户端Socket,指定服务器地址和端口
// Socket socket=new Socket("127.0.0.1",5200);
Socket socket = new Socket("www.liuwanr.cn", 9123);
System.out.println("客户端启动成功");
// 2、获取输出流,向服务器端发送信息
// 向本机的52000端口发出客户请求
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// 由系统标准输入设备构造BufferedReader对象
PrintWriter write = new PrintWriter(socket.getOutputStream());
// 由Socket对象得到输出流,并构造PrintWriter对象
//3、获取输入流,并读取服务器端的响应信息
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
// 由Socket对象得到输入流,并构造相应的BufferedReader对象
String readline;
readline = br.readLine(); // 从系统标准输入读入一字符串
while (!readline.equals("end")) {
// 若从标准输入读入的字符串为 "end"则停止循环
write.println(readline);
// 将从系统标准输入读入的字符串输出到Server
write.flush();
// 刷新输出流,使Server马上收到该字符串
System.out.println("Client:" + readline);
// 在系统标准输出上打印读入的字符串
System.out.println("Server:" + in.readLine());
// 从Server读入一字符串,并打印到标准输出上
readline = br.readLine(); // 从系统标准输入读入一字符串
} // 继续循环
//4、关闭资源
write.close(); // 关闭Socket输出流
in.close(); // 关闭Socket输入流
socket.close(); // 关闭Socket
} catch (Exception e) {
System.out.println("can not listen to:" + e);// 出错,打印出错信息
}
}
private static String GetFileSign(){
String ret = "";
File file;
FileInputStream fis;
ByteArrayOutputStream baos = null;
BufferedInputStream bis = null;;
try {
file = new File("/Users/ptdcxywzptdq/Downloads/100EOS5D/T0QtWInMhK33BexwBkE2JA.JPG");
fis = new FileInputStream(file);
baos = new ByteArrayOutputStream((int)file.length());
bis = new BufferedInputStream(fis);
byte[] buffer = new byte[1024];
int len = 0;
while(true){
len = bis.read(buffer);
if(len == -1){
break;
}
baos.write(buffer);
}
return Base64.encodeBase64URLSafeString(RandomUtil.getMD5Bytes(baos.toByteArray()));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally{
try {
baos.close();
bis.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return ret;
}
private static String encryptePassword(String password){
byte[] content = password.getBytes();
CRC32 crcEncoder = new CRC32();
crcEncoder.update(content);
String crcStr = Long.toHexString(crcEncoder.getValue());
System.out.println("CRC:"+crcStr);
byte[] crc = crcStr.getBytes();
byte[] high = new byte[4];
byte[] low = new byte[4];
System.arraycopy(crc, 0, high, 0, 4);
System.arraycopy(crc, 4, low, 0, 4);
String pass = "";
try {
SecretKeySpec sks = new SecretKeySpec(ArrayUtils.addAll(crc, crc), "AES");
Cipher cp = Cipher.getInstance("AES");
cp.init(Cipher.ENCRYPT_MODE, sks);
byte[] encryptedpass = cp.doFinal(content);
System.out.println("AES:" + Base64.encodeBase64URLSafeString(encryptedpass));
pass = Base64.encodeBase64URLSafeString(ArrayUtils.addAll(ArrayUtils.addAll(high, encryptedpass), low));
System.out.println("BASE:" + new String(pass));
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
}
System.out.println(pass);
return pass;
}
}

@ -0,0 +1,68 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.AliyunOssService;
@RestController
@RequestMapping("/aliyun")
public class AliyunOssController {
@Autowired
private AliyunOssService ossService;
/**
* 上传文件
* @param file
* @return
*/
@PostMapping("/uploadFiles")
Response uploadFiles(MultipartFile file) {
Response resp = new Response();
HashMap<String, Object> ret = ossService.uploadFiles(file);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 下载文件
* @param objectName在阿里云的文件路径
* @param fileurl:本地路径
* @return
*/
@GetMapping("/downloadFiles")
Response downloadFiles(HttpServletResponse response,@RequestParam String objectName) {
Response resp = new Response();
try {
ossService.downloadFiles(response,objectName);
resp.setStatus(200);
resp.setMessage("下载成功!");
} catch (Exception e) {
resp.setStatus(300);
resp.setErrmessage("下载失败");
}
return null;
}
}

@ -0,0 +1,28 @@
package com.yipin.liuwanr.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.helper.RedisHelper;
@RestController
@RequestMapping("/app")
public class AppController {
@Autowired
RedisHelper redisHelper;
@RequestMapping("/lastver")
Response version() {
Response resp = new Response();
JSONObject job = new JSONObject();
job.put("android", "1.0.0");
job.put("ios", "1.0.0");
resp.setStatus(200);
resp.setMessage(job);
return resp;
}
}

@ -0,0 +1,389 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Assesment;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.AssesmentService;
import com.yipin.liuwanr.vo.AssesmentStudentVo;
@RestController
@RequestMapping("/assesment")
@CrossOrigin
public class AssesmentController {
@Autowired
private AssesmentService service;
/**
* 考核管理列表
* @param className行政班级名称
* @param assesmentState考核状态
* @param releaseType发布方式
* @param creationTime起始时间
* @param endTime结束时间
* @param month月份
* @param pageSize每页多少条数据
* @param pageNo第几页
* @return
*/
@GetMapping("/queryAssesmentcondition")
Response queryAssementCondition(Integer staffId,Integer courseId,String className,
Integer assesmentState,Integer releaseType, String creationTime,String endTime,Integer month,
@RequestParam(defaultValue = "0")Integer pageSize,
@RequestParam(defaultValue = "0")Integer pageNo ) {
Response resp = new Response();
Assesment assesment = new Assesment();
if(staffId!=null) {
assesment.setStaffId(staffId);
}
if(courseId!=null) {
assesment.setCourseId(courseId);
}
if(className!=null&&className!="") {
assesment.setClassName(className);
}
if (assesmentState!=null) {
assesment.setAssesmentState(assesmentState);
}
if (releaseType!=null) {
assesment.setReleaseType(releaseType);
}
if (month!=null) {
assesment.setMonth(month);
}
if (creationTime!=null&&creationTime!="") {
assesment.setCreationTime(creationTime);
}
if (endTime!=null&&endTime!="") {
assesment.setEndTime(endTime);
}
HashMap<String, Object> ret = service.queryAssesmentCondition(assesment, pageNo, pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 创建考核
* @param vo
* @return
*/
@PostMapping("/addAssesment")
Response addAssesment(@RequestBody AssesmentStudentVo vo) {
Response resp = new Response();
HashMap<String, Object> ret = service.addAssesment(vo);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询选中的学生有哪些正在参与考核
* @param studentIds
* @return
*/
@GetMapping("/queryStudentisAssess")
Response queryStudentisAssess(@RequestParam List<Integer> studentIds) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryStudentisAssess(studentIds);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 根据id查询考核的信息
* @param id
* @return
*/
@GetMapping("/queryGetById")
Response getByAssesmentId(Integer id) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryGetById(id);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 修改考核
* @param vo
* @return
*/
@PostMapping("/updateAssesment")
Response updateAssesment(@RequestBody AssesmentStudentVo vo) {
Response resp = new Response();
Assesment assesment=vo.getAssesment();
List<Integer> studentIds=vo.getStudentIds();
HashMap<String, Object> ret = service.updateAssesment(assesment,studentIds);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 启动考核前的判断
* @param assesmentId
* @return
*/
@GetMapping("/assessmentJudgment")
Response updateState(Integer assesmentId) {
Response resp = new Response();
HashMap<String, Object> ret = service.assessmentJudgment(assesmentId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 修改考核状态
* @param id
* @param state
* @return
*/
@PostMapping("/updateState")
Response updateState(@RequestBody Assesment assesment) {
Response resp = new Response();
HashMap<String, Object> ret = service.updateState(assesment);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询实验班级一级栏目
* @param staffId
* @return
*/
@GetMapping("/getExperimentalClass")
Response getExperimentalClass(Integer staffId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryCretionTime(staffId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询实验班级名称以及班级一下的学生
* @param creationTime
* @return
*/
@GetMapping("/getCreationTime")
Response getCreationTime(String creationTime,Integer staffId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryCretionTime(creationTime,staffId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 考核信息展示
* @param assesmentId
* @return
*/
@GetMapping("/queryAssesmet")
Response queryAssesmet(Integer assesmentId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryAssesment(assesmentId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 班级筛选
* @param assesmentId
* @return
*/
@GetMapping("/getByclass")
Response getByclass(Integer assesmentId) {
Response resp = new Response();
HashMap<String, Object> ret = service.getByclass(assesmentId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 成绩概况
* @param assesmentId
* @param experimentalClassId
* @param classId
* @return
*/
@GetMapping("/queryClassScore")
Response queryClassScore(Integer assesmentId,Integer experimentalClassId,@RequestParam List<Integer> classId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryScore(assesmentId,experimentalClassId,classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 成绩分布柱状图
* @param assesmentId
* @param experimentalClassId
* @param classId
* @return
*/
@GetMapping("/queryHistogram")
Response queryHistogram(Integer assesmentId,Integer experimentalClassId,
@RequestParam List<Integer> classId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryHistogram(assesmentId,experimentalClassId,classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 错误分布折线图
* @param assesmentId
* @param experimentalClassId
* @param classId
* @return
*/
@GetMapping("/getLinechart")
Response getLinechart(Integer assesmentId,Integer experimentalClassId,
@RequestParam List<Integer> classId) {
Response resp = new Response();
HashMap<String, Object> ret = service.getLinechart(assesmentId,experimentalClassId,classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 成绩明细
* @param assesmentId
* @param experimentalClassId
* @param classId
* @return
*/
@GetMapping("/queryAssesmentScore")
Response queryAssesmentScore(Integer assesmentId,Integer experimentalClassId,
@RequestParam List<Integer> classId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryAssesmentScore(assesmentId,experimentalClassId,classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,48 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.AssesmentRecordService;
@RestController
@RequestMapping("/assesmentRecord")
/**
* 考核记录
* @author 或然
*
*/
public class AssesmentRecordController {
@Autowired
private AssesmentRecordService assesmentRecordService;
/**
* 考核管理查询成绩明细
*/
@GetMapping("/queryStudentAssessment")
Response queryStudentAssessment(Integer studentId,Integer courseId) {
Response resp = new Response();
if (studentId==null) {
resp.setStatus(300);
resp.setErrmessage("studentId Empty");
return resp;
}
HashMap<String, Object> ret = assesmentRecordService.queryStudentAssessment(studentId,courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,111 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.AttendanceService;
@RestController
@RequestMapping("/attendance")
/**
* 考勤记录
* @author 或然
*
*/
public class AttendanceController {
@Autowired
private AttendanceService attendanceService;
/**
* 考勤记录展示
* @param studentId
* @param courseId
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping("/queryAttendanceDetailed")
Response queryAttendanceDetailed(Integer studentId,Integer courseId,Integer pageNo,Integer pageSize) {
Response resp = new Response();
if (null==studentId) {
resp.setStatus(300);
resp.setErrmessage("studentId is empty");
return resp;
}else if(null==courseId) {
resp.setStatus(300);
resp.setErrmessage("courseId is empty");
return resp;
}else {
HashMap<String, Object> ret = attendanceService.queryAttendanceDetailed(studentId,courseId,pageNo, pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 考勤记录导出
* @param response
* @param studentId
* @param courseId
* @param titles
* @return
*/
@GetMapping("/exportPractice")
Response exportPractice(HttpServletResponse response,Integer studentId,Integer courseId,String[] titles) {
try {
attendanceService.exportPractice(response,studentId,courseId,titles);
} catch (Exception e) {
return null;
}
return null;
}
/**
* 考勤个人信息展示
* @param studentId
* @param courseId
* @return
*/
@GetMapping("/queryAttendanceSignIn")
Response queryAttendanceSignIn(Integer studentId,Integer courseId) {
Response resp = new Response();
if (null==studentId) {
resp.setStatus(300);
resp.setErrmessage("studentId is empty");
return resp;
}else if(null==courseId) {
resp.setStatus(300);
resp.setErrmessage("courseId is empty");
return resp;
}else {
HashMap<String, Object> ret = attendanceService.queryAttendance(studentId,courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,82 @@
package com.yipin.liuwanr.controller;
import java.io.IOException;
import org.jboss.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.tcpserver.MinaSessionManager;
import com.yipin.liuwanr.helper.ElasticHelper;
@RestController
public class BaseController {
@Autowired
private RedisHelper redisHelper;
@Autowired
private ElasticHelper elasticHelper;
private static Logger logger = Logger.getLogger(BaseController.class);
@RequestMapping("/")
String hello() {
return "Liuwanr Backend Index!";
}
@RequestMapping("/test/redis/get/{key}")
String getRedis(@PathVariable("key") String key) {
return redisHelper.get(key).toString();
}
@RequestMapping("/test/redis/set/{key}")
String putRedis(@PathVariable("key") String key, @RequestParam("value") String value) {
redisHelper.set(key, value);
return "SUCCESS";
}
@RequestMapping("/test/elastic/get/{key}")
String getElastic(@PathVariable("key") String key) {
String ret = "ERROR";
try {
ret = elasticHelper.get(key);
} catch (IOException e) {
logger.error(e.getMessage());
}
return ret;
}
@RequestMapping("/test/elastic/set/{key}")
String putElastic(@PathVariable("key") String key, @RequestParam("value") String value, @RequestParam(value="ts", required = false, defaultValue = "0") long timestamp) {
String ret = "SUCCESS";
try {
switch (key) {
case "_create":
elasticHelper.create(value);
break;
case "_delete":
elasticHelper.delete(value);
break;
default:
elasticHelper.set(key, value, timestamp);
break;
}
} catch (IOException e) {
logger.error(e.getMessage());
ret = "ERROR";
}
return ret;
}
@RequestMapping("/test/tcp/put/{key}/{msg}")
String putTcpMessage(@PathVariable("key") String key, @PathVariable("msg") String msg) {
MinaSessionManager.getSessionByDevice(key).write(msg.replace("-", "|") + "\r");
return "SUCCESS";
}
}

@ -0,0 +1,112 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.City;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.CityService;
@RestController
@RequestMapping("/city")
@CrossOrigin
public class CityController {
@Autowired
private CityService cityService;
@Autowired
RedisHelper redisHelper;
/**
* 添加城市
*/
@PostMapping("/addCity")
Response addCustomer(@RequestBody City city) {
Response resp = new Response();
HashMap<String, Object> ret = cityService.addCity(city);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询城市
*/
@GetMapping("/queryCity")
Response queryCity(@RequestParam Integer provinceId) {
Response resp = new Response();
HashMap<String, Object> ret = cityService.queryCity(provinceId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 删除城市
*/
@PostMapping("/deleteCity")
Response deleteCity(@RequestParam Integer cityId) {
Response resp = new Response();
if (cityId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = cityService.deleteCity(cityId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新城市
*/
@RequestMapping(value="/updateCity",method = RequestMethod.POST)
Response updateCity(@RequestBody City city) {
Response resp = new Response();
if (city==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = cityService.updateCity(city);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,44 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.ClassService;
@RestController
@RequestMapping("/class")
public class ClassController {
@Autowired
private ClassService classService;
/**
* 在行政班级面板根据行政班级名称查询信息
* @param className
* @return
*/
@GetMapping("/queryGetByClassName")
Response queryExperimentClass(@RequestParam String className) {
Response resp = new Response();
HashMap<String, Object> ret=classService.queryGetByClassName(className);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,577 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Course;
import com.yipin.liuwanr.entity.CourseLink;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.ServiceConfig;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.CourseService;
import com.yipin.liuwanr.vo.CourseVO;
@RestController
@RequestMapping("/course")
@CrossOrigin
public class CourseController {
@Autowired
private CourseService courseService;
@Autowired
RedisHelper redisHelper;
/**
* 添加课程
*
*/
@PostMapping("/addCourse")
Response addCustomer(@RequestBody CourseVO vo) {
Response resp = new Response();
Course course = vo.getCourse();
List<ServiceConfig> serviceConfigList = vo.getServiceConfigList();
if (course.getCourseName()==null||course.getCourseName().length()<=0) {
resp.setStatus(300);
resp.setErrmessage("Course Name Is Null!");
}else if(course.getCourseType()==null){
resp.setStatus(300);
resp.setErrmessage("Course Type Is Null!");
}else if(course.getDisciplineId()==null){
resp.setStatus(300);
resp.setErrmessage("DisciplineId Type Is Null!");
}else if(course.getProfessionalClassId()==null){
resp.setStatus(300);
resp.setErrmessage("ProfessionalId Class Is Null!");
}else if(course.getProfessionalId()==null){
resp.setStatus(300);
resp.setErrmessage("ProfessionalId Is Null!");
}else if(course.getMarketPrice()==null||course.getMarketPrice().length()<=0){
resp.setStatus(300);
resp.setErrmessage("Market Price Is Null!");
}else if(course.getCourseIntroduction()==null||course.getCourseIntroduction().length()<=0){
resp.setStatus(300);
resp.setErrmessage("Course Introduction Is Null!");
}else if(course.getTeachingGoal()==null||course.getTeachingGoal().length()<=0){
resp.setStatus(300);
resp.setErrmessage("Teaching Goal Is Null!");
}else if(course.getSystemId()==null||course.getSystemId()==""){
resp.setStatus(300);
resp.setErrmessage("SystemId Is Null!");
}else {
HashMap<String, Object> ret = courseService.addCourse(course);
Integer courseId = (Integer) ret.get("retvalue");
Integer size = vo.getServiceConfigList().size();
for (int i = 0; i < size; i++) {
serviceConfigList.get(i).setCourseId(courseId);
}
// HashMap<String, Object> retPC = courseService.addCoursePC(serviceConfigList);
int status = (int) ret.get("retcode");
if (200 == status) {
HashMap<String, Object> retPC = courseService.addCoursePC(serviceConfigList);
int statusPC = (int) retPC.get("retcode");
if (statusPC == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询课程
*/
@GetMapping("/queryCourse")
Response queryCourse(@RequestParam Integer disciplineId,Integer professionalClassId,Integer professionalId,Integer pageNo,Integer pageSize,String searchContent,Integer courseType) {
Response resp = new Response();
Course course = new Course();
if (searchContent!=null&&searchContent!="") {
course.setSearchContent(searchContent);
}
if (disciplineId!=null) {
course.setDisciplineId(disciplineId);
}
if (professionalClassId!=null) {
course.setProfessionalClassId(professionalClassId);
}
if (professionalId!=null) {
course.setProfessionalId(professionalId);
}
if (courseType!=null) {
course.setCourseType(courseType);
}
HashMap<String, Object> ret = courseService.queryCourse(course,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询课程详情
*/
@GetMapping("/queryCourseDetails")
Response queryCourseDetails(@RequestParam Integer courseId) {
Response resp = new Response();
if (courseId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = courseService.queryCourseDetails(courseId);
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
// /**
// * 查询课程详情课程权限
// */
// @GetMapping("/queryCourseDetailsTC")
// Response queryCourseDetailsTC(@RequestParam Integer courseId,Integer pageNo,Integer pageSize) {
// Response resp = new Response();
// if (courseId==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// }else {
// HashMap<String, Object> ret = courseService.queryCourseDetailsTC(courseId,pageNo,pageSize);
// resp.setStatus(200);
// resp.setErrmessage("Parameter effective");
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
//}
/**
* 删除课程
*/
@PostMapping("/deleteCourse")
Response deleteCourse(@RequestBody List<Integer> courseId) {
Response resp = new Response();
if (courseId.isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = courseService.deleteCourse(courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新课程
*/
@RequestMapping(value="/updateCourse",method = RequestMethod.POST)
Response updateCourse(@RequestBody CourseVO vo) {
Response resp = new Response();
Course course = vo.getCourse();
List<ServiceConfig> serviceConfigList = vo.getServiceConfigList();
if (course.getCourseId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = courseService.updateCourse(course);
int status = (int) ret.get("retcode");
if (200 == status) {
Integer courseId = course.getCourseId();
HashMap<String, Object> ret1 = courseService.deleteCoursePC(courseId);
Integer size = vo.getServiceConfigList().size();
for (int i = 0; i < size; i++) {
serviceConfigList.get(i).setCourseId(courseId);
}
HashMap<String, Object> ret2 = courseService.addCoursePC(serviceConfigList);
// int status1 = (int) ret1.get("retcode");
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 是否上架课程控制
*/
@PostMapping("/isShelves")
Response isShelves(@RequestBody Course course) {
Response resp = new Response();
if (course.getCourseId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else if (course.getIsShelves() == null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = courseService.isShelves(course);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询课程学科
*/
@GetMapping("/queryCourseDiscipline")
Response queryCourseDiscipline() {
Response resp = new Response();
HashMap<String, Object> ret = courseService.queryCourseDiscipline();
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询课程专业类
*/
@GetMapping("/queryCourseProfessionalClass")
Response queryCourseProfessionalClass(@RequestParam Integer disciplineId) {
Response resp = new Response();
HashMap<String, Object> ret = courseService.queryCourseProfessionalClass(disciplineId);
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询课程专业
*/
@GetMapping("/queryCourseProfessional")
Response queryCourseProfessional(@RequestParam Integer professionalClassId) {
Response resp = new Response();
HashMap<String, Object> ret = courseService.queryCourseProfessional(professionalClassId);
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询应用配置
*/
@GetMapping("/queryAppConfig")
Response queryAppConfig(@RequestParam String searchContent,@RequestParam List<Integer> systemId) {
Response resp = new Response();
ServiceConfig serviceConfig = new ServiceConfig();
HashMap<String, Object> ret = courseService.queryAppConfig(searchContent,systemId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 添加项目环节
*/
@PostMapping("/addCourseLink")
Response addCourseLink(@RequestBody CourseLink courseLink) {
Response resp = new Response();
List<CourseLink> courseLinkList = courseLink.getCourseLink();
if (courseLinkList.isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("courseLinkList Is Null!");
}else {
Integer size = courseLinkList.size();
for (int i = 0; i < size; i++) {
Integer courseId = courseLinkList.get(i).getCourseId();
Integer projectId = courseLinkList.get(i).getProjectId();
if (courseId==null) {
resp.setStatus(300);
resp.setErrmessage("courseId Is Null!");
return resp;
}if(projectId==null) {
resp.setStatus(300);
resp.setErrmessage("projectId Is Null!");
return resp;
}
}
HashMap<String, Object> ret = courseService.addCourseLink(courseLinkList);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询实训配置
*/
@GetMapping("/queryTrainingConfig")
Response queryTrainingConfig(@RequestParam Integer courseId) {
Response resp = new Response();
if (courseId ==null) {
resp.setStatus(300);
resp.setErrmessage("courseId Is Null!");
}
HashMap<String, Object> ret = courseService.queryTrainingConfig(courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 绑定实训配置
*/
@PostMapping("/addTrainingConfig")
Response addTrainingConfig(@RequestBody Course course) {
Response resp = new Response();
Integer courseId = course.getCourseId();
String systemId = course.getSystemId();
if (courseId==null) {
resp.setStatus(300);
resp.setErrmessage("courseId Is Null!");
}
if (systemId==null) {
resp.setStatus(300);
resp.setErrmessage("systemId Is Null!");
}
HashMap<String, Object> ret = courseService.addTrainingConfig(course);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询环节详情
*/
@GetMapping("/queryLinkDetails")
Response queryLinkDetails(@RequestParam Integer courseId,Integer projectId) {
Response resp = new Response();
CourseLink courseLink = new CourseLink();
if (projectId!=null) {
courseLink.setProjectId(projectId);
}
if(courseId!= null){
courseLink.setCourseId(courseId);
}
HashMap<String, Object> ret = courseService.queryLinkDetails(courseLink);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 更新环节
*/
@PostMapping("/updateLink")
Response updateLink(@RequestBody CourseLink courseLink) {
Response resp = new Response();
if (courseLink.getLinkId() ==null) {
resp.setStatus(300);
resp.setErrmessage("LinkId Is Null!");
}
HashMap<String, Object> ret = courseService.updateLink(courseLink);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
// /**
// * 删除实训配置
// */
// @PostMapping("/deleteTrainingConfig")
// Response deleteTrainingConfig(@RequestBody Course course) {
// Response resp = new Response();
// if (course.getProjectId()==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// } else {
// HashMap<String, Object> ret = courseService.deleteTrainingConfig(course);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
// /**
// * 是否展示项目控制
// */
// @PostMapping("/isShow")
// Response isShow(@RequestBody Course course) {
// Response resp = new Response();
// if (course.getProjectId()==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// }else if (course.getIsShow() == null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// } else {
// HashMap<String, Object> ret = courseService.isShow(course);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
/**
* 查询配置
*/
@GetMapping("/queryConfig")
Response queryConfig(@RequestParam String systemId,Integer pageNo,Integer pageSize) {
Response resp = new Response();
if (systemId ==null||systemId == "") {
resp.setStatus(300);
resp.setErrmessage("systemId Is Null!");
}
HashMap<String, Object> ret = courseService.queryConfig(systemId,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/platformQueryCourse")
Response platformQueryCourse(Integer schoolId) {
Response resp = new Response();
HashMap<String, Object> ret = courseService.platformQueryCourse(schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/getCourse")
Response getcouese(Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = courseService.getcouese(courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,105 @@
//package com.yipin.liuwanr.controller;
//
//import java.util.HashMap;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.yipin.liuwanr.entity.Course;
//import com.yipin.liuwanr.entity.CoursePermissions;
//import com.yipin.liuwanr.entity.Response;
//import com.yipin.liuwanr.helper.RedisHelper;
//import com.yipin.liuwanr.service.CoursePermissionsService;
//
//@RestController
//@RequestMapping("/CoursePermissions")
//@CrossOrigin
//public class CoursePermissionsController {
//
// @Autowired
// private CoursePermissionsService coursePermissionsService;
//
// @Autowired
// RedisHelper redisHelper;
//
// /**
// * 添加课程权限
// */
// @PostMapping("/addCoursePermissions")
// Response addCustomer(@RequestBody CoursePermissions coursePermissions) {
// Response resp = new Response();
// if (coursePermissions.getCourseId()==null) {
// resp.setStatus(300);
// resp.setErrmessage("CouserId Is Null!");
// }else {
// HashMap<String, Object> ret = coursePermissionsService.addCoursePermissions(coursePermissions);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
//
//
// /**
// * 更新课程
// */
// @RequestMapping(value="/updateCourse",method = RequestMethod.POST)
// Response updateCourse(@RequestBody Course course) {
// Response resp = new Response();
// if (course.getCourseId()==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// } else {
// HashMap<String, Object> ret = coursePermissionsService.updateCourse(course);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
//
// /**
// * 是否展示项目控制
// */
// @PostMapping("/isShow")
// Response isShow(@RequestBody Course course) {
// Response resp = new Response();
// if (course.getProjectId()==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// }else if (course.getIsShow() == null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// } else {
// HashMap<String, Object> ret = coursePermissionsService.isShow(course);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
//
//}

@ -0,0 +1,224 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Customer;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.UserM;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.CustomerService;
@RestController
@RequestMapping("/customer")
@CrossOrigin
public class CustomerController {
@Autowired
private CustomerService customerService;
@Autowired
RedisHelper redisHelper;
/**
* 添加客户
*/
@PostMapping("/addCustomer")
Response addCustomer(@RequestBody Customer customer) {
Response resp = new Response();
UserM userm = new UserM();
userm.setCityId(customer.getCityId());
userm.setCountries(customer.getCountries());
userm.setProvinceId(customer.getProvinceId());
userm.setPhone(customer.getAdminPhone());
userm.setEmail(customer.getEmail());
userm.setPassword("huoran123");
if (customer.getCityId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = customerService.addCustomer(customer);
HashMap<String, Object> ret1 = customerService.addAdmin(userm);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询客户
*/
@GetMapping("/queryCustomer")
Response queryCustomer(@RequestParam String countries,Integer provinceId,Integer cityId,Integer pageNo,Integer pageSize,String searchContent) {
Response resp = new Response();
Customer customer = new Customer();
if (searchContent!=null&&searchContent!="") {
customer.setSearchContent(searchContent);
}
if (countries!=null&&countries!="") {
customer.setCountries(countries);
}
if (provinceId!=null) {
customer.setProvinceId(provinceId);
}
if (cityId!=null) {
customer.setCityId(cityId);
}
HashMap<String, Object> ret = customerService.queryCustomer(customer,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询客户详情
*/
@GetMapping("/queryCustomerDetails")
Response queryCustomerDetails(@RequestParam Integer customerId) {
Response resp = new Response();
if (customerId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = customerService.queryCustomerDetails(customerId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除客户
*/
@PostMapping("/deleteCustomer")
Response deleteCustomer(@RequestBody Customer customer) {
Response resp = new Response();
if (customer.getCustomer().isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = customerService.deleteCustomer(customer);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新客户
*/
@PostMapping("/updateCustomer")
Response updateCustomer(@RequestBody Customer customer) {
Response resp = new Response();
if (customer.getCustomerId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = customerService.updateCustomer(customer);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询客户是否存在
*/
@GetMapping("/queryCustomerIsExists")
Response queryCustomerIsExists(@RequestParam Integer schoolId) {
Response resp = new Response();
if (schoolId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = customerService.queryCustomerIsExists(schoolId);
if (ret.isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("该客户已存在!");
}else {
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
}
return resp;
}
/**
* 查询行业类
*/
@GetMapping("/queryCustomerIndustryClass")
Response queryCustomerIndustryClass() {
Response resp = new Response();
HashMap<String, Object> ret = customerService.queryCustomerIndustryClass();
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询行业
*/
@GetMapping("/queryCustomerIndustry")
Response queryCustomerIndustry(@RequestParam Integer industryClassId) {
Response resp = new Response();
HashMap<String, Object> ret = customerService.queryCustomerIndustry(industryClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,114 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.Test;
import com.yipin.liuwanr.entity.Demo;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.UserService;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@RestController
@RequestMapping("/demo")
public class DemoController {
@Autowired
private UserService userService;
@Autowired
RedisHelper redisHelper;
@GetMapping("/demo")
Response createUser() {
Response resp = new Response();
Demo demo = new Demo();
if (demo!=null) {
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
HashMap<String, Object> ret = userService.demo(demo);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
@GetMapping("/insert")
Response createDemo() {
String urlStr = "http://vip.stock.finance.sina.com.cn/quotes_service/api/json_v2.php/Market_Center.getHQNodeData?page=1&num=40&sort=symbol&asc=1&node=hs_a&symbol=&_s_r_a=init";
Response resp = new Response();
Demo demo = new Demo();
String result = Test.getURLContent(urlStr);
System.out.println(result);
JSONArray json = JSONArray.fromObject(result);
if (json.size()>0) {
for (int i = 0; i < json.size(); i++) {
JSONObject job = json.getJSONObject(i);
String amount = job.getString("amount");
String buy = job.getString("buy");
String changepercent = job.getString("changepercent");
String code = job.getString("code");
String high = job.getString("high");
String low = job.getString("low");
String mktcap = job.getString("mktcap");
String name = job.getString("name");
String nmc = job.getString("nmc");
String open = job.getString("open");
String pb = job.getString("pb");
String per = job.getString("per");
String pricechange = job.getString("pricechange");
String sell = job.getString("sell");
String settlement = job.getString("settlement");
String symbol = job.getString("symbol");
String ticktime = job.getString("ticktime");
String trade = job.getString("trade");
String turnoverratio = job.getString("turnoverratio");
String volume = job.getString("volume");
demo.setAmount(amount);
demo.setBuy(buy);
demo.setChangepercent(changepercent);
demo.setCode(code);
demo.setHigh(high);
demo.setLow(low);
demo.setMktcap(mktcap);
demo.setName(name);
demo.setNmc(nmc);
demo.setOpen(open);
demo.setPb(pb);
demo.setPer(per);
demo.setPricechange(pricechange);
demo.setSell(sell);
demo.setSettlement(settlement);
demo.setSymbol(symbol);
demo.setTicktime(ticktime);
demo.setTrade(trade);
demo.setTurnoverratio(turnoverratio);
demo.setVolume(volume);
HashMap<String, Object> ret = userService.insert(demo);
}
}
// HashMap<String, Object> ret = userService.demo(demo);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
return resp;
}
}

@ -0,0 +1,151 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.DeviceService;
@RestController
@RequestMapping("/device")
public class DeviceController {
@Autowired
DeviceService deviceService;
@GetMapping("/bundling")
Response bindDevice(@RequestHeader("X-UUID") String uuid, @RequestParam("puid") String puid, @RequestParam("duid") String duid) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.bound(uuid, puid, duid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@DeleteMapping("/bundling")
Response unbindDevice(@RequestHeader("X-UUID") String uuid, @RequestParam("puid") String puid, @RequestParam("duid") String duid) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.unbundling(uuid, puid, duid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/detail")
Response getDeviceDetail(@RequestHeader("X-UUID") String uuid, @RequestParam("duid") String duid) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.detail(uuid, duid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/status")
Response getDeviceStatus(@RequestHeader("X-UUID") String uuid, @RequestParam("duid") String duid) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.status(uuid, duid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/refresh")
Response callDeviceToRefresh(@RequestHeader("X-UUID") String uuid, @RequestParam("duid") String duid) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.refresh(uuid, duid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/health")
Response getPetHealth(@RequestHeader("X-UUID") String uuid, @RequestParam("duid") String duid, @RequestParam("period") String period) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.health(uuid, duid, period);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/track")
Response trackPetPath(@RequestHeader("X-UUID") String uuid, @RequestParam("duid") String duid, @RequestParam("from") long from, @RequestParam("to") long to) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.track(uuid, duid, from, to);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/snapshot")
Response callDeviceToSnapshot(@RequestHeader("X-UUID") String uuid, @RequestParam("duid") String duid) {
Response resp = new Response();
HashMap<String, Object> ret = deviceService.snapshot(uuid, duid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,361 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.ExperimentalClass;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.Student;
import com.yipin.liuwanr.service.ExperimentalClassService;
import com.yipin.liuwanr.vo.ExperimentalClassVo;
@RestController
@RequestMapping("/experimentalClass")
public class ExperimentalClassController {
@Autowired
private ExperimentalClassService classService;
/**
* 实验班级面板根据实验班级名称查询信息
* @param experimentalClassName
* @return
*/
@GetMapping("/queryExperimentClassByName")
Response queryExperimentClass(@RequestParam String experimentalClassName) {
Response resp = new Response();
HashMap<String, Object> ret=classService.queryGetByExperimentalClassName(experimentalClassName);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询实验班级
* @param experimentalClassId
* @return
*/
@GetMapping("/queryExperimentalClass")
Response queryExperimentalClass(@RequestParam Integer schoolId) {
Response resp = new Response();
HashMap<String, Object> ret=classService.queryExperimentalClass(schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询实验班级详情
* @param experimentalClassId
* @return
*/
@GetMapping("/queryExperimentClassDetails")
Response queryExperimentClassDetails(@RequestParam String experimentalClassId,@RequestParam Integer courseId,
@RequestParam Integer professionalId,@RequestParam Integer classId,@RequestParam String studentNameNumber) {
Response resp = new Response();
Student student = new Student();
if (experimentalClassId!=null&&experimentalClassId!="") {
if (professionalId!=null) {
student.setProfessionalId(professionalId);
}
if (classId!=null) {
student.setClassId(classId);
}
if (studentNameNumber!=null&&studentNameNumber!="") {
student.setStudentNameNumber(studentNameNumber);
}
student.setExperimentalClassId(experimentalClassId);
HashMap<String, Object> ret=classService.queryExperimentalClassDetails(student,courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}else {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
return resp;
}
/**
* 实验班级添加学生
*/
@PostMapping("/experimentClassAddStudent")
Response experimentClassAddStudent(@RequestBody List<Student> studentList) {
Response resp = new Response();
if (studentList.isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = classService.experimentClassAddStudent(studentList);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 实验班级删除学生
*/
@PostMapping("/experimentClassDeleteStudent")
Response experimentClassDeleteStudent(@RequestBody List<Student> studentList) {
Response resp = new Response();
if (studentList.isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = classService.experimentClassDeleteStudent(studentList);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 修改实验班级名称
*/
@PostMapping("/updateExperimentClassName")
Response updateExperimentClassName(@RequestBody ExperimentalClass experimentalClass) {
Response resp = new Response();
Integer experimentalClassId = experimentalClass.getExperimentalClassId();
String experimentalClassName = experimentalClass.getExperimentalClassName();
if (experimentalClassId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else if(experimentalClassName==null||experimentalClassName==""){
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = classService.updateExperimentClassName(experimentalClass);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询实验班级学生专业
* @param experimentalClassId
* @return
*/
@GetMapping("/queryExperimentalClassSP")
Response queryExperimentalClassSP(@RequestParam Integer experimentalClassId) {
Response resp = new Response();
HashMap<String, Object> ret=classService.queryExperimentalClassSP(experimentalClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 专业下拉框
* @param experimentalClassId
* @return
*/
Response getProfessionals(@RequestParam Integer experimentalClassId) {
Response resp = new Response();
HashMap<String, Object> ret=classService.getProfessionals(experimentalClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 班级下拉框
* @param experimentalClassId
* @return
*/
Response getStudentClass(@RequestParam Integer experimentalClassId) {
Response resp = new Response();
HashMap<String, Object> ret=classService.getStudentClass(experimentalClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
//新增学生显示数据
Response queryexperimentalClass(@RequestParam Integer experimentalClassId) {
Response resp = new Response();
HashMap<String, Object> ret=classService.queryexperimentalClass(experimentalClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
//新增学生
Response addStudent(@RequestParam ExperimentalClassVo vo) {
Response resp = new Response();
HashMap<String, Object> ret=classService.addStudent(vo);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询学生行政班级
* @param experimentalClassId
* @return
*/
@GetMapping("/queryStudentClass")
Response queryStudentClass(@RequestParam Integer experimentalClassId) {
Response resp = new Response();
HashMap<String, Object> ret=classService.queryStudentClass(experimentalClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 添加实验班级
* @throws Exception
*/
@Transactional
@PostMapping("/addExperimentalClass")
public Response addExperimentalClass(@RequestBody ExperimentalClassVo vo) throws Exception {
Response resp = new Response();
ExperimentalClass experimentalClass = vo.getExperimentalClass();
List<Student> studentList = vo.getStudentList();
Integer schoolId = experimentalClass.getSchoolId();
if (schoolId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = classService.addExperimentalClass(experimentalClass);
Integer experimentalClassId = experimentalClass.getExperimentalClassId();
int size = studentList.size();
for (int i = 0; i < size; i++) {
studentList.get(i).setIntExperimentalClassId(experimentalClassId);
}
int status = (int) ret.get("retcode");
if (200 == status) {
HashMap<String, Object> ret1 = classService.experimentClassAddStudent(studentList);
int status1 = (int) ret1.get("retcode");
if (status1 == 200) {
resp.setStatus(status1);
resp.setMessage(ret.get("retvalue"));
}else {
resp.setStatus(status1);
resp.setErrmessage(ret.get("retvalue").toString());
throw new Exception();
}
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
throw new Exception();
}
}
return resp;
}
//删除实验班级
@PostMapping("/deleteExperimentalClass")
Response deleteExperimentalClass(@RequestBody ExperimentalClass experimentalClass) {
Response resp = new Response();
Integer experimentalClassId = experimentalClass.getExperimentalClassId();
if (experimentalClassId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter cannot be empty");
}else {
HashMap<String, Object> ret = classService.deleteExperimentalClass(experimentalClassId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,136 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Attendance;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.ExperimentallearningService;
@RestController
@RequestMapping("/Experimentallearning")
public class ExperimentallearningController {
@Autowired
private ExperimentallearningService service;
/**
* 实验项目
* @param courseId
* @return
*/
@GetMapping("/queryExperimentallearning")
Response queryExperimentallearning(Integer studentId,Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryProject(studentId,courseId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 添加签到记录
* @param courseId
* @param studentId
* @param experimentName
* @return
*/
@PostMapping("/insertAttendance")
Response insertAttendance(@RequestBody Attendance attendance) {
Response resp = new Response();
if(null==attendance) {
resp.setStatus(300);
resp.setMessage("attendance is null");
return resp;
}
HashMap<String, Object> ret = service.insertAttendance(attendance);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 获取教师信息
* @param courseId
* @return
*/
@GetMapping("/queryTeacherName")
Response queryTeacherName(Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryTeacherName(courseId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 获取学生信息
* @param courseId
* @return
*/
@GetMapping("/queryStudentName")
Response queryStudentName(Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryStudentName(courseId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 进入考核
* @param courseId
* @param studentId
* @return
*/
@GetMapping("/queryAssesment")
Response queryAssesment(Integer courseId,Integer studentId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryAssesment(courseId,studentId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,296 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.jboss.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yipin.liuwanr.entity.Group;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.GroupService;
@RestController
@RequestMapping("/group")
public class GroupController {
Logger logger = Logger.getLogger(GroupController.class);
@Autowired
GroupService groupService;
@PostMapping("/handle")
Response handleMessage(@RequestBody String message) {
Response resp = new Response();
logger.info(message);
JSONObject group = JSON.parseObject(message);
// 消息发送者
String from = group.getString("fromAccount");
/*
* "eventType"="1",
* 表示CONVERSATION消息即会话类型的消息目前包括P2P聊天消息群组聊天消息群组操作好友操作
* PERSON二人会话数据TEAM群聊数据CUSTOM_PERSON个人自定义系统通知CUSTOM_TEAM
* 群组自定义系统通知
*/
if (1 == group.getInteger("eventType")) {
if (0 == group.getString("convType").compareToIgnoreCase("CUSTOM_TEAM")
|| 0 == group.getString("convType").compareToIgnoreCase("TEAM")) {
// 消息接受者,也就是群id
long to = group.getLongValue("to");
if (0 == group.getString("msgType").compareToIgnoreCase("TEAM_INVITE")
|| 0 == group.getString("msgType").compareToIgnoreCase("NOTIFICATION")) {
// 消息附加信息.群资料以及用户信息等
JSONObject attach = JSON.parseObject(group.getString("attach").replace("\\\"", "\""));
// 群操作信息
JSONObject data = attach.getJSONObject("data");
// 群信息
JSONObject tinfo = data == null ? attach.getJSONObject("tinfo") : data.getJSONObject("tinfo");
// 群对象
Group thisgroup = new Group();
/*
* "1":"群组id,可转为Long型", "3":"群名称",
* "4":"群类型,0表示讨论组,1表示高级群", "5":"创建者用户帐号",
* "7":"群公告等各种属性", "8":"群有效标记,0表示无效,1表示有效",
* "9":"群有效成员个数", "10":"群组成员列表更新的时间戳,精确到毫秒",
* "11":"创建时间,精确到毫秒", "12":"更新时间,精确到毫秒", "14":"群介绍",
* "15":"群公告,为JSONArray的toString,格式参考下文",
* "16":"群属性,0表示入群不需要申请,1表示入群需要申请", "18":"第三方扩展字段",
* "19":"第三方服务器扩展字段", "20":"群头像", "21":"被邀请人同意方式",
* 0需要统一(默认)1不需要同意, "22":"谁可以邀请他人入群",
* 0管理员(默认)1所有人, "23":"谁可以修改群资料", 0管理员(默认)1所有人,
* "24":"谁可以更新群自定义属性"0管理员(默认)1所有人
*/
if (tinfo != null) {
thisgroup.setGuid(tinfo.getLong("1"));
if(tinfo.containsKey("3")){
thisgroup.setName(tinfo.getString("3"));
}
if(tinfo.containsKey("5")){
thisgroup.setUuid(tinfo.getString("5"));
}
if(tinfo.containsKey("9")){
thisgroup.setMembers(tinfo.getIntValue("9"));
}
if(tinfo.containsKey("14")){
thisgroup.setDescription(tinfo.getString("14"));
}
if(tinfo.containsKey("18")){
String[] location = tinfo.getString("18").split(",");
thisgroup.setLongitude(Double.parseDouble(location[0]));
thisgroup.setLatitude(Double.parseDouble(location[1]));
}
if(tinfo.containsKey("20")){
thisgroup.setAvatar(tinfo.getString("20"));
}
}
if (0 == group.getString("msgType").compareToIgnoreCase("TEAM_INVITE")) {
if (1 == thisgroup.getMembers()) {
createGroup(thisgroup);
addMember(thisgroup.getUuid(), thisgroup.getGuid(), thisgroup.getUuid());
} else {
updateGroup(thisgroup);
JSONArray ids = data.getJSONArray("ids");
for (Object s : ids) {
addMember(thisgroup.getUuid(), thisgroup.getGuid(), s.toString());
}
}
} else if (0 == group.getString("msgType").compareToIgnoreCase("NOTIFICATION")) {
// 群操作类型
int actiontype = attach.getIntValue("id");
// 处理相应群消息
switch (actiontype) {
case 0: // TEAM_INVITE,即群拉人
break;
case 1: // TEAM_KICK,即群踢人
updateGroup(thisgroup);
JSONArray ids = data.getJSONArray("ids");
for (Object s : ids) {
removeMember(thisgroup.getUuid(), thisgroup.getGuid(), s.toString());
}
break;
case 2: // TEAM_LEAVE,即退出群
updateGroup(thisgroup);
removeMember(thisgroup.getUuid(), thisgroup.getGuid(), data.getString("id"));
break;
case 3: // TEAM_UPDATE,即群更新群信息
updateGroup(thisgroup);
break;
case 4: // TEAM_DISMISS,即群解散
dismissGroup(from, to);
break;
case 5: // TEAM_APPLY_PASS,即群申请加入成功
updateGroup(thisgroup);
addMember(thisgroup.getUuid(), thisgroup.getGuid(), data.getString("id"));
break;
case 6: // TEAM_OWNER_TRANSFER,即群主退群并移交群主
updateGroup(thisgroup);
removeMember(thisgroup.getUuid(), thisgroup.getGuid(), data.getString("id"));
break;
case 7: // TEAM_ADD_MANAGER,即增加管理员
break;
case 8: // TEAM_REMOVE_MANAGER,即群删除管理员
break;
case 9: // TEAM_INVITE_ACCEPT,即群接受邀请进群
updateGroup(thisgroup);
addMember(thisgroup.getUuid(), thisgroup.getGuid(), data.getString("id"));
break;
default:
break;
}
}
}
}
}
return resp;
}
@PostMapping("/create")
Response createGroup(@RequestBody Group group) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.create(group);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@PostMapping("/update")
Response updateGroup(@RequestBody Group group) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.update(group);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/add")
Response addMember(@RequestHeader("X-UUID") String uuid, @RequestParam("guid") long guid,
@RequestParam("uuid") String buuid) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.addMember(uuid, guid, buuid);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/kick")
Response removeMember(@RequestHeader("X-UUID") String uuid, @RequestParam("guid") long guid,
@RequestParam("uuid") String buuid) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.deleteMember(uuid, guid, buuid);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/block")
Response blockUser(@RequestHeader("X-UUID") String uuid, @RequestParam("guid") long guid,
@RequestParam("uuid") String buuid) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.blockUser(uuid, guid, buuid);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/unblock")
Response unblockUser(@RequestHeader("X-UUID") String uuid, @RequestParam("guid") long guid,
@RequestParam("uuid") String buuid) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.unblockUser(uuid, guid, buuid);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@DeleteMapping("/dismiss")
Response dismissGroup(@RequestHeader("X-UUID") String uuid, @RequestParam("guid") long guid) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.delete(uuid, guid);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/detail")
Response getGroupDetail(@RequestHeader("X-UUID") String uuid, @RequestParam("guid") long guid) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.detail(guid);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/around")
Response getAroundGroup(@RequestHeader("X-UUID") String uuid, @RequestParam("longitude") double longi, @RequestParam("latitude") double lati) {
Response resp = new Response();
HashMap<String, Object> ret = groupService.around(uuid, longi, lati);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,107 @@
package com.yipin.liuwanr.controller;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.HashMap;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.helper.ExcelExportHelper;
import com.yipin.liuwanr.service.MakeuplistService;
@RestController
@RequestMapping("/makeuplist")
public class MakeuplistController {
@Autowired
private MakeuplistService makeuplistService;
/**
* 上传Excel文件读取数据到数据库
* @param file
* @return
*/
@PostMapping("/importMakeuplist")
Response queryCustomer(@RequestParam("file") MultipartFile file,@RequestParam Integer staffId) {
Response resp = new Response();
if(StringUtils.isEmpty(staffId)) {
resp.setStatus(300);
resp.setMessage("staffId cannot be empty ");
return resp;
}
HashMap<String, Object> ret = makeuplistService.addMakeuplist(file,staffId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 在补考名单中渲染表格根据班级名称查询信息
* @param className
* @return
*/
@GetMapping("/queryGetByClassName")
Response queryGetByClassName(@RequestParam Integer staffId,@RequestParam String className) {
Response resp = new Response();
if(StringUtils.isEmpty(staffId)) {
resp.setStatus(300);
resp.setMessage("staffId cannot be empty ");
} else {
HashMap<String, Object> ret = makeuplistService.queryAllMakeuplist(staffId,className);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 下载Excel
* @param response
* @return
*/
@GetMapping("/excelExport")
Response excelExport( HttpServletResponse response,String fileName,String[] titles) {
ExcelExportHelper excelExportHelper=new ExcelExportHelper();
String filename=fileName+".xlsx";
XSSFWorkbook bos=excelExportHelper.excelExport(fileName,titles);
try {
response.setHeader("content-Type","application/vnd.ms-excel");
response.setHeader("Content-disposition","attachment;filename="+URLEncoder.encode(filename,"UTF-8"));
response.flushBuffer();
bos.write(response.getOutputStream());
bos.close();
} catch (IOException e) {
}
return null;
}
}

@ -0,0 +1,365 @@
package com.yipin.liuwanr.controller;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.ContractInformation;
import com.yipin.liuwanr.entity.CoursePermissions;
import com.yipin.liuwanr.entity.Order;
import com.yipin.liuwanr.entity.OrderVo;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.OrderService;
@RestController
@RequestMapping("/order")
@CrossOrigin
public class OrderController {
@Autowired
private OrderService orderService;
@Autowired
RedisHelper redisHelper;
/**
* 添加订单
* @throws Exception
*/
@Transactional
@PostMapping("/addOrder")
public Response addOrder(@RequestBody OrderVo vo) throws Exception {
long timeStamp = new Date().getTime();//获取时间戳
String orderNumber = String.valueOf(timeStamp);//long转String
vo.getOrder().setOrderNumber(orderNumber);
Response resp = new Response();
Order order = vo.getOrder();
ContractInformation contractInformation = vo.getContractInformation();
if (vo.getOrder().getCityId() == null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = orderService.addOrder(order);
Integer orderId = (Integer) ret.get("orderId");
contractInformation.setOrderId(orderId);
Integer size = vo.getCoursePermissionss().size();
for (int i = 0; i < size; i++) {
vo.getCoursePermissionss().get(i).setOrderId(orderId);
}
List<CoursePermissions> coursePermissionss = vo.getCoursePermissionss();
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
//添加合同信息
if (!coursePermissionss.isEmpty()) {
HashMap<String, Object> ret1 = orderService.addContractInformation(contractInformation);
int status1 = (int) ret1.get("retcode");
if (status1 == 200) {
resp.setStatus(status1);
resp.setMessage(ret1.get("retvalue"));
//添加课程权限
HashMap<String, Object> ret2 = orderService.addCoursePermissionss(coursePermissionss);
int status2 = (int) ret2.get("retcode");
if (status2 == 200) {
resp.setStatus(status2);
resp.setMessage(ret2.get("retvalue"));
}else {
resp.setStatus(status2);
resp.setErrmessage(ret2.get("retvalue").toString());
throw new Exception();
}
}else {
resp.setStatus(status1);
resp.setErrmessage(ret1.get("retvalue").toString());
throw new Exception();
}
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
throw new Exception();
}
}
}
return resp;
}
/**
* 查询订单
*/
@GetMapping("/queryOrder")
Response queryOrder(@RequestParam Integer provinceId,Integer cityId,Integer pageNo,Integer pageSize,Integer orderType,Integer orderStatus,String searchContent) {
Response resp = new Response();
Order order = new Order();
if(provinceId!=null) {
order.setProvinceId(provinceId);
}
if(cityId!=null) {
order.setCityId(cityId);
}
if (orderType!=null) {
order.setOrderType(orderType);
}
if (orderStatus!=null) {
order.setOrderStatus(orderStatus);
}
if (searchContent!=null&&searchContent!="") {
order.setSearchContent(searchContent);
}
HashMap<String, Object> ret = orderService.queryOrder(order,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询订单详情
*/
@GetMapping("/queryOrderDetails")
Response queryOrderDetails(@RequestParam Integer orderId) {
Response resp = new Response();
if(orderId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = orderService.queryOrderDetails(orderId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除订单
*/
@PostMapping("/deleteOrder")
Response deleteOrder(@RequestBody List<Integer> orderId) {
Response resp = new Response();
if (orderId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = orderService.deleteOrder(orderId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新订单
* @throws Exception
*/
@Transactional
@PostMapping("/updateOrder")
public Response updateOrder(@RequestBody OrderVo vo) throws Exception {
Response resp = new Response();
Order order = vo.getOrder();
List<CoursePermissions> coursePermissionss= vo.getCoursePermissionss();
ContractInformation contractInformation = vo.getContractInformation();
if (vo.getOrder().getOrderId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = orderService.updateOrder(order);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
HashMap<String, Object> ret1 = orderService.updateCoursePermissions(coursePermissionss);
int status1 = (int) ret1.get("retcode");
if (status1 == 200) {
resp.setStatus(status1);
resp.setMessage(ret.get("retvalue"));
HashMap<String, Object> ret2 = orderService.updateContractInformation(contractInformation);
int status2 = (int) ret2.get("retcode");
if (status2 == 200) {
resp.setStatus(status2);
resp.setMessage(ret.get("retvalue"));
}else {
resp.setStatus(status2);
resp.setMessage(ret.get("retvalue"));
throw new Exception();
}
}else {
resp.setStatus(status1);
resp.setMessage(ret.get("retvalue"));
throw new Exception();
}
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
throw new Exception();
}
}
return resp;
}
/**
* 查询课程权限
*/
@GetMapping("/queryCoursePermissions")
Response queryApplicationPermissions(@RequestParam String courseId) {
Response resp = new Response();
HashMap<String, Object> ret = orderService.queryCoursePermissions(courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
// /**
// * 绑定应用权限
// */
// @PostMapping("/bindingApplicationPermissions")
// Response bindingApplicationPermissions(@RequestBody ApplicationPermissions applicationPermissions) {
// Response resp = new Response();
// String systemId = applicationPermissions.getSystemId();
// Integer orderId = applicationPermissions.getOrderId();
// if (systemId==null||systemId==""||orderId ==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// }
// else {
// HashMap<String, Object> ret = orderService.bindingApplicationPermissions(applicationPermissions);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
/**
* 是否发货控制
*/
@PostMapping("/isDeliverGoods")
Response isDeliverGoods(@RequestBody CoursePermissions coursePermissions) {
Response resp = new Response();
if (coursePermissions.getCoursePermissionsId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else if (coursePermissions.getIsDeliverGoods() == null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = orderService.isDeliverGoods(coursePermissions);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询订单客户
*/
@GetMapping("/queryOrderCustomer")
Response queryOrderCustomer(@RequestParam Integer cityId,Integer provinceId) {
Response resp = new Response();
if(cityId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else if (provinceId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = orderService.queryOrderCustomer(cityId,provinceId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询订单客户联系人
*/
@GetMapping("/queryOrderCustomerContact")
Response queryOrderCustomerContact(@RequestParam Integer customerId) {
Response resp = new Response();
if(customerId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = orderService.queryOrderCustomerContact(customerId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询订单课程列表
*/
@GetMapping("/queryCourseList")
Response queryCourseList(@RequestParam String searchContent,@RequestParam List<Integer> courseId,Integer pageNo,Integer pageSize) {
Response resp = new Response();
HashMap<String, Object> ret = orderService.queryCourseList(searchContent,courseId,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,62 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.PersonalCenter;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.PersonalCenterService;
@RestController
@RequestMapping("/personalCenter")
public class PersonalCenterController {
@Autowired
private PersonalCenterService personalCenterService;
/**
* 查询个人中心
*/
@GetMapping("/queryPersonalCenter")
Response queryPersonalCenter(@RequestParam Integer userId,Integer accountRole) {
Response resp = new Response();
PersonalCenter personalCenter = new PersonalCenter();
if(userId!=null) {
personalCenter.setUserId(userId);
if(accountRole==4) {
//学生个人中心
personalCenter.setAccountRole(accountRole);
HashMap<String, Object> ret = personalCenterService.queryPersonalCenter(personalCenter);
resp.setStatus(200);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
if(accountRole==3) {
//老师个人中心
personalCenter.setAccountRole(accountRole);
HashMap<String, Object> ret = personalCenterService.queryPersonalCenterTeacher(personalCenter);
resp.setStatus(200);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
}
return resp;
}
}

@ -0,0 +1,170 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Pet;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.PetService;
@RestController
@RequestMapping("/pet")
public class PetController {
@Autowired
private PetService petService;
@PostMapping("/create")
Response createPet(@RequestHeader("X-UUID") String uuid, @RequestBody Pet pet) {
Response resp = new Response();
HashMap<String, Object> ret = petService.create(uuid, pet);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@PostMapping("/update")
Response updatePet(@RequestHeader("X-UUID") String uuid, @RequestBody Pet pet) {
Response resp = new Response();
HashMap<String, Object> ret = petService.update(uuid, pet);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@DeleteMapping("/delete")
Response deletePet(@RequestHeader("X-UUID") String uuid, @RequestParam("puid") String puid) {
Response resp = new Response();
HashMap<String, Object> ret = petService.delete(uuid, puid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/detail")
Response watchPet(@RequestHeader("X-UUID") String uuid, @RequestParam("puid") String puid) {
Response resp = new Response();
HashMap<String, Object> ret = petService.getOne(uuid, puid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/list")
Response listPet(@RequestHeader("X-UUID") String uuid) {
Response resp = new Response();
HashMap<String, Object> ret = petService.getMyPets(uuid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/findown")
Response locatePet(@RequestHeader("X-UUID") String uuid) {
Response resp = new Response();
HashMap<String, Object> ret = petService.whereisMyPets(uuid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/around")
Response searchPet(@RequestParam("longitude") double longitude, @RequestParam("latitude") double latidude) {
Response resp = new Response();
HashMap<String, Object> ret = petService.getNearByPets(longitude, latidude);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/breeds")
Response getPetBreeds(@RequestParam("category") int category) {
Response resp = new Response();
HashMap<String, Object> ret = petService.getBreedsByCategory(category);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/greet")
Response sayHello(@RequestHeader("X-UUID") String from, @RequestParam("uuid") String to, @RequestParam("puid") String puid, @RequestParam(value="type", required = false, defaultValue = "1") int type, @RequestParam(value="message", required = false, defaultValue = "") String message) {
Response resp = new Response();
HashMap<String, Object> ret = petService.sayHelloToPet(from, to, puid, type, message);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,119 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.PracticeService;
@RestController
@RequestMapping("/experiment")
/**
* 练习+考核记录
* @author 或然
*
*/
public class PracticeController {
@Autowired
private PracticeService service;
/**
* 练习记录 And 考核记录
*
* @param studentId
* @param pageNum
* @param pageSize
* @return
*/
@GetMapping("/queryStudentByPage")
Response queryStudentByPage(Integer studentId,Integer projectPermissions,Integer courseId,Integer pageNum,Integer pageSize) {
Response resp = new Response();
if( null==studentId) {
resp.setStatus(500);
resp.setErrmessage("student is null");
}else if(null==projectPermissions) {
resp.setStatus(500);
resp.setErrmessage("projectPermissions is null");
}else {
HashMap<String, Object> ret = service.queryStudentByPage(studentId,projectPermissions,courseId,pageNum,pageSize);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 练习记录 And 考核记录导出
* @param response
* @param studentId学生id
* @param projectPermissions权限(练习考核)
* @param titles(标题)
* @return
*/
@GetMapping("/exportPractice")
Response exportPractice(HttpServletResponse response, Integer studentId,Integer projectPermissions,Integer courseId,String[] titles) {
try {
service.exportPractice(response,studentId,projectPermissions,courseId,titles);
} catch (Exception e) {
}
return null;
}
/**
* 练习信息
* @param vo
* @return
*/
@GetMapping("/queryPracticeVo")
Response queryPracticeVo(Integer studentId,Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryPracticeVo(studentId,courseId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 实验项目表格数据渲染接口
* @param courseId
* @return
*/
@GetMapping("/queryAllExperiment")
Response queryAllExperiment(Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryAllExperiment(courseId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,123 @@
//package com.yipin.liuwanr.controller;
//
//import java.util.HashMap;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.yipin.liuwanr.entity.StuProfessionalArchitecture;
//import com.yipin.liuwanr.entity.Response;
//import com.yipin.liuwanr.helper.RedisHelper;
//import com.yipin.liuwanr.service.StuProfessionalArchitectureService;
//
//@RestController
//@RequestMapping("/stuProfessionalArchitecture")
//public class ProfessionalArchitectureController {
//
// @Autowired
// private StuProfessionalArchitectureService stuProfessionalArchitectureService;
//
// @Autowired
// RedisHelper redisHelper;
//
// /**
// * 添加专业组织
// */
// @PostMapping("/addStuProfessionalArchitecture")
// Response addCustomer(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
// Response resp = new Response();
// String stuProfessionalArchitectureName = stuProfessionalArchitecture.getStuProfessionalArchitectureName();
// Integer SchoolId = stuProfessionalArchitecture.getSchoolId();
// if (stuProfessionalArchitectureName==null||stuProfessionalArchitectureName==""||SchoolId ==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// }
// else {
// HashMap<String, Object> ret = stuProfessionalArchitectureService.addStuProfessionalArchitecture(stuProfessionalArchitecture);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
//
// /**
// * 查询专业架构
// */
// @GetMapping("/queryStuProfessionalArchitecture")
// Response queryCustomer(@RequestParam String schoolId) {
// Response resp = new Response();
// if (schoolId == null || schoolId=="") {
// resp.setStatus(300);
// resp.setMessage("schoolId is null!");
// }else {
// HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuProfessionalArchitecture(schoolId);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
//}
//
// /**
// * 删除专业架构
// */
// @PostMapping("/deleteStuProfessionalArchitecture")
// Response deleteCustomer(@RequestBody String stuProfessionalArchitectureId) {
// Response resp = new Response();
// if (stuProfessionalArchitectureId==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// } else {
// HashMap<String, Object> ret = stuProfessionalArchitectureService.deleteStuProfessionalArchitecture(stuProfessionalArchitectureId);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
//
// /**
// * 更新专业架构
// */
// @PostMapping("/updateStuProfessionalArchitecture")
// Response updateCustomer(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
// Response resp = new Response();
// String professionalArchitectureName = stuProfessionalArchitecture.getStuProfessionalArchitectureName();
// if (professionalArchitectureName==null) {
// resp.setStatus(300);
// resp.setErrmessage("Parameter Invalid");
// } else {
// HashMap<String, Object> ret = stuProfessionalArchitectureService.updateStuProfessionalArchitecture(stuProfessionalArchitecture);
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// }
// return resp;
// }
//}

@ -0,0 +1,50 @@
package com.yipin.liuwanr.controller;
//package com.yipin.liuwanr.controller;
//
//import com.yipin.liuwanr.entity.Order;
//import com.yipin.liuwanr.entity.Professional;
//import com.yipin.liuwanr.entity.Response;
//import com.yipin.liuwanr.helper.RedisHelper;
//import com.yipin.liuwanr.service.OrderService;
//import org.apache.ibatis.annotations.Delete;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.HashMap;
//
//@RestController
//@RequestMapping("/professional")
//public class ProfessionalController {
//
// @Autowired
// private OrderService orderService;
//
// @Autowired
// RedisHelper redisHelper;
//
// /**
// * 查询订单
// */
// @GetMapping("/queryOrder")
// Response queryOrder(@RequestParam Integer professionalClassId) {
// Response resp = new Response();
// Professional professional = new Professional();
// if(professionalClassId==null) {
// resp.setStatus(300);
// resp.setMessage(professionalClassId);
// }
//// HashMap<String, Object> ret = orderService.queryOrder(order);
// resp.setStatus(200);
// resp.setErrmessage("Parameter effective");
//
// int status = (int) ret.get("retcode");
// if (200 == status) {
// resp.setStatus(status);
// resp.setMessage(ret.get("retvalue"));
// } else {
// resp.setStatus(status);
// resp.setErrmessage(ret.get("retvalue").toString());
// }
// return resp;
// }
//}

@ -0,0 +1,98 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Project_Management;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.service.ProjectAndCourseService;
@RestController
@RequestMapping("/ProjectAndCourse")
public class ProjectAndCourseController {
@Autowired
private ProjectAndCourseService service;
/**
* 根据课程查询实验项目信息
* @param courseId
* @return
*/
@GetMapping("/queryProject")
Response queryProject(Integer courseId) {
Response resp = new Response();
HashMap<String, Object> ret = service.queryProject(courseId);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 修改项目状态
* @param projectId
* @param isExperiment
* @return
*/
@PostMapping("/updateIsExperiment")
Response updateIsExperiment(@RequestBody Project_Management management) {
Response resp = new Response();
if(null==management) {
resp.setStatus(300);
resp.setErrmessage("management Is null");
return resp;
}else {
HashMap<String, Object> ret = service.updateIsExperiment(management);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 修改考勤状态
* @param projectId
* @param isAttendance
* @return
*/
@PostMapping("/updateIsAttendance")
Response updateIsAttendance(@RequestBody Project_Management management) {
Response resp = new Response();
if(null==management) {
resp.setStatus(300);
resp.setErrmessage("management Is null");
return resp;
}else {
HashMap<String, Object> ret = service.updateIsAttendance(management);
int status = (int) ret.get("retcode");
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,113 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Province;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.ProvinceService;
@RestController
@RequestMapping("/province")
@CrossOrigin
public class ProvinceController {
@Autowired
private ProvinceService ProvinceService;
@Autowired
RedisHelper redisHelper;
/**
* 添加省份
*/
@PostMapping("/addProvince")
Response addProvince(@RequestBody Province province) {
Response resp = new Response();
HashMap<String, Object> ret = ProvinceService.addProvince(province);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询省份
*/
@GetMapping("/queryProvince")
Response queryProvince() {
Response resp = new Response();
Province province = new Province();
HashMap<String, Object> ret = ProvinceService.queryProvince(province);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 删除省份
*/
@PostMapping("/deleteProvince")
Response deleteProvince(@RequestParam Integer provinceId) {
Response resp = new Response();
if (provinceId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = ProvinceService.deleteProvince(provinceId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新省份
*/
@RequestMapping(value="/updateProvince",method = RequestMethod.POST)
Response updateProvince(@RequestBody Province province) {
Response resp = new Response();
if (province==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = ProvinceService.updateProvince(province);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,34 @@
package com.yipin.liuwanr.controller;
public class Response {
private int status = 200;
private Object message;
private String errmessage;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public Object getMessage() {
return message;
}
public void setMessage(Object message) {
this.message = message;
}
public String getErrmessage() {
return errmessage;
}
public void setErrmessage(String errmessage) {
this.errmessage = errmessage;
}
}

@ -0,0 +1,154 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.School;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.SchoolService;
@RestController
@RequestMapping("/school")
@CrossOrigin
public class SchoolController {
@Autowired
private SchoolService schoolService;
@Autowired
RedisHelper redisHelper;
/**
* 添加学校
*/
@PostMapping("/addSchool")
Response addSchool(@RequestBody School school) {
Response resp = new Response();
if (school==null) {
resp.setStatus(300);
resp.setErrmessage("Course Name Is Null!");
}else {
HashMap<String, Object> ret = schoolService.addSchool(school);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学校
*/
@GetMapping("/querySchool")
Response querySchool(@RequestParam Integer provinceId,Integer cityId,Integer level) {
Response resp = new Response();
School school = new School();
if (provinceId!=null) {
school.setProvinceId(provinceId);
}
if (cityId!=null) {
school.setCityId(cityId);
}
if (level!=null) {
school.setLevel(level);
}
HashMap<String, Object> ret = schoolService.querySchool(school);
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询学校详情
*/
@GetMapping("/querySchoolDetails")
Response querySchoolDetails(@RequestParam Integer schoolId) {
Response resp = new Response();
School school = new School();
if (schoolId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = schoolService.querySchoolDetails(schoolId);
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除学校
*/
@PostMapping("/deleteSchool")
Response deleteSchool(@RequestBody School school) {
Response resp = new Response();
if (school==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = schoolService.deleteSchool(school);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新学校
*/
@PostMapping("/updateSchool")
Response updateSchool(@RequestBody School school) {
Response resp = new Response();
if (school==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = schoolService.updateSchool(school);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,147 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.apache.ibatis.annotations.Delete;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.ServiceConfig;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.ServiceConfigService;
@RestController
@RequestMapping("/serviceConfig")
@CrossOrigin
public class ServiceConfigController {
@Autowired
private ServiceConfigService serviceConfigService;
@Autowired
RedisHelper redisHelper;
/**
* 添加服务配置
*/
@PostMapping("/addServiceConfig")
Response addServiceConfig(@RequestBody ServiceConfig serviceConfig) {
Response resp = new Response();
if (serviceConfig.getSystemName()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = serviceConfigService.addServiceConfig(serviceConfig);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询服务配置
*/
@GetMapping("/queryServiceConfig")
Response queryServiceConfig(@RequestParam Integer systemAttribution,Integer systemType,String searchContent,Integer pageNo,Integer pageSize) {
Response resp = new Response();
ServiceConfig serviceConfig = new ServiceConfig();
if (systemAttribution!= null) {
serviceConfig.setSystemAttribution(systemAttribution);
}if(systemType!=null) {
serviceConfig.setSystemType(systemType);
}if (searchContent!=null && searchContent!="") {
serviceConfig.setSearchContent(searchContent);
}
HashMap<String, Object> ret = serviceConfigService.queryServiceConfig(serviceConfig,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询服务配置
*/
@GetMapping("/queryServiceConfigDetails")
Response queryServiceConfigDetails(@RequestParam Integer systemId) {
Response resp = new Response();
if (systemId== null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
HashMap<String, Object> ret = serviceConfigService.queryServiceConfigDetails(systemId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 删除服务配置
*/
@Delete("/deleteServiceConfig")
Response deleteServiceConfig(@RequestBody ServiceConfig serviceConfig) {
Response resp = new Response();
if (serviceConfig.getSystemId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = serviceConfigService.deleteServiceConfig(serviceConfig);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新服务配置
*/
@PostMapping("/updateServiceConfig")
Response updateServiceConfig(@RequestBody ServiceConfig serviceConfig) {
Response resp = new Response();
if (serviceConfig.getSystemName()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = serviceConfigService.updateServiceConfig(serviceConfig);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,192 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.Staff;
import com.yipin.liuwanr.entity.UserM;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.StaffService;
import com.yipin.liuwanr.service.UserService;
@RestController
@RequestMapping("/staff")
@CrossOrigin
public class StaffController {
@Autowired
private StaffService staffService;
@Autowired
private UserService userService;
@Autowired
RedisHelper redisHelper;
@PostMapping("/readStaff")
Response readStaff(MultipartFile file,Integer schoolId){
Response resp = new Response();
if(StringUtils.isEmpty(schoolId)) {
resp.setStatus(300);
resp.setMessage("schoolId is not empty");
return resp;
}
HashMap<String, Object> ret =staffService.readStaff(file,schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 添加员工
*/
@PostMapping("/addStaff")
Response addCustomer(@RequestBody Staff staff) {
Response resp = new Response();
UserM user = new UserM();
user.setPassword("huoran123");
user.setWorkNumber(staff.getStaffWorkNumber());
user.setUserAccount(staff.getStaffWorkNumber());
user.setAccountRole(3);
user.setName(staff.getStaffName());
user.setPhone(staff.getPhone());
user.setEmail(staff.getEmail());
user.setSchoolId(staff.getSchoolId());
Long startTs = System.currentTimeMillis(); // 当前时间戳
String uniqueIdentificationAccount = startTs+"";
user.setUniqueIdentificationAccount(uniqueIdentificationAccount);
staff.setUniqueIdentificationAccount(uniqueIdentificationAccount);
user.setUniqueIdentificationAccount(staff.getUniqueIdentificationAccount());
if (staff.getPhone()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffService.addStaff(staff);
HashMap<String, Object> ret1 = userService.addUser(user);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询员工
*/
@GetMapping("/queryStaff")
Response queryCustomer(@RequestParam String nameAndNumber,String staffProfessionalArchitectureIds,Integer pageNo,Integer pageSize,String staffGradeIds) {
Response resp = new Response();
Staff staff = new Staff();
if (nameAndNumber!=null&&nameAndNumber!="") {
staff.setNameAndNumber(nameAndNumber);
}
if (staffProfessionalArchitectureIds!=null&&staffProfessionalArchitectureIds!="") {
staff.setStaffProfessionalArchitectureIds(staffProfessionalArchitectureIds);
}
if (staffGradeIds!=null&&staffGradeIds!="") {
staff.setStaffGradeIds(staffGradeIds);
}
HashMap<String, Object> ret = staffService.queryStaff(staff,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询员工详情
*/
@GetMapping("/queryStaffDetails")
Response queryStaffDetails(@RequestParam Integer staffId) {
Response resp = new Response();
if (staffId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = staffService.queryStaffDetails(staffId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除员工
*/
@PostMapping("/deleteStaff")
Response deleteStaff(@RequestBody List<Integer> staffId) {
Response resp = new Response();
if (staffId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffService.deleteStaff(staffId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新员工
*/
@PostMapping("/updateStaff")
Response updateStaff(@RequestBody Staff staff) {
Response resp = new Response();
if (staff==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffService.updateStaff(staff);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,145 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.StaffGrade;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.StaffGradeService;
@RestController
@RequestMapping("/staffGrade")
@CrossOrigin
public class StaffGradeController {
@Autowired
private StaffGradeService staffGradeService;
@Autowired
RedisHelper redisHelper;
/**
* 添加员工年级
*/
@PostMapping("/addStaffGrade")
Response addCustomer(@RequestBody StaffGrade staffGrade) {
Response resp = new Response();
if (staffGrade.getStaffProfessionalArchitectureId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffGradeService.addStaffGrade(staffGrade);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询员工年级
*/
@GetMapping("/queryStaffGrade")
Response queryCustomer(@RequestParam Integer staffProfessionalArchitectureId) {
Response resp = new Response();
if (staffProfessionalArchitectureId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = staffGradeService.queryStaffGrade(staffProfessionalArchitectureId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询员工年级详情
*/
@GetMapping("/queryStaffGradeDetails")
Response queryStaffGradeDetails(@RequestParam Integer staffGradeId) {
Response resp = new Response();
if (staffGradeId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = staffGradeService.queryStaffGradeDetails(staffGradeId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除员工年级
*/
@PostMapping("/deleteStaffGrade")
Response deleteStaffGrade(@RequestBody StaffGrade staffGrade) {
Response resp = new Response();
Integer staffGradeId = staffGrade.getStaffGradeId();
if (staffGradeId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffGradeService.deleteStaffGrade(staffGradeId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新员工年级
*/
@PostMapping("/updateStaffGrade")
Response updateStaffGrade(@RequestBody StaffGrade staffGrade) {
Response resp = new Response();
if (staffGrade.getStaffGradeId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffGradeService.updateStaffGrade(staffGrade);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,149 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.StaffProfessionalArchitecture;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.StaffProfessionalArchitectureService;
@RestController
@RequestMapping("/staffProfessionalArchitecture")
@CrossOrigin
public class StaffProfessionalArchitectureController {
@Autowired
private StaffProfessionalArchitectureService staffProfessionalArchitectureService;
@Autowired
RedisHelper redisHelper;
/**
* 添加员工专业组织
*/
@PostMapping("/addStaffProfessionalArchitecture")
Response addCustomer(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) {
Response resp = new Response();
String staffProfessionalArchitectureName = staffProfessionalArchitecture.getStaffProfessionalArchitectureName();
Integer schoolId = staffProfessionalArchitecture.getSchoolId();
if (staffProfessionalArchitectureName==null||staffProfessionalArchitectureName==""||schoolId ==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
else {
HashMap<String, Object> ret = staffProfessionalArchitectureService.addStaffProfessionalArchitecture(staffProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询员工专业架构
*/
@GetMapping("/queryStaffProfessionalArchitecture")
Response queryStaffProfessionalArchitecture(@RequestParam Integer schoolId) {
Response resp = new Response();
if (schoolId == null) {
resp.setStatus(300);
resp.setMessage("schoolId is null!");
}else {
HashMap<String, Object> ret = staffProfessionalArchitectureService.queryStaffProfessionalArchitecture(schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询员工全部专业架构
*/
@GetMapping("/queryAllStaffProfessionalArchitecture")
Response queryAllStaffProfessionalArchitecture(@RequestParam Integer schoolId) {
Response resp = new Response();
if (schoolId == null) {
resp.setStatus(300);
resp.setMessage("schoolId is null!");
}else {
HashMap<String, Object> ret = staffProfessionalArchitectureService.queryAllStaffProfessionalArchitecture(schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除员工专业架构
*/
@PostMapping("/deleteStaffProfessionalArchitecture")
Response deleteStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) {
Response resp = new Response();
Integer staffProfessionalArchitectureId = staffProfessionalArchitecture.getStaffProfessionalArchitectureId();
if (staffProfessionalArchitectureId==null) {
resp.setStatus(300);
resp.setErrmessage("staffProfessionalArchitectureId Parameter Invalid");
} else {
HashMap<String, Object> ret = staffProfessionalArchitectureService.deleteStaffProfessionalArchitecture(staffProfessionalArchitectureId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新员工专业架构
*/
@PostMapping("/updateStaffProfessionalArchitecture")
Response updateStaffProfessionalArchitecture(@RequestBody StaffProfessionalArchitecture staffProfessionalArchitecture) {
Response resp = new Response();
String staffProfessionalArchitectureName = staffProfessionalArchitecture.getStaffProfessionalArchitectureName();
if (staffProfessionalArchitectureName==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = staffProfessionalArchitectureService.updateStaffProfessionalArchitecture(staffProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,436 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.StuProfessionalArchitecture;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.StuProfessionalArchitectureService;
@RestController
@RequestMapping("/stuProfessionalArchitecture")
@CrossOrigin
public class StuProfessionalArchitectureController {
@Autowired
private StuProfessionalArchitectureService stuProfessionalArchitectureService;
@Autowired
RedisHelper redisHelper;
/**
* 添加学生专业组织
*/
@PostMapping("/addStuProfessionalArchitecture")
Response addStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response();
String stuProfessionalArchitectureName = stuProfessionalArchitecture.getStuProfessionalArchitectureName();
Integer SchoolId = stuProfessionalArchitecture.getSchoolId();
if (stuProfessionalArchitectureName==null||stuProfessionalArchitectureName==""||SchoolId ==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.addStuProfessionalArchitecture(stuProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生专业架构
*/
@GetMapping("/queryStuProfessionalArchitecture")
Response queryStuProfessionalArchitecture(@RequestParam Integer schoolId) {
Response resp = new Response();
if (schoolId == null) {
resp.setStatus(300);
resp.setMessage("schoolId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuProfessionalArchitecture(schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生专业架构详情
*/
@GetMapping("/queryStuPAD")
Response queryStuPAD(@RequestParam Integer stuProfessionalArchitectureId) {
Response resp = new Response();
if (stuProfessionalArchitectureId == null) {
resp.setStatus(300);
resp.setMessage("stuProfessionalArchitectureId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuPAD(stuProfessionalArchitectureId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除学生专业架构
*/
@PostMapping("/deleteStuProfessionalArchitecture")
Response deleteStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture professionalArchitecture) {
Response resp = new Response();
Integer stuProfessionalArchitectureId = professionalArchitecture.getStuProfessionalArchitectureId();
if (stuProfessionalArchitectureId==null) {
resp.setStatus(300);
resp.setErrmessage("stuProfessionalArchitectureId Parameter Invalid");
} else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.deleteStuProfessionalArchitecture(stuProfessionalArchitectureId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除学生年级
*/
@PostMapping("/deleteStuGrade")
Response deleteStuGrade(@RequestBody StuProfessionalArchitecture stu) {
Response resp = new Response();
Integer gradeId = stu.getGradeId();
if (gradeId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.deleteStuGrade(gradeId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除学生班级
*/
@PostMapping("/deleteStuClass")
Response deleteStuClass(@RequestBody StuProfessionalArchitecture stu) {
Response resp = new Response();
Integer classId = stu.getClassId();
if (classId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.deleteStuClass(classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新学生专业架构
*/
@PostMapping("/updateStuProfessionalArchitecture")
Response updateStuProfessionalArchitecture(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response();
Integer professionalArchitectureId = stuProfessionalArchitecture.getStuProfessionalArchitectureId();
if (professionalArchitectureId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.updateStuProfessionalArchitecture(stuProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询全部学生专业架构
*/
@GetMapping("/queryStudentProfessionalArchitecture")
Response queryStudentProfessionalArchitecture(@RequestParam Integer schoolId) {
Response resp = new Response();
if (schoolId == null) {
resp.setStatus(300);
resp.setMessage("schoolId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStudentProfessionalArchitecture(schoolId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生年级
*/
@GetMapping("/queryStuGrade")
Response queryStuGrade(@RequestParam Integer stuProfessionalArchitectureId) {
Response resp = new Response();
if (stuProfessionalArchitectureId == null) {
resp.setStatus(300);
resp.setMessage("stuProfessionalArchitectureId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuGrade(stuProfessionalArchitectureId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生年级详情
*/
@GetMapping("/queryStuGradeD")
Response queryStuGradeD(@RequestParam Integer gradeId) {
Response resp = new Response();
if (gradeId == null) {
resp.setStatus(300);
resp.setMessage("gradeId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuGradeD(gradeId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生班级
*/
@GetMapping("/queryStuClass")
Response queryStuClass(@RequestParam Integer gradeId) {
Response resp = new Response();
if (gradeId == null) {
resp.setStatus(300);
resp.setMessage("gradeId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuClass(gradeId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生班级详情
*/
@GetMapping("/queryStuClassD")
Response queryStuClassD(@RequestParam Integer classId) {
Response resp = new Response();
if (classId == null) {
resp.setStatus(300);
resp.setMessage("classId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStuClassD(classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 添加班级
*/
@PostMapping("/addStuClass")
Response addStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response();
String stuClassName = stuProfessionalArchitecture.getClassName();
Integer gradeId = stuProfessionalArchitecture.getGradeId();
if (stuClassName==null||stuClassName==""||gradeId ==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.addStuClass(stuProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 修改班级
*/
@PostMapping("/updateStuClass")
Response updateStuClass(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response();
String stuClassName = stuProfessionalArchitecture.getClassName();
if (stuClassName==null||stuClassName=="") {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.updateStuClass(stuProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 添加年级
*/
@PostMapping("/addStuGrade")
Response addStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response();
String stuGradeName = stuProfessionalArchitecture.getGradeName();
Integer stuProfessionalArchitectureId = stuProfessionalArchitecture.getStuProfessionalArchitectureId();
if (stuGradeName==null||stuGradeName==""||stuProfessionalArchitectureId ==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.addStuGrade(stuProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 修改年级
*/
@PostMapping("/updateStuGrade")
Response updateStuGrade(@RequestBody StuProfessionalArchitecture stuProfessionalArchitecture) {
Response resp = new Response();
String stuGradeName = stuProfessionalArchitecture.getGradeName();
if (stuGradeName==null||stuGradeName=="") {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}
else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.updateStuGrade(stuProfessionalArchitecture);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生
*/
@GetMapping("/queryStudent")
Response queryStudent(@RequestParam Integer classId) {
Response resp = new Response();
if (classId == null) {
resp.setStatus(300);
resp.setMessage("classId is null!");
}else {
HashMap<String, Object> ret = stuProfessionalArchitectureService.queryStudent(classId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,201 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.Student;
import com.yipin.liuwanr.entity.UserM;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.StudentService;
import com.yipin.liuwanr.service.UserService;
@RestController
@RequestMapping("/student")
@CrossOrigin
public class StudentController {
@Autowired
private StudentService studentService;
@Autowired
private UserService userService;
@Autowired
RedisHelper redisHelper;
/**
* 批量导入学生
* @param file
* @param classId
* @return
*/
@PostMapping("/readStudent")
Response readStudent(MultipartFile file,@RequestParam Integer schoolId){
Response resp = new Response();
if(StringUtils.isEmpty(schoolId)) {
resp.setStatus(300);
resp.setMessage("schoolId is not empty");
return resp;
}
HashMap<String, Object> ret =studentService.readStudent(schoolId,file);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 添加学生
*/
@PostMapping("/addStudent")
Response addStudent(@RequestBody Student student) {
Response resp = new Response();
UserM user = new UserM();
user.setPassword("huoran123");
user.setPassword(student.getStudentPassword());
user.setUserAccount(student.getStudentNumber());
user.setAccountRole(4);
user.setName(student.getStudentName());
user.setPhone(student.getPhone());
user.setEmail(student.getEmail());
user.setWorkNumber(student.getStudentNumber());
Long startTs = System.currentTimeMillis(); // 当前时间戳
String uniqueIdentificationAccount = startTs+"";
user.setUniqueIdentificationAccount(uniqueIdentificationAccount);
student.setUniqueIdentificationAccount(uniqueIdentificationAccount);
if (student.getPhone()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = studentService.addStudent(student);
HashMap<String, Object> ret1 = userService.addUser(user);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询学生
*/
@GetMapping("/queryStudent")
Response queryStudent(@RequestParam String searchContent,Integer pageNo,Integer pageSize,String professionalIds,String gradeIds,String classIds) {
Response resp = new Response();
Student student = new Student();
if (searchContent!=null&&searchContent!="") {
student.setSearchContent(searchContent);
}
if (professionalIds!=null&&professionalIds!="") {
student.setProfessionalIds(professionalIds);
}
if (gradeIds!=null&&gradeIds!="") {
student.setGradeIds(gradeIds);
}
if (classIds!=null&&classIds!="") {
student.setClassIds(classIds);
}
HashMap<String, Object> ret = studentService.queryStudent(student,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询学生详情
*/
@GetMapping("/queryStudentDetails")
Response queryStudentDetails(@RequestParam Integer studentId) {
Response resp = new Response();
if (studentId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = studentService.queryStudentDetails(studentId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 删除学生
*/
@PostMapping("/deleteStudent")
Response deleteStudent(@RequestBody List<Integer> studentId) {
Response resp = new Response();
if (studentId==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = studentService.deleteStudent(studentId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新学生
*/
@PostMapping("/updateStudent")
Response updateStudent(@RequestBody Student student) {
Response resp = new Response();
if (student==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = studentService.updateStudent(student);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,154 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yipin.liuwanr.entity.Comment;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.Topic;
import com.yipin.liuwanr.service.TopicService;
@RestController
@RequestMapping("/topic")
public class TopicController {
@Autowired
private TopicService topicService;
@PostMapping("/create")
Response createTopic(@RequestBody Topic topic) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.create(topic);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@DeleteMapping("/delete")
Response deleteTopic(@RequestHeader("X-UUID") String uuid, @RequestParam("tuid") String tuid) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.delete(uuid, tuid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/detail")
Response showTopic(@RequestHeader("X-UUID") String uuid, @RequestParam("tuid") String tuid) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.detail(uuid, tuid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/around")
Response aroundTopic(@RequestHeader("X-UUID") String uuid, @RequestParam("longitude") double longitude, @RequestParam("latitude") double latitude) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.around(uuid, latitude, longitude);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/list")
Response listTopic(@RequestHeader("X-UUID") String uuid, @RequestParam("uuid") String buuid, @RequestParam(value = "type", required = false, defaultValue = "0") int type) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.list(uuid, buuid, type);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/tag")
Response topicTag(@RequestHeader("X-UUID") String uuid) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.tags(uuid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@PostMapping("/comment")
Response deleteTopic(@RequestBody Comment comment) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.comment(comment);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@DeleteMapping("/comment")
Response deleteComment(@RequestHeader("X-UUID") String uuid, @RequestParam("cuid") String cuid) {
Response resp = new Response();
HashMap<String, Object> ret = topicService.deleteComment(uuid, cuid);
int status = (int) ret.get("retcode");
if(200 == status){
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
}
else{
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -0,0 +1,298 @@
package com.yipin.liuwanr.controller;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yipin.liuwanr.entity.Response;
import com.yipin.liuwanr.entity.User;
import com.yipin.liuwanr.entity.UserM;
import com.yipin.liuwanr.helper.PushHelper;
import com.yipin.liuwanr.helper.RandomUtil;
import com.yipin.liuwanr.helper.RedisHelper;
import com.yipin.liuwanr.service.UserService;
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@Autowired
RedisHelper redisHelper;
@GetMapping("/login")
Response loginUser(@RequestParam("id") String id, @RequestParam("password") String password,
HttpServletResponse response) {
Response resp = new Response();
HashMap<String, Object> ret = userService.login(id, password);
int status = (int) ret.get("retcode");
if (200 == status) {
User user = (User) ret.get("retvalue");
String uuid = user.getUuid();
String token = RandomUtil.getToken(uuid);
int tokenexpire = 60 * 60 * 24 * 7;
String refreshtoken = RandomUtil.getToken(uuid, token);
int refreshtokenexpire = 60 * 60 * 24 * 365;
if (PushHelper.refreshIMToken(uuid, refreshtoken)) {
resp.setStatus(status);
resp.setMessage(user);
redisHelper.setTokenById(uuid, token, tokenexpire);
redisHelper.setRefreshTokenById(uuid, refreshtoken, refreshtokenexpire);
response.addHeader("X-TOKEN", token);
response.addHeader("X-TOKEN-EXPIRES-AFTER", (System.currentTimeMillis() + 1000 * tokenexpire) + "");
response.addHeader("X-FRESH-TOKEN", refreshtoken);
response.addHeader("X-FRESH-TOKEN-EXPIRES-AFTER",
(System.currentTimeMillis() + 1000 * refreshtokenexpire) + "");
} else {
resp.setStatus(500);
resp.setErrmessage("Operation Failed");
}
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
@GetMapping("/reauth")
Response getNewToken(@RequestHeader("X-UUID") String uuid, @RequestHeader("X-TOKEN") String stoken,
@RequestHeader("X-SIGN") String sign, HttpServletResponse response) {
Response resp = new Response();
String oldtoken = redisHelper.getTokenById(uuid);
String oldrefreshtoken = redisHelper.getRefreshTokenById(uuid);
if (oldtoken == null || oldrefreshtoken == null) {
resp.setStatus(500);
resp.setErrmessage("Cache Error, Try Again");
} else if (oldrefreshtoken == "none") {
resp.setStatus(400);
resp.setErrmessage("Authentication Info Expired");
} else if (0 == RandomUtil.getMD5String((stoken + oldrefreshtoken).getBytes()).compareToIgnoreCase(sign)) {
resp.setStatus(300);
resp.setErrmessage("Authentication Failed");
} else {
String token = RandomUtil.getToken(uuid);
int tokenexpire = 60 * 60 * 24 * 7;
redisHelper.setTokenById(uuid, token, tokenexpire);
response.addHeader("X-TOKEN", token);
response.addHeader("X-TOKEN-EXPIRES-AFTER", (System.currentTimeMillis() + 1000 * tokenexpire) + "");
resp.setStatus(200);
resp.setMessage("Success");
}
return resp;
}
/**
* 添加用户
*/
@PostMapping("/addUser")
Response addUser(@RequestBody UserM user) {
Response resp = new Response();
if (user.getCityId()==null) {//城市是否为空
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
user.setPassword("huoran123");//设置默认密码
String uniqueIdentificationAccount = System.currentTimeMillis()+"";
user.setUniqueIdentificationAccount(uniqueIdentificationAccount);
HashMap<String, Object> ret = userService.addUser(user);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 查询用户(根据国家省份城市)
*/
@GetMapping("/queryUser")
Response queryUser(@RequestParam String countries,Integer provinceId,Integer cityId,Integer pageNo,Integer pageSize,Integer schoolId,Integer accountRole,String searchContent,Integer month,String creationTime,String endTime) {
Response resp = new Response();
UserM user = new UserM();
//设置国家
if (countries != null&&countries!="") {
user.setCountries(countries);
}
//设置省份
if(provinceId!=null) {
user.setProvinceId(provinceId);
}
//设置城市
if(cityId!=null) {
user.setCityId(cityId);
}
//学校
if (schoolId!=null) {
user.setSchoolId(schoolId);
}
//角色
if (accountRole!=null) {
user.setAccountRole(accountRole);
}
//搜索内容
if (searchContent!=null&&searchContent!="") {
user.setSearchContent(searchContent);
}
//月份
if (month!=null) {
user.setMonth(month);;
}
//创建时间
if (creationTime!=null&&creationTime!="") {
user.setCreationTime(creationTime);
}
//结束时间
if (endTime!=null&&endTime!="") {
user.setEndTime(endTime);
}
HashMap<String, Object> ret = userService.queryUser(user,pageNo,pageSize);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 删除用户(根据ID修改isdel状态,0可见 1不可见)
*/
@PostMapping("/deleteUser")
Response deleteUser(@RequestBody UserM user) {
Response resp = new Response();
if (user.getUser().isEmpty()) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = userService.deleteUser(user);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 更新用户
*/
@PostMapping("/updateUser")
Response updateUser(@RequestBody UserM user) {
Response resp = new Response();
if (user.getUserId()==null) {
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
} else {
HashMap<String, Object> ret = userService.updateUser(user);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
/**
* 登陆(前台传来的key必须是phonepassword)
*/
@GetMapping("/logins")
Response logins(@RequestParam("phone") String phone, @RequestParam("password") String password,
HttpServletRequest req, HttpServletResponse res) {
Response resp = new Response();
UserM user = new UserM();
if (phone != null) {
user.setPhone(phone);
}if(password!=null) {
user.setPassword(password);
}
HashMap<String, Object> ret = userService.logins(user);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
/**
* 查询用户详情(ID)
*/
@GetMapping("/queryUserDetails")
Response queryUserDetails(@RequestParam Integer userId) {
Response resp = new Response();
if (userId==null) {//前台传来的值是否为空
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = userService.queryUserDetails(userId);
resp.setStatus(200);
resp.setErrmessage("Parameter effective");
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
@PostMapping("/uploadUserAvatars")
Response uploadUserAvatars(MultipartFile file,Integer userId) {
Response resp = new Response();
if (userId==null) {//前台传来的值是否为空
resp.setStatus(300);
resp.setErrmessage("Parameter Invalid");
}else {
HashMap<String, Object> ret = userService.uploadUserAvatars(file,userId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
}
return resp;
}
}

@ -0,0 +1,190 @@
//package com.yipin.liuwanr.controller;
//
//import java.io.InputStream;
//
//import javax.servlet.http.HttpServletResponse;
//import com.fasterxml.jackson.core.JsonProcessingException;
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.yipin.liuwanr.entity.FileInfo;
//import org.apache.tomcat.util.codec.binary.Base64;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.web.bind.annotation.*;
//import javax.servlet.http.HttpServletRequest;
//import java.io.*;
//import java.net.URLDecoder;
//import java.security.MessageDigest;
//import java.security.NoSuchAlgorithmException;
//
//
///**
// * WOPI HOST
// * Created by 宁智勇 on 2020/07/08.
// */
//@RestController
//@RequestMapping(value="/wopi")
//public class WopiHostContrller {
//
// @Value("${file.path}")
// private String filePath;
//
// /**
// * 获取文件流
// * @param name
// * @param response
// */
// @GetMapping("/files/{name}/contents")
// public void getFile(@PathVariable(name = "name") String name, HttpServletResponse response) {
// System.out.println("GET获取文件啦!!!!");
// InputStream fis = null;
// OutputStream toClient = null;
// try {
// // 文件的路径
// String path = filePath + name;
// File file = new File(path);
// // 取得文件名
// String filename = file.getName();
// // 以流的形式下载文件
// fis = new BufferedInputStream(new FileInputStream(path));
// byte[] buffer = new byte[fis.available()];
// fis.read(buffer);
// // 清空response
// response.reset();
//
// // 设置response的Header
// response.addHeader("Content-Disposition", "attachment;filename=" +
// new String(filename.getBytes("utf-8"), "ISO-8859-1"));
// response.addHeader("Content-Length", "" + file.length());
// toClient = new BufferedOutputStream(response.getOutputStream());
// response.setContentType("application/octet-stream");
// toClient.write(buffer);
// toClient.flush();
// System.out.println("GET获取文件Contents结束!!!!");
//
// } catch (IOException ex) {
// ex.printStackTrace();
// } finally {
// try {
// fis.close();
// toClient.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
//
// /**
// * 保存更新文件
// * @param name
// * @param content
// */
// @PostMapping("/files/{name}/contents")
// public void postFile(@PathVariable(name = "name") String name, @RequestBody byte[] content) {
// System.out.println("POST获取文件Contents啦!!!!");
// // 文件的路径
// String path = filePath + name;
// File file = new File(path);
// FileOutputStream fop = null;
// try {
// if (!file.exists()) {
// file.createNewFile();//构建文件
// }
// fop = new FileOutputStream(file);
// fop.write(content);
// fop.flush();
// System.out.println("POST获取文件结束!!!!");
//
// System.out.println("------------ save file ------------ ");
// } catch (IOException e) {
// e.printStackTrace();
// } finally {
// try {
// fop.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
//
// /**
// * 获取文件信息
// * @param request
// * @param response
// * @return
// * @throws UnsupportedEncodingException
// */
// @GetMapping("/files/{name}")
// public void getFileInfo(HttpServletRequest request, HttpServletResponse response) {
// System.out.println("获取文件啦!!!!");
// String uri = request.getRequestURI();
// FileInfo info = new FileInfo();
// try {
// // 获取文件名, 防止中文文件名乱码
// String fileName = URLDecoder.decode(uri.substring(uri.indexOf("wopi/files/") + 11, uri.length()), "UTF-8");
// if (fileName != null && fileName.length() > 0) {
// System.out.println("文件不为空啊");
// File file = new File(filePath + fileName);
// if (file.exists()) {
// // 取得文件名
// info.setBaseFileName(file.getName());
// info.setSize(file.length());
// info.setOwnerId("admin");
// info.setVersion(file.lastModified());
// info.setSha256(getHash256(file));
// info.setAllowExternalMarketplace(true);
// info.setUserCanWrite(true);
// info.setSupportsUpdate(true);
// info.setSupportsLocks(true);
// }
// }
//
// ObjectMapper mapper = new ObjectMapper();
// String Json = mapper.writeValueAsString(info);
//
// response.setContentType("application/json;charset=utf-8");
// response.getWriter().write(Json);
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// } catch (JsonProcessingException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
//
// /**
// * 获取文件的SHA-256值
// * @param file
// * @return
// */
// public static String getHash256(File file) {
// String value = "";
// // 获取hash值
// try {
// byte[] buffer = new byte[1024];
// int numRead;
// InputStream fis = new FileInputStream(file);
// //如果想使用SHA-1或SHA-256,则传入SHA-1,SHA-256
// MessageDigest complete = MessageDigest.getInstance("SHA-256");
// do {
// //从文件读到buffer
// numRead = fis.read(buffer);
// if (numRead > 0) {
// //用读到的字节进行MD5的计算,第二个参数是偏移量
// complete.update(buffer, 0, numRead);
// }
// } while (numRead != -1);
//
// fis.close();
// value = new String(Base64.encodeBase64(complete.digest()));
// } catch (NoSuchAlgorithmException e) {
// e.printStackTrace();
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// } catch (IOException e) {
// e.printStackTrace();
// }
// return value;
// }
//
//}
//

@ -0,0 +1,56 @@
package com.yipin.liuwanr.entity;
public class Action {
private String day;
private int step = -1;
private int jump = -1;
private int roll = -1;
private int move = -1;
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
public int getStep() {
return step;
}
public void setStep(int step) {
this.step = step;
}
public int getJump() {
return jump;
}
public void setJump(int jump) {
this.jump = jump;
}
public int getRoll() {
return roll;
}
public void setRoll(int roll) {
this.roll = roll;
}
public int getMove() {
return move;
}
public void setMove(int move) {
this.move = move;
}
}

@ -0,0 +1,93 @@
package com.yipin.liuwanr.entity;
//应用程序权限
public class ApplicationPermissions {
//应用程序权限主键id
private Integer applicationPermissionsId;
//应用程序名称
private String applicationPermissionsName;
//使用期限
private Integer usePeriod;
//市场价
private String marketPrice;
//交易价格
private Integer transactionPrice;
//折扣率
private Integer discount;
//绑定端口地址id
private Integer portAddressId;
//是否发货
private Integer isDeliverGoods;
//绑定系统id
private String systemId;
//绑定订单id
private Integer orderId;
//系统名称
private String systemName;
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public Integer getApplicationPermissionsId() {
return applicationPermissionsId;
}
public void setApplicationPermissionsId(Integer applicationPermissionsId) {
this.applicationPermissionsId = applicationPermissionsId;
}
public String getApplicationPermissionsName() {
return applicationPermissionsName;
}
public void setApplicationPermissionsName(String applicationPermissionsName) {
this.applicationPermissionsName = applicationPermissionsName;
}
public Integer getUsePeriod() {
return usePeriod;
}
public void setUsePeriod(Integer usePeriod) {
this.usePeriod = usePeriod;
}
public String getMarketPrice() {
return marketPrice;
}
public void setMarketPrice(String marketPrice) {
this.marketPrice = marketPrice;
}
public Integer getTransactionPrice() {
return transactionPrice;
}
public void setTransactionPrice(Integer transactionPrice) {
this.transactionPrice = transactionPrice;
}
public Integer getDiscount() {
return discount;
}
public void setDiscount(Integer discount) {
this.discount = discount;
}
public Integer getPortAddressId() {
return portAddressId;
}
public void setPortAddressId(Integer portAddressId) {
this.portAddressId = portAddressId;
}
public Integer getIsDeliverGoods() {
return isDeliverGoods;
}
public void setIsDeliverGoods(Integer isDeliverGoods) {
this.isDeliverGoods = isDeliverGoods;
}
public String getSystemId() {
return systemId;
}
public void setSystemId(String systemId) {
this.systemId = systemId;
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
}

@ -0,0 +1,207 @@
package com.yipin.liuwanr.entity;
/**
* 考核信息
*
* @author 全承珠
*
*/
public class Assesment {
private Integer assesmentState;// 考核状态
private Integer id;// 考核id
private Integer experimentId;// 项目id
private String creationTime;// 创建时间
private String endTime;// 结束时间
private String assesmentName;// 考核名称
private Integer releaseType;// 发布类型
private String timesum;// 耗时
private Integer assessmentNumber;// 考核点数量
private Integer errorRate;// 错误率
private Integer experimentalClassId;//实验班级id
private String classId;// 行政班级id
private String teacherInClass;// 任课老师
private Integer staffId;// 教师id
private Integer courseId;// 课程id
private Integer assessmentSize;// 考核人数
private String projectName;//项目名称
private String className;//行政班级名称
private Integer month;
private String staffName;
private Integer actualNumber;//实际人数
public Integer getActualNumber() {
return actualNumber;
}
public void setActualNumber(Integer actualNumber) {
this.actualNumber = actualNumber;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public Integer getExperimentalClassId() {
return experimentalClassId;
}
public void setExperimentalClassId(Integer experimentalClassId) {
this.experimentalClassId = experimentalClassId;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getExperimentId() {
return experimentId;
}
public void setExperimentId(Integer experimentId) {
this.experimentId = experimentId;
}
public String getCreationTime() {
return creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getAssesmentName() {
return assesmentName;
}
public void setAssesmentName(String assesmentName) {
this.assesmentName = assesmentName;
}
public Integer getReleaseType() {
return releaseType;
}
public void setReleaseType(Integer releaseType) {
this.releaseType = releaseType;
}
public Integer getAssesmentState() {
return assesmentState;
}
public void setAssesmentState(Integer assesmentState) {
this.assesmentState = assesmentState;
}
public Integer getAssessmentNumber() {
return assessmentNumber;
}
public void setAssessmentNumber(Integer assessmentNumber) {
this.assessmentNumber = assessmentNumber;
}
public Integer getErrorRate() {
return errorRate;
}
public void setErrorRate(Integer errorRate) {
this.errorRate = errorRate;
}
public String getClassId() {
return classId;
}
public void setClassId(String classId) {
this.classId = classId;
}
public String getTimesum() {
return timesum;
}
public void setTimesum(String timesum) {
this.timesum = timesum;
}
public String getTeacherInClass() {
return teacherInClass;
}
public void setTeacherInClass(String teacherInClass) {
this.teacherInClass = teacherInClass;
}
public Integer getStaffId() {
return staffId;
}
public void setStaffId(Integer staffId) {
this.staffId = staffId;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public Integer getAssessmentSize() {
return assessmentSize;
}
public void setAssessmentSize(Integer assessmentSize) {
this.assessmentSize = assessmentSize;
}
}

@ -0,0 +1,90 @@
package com.yipin.liuwanr.entity;
public class Attendance {
private Integer id;
private Integer courseId; //课程 ID
private Integer experimentId; //实验项目 ID
private String creationTime; //考勤签到时间
private Integer signIn; //0 签到 1 未签到
private Integer studentId; //学生学号
private Integer experimentalClassId; //绑定实验班级ID
private Integer count; //计算签到次数
private String studentName; //学生姓名
private String experimentName; //实验项目名称
private Integer absence; //缺勤次数
private Integer signInNumber; //签到次数
public Integer getAbsence() {
return absence;
}
public void setAbsence(Integer absence) {
this.absence = absence;
}
public Integer getSignInNumber() {
return signInNumber;
}
public void setSignInNumber(Integer signInNumber) {
this.signInNumber = signInNumber;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
public String getExperimentName() {
return experimentName;
}
public void setExperimentName(String experimentName) {
this.experimentName = experimentName;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public Integer getExperimentId() {
return experimentId;
}
public void setExperimentId(Integer experimentId) {
this.experimentId = experimentId;
}
public String getCreationTime() {
return creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public Integer getSignIn() {
return signIn;
}
public void setSignIn(Integer signIn) {
this.signIn = signIn;
}
public Integer getStudentId() {
return studentId;
}
public void setStudentId(Integer studentId) {
this.studentId = studentId;
}
public Integer getExperimentalClassId() {
return experimentalClassId;
}
public void setExperimentalClassId(Integer experimentalClassId) {
this.experimentalClassId = experimentalClassId;
}
}

@ -0,0 +1,22 @@
package com.yipin.liuwanr.entity;
public class Breed {
int id;
String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -0,0 +1,29 @@
package com.yipin.liuwanr.entity;
public class City {
//城市主键ID
private Integer cityId;
//城市名称
private String cityName;
//绑定省份ID
private Integer provinceId;
public Integer getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
}

@ -0,0 +1,144 @@
package com.yipin.liuwanr.entity;
public class Comment {
private String cuid;
private String uuid;
private String tuid;
private String touuid;
private String tocuid;
private String nickname;
private String avatar;
private String tonickname;
private int type;
private int agree = 0;
private int object = 0;
private int opinion = 0;
private String content;
private String createtime;
public String getCuid() {
return cuid;
}
public void setCuid(String cuid) {
this.cuid = cuid;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getTuid() {
return tuid;
}
public void setTuid(String tuid) {
this.tuid = tuid;
}
public String getTouuid() {
return touuid;
}
public void setTouuid(String touuid) {
this.touuid = touuid;
}
public String getTocuid() {
return tocuid;
}
public void setTocuid(String tocuid) {
this.tocuid = tocuid;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getTonickname() {
return tonickname;
}
public void setTonickname(String tonickname) {
this.tonickname = tonickname;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getAgree() {
return agree;
}
public void setAgree(int agree) {
this.agree = agree;
}
public int getObject() {
return object;
}
public void setObject(int object) {
this.object = object;
}
public int getOpinion() {
return opinion;
}
public void setOpinion(int opinion) {
this.opinion = opinion;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
}

@ -0,0 +1,77 @@
package com.yipin.liuwanr.entity;
public class Config {
String uuid;
int conf1 = -1;
int conf2 = -1;
int conf3 = -1;
int conf4 = -1;
int conf5 = -1;
int updatetime;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public int getConf1() {
return conf1;
}
public void setConf1(int conf1) {
this.conf1 = conf1;
}
public int getConf2() {
return conf2;
}
public void setConf2(int conf2) {
this.conf2 = conf2;
}
public int getConf3() {
return conf3;
}
public void setConf3(int conf3) {
this.conf3 = conf3;
}
public int getConf4() {
return conf4;
}
public void setConf4(int conf4) {
this.conf4 = conf4;
}
public int getConf5() {
return conf5;
}
public void setConf5(int conf5) {
this.conf5 = conf5;
}
public int getUpdatetime() {
return updatetime;
}
public void setUpdatetime(int updatetime) {
this.updatetime = updatetime;
}
}

@ -0,0 +1,53 @@
package com.yipin.liuwanr.entity;
public class ContractInformation {
//合同信息主键id
private Integer contractInformationId;
//合同名称
private String contractInformationName;
//合同编号
private String contractInformationNumber;
//合同金额
private int contractInformationSum;
//合同文件链接
private String contractInformationLink;
//绑定订单id
private Integer orderId;
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getContractInformationId() {
return contractInformationId;
}
public void setContractInformationId(Integer contractInformationId) {
this.contractInformationId = contractInformationId;
}
public String getContractInformationName() {
return contractInformationName;
}
public void setContractInformationName(String contractInformationName) {
this.contractInformationName = contractInformationName;
}
public String getContractInformationNumber() {
return contractInformationNumber;
}
public void setContractInformationNumber(String contractInformationNumber) {
this.contractInformationNumber = contractInformationNumber;
}
public int getContractInformationSum() {
return contractInformationSum;
}
public void setContractInformationSum(int contractInformationSum) {
this.contractInformationSum = contractInformationSum;
}
public String getContractInformationLink() {
return contractInformationLink;
}
public void setContractInformationLink(String contractInformationLink) {
this.contractInformationLink = contractInformationLink;
}
}

@ -0,0 +1,125 @@
package com.yipin.liuwanr.entity;
public class Course {
//主键ID
private Integer courseId;
//课程名称
private String courseName;
//课程类别
private Integer courseType;
//绑定学科id
private Integer disciplineId;
//绑定专业类id
private Integer professionalClassId;
//绑定专业id
private Integer professionalId;
//预计课时
private Integer courseHours;
//市场价格
private String marketPrice;
//课程简介
private String courseIntroduction;
//教学目标
private String teachingGoal;
//搜索内容
private String searchContent;
//绑定系统Id
private String systemId;
//绑定系统名称
private String systemName;
//是否上架
private Integer isShelves;
//创建时间
private String creationTime;
public String getCreationTime() {
return creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public Integer getIsShelves() {
return isShelves;
}
public void setIsShelves(Integer isShelves) {
this.isShelves = isShelves;
}
public String getSystemId() {
return systemId;
}
public void setSystemId(String systemId) {
this.systemId = systemId;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
public Integer getCourseType() {
return courseType;
}
public void setCourseType(Integer courseType) {
this.courseType = courseType;
}
public Integer getDisciplineId() {
return disciplineId;
}
public void setDisciplineId(Integer disciplineId) {
this.disciplineId = disciplineId;
}
public Integer getProfessionalClassId() {
return professionalClassId;
}
public void setProfessionalClassId(Integer professionalClassId) {
this.professionalClassId = professionalClassId;
}
public Integer getProfessionalId() {
return professionalId;
}
public void setProfessionalId(Integer professionalId) {
this.professionalId = professionalId;
}
public Integer getCourseHours() {
return courseHours;
}
public void setCourseHours(Integer courseHours) {
this.courseHours = courseHours;
}
public String getMarketPrice() {
return marketPrice;
}
public void setMarketPrice(String marketPrice) {
this.marketPrice = marketPrice;
}
public String getCourseIntroduction() {
return courseIntroduction;
}
public void setCourseIntroduction(String courseIntroduction) {
this.courseIntroduction = courseIntroduction;
}
public String getTeachingGoal() {
return teachingGoal;
}
public void setTeachingGoal(String teachingGoal) {
this.teachingGoal = teachingGoal;
}
public String getSearchContent() {
return searchContent;
}
public void setSearchContent(String searchContent) {
this.searchContent = searchContent;
}
}

@ -0,0 +1,56 @@
package com.yipin.liuwanr.entity;
import java.util.List;
public class CourseLink {
//课程环节主键id
private Integer linkId;
//项目id
private Integer projectId;
//文件链接
private String fileLink;
//环节名称
private String linkName;
//绑定课程id
private Integer courseId;
private List<CourseLink> courseLink;
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public List<CourseLink> getCourseLink() {
return courseLink;
}
public void setCourseLink(List<CourseLink> courseLink) {
this.courseLink = courseLink;
}
public Integer getLinkId() {
return linkId;
}
public void setLinkId(Integer linkId) {
this.linkId = linkId;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getFileLink() {
return fileLink;
}
public void setFileLink(String fileLink) {
this.fileLink = fileLink;
}
public String getLinkName() {
return linkName;
}
public void setLinkName(String linkName) {
this.linkName = linkName;
}
}

@ -0,0 +1,102 @@
package com.yipin.liuwanr.entity;
//课程权限
public class CoursePermissions {
//课程权限主键id
private Integer coursePermissionsId;
//课程名称
private String coursePermissionsName;
//使用期限
private Integer usePeriod;
//市场价
private String marketPrice;
//交易价格
private Integer transactionPrice;
//折扣率
private Integer discount;
//绑定端口地址id
private Integer portAddressId;
//是否发货
private Integer isDeliverGoods;
//绑定课程id
private Integer courseId;
//绑定订单id
private Integer orderId;
//课程名称
private String courseName;
//到期时间
private String expirationTime;
public String getExpirationTime() {
return expirationTime;
}
public void setExpirationTime(String expirationTime) {
this.expirationTime = expirationTime;
}
public Integer getCoursePermissionsId() {
return coursePermissionsId;
}
public void setCoursePermissionsId(Integer coursePermissionsId) {
this.coursePermissionsId = coursePermissionsId;
}
public String getCoursePermissionsName() {
return coursePermissionsName;
}
public void setCoursePermissionsName(String coursePermissionsName) {
this.coursePermissionsName = coursePermissionsName;
}
public Integer getUsePeriod() {
return usePeriod;
}
public void setUsePeriod(Integer usePeriod) {
this.usePeriod = usePeriod;
}
public String getMarketPrice() {
return marketPrice;
}
public void setMarketPrice(String marketPrice) {
this.marketPrice = marketPrice;
}
public Integer getTransactionPrice() {
return transactionPrice;
}
public void setTransactionPrice(Integer transactionPrice) {
this.transactionPrice = transactionPrice;
}
public Integer getDiscount() {
return discount;
}
public void setDiscount(Integer discount) {
this.discount = discount;
}
public Integer getPortAddressId() {
return portAddressId;
}
public void setPortAddressId(Integer portAddressId) {
this.portAddressId = portAddressId;
}
public Integer getIsDeliverGoods() {
return isDeliverGoods;
}
public void setIsDeliverGoods(Integer isDeliverGoods) {
this.isDeliverGoods = isDeliverGoods;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
}

@ -0,0 +1,184 @@
package com.yipin.liuwanr.entity;
import java.util.List;
public class Customer {
//主键ID
private Integer customerId;
//客户名称
private String customerName;
//国家
private String countries;
//行业
private String industry;
//省份
private Integer provinceId;
//管理员姓名
private String adminName;
//管理员电话
private String adminPhone;
//城市
private Integer cityId;
//客户类型
private Integer customerType;
//到期时间
private String stopTime;
//邮件
private String email;
//绑定学校ID
private Integer schoolId;
//搜索内容
private String searchContent;
private List<Customer> customer;
//绑定行业类ID
private Integer industryClassId;
//绑定行业类名称
private String industryClassName;
//绑定行业ID
private Integer industryId;
//绑定行业名称
private String industryName;
//————————————————————————
//绑定省份名称
private String provinceName;
//绑定城市名称
private String cityName;
//绑定学校名称
private String schoolName;
//学校层次
private Integer level;
public String getIndustryClassName() {
return industryClassName;
}
public void setIndustryClassName(String industryClassName) {
this.industryClassName = industryClassName;
}
public String getIndustryName() {
return industryName;
}
public void setIndustryName(String industryName) {
this.industryName = industryName;
}
public Integer getIndustryClassId() {
return industryClassId;
}
public void setIndustryClassId(Integer industryClassId) {
this.industryClassId = industryClassId;
}
public Integer getIndustryId() {
return industryId;
}
public void setIndustryId(Integer industryId) {
this.industryId = industryId;
}
public List<Customer> getCustomer() {
return customer;
}
public void setCustomer(List<Customer> customer) {
this.customer = customer;
}
public String getSearchContent() {
return searchContent;
}
public void setSearchContent(String searchContent) {
this.searchContent = searchContent;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getCustomerId() {
return customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCountries() {
return countries;
}
public void setCountries(String countries) {
this.countries = countries;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
public String getAdminPhone() {
return adminPhone;
}
public void setAdminPhone(String adminPhone) {
this.adminPhone = adminPhone;
}
public Integer getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public Integer getCustomerType() {
return customerType;
}
public void setCustomerType(Integer customerType) {
this.customerType = customerType;
}
public String getStopTime() {
return stopTime;
}
public void setStopTime(String stopTime) {
this.stopTime = stopTime;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Integer getSchoolId() {
return schoolId;
}
public void setSchoolId(Integer schoolId) {
this.schoolId = schoolId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName;
}
}

@ -0,0 +1,204 @@
package com.yipin.liuwanr.entity;
public class Demo {
String symbol;
String code;
String name;
String trade;
String pricechange;
String changepercent;
String buy;
String sell;
String settlement;
String open;
String high;
String low;
String volume;
String amount;
String ticktime;
String per;
String pb;
String mktcap;
String nmc;
String turnoverratio;
public String getSymbol() {
return symbol;
}
public void setSymbol(String symbol) {
this.symbol = symbol;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTrade() {
return trade;
}
public void setTrade(String trade) {
this.trade = trade;
}
public String getPricechange() {
return pricechange;
}
public void setPricechange(String pricechange) {
this.pricechange = pricechange;
}
public String getChangepercent() {
return changepercent;
}
public void setChangepercent(String changepercent) {
this.changepercent = changepercent;
}
public String getBuy() {
return buy;
}
public void setBuy(String buy) {
this.buy = buy;
}
public String getSell() {
return sell;
}
public void setSell(String sell) {
this.sell = sell;
}
public String getSettlement() {
return settlement;
}
public void setSettlement(String settlement) {
this.settlement = settlement;
}
public String getOpen() {
return open;
}
public void setOpen(String open) {
this.open = open;
}
public String getHigh() {
return high;
}
public void setHigh(String high) {
this.high = high;
}
public String getLow() {
return low;
}
public void setLow(String low) {
this.low = low;
}
public String getVolume() {
return volume;
}
public void setVolume(String volume) {
this.volume = volume;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getTicktime() {
return ticktime;
}
public void setTicktime(String ticktime) {
this.ticktime = ticktime;
}
public String getPer() {
return per;
}
public void setPer(String per) {
this.per = per;
}
public String getPb() {
return pb;
}
public void setPb(String pb) {
this.pb = pb;
}
public String getMktcap() {
return mktcap;
}
public void setMktcap(String mktcap) {
this.mktcap = mktcap;
}
public String getNmc() {
return nmc;
}
public void setNmc(String nmc) {
this.nmc = nmc;
}
public String getTurnoverratio() {
return turnoverratio;
}
public void setTurnoverratio(String turnoverratio) {
this.turnoverratio = turnoverratio;
}
}

@ -0,0 +1,53 @@
package com.yipin.liuwanr.entity;
public class Device {
String duid;
String version;
int tariff;
String createtime;
String updatetime;
public String getDuid() {
return duid;
}
public void setDuid(String duid) {
this.duid = duid;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public int getTariff() {
return tariff;
}
public void setTariff(int tariff) {
this.tariff = tariff;
}
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
@Override
public String toString() {
return "Device [duid=" + duid + ", version=" + version + ", tariff=" + tariff
+ ", createtime=" + createtime + ", updatetime=" + updatetime + "]";
}
}

@ -0,0 +1,29 @@
package com.yipin.liuwanr.entity;
public class Discipline {
//主键ID
private Integer disciplineId;
//学科名称
private String disciplineName;
//学科层次id
private Integer disciplineLevelId;
public Integer getDisciplineId() {
return disciplineId;
}
public void setDisciplineId(Integer disciplineId) {
this.disciplineId = disciplineId;
}
public String getDisciplineName() {
return disciplineName;
}
public void setDisciplineName(String disciplineName) {
this.disciplineName = disciplineName;
}
public Integer getDisciplineLevelId() {
return disciplineLevelId;
}
public void setDisciplineLevelId(Integer disciplineLevelId) {
this.disciplineLevelId = disciplineLevelId;
}
}

@ -0,0 +1,121 @@
package com.yipin.liuwanr.entity;
/**
* 实验班级信息
*
* @author 全承珠
*
*/
public class ExperimentalClass {
//实验班级主键ID
private Integer experimentalClassId;
//实验班级名称
private String experimentalClassName;
//班级大小
private Integer classSize;
//练习次数
private Integer practiceNumber;
//考核次数
private Integer inspectionNumber;
//课程进度
private String courseSchedule;
//创建时间
private String creationTime;
//创建人
private String founder;
//绑定课程Id
private Integer courseId;
//绑定学校id
private Integer schoolId;
//绑定用户Id
private Integer userId;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getSchoolId() {
return schoolId;
}
public void setSchoolId(Integer schoolId) {
this.schoolId = schoolId;
}
public Integer getExperimentalClassId() {
return experimentalClassId;
}
public void setExperimentalClassId(Integer experimentalClassId) {
this.experimentalClassId = experimentalClassId;
}
public String getExperimentalClassName() {
return experimentalClassName;
}
public void setExperimentalClassName(String experimentalClassName) {
this.experimentalClassName = experimentalClassName;
}
public Integer getClassSize() {
return classSize;
}
public void setClassSize(Integer classSize) {
this.classSize = classSize;
}
public Integer getPracticeNumber() {
return practiceNumber;
}
public void setPracticeNumber(Integer practiceNumber) {
this.practiceNumber = practiceNumber;
}
public Integer getInspectionNumber() {
return inspectionNumber;
}
public void setInspectionNumber(Integer inspectionNumber) {
this.inspectionNumber = inspectionNumber;
}
public String getCourseSchedule() {
return courseSchedule;
}
public void setCourseSchedule(String courseSchedule) {
this.courseSchedule = courseSchedule;
}
public String getCreationTime() {
return creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public String getFounder() {
return founder;
}
public void setFounder(String founder) {
this.founder = founder;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
}

@ -0,0 +1,69 @@
package com.yipin.liuwanr.entity;
public class FileInfo {
private String baseFileName;
private long size;
private String ownerId;
private long version;
private String sha256;
private boolean allowExternalMarketplace;
private boolean userCanWrite;
private boolean supportsUpdate;
private boolean supportsLocks;
public String getBaseFileName() {
return baseFileName;
}
public void setBaseFileName(String baseFileName) {
this.baseFileName = baseFileName;
}
public long getSize() {
return size;
}
public void setSize(long size) {
this.size = size;
}
public String getOwnerId() {
return ownerId;
}
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
}
public long getVersion() {
return version;
}
public void setVersion(long version) {
this.version = version;
}
public String getSha256() {
return sha256;
}
public void setSha256(String sha256) {
this.sha256 = sha256;
}
public boolean isAllowExternalMarketplace() {
return allowExternalMarketplace;
}
public void setAllowExternalMarketplace(boolean allowExternalMarketplace) {
this.allowExternalMarketplace = allowExternalMarketplace;
}
public boolean isUserCanWrite() {
return userCanWrite;
}
public void setUserCanWrite(boolean userCanWrite) {
this.userCanWrite = userCanWrite;
}
public boolean isSupportsUpdate() {
return supportsUpdate;
}
public void setSupportsUpdate(boolean supportsUpdate) {
this.supportsUpdate = supportsUpdate;
}
public boolean isSupportsLocks() {
return supportsLocks;
}
public void setSupportsLocks(boolean supportsLocks) {
this.supportsLocks = supportsLocks;
}
}

@ -0,0 +1,41 @@
package com.yipin.liuwanr.entity;
public class FilesResult {
// 文件名
private String fileName;
// 文件在储存空间的路径
private String fileUrl;
// 上传状态
private String status;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
return "UploadFilesResult [fileName=" + fileName + ", fileUrl=" + fileUrl + ", status=" + status + "]";
}
}

@ -0,0 +1,59 @@
package com.yipin.liuwanr.entity;
import java.util.List;
/**
*
*
* @author 全承珠
*
*/
public class Grade {
private Integer gradeId;
private String gradeName;
private Integer professionalArchitectureId;
private List<ExperimentalClass> experimentalClass;
private List<SutdentClass> classes;
public List<SutdentClass> getClasses() {
return classes;
}
public void setClasses(List<SutdentClass> classes) {
this.classes = classes;
}
public List<ExperimentalClass> getExperimentalClass() {
return experimentalClass;
}
public void setExperimentalClass(List<ExperimentalClass> experimentalClass) {
this.experimentalClass = experimentalClass;
}
public Integer getGradeId() {
return gradeId;
}
public void setGradeId(Integer gradeId) {
this.gradeId = gradeId;
}
public String getGradeName() {
return gradeName;
}
public void setGradeName(String gradeName) {
this.gradeName = gradeName;
}
public Integer getProfessionalArchitectureId() {
return professionalArchitectureId;
}
public void setProfessionalArchitectureId(Integer professionalArchitectureId) {
this.professionalArchitectureId = professionalArchitectureId;
}
}

@ -0,0 +1,127 @@
package com.yipin.liuwanr.entity;
import java.util.List;
public class Group {
private long guid;
private String name;
private String avatar;
private String uuid;
private String description;
private double latitude;
private double longitude;
private int members;
private int joined;
private List<User> users;
private String createtime;
private String updatetime;
public long getGuid() {
return guid;
}
public void setGuid(long guid) {
this.guid = guid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public int getMembers() {
return members;
}
public void setMembers(int members) {
this.members = members;
}
public int getJoined() {
return joined;
}
public void setJoined(int joined) {
this.joined = joined;
}
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users = users;
}
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
public String getUpdatetime() {
return updatetime;
}
public void setUpdatetime(String updatetime) {
this.updatetime = updatetime;
}
}

@ -0,0 +1,73 @@
package com.yipin.liuwanr.entity;
public class ImagePart {
private String imgname;
private int total;
private int index;
private int length;
private int checksum;
private String content;
public String getImgname() {
return imgname;
}
public void setImgname(String imgname) {
this.imgname = imgname;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getChecksum() {
return checksum;
}
public void setChecksum(int checksum) {
this.checksum = checksum;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return "ImagePart [imgname=" + imgname + ", total=" + total + ", index=" + index + ", length=" + length
+ ", checksum=" + checksum + ", content=" + content + "]";
}
}

@ -0,0 +1,31 @@
package com.yipin.liuwanr.entity;
//行业
public class Industry {
//行业主键ID
private Integer industryId;
//行业类绑定ID
private Integer industryClassId;
//行业名称
private String industryName;
public Integer getIndustryId() {
return industryId;
}
public void setIndustryId(Integer industryId) {
this.industryId = industryId;
}
public Integer getIndustryClassId() {
return industryClassId;
}
public void setIndustryClassId(Integer industryClassId) {
this.industryClassId = industryClassId;
}
public String getIndustryName() {
return industryName;
}
public void setIndustryName(String industryName) {
this.industryName = industryName;
}
}

@ -0,0 +1,23 @@
package com.yipin.liuwanr.entity;
//行业类
public class IndustryClass {
//行业类主键ID
private Integer industryClassId;
//行业类名称
private String industryClassName;
public Integer getIndustryClassId() {
return industryClassId;
}
public void setIndustryClassId(Integer industryClassId) {
this.industryClassId = industryClassId;
}
public String getIndustryClassName() {
return industryClassName;
}
public void setIndustryClassName(String industryClassName) {
this.industryClassName = industryClassName;
}
}

@ -0,0 +1,65 @@
package com.yipin.liuwanr.entity;
/**
* 补考名单
* @author 全承珠
*
*/
public class Makeuplist {
private String professionalName;
private Integer gradeName;
private String className;
private Integer studentNumber;
private String studentName;
private Integer staffId;
public String getProfessionalName() {
return professionalName;
}
public void setProfessionalName(String professionalName) {
this.professionalName = professionalName;
}
public Integer getGradeName() {
return gradeName;
}
public Integer getStaffId() {
return staffId;
}
public void setStaffId(Integer staffId) {
this.staffId = staffId;
}
public void setGradeName(Integer gradeName) {
this.gradeName = gradeName;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Integer getStudentNumber() {
return studentNumber;
}
public void setStudentNumber(Integer studentNumber) {
this.studentNumber = studentNumber;
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
}

@ -0,0 +1,145 @@
package com.yipin.liuwanr.entity;
import java.util.List;
public class Order {
//订单主键id
private Integer orderId;
//订单编号
private String orderNumber;
//绑定客户id
private Integer customerId;
//客户名称
private String customerName;
//订单名称
private String orderName;
//订单金额
private String orderAmount;
//订单时间
private String orderDate;
//订单类型(1、正式 2、使用)
private Integer orderType;
//订单状态(1、待发货 2、已完成 3、已取消)
private Integer orderStatus;
//订单性质(1、续签 2、初签)
private Integer orderNature;
//省份
private Integer provinceId;
//城市
private Integer cityId;
//订单联系人
private String orderContact;
//电话
private String phone;
//邮件
private String email;
//搜索内容
private String searchContent;
//多个订单id
private List<Integer> orderIds;
public List<Integer> getOrderIds() {
return orderIds;
}
public void setOrderIds(List<Integer> orderIds) {
this.orderIds = orderIds;
}
public Integer getCustomerId() {
return customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
public Integer getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public String getSearchContent() {
return searchContent;
}
public void setSearchContent(String searchContent) {
this.searchContent = searchContent;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getOrderName() {
return orderName;
}
public void setOrderName(String orderName) {
this.orderName = orderName;
}
public String getOrderAmount() {
return orderAmount;
}
public void setOrderAmount(String orderAmount) {
this.orderAmount = orderAmount;
}
public String getOrderDate() {
return orderDate;
}
public void setOrderDate(String orderDate) {
this.orderDate = orderDate;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public Integer getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(Integer orderStatus) {
this.orderStatus = orderStatus;
}
public Integer getOrderNature() {
return orderNature;
}
public void setOrderNature(Integer orderNature) {
this.orderNature = orderNature;
}
public String getOrderContact() {
return orderContact;
}
public void setOrderContact(String orderContact) {
this.orderContact = orderContact;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}

@ -0,0 +1,53 @@
package com.yipin.liuwanr.entity;
import java.util.ArrayList;
import java.util.List;
public class OrderVo {
//订单
private Order order;
//合同信息
private ContractInformation contractInformation;
//课程权限
private CoursePermissions coursePermissions;
private List<Order> orders;
private List<ContractInformation> contractInformations;
private List<CoursePermissions> CoursePermissionss = new ArrayList<CoursePermissions>();
public Order getOrder() {
return order;
}
public void setOrder(Order order) {
this.order = order;
}
public ContractInformation getContractInformation() {
return contractInformation;
}
public void setContractInformation(ContractInformation contractInformation) {
this.contractInformation = contractInformation;
}
public CoursePermissions getCoursePermissions() {
return coursePermissions;
}
public void setCoursePermissions(CoursePermissions coursePermissions) {
this.coursePermissions = coursePermissions;
}
public List<Order> getOrders() {
return orders;
}
public void setOrders(List<Order> orders) {
this.orders = orders;
}
public List<ContractInformation> getContractInformations() {
return contractInformations;
}
public void setContractInformations(List<ContractInformation> contractInformations) {
this.contractInformations = contractInformations;
}
public List<CoursePermissions> getCoursePermissionss() {
return CoursePermissionss;
}
public void setCoursePermissionss(List<CoursePermissions> coursePermissionss) {
CoursePermissionss = coursePermissionss;
}
}

@ -0,0 +1,45 @@
package com.yipin.liuwanr.entity;
import java.io.Serializable;
import java.util.List;
public class PageResult implements Serializable {
// 总记录数
private Long total;
// 总记录
private List<?> rows;
private int totalPages;
public PageResult(Long total, List<?> rows,int totalPages) {
this.total = total;
this.rows = rows;
this.totalPages = totalPages;
}
public int getTotalPages() {
return totalPages;
}
public void setTotalPages(int totalPages) {
this.totalPages = totalPages;
}
public Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
public List<?> getRows() {
return rows;
}
public void setRows(List<?> rows) {
this.rows = rows;
}
}

@ -0,0 +1,181 @@
package com.yipin.liuwanr.entity;
public class PersonalCenter {
private Integer userId; //主键ID
private String name; //用户姓名
private String userAccount; //用户账号
private String password; //密码
private Integer sex; //性别1男,2女
private String workNumber; //工号、学号
private String phone; //个人手机
private String email; //个人邮箱
private Integer logInNumber; //登陆次数
private String schoolName; //学校名称
private String provinceName; //省份名称
private String cityName; //城市名称
private String professionalName; //专业名称
private Integer gradeName; //年级名称(只存int整型数字)
private Integer className; //班级名称(只存int整型数字)
private Integer accountRole; //账号角色(1、超级管理员 2、管理员 3、教师 4、学生)
private String experimentalClassName; //实验班级名称
private String experimentName;
private String staffName;
private Integer logNumber;
private String lastTimeOfLanding;
private String staffGradeName;
private Integer staffWorkNumber;
public String getStaffGradeName() {
return staffGradeName;
}
public void setStaffGradeName(String staffGradeName) {
this.staffGradeName = staffGradeName;
}
public Integer getStaffWorkNumber() {
return staffWorkNumber;
}
public void setStaffWorkNumber(Integer staffWorkNumber) {
this.staffWorkNumber = staffWorkNumber;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public Integer getLogNumber() {
return logNumber;
}
public void setLogNumber(Integer logNumber) {
this.logNumber = logNumber;
}
public String getLastTimeOfLanding() {
return lastTimeOfLanding;
}
public void setLastTimeOfLanding(String lastTimeOfLanding) {
this.lastTimeOfLanding = lastTimeOfLanding;
}
public String getExperimentName() {
return experimentName;
}
public void setExperimentName(String experimentName) {
this.experimentName = experimentName;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUserAccount() {
return userAccount;
}
public void setUserAccount(String userAccount) {
this.userAccount = userAccount;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getSex() {
return sex;
}
public void setSex(Integer sex) {
this.sex = sex;
}
public String getWorkNumber() {
return workNumber;
}
public void setWorkNumber(String workNumber) {
this.workNumber = workNumber;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Integer getLogInNumber() {
return logInNumber;
}
public void setLogInNumber(Integer logInNumber) {
this.logInNumber = logInNumber;
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public String getProfessionalName() {
return professionalName;
}
public void setProfessionalName(String professionalName) {
this.professionalName = professionalName;
}
public Integer getGradeName() {
return gradeName;
}
public void setGradeName(Integer gradeName) {
this.gradeName = gradeName;
}
public Integer getClassName() {
return className;
}
public void setClassName(Integer className) {
this.className = className;
}
public Integer getAccountRole() {
return accountRole;
}
public void setAccountRole(Integer accountRole) {
this.accountRole = accountRole;
}
public String getExperimentalClassName() {
return experimentalClassName;
}
public void setExperimentalClassName(String experimentalClassName) {
this.experimentalClassName = experimentalClassName;
}
}

@ -0,0 +1,153 @@
package com.yipin.liuwanr.entity;
public class Pet {
private String puid;
private String uuid;
private String nickname;
private int sex = -1;
private String birthday;
private int category;
private int breed;
private int height;
private int weight;
private String sign;
private String avatar;
private Device device;
private String createtime;
private String updatetime;
public String getPuid() {
return puid;
}
public void setPuid(String puid) {
this.puid = puid;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public int getSex() {
return sex;
}
public void setSex(int sex) {
this.sex = sex;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public int getCategory() {
return category;
}
public void setCategory(int category) {
this.category = category;
}
public int getBreed() {
return breed;
}
public void setBreed(int breed) {
this.breed = breed;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public Device getDevice() {
return device;
}
public void setDevice(Device device) {
this.device = device;
}
public String getUpdatetime() {
return updatetime;
}
public void setUpdatetime(String updatetime) {
this.updatetime = updatetime;
}
public String getCreatetime() {
return createtime;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
@Override
public String toString() {
return "Pet [puid=" + puid + ", nickname=" + nickname + ", sex=" + sex + ", birthday=" + birthday
+ ", category=" + category + ", breed=" + breed + ", height=" + height + ", weight=" + weight
+ ", sign=" + sign + ", avatar=" + avatar + ", device=" + device + ", createtime=" + createtime
+ ", updatetime=" + updatetime + "]";
}
}

@ -0,0 +1,102 @@
package com.yipin.liuwanr.entity;
/**
* 判分点记录
* @author Admin
*
*/
public class PointRecord {
private Integer pointRecordId;
private Integer assesmentId;
private Integer judgmentPointsId;
private Integer projectId;
private Integer experimentalClassId;
private Integer classId;
private Integer studentId;
private Integer rightAndWrong;
private String judgmentPointsName;
private Integer number;
public String getJudgmentPointsName() {
return judgmentPointsName;
}
public void setJudgmentPointsName(String judgmentPointsName) {
this.judgmentPointsName = judgmentPointsName;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public Integer getPointRecordId() {
return pointRecordId;
}
public void setPointRecordId(Integer pointRecordId) {
this.pointRecordId = pointRecordId;
}
public Integer getAssesmentId() {
return assesmentId;
}
public void setAssesmentId(Integer assesmentId) {
this.assesmentId = assesmentId;
}
public Integer getJudgmentPointsId() {
return judgmentPointsId;
}
public void setJudgmentPointsId(Integer judgmentPointsId) {
this.judgmentPointsId = judgmentPointsId;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public Integer getExperimentalClassId() {
return experimentalClassId;
}
public void setExperimentalClassId(Integer experimentalClassId) {
this.experimentalClassId = experimentalClassId;
}
public Integer getClassId() {
return classId;
}
public void setClassId(Integer classId) {
this.classId = classId;
}
public Integer getStudentId() {
return studentId;
}
public void setStudentId(Integer studentId) {
this.studentId = studentId;
}
public Integer getRightAndWrong() {
return rightAndWrong;
}
public void setRightAndWrong(Integer rightAndWrong) {
this.rightAndWrong = rightAndWrong;
}
}

@ -0,0 +1,60 @@
package com.yipin.liuwanr.entity;
public class Position {
private String puid;
private String duid;
private boolean online = false;
private double longitude;
private double latitude;
public Position(double log, double lat){
this.longitude = log;
this.latitude = lat;
}
public String getPuid() {
return puid;
}
public void setPuid(String puid) {
this.puid = puid;
}
public String getDuid() {
return duid;
}
public void setDuid(String duid) {
this.duid = duid;
}
public boolean isOnline() {
return online;
}
public void setOnline(boolean online) {
this.online = online;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
}

@ -0,0 +1,52 @@
package com.yipin.liuwanr.entity;
import java.util.List;
/**
* 专业信息
*
* @author 全承珠
*
*/
public class Professional {
//专业id
private Integer professionalId;
//专业名称
private String professionalName;
//专业类id
private Integer professionalClassId;
private List<Grade> grade;
public List<Grade> getGrade() {
return grade;
}
public void setGrade(List<Grade> grade) {
this.grade = grade;
}
public Integer getProfessionalId() {
return professionalId;
}
public void setProfessionalId(Integer professionalId) {
this.professionalId = professionalId;
}
public String getProfessionalName() {
return professionalName;
}
public void setProfessionalName(String professionalName) {
this.professionalName = professionalName;
}
public Integer getProfessionalClassId() {
return professionalClassId;
}
public void setProfessionalClassId(Integer professionalClassId) {
this.professionalClassId = professionalClassId;
}
}

@ -0,0 +1,30 @@
package com.yipin.liuwanr.entity;
public class ProfessionalArchitecture {
//学生专业架构ID
private Integer stuProfessionalArchitectureId;
//学生专业架构名称
private String stuProfessionalArchitectureName;
//绑定学校ID
private Integer schoolId;
public Integer getStuProfessionalArchitectureId() {
return stuProfessionalArchitectureId;
}
public void setStuProfessionalArchitectureId(Integer stuProfessionalArchitectureId) {
this.stuProfessionalArchitectureId = stuProfessionalArchitectureId;
}
public String getStuProfessionalArchitectureName() {
return stuProfessionalArchitectureName;
}
public void setStuProfessionalArchitectureName(String stuProfessionalArchitectureName) {
this.stuProfessionalArchitectureName = stuProfessionalArchitectureName;
}
public Integer getSchoolId() {
return schoolId;
}
public void setSchoolId(Integer schoolId) {
this.schoolId = schoolId;
}
}

@ -0,0 +1,30 @@
package com.yipin.liuwanr.entity;
public class ProfessionalClass {
//专业类ID
private Integer professionalClassId;
//专业类名称
private String professionalClassName;
//学科层次ID
private String disciplineId;
public Integer getProfessionalClassId() {
return professionalClassId;
}
public void setProfessionalClassId(Integer professionalClassId) {
this.professionalClassId = professionalClassId;
}
public String getProfessionalClassName() {
return professionalClassName;
}
public void setProfessionalClassName(String professionalClassName) {
this.professionalClassName = professionalClassName;
}
public String getDisciplineId() {
return disciplineId;
}
public void setDisciplineId(String disciplineId) {
this.disciplineId = disciplineId;
}
}

@ -0,0 +1,186 @@
package com.yipin.liuwanr.entity;
/**
* 项目管理
*
* @author 86151
*
*/
public class Project_Management {
private Integer projectId;// 项目主键ID
private String projectName;// 项目名称
private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛)
private Integer founder;// 创建人(0、系统 1、老师)
private String creationTime;// 创建时间
private Integer state;// 状态(0、草稿箱 1、已发布)
private String experimentalGoal;// 实验目标
private String caseDescription; // 案例描述
private String experimentTask;// 实验任务
private String experimentalDataId;// 绑定实验数据ID
private String experimentSuggests; // 实验提示
private Integer systemId;// 绑定服务配置ID
private Integer isdel;
private Integer isShow;
private Integer isstartexperimental;
private Integer isstartexperimentSuggests;
private Integer isExperiment;
private Integer isAttendance;
private Integer signin;//是否签到
public Integer getSignin() {
return signin;
}
public void setSignin(Integer signin) {
this.signin = signin;
}
public Integer getIsstartexperimental() {
return isstartexperimental;
}
public void setIsstartexperimental(Integer isstartexperimental) {
this.isstartexperimental = isstartexperimental;
}
public Integer getIsstartexperimentSuggests() {
return isstartexperimentSuggests;
}
public void setIsstartexperimentSuggests(Integer isstartexperimentSuggests) {
this.isstartexperimentSuggests = isstartexperimentSuggests;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public Integer getProjectPermissions() {
return projectPermissions;
}
public void setProjectPermissions(Integer projectPermissions) {
this.projectPermissions = projectPermissions;
}
public Integer getFounder() {
return founder;
}
public void setFounder(Integer founder) {
this.founder = founder;
}
public String getCreationTime() {
return creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public String getExperimentalGoal() {
return experimentalGoal;
}
public void setExperimentalGoal(String experimentalGoal) {
this.experimentalGoal = experimentalGoal;
}
public String getCaseDescription() {
return caseDescription;
}
public void setCaseDescription(String caseDescription) {
this.caseDescription = caseDescription;
}
public String getExperimentTask() {
return experimentTask;
}
public void setExperimentTask(String experimentTask) {
this.experimentTask = experimentTask;
}
public Integer getIsdel() {
return isdel;
}
public void setIsdel(Integer isdel) {
this.isdel = isdel;
}
public Integer getIsShow() {
return isShow;
}
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
public String getExperimentalDataId() {
return experimentalDataId;
}
public void setExperimentalDataId(String experimentalDataId) {
this.experimentalDataId = experimentalDataId;
}
public String getExperimentSuggests() {
return experimentSuggests;
}
public void setExperimentSuggests(String experimentSuggests) {
this.experimentSuggests = experimentSuggests;
}
public Integer getSystemId() {
return systemId;
}
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
public Integer getIsExperiment() {
return isExperiment;
}
public void setIsExperiment(Integer isExperiment) {
this.isExperiment = isExperiment;
}
public Integer getIsAttendance() {
return isAttendance;
}
public void setIsAttendance(Integer isAttendance) {
this.isAttendance = isAttendance;
}
}

@ -0,0 +1,21 @@
package com.yipin.liuwanr.entity;
public class Province {
//省份主键ID
private Integer provinceId;
//省份名称
private String provinceName;
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
}

@ -0,0 +1,103 @@
package com.yipin.liuwanr.entity;
/**
* 记录表
* @author 或然
*
*/
public class Record {
private Integer recordId;
private Integer projectId;
private Integer studentId;
private Integer score;
private String createTime;
private String endTime;
private String timeSum;
private Integer integral;
private String projectName;
private Integer number;
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public Integer getRecordId() {
return recordId;
}
public void setRecordId(Integer recordId) {
this.recordId = recordId;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public Integer getStudentId() {
return studentId;
}
public void setStudentId(Integer studentId) {
this.studentId = studentId;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getTimeSum() {
return timeSum;
}
public void setTimeSum(String timeSum) {
this.timeSum = timeSum;
}
public Integer getIntegral() {
return integral;
}
public void setIntegral(Integer integral) {
this.integral = integral;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
}

@ -0,0 +1,24 @@
package com.yipin.liuwanr.entity;
public class Relationship {
private String hid;
private String lid;
public String getHid() {
return hid;
}
public void setHid(String hid) {
this.hid = hid;
}
public String getLid() {
return lid;
}
public void setLid(String lid) {
this.lid = lid;
}
}

@ -0,0 +1,34 @@
package com.yipin.liuwanr.entity;
public class Response {
private int status = 200;
private Object message;
private String errmessage;
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public Object getMessage() {
return message;
}
public void setMessage(Object message) {
this.message = message;
}
public String getErrmessage() {
return errmessage;
}
public void setErrmessage(String errmessage) {
this.errmessage = errmessage;
}
}

@ -0,0 +1,45 @@
package com.yipin.liuwanr.entity;
public class School {
//主键ID
private Integer schoolId;
//学校名称
private String schoolName;
//省份
private Integer provinceId;
//城市
private Integer cityId;
//层次
private Integer level;
public Integer getSchoolId() {
return schoolId;
}
public void setSchoolId(Integer schoolId) {
this.schoolId = schoolId;
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName;
}
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
public Integer getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
}

@ -0,0 +1,69 @@
package com.yipin.liuwanr.entity;
public class Score {
private double avg;//平均分
private double median;//中位数
private Integer min;//最低分
private Integer max;//最高分
private Integer peopleSize;//考核人数
private Integer pointNumber;//判分点数量
private double error;//错误率
public double getAvg() {
return avg;
}
public void setAvg(double avg) {
this.avg = avg;
}
public double getMedian() {
return median;
}
public void setMedian(double median) {
this.median = median;
}
public Integer getMin() {
return min;
}
public void setMin(Integer min) {
this.min = min;
}
public Integer getMax() {
return max;
}
public void setMax(Integer max) {
this.max = max;
}
public Integer getPeopleSize() {
return peopleSize;
}
public void setPeopleSize(Integer peopleSize) {
this.peopleSize = peopleSize;
}
public Integer getPointNumber() {
return pointNumber;
}
public void setPointNumber(Integer pointNumber) {
this.pointNumber = pointNumber;
}
public double getError() {
return error;
}
public void setError(double error) {
this.error = error;
}
}

@ -0,0 +1,102 @@
package com.yipin.liuwanr.entity;
public class ServiceConfig {
//主键ID
private Integer systemId;
//系统名称
private String systemName;
//系统类型
private Integer systemType;
//系统归属
private Integer systemAttribution;
//系统状态
private Integer systemStatus;
//搜索内容
private String searchContent;
//项目名称
private String projectName;
//绑定课程Id
private Integer courseId;
//多个系统Id
private String systemIds;
//项目id
private Integer projectId;
//项目是否展示
private Integer isShow;
//系统地址
private String systemAddress;
public String getSystemIds() {
return systemIds;
}
public void setSystemIds(String systemIds) {
this.systemIds = systemIds;
}
public String getSystemAddress() {
return systemAddress;
}
public void setSystemAddress(String systemAddress) {
this.systemAddress = systemAddress;
}
public Integer getIsShow() {
return isShow;
}
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public Integer getCourseId() {
return courseId;
}
public void setCourseId(Integer courseId) {
this.courseId = courseId;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public Integer getSystemId() {
return systemId;
}
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
public String getSystemName() {
return systemName;
}
public void setSystemName(String systemName) {
this.systemName = systemName;
}
public Integer getSystemType() {
return systemType;
}
public void setSystemType(Integer systemType) {
this.systemType = systemType;
}
public Integer getSystemAttribution() {
return systemAttribution;
}
public void setSystemAttribution(Integer systemAttribution) {
this.systemAttribution = systemAttribution;
}
public Integer getSystemStatus() {
return systemStatus;
}
public void setSystemStatus(Integer systemStatus) {
this.systemStatus = systemStatus;
}
public String getSearchContent() {
return searchContent;
}
public void setSearchContent(String searchContent) {
this.searchContent = searchContent;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save