diff --git a/orange-demo-multi-service-for-app/.DS_Store b/orange-demo-multi-service-for-app/.DS_Store
new file mode 100644
index 00000000..5008ddfc
Binary files /dev/null and b/orange-demo-multi-service-for-app/.DS_Store differ
diff --git a/orange-demo-multi-service-for-app/.idea/.name b/orange-demo-multi-service-for-app/.idea/.name
new file mode 100644
index 00000000..eaf507fb
--- /dev/null
+++ b/orange-demo-multi-service-for-app/.idea/.name
@@ -0,0 +1 @@
+OrangeMultiDemo
\ No newline at end of file
diff --git a/orange-demo-multi-service-for-app/.idea/compiler.xml b/orange-demo-multi-service-for-app/.idea/compiler.xml
index 2d58d5b1..956da22b 100644
--- a/orange-demo-multi-service-for-app/.idea/compiler.xml
+++ b/orange-demo-multi-service-for-app/.idea/compiler.xml
@@ -6,19 +6,19 @@
-
+
+
-
@@ -28,6 +28,7 @@
+
diff --git a/orange-demo-multi-service-for-app/.idea/misc.xml b/orange-demo-multi-service-for-app/.idea/misc.xml
index c5f2fee0..146992f7 100644
--- a/orange-demo-multi-service-for-app/.idea/misc.xml
+++ b/orange-demo-multi-service-for-app/.idea/misc.xml
@@ -8,6 +8,7 @@
diff --git a/orange-demo-multi-service-for-app/.idea/workspace.xml b/orange-demo-multi-service-for-app/.idea/workspace.xml
index 6840b8d1..29afe984 100644
--- a/orange-demo-multi-service-for-app/.idea/workspace.xml
+++ b/orange-demo-multi-service-for-app/.idea/workspace.xml
@@ -1,7 +1,7 @@
-
+
@@ -13,7 +13,7 @@
-
+
@@ -36,7 +36,7 @@
-
+
@@ -83,12 +83,12 @@
-
- 1609680782670
+
+ 1612356392884
- 1609680782670
-
+ 1612356392884
+
diff --git a/orange-demo-multi-service-for-app/OrangeMultiDemo.iml b/orange-demo-multi-service-for-app/OrangeMultiDemo.iml
deleted file mode 100644
index 45fd11ef..00000000
--- a/orange-demo-multi-service-for-app/OrangeMultiDemo.iml
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/orange-demo-multi-service-for-app/application/course-class/course-class-interface/src/main/java/com/orange/demo/courseclassinterface/dto/StudentDto.java b/orange-demo-multi-service-for-app/application/course-class/course-class-interface/src/main/java/com/orange/demo/courseclassinterface/dto/StudentDto.java
index 5bb9e077..108f5f1e 100644
--- a/orange-demo-multi-service-for-app/application/course-class/course-class-interface/src/main/java/com/orange/demo/courseclassinterface/dto/StudentDto.java
+++ b/orange-demo-multi-service-for-app/application/course-class/course-class-interface/src/main/java/com/orange/demo/courseclassinterface/dto/StudentDto.java
@@ -117,6 +117,12 @@ public class StudentDto {
@NotNull(message = "数据验证失败,所属校区不能为空!")
private Long schoolId;
+ /**
+ * 注册时间。
+ */
+ @ApiModelProperty(value = "注册时间")
+ private Date registerTime;
+
/**
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
*/
diff --git a/orange-demo-multi-service-for-app/application/course-class/course-class-service/src/main/java/com/orange/demo/courseclassservice/dao/mapper/StudentClassMapper.xml b/orange-demo-multi-service-for-app/application/course-class/course-class-service/src/main/java/com/orange/demo/courseclassservice/dao/mapper/StudentClassMapper.xml
index ea933841..5da446a6 100644
--- a/orange-demo-multi-service-for-app/application/course-class/course-class-service/src/main/java/com/orange/demo/courseclassservice/dao/mapper/StudentClassMapper.xml
+++ b/orange-demo-multi-service-for-app/application/course-class/course-class-service/src/main/java/com/orange/demo/courseclassservice/dao/mapper/StudentClassMapper.xml
@@ -31,7 +31,6 @@
AND zz_class.class_level = #{studentClassFilter.classLevel}
- AND zz_class.status = ${@com.orange.demo.common.core.constant.GlobalDeletedFlag@NORMAL}
\ No newline at end of file
diff --git a/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedisDictionaryCache.java b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedisDictionaryCache.java
new file mode 100644
index 00000000..9d2908cc
--- /dev/null
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedisDictionaryCache.java
@@ -0,0 +1,412 @@
+package com.orange.demo.common.redis.cache;
+
+import com.alibaba.fastjson.JSON;
+import com.orange.demo.common.core.cache.DictionaryCache;
+import com.orange.demo.common.core.constant.ApplicationConstant;
+import com.orange.demo.common.core.exception.RedisCacheAccessException;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.redisson.api.RMap;
+import org.redisson.api.RedissonClient;
+
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * 字典数据Redis缓存对象。
+ *
+ * @param 字典表主键类型。
+ * @param 字典表对象类型。
+ * @author Jerry
+ * @date 2020-09-24
+ */
+@Slf4j
+public class RedisDictionaryCache implements DictionaryCache {
+
+ /**
+ * redisson客户端。
+ */
+ protected final RedissonClient redissonClient;
+ /**
+ * 数据存储对象。
+ */
+ protected final RMap dataMap;
+ /**
+ * 字典值对象类型。
+ */
+ protected final Class valueClazz;
+ /**
+ * 由于大部分场景是读取操作,所以使用读写锁提高并发的伸缩性。
+ */
+ protected final ReadWriteLock lock;
+ /**
+ * 获取字典主键数据的函数对象。
+ */
+ protected final Function idGetter;
+ /**
+ * 超时时长。单位毫秒。
+ */
+ protected static final long TIMEOUT = 2000L;
+
+ /**
+ * 当前对象的构造器函数。
+ *
+ * @param redissonClient Redisson的客户端对象。
+ * @param dictionaryName 字典表的名称。等同于redis hash对象的key。
+ * @param valueClazz 值对象的Class对象。
+ * @param idGetter 获取当前类主键字段值的函数对象。
+ * @param 字典主键类型。
+ * @param 字典对象类型
+ * @return 实例化后的字典内存缓存对象。
+ */
+ public static RedisDictionaryCache create(
+ RedissonClient redissonClient,
+ String dictionaryName,
+ Class valueClazz,
+ Function idGetter) {
+ if (idGetter == null) {
+ throw new IllegalArgumentException("IdGetter can't be NULL.");
+ }
+ return new RedisDictionaryCache<>(redissonClient, dictionaryName, valueClazz, idGetter);
+ }
+
+ /**
+ * 构造函数。
+ *
+ * @param redissonClient Redisson的客户端对象。
+ * @param dictionaryName 字典表的名称。等同于redis hash对象的key。确保全局唯一。
+ * @param valueClazz 值对象的Class对象。
+ * @param idGetter 获取当前类主键字段值的函数对象。
+ */
+ public RedisDictionaryCache(
+ RedissonClient redissonClient,
+ String dictionaryName,
+ Class valueClazz,
+ Function idGetter) {
+ this.redissonClient = redissonClient;
+ this.dataMap = redissonClient.getMap(dictionaryName + ApplicationConstant.DICT_CACHE_NAME_SUFFIX);
+ this.lock = new ReentrantReadWriteLock();
+ this.valueClazz = valueClazz;
+ this.idGetter = idGetter;
+ }
+
+ /**
+ * 按照数据插入的顺序返回全部字典对象的列表。
+ *
+ * @return 全部字段数据列表。
+ */
+ @Override
+ public List getAll() {
+ Collection dataList;
+ String exceptionMessage;
+ try {
+ if (lock.readLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataList = dataMap.readAllValues();
+ } finally {
+ // 如果上面的操作时间超过redisson.lockWatchdogTimeout的时长,
+ // redis会将与该锁关联的键删除,此后调用unlock的时候,就会抛出运行时异常。
+ lock.readLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::getAll] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ if (CollectionUtils.isEmpty(dataList)) {
+ return new LinkedList<>();
+ }
+ return dataList.stream()
+ .map(data -> JSON.parseObject(data, valueClazz))
+ .collect(Collectors.toCollection(LinkedList::new));
+ }
+
+ /**
+ * 获取缓存中与键列表对应的对象列表。
+ *
+ * @param keys 主键集合。
+ * @return 对象列表。
+ */
+ @Override
+ public List getInList(Set keys) {
+ if (CollectionUtils.isEmpty(keys)) {
+ return new LinkedList<>();
+ }
+ Collection dataList;
+ String exceptionMessage;
+ try {
+ if (lock.readLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataList = dataMap.getAll(keys).values();
+ } finally {
+ lock.readLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::getInList] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ if (dataList == null) {
+ return new LinkedList<>();
+ }
+ return dataList.stream()
+ .map(data -> JSON.parseObject(data, valueClazz))
+ .collect(Collectors.toCollection(LinkedList::new));
+ }
+
+ /**
+ * 从缓存中获取指定的数据。
+ *
+ * @param id 数据的key。
+ * @return 获取到的数据,如果没有返回null。
+ */
+ @Override
+ public V get(K id) {
+ if (id == null) {
+ return null;
+ }
+ String data;
+ String exceptionMessage;
+ try {
+ if (lock.readLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ data = dataMap.get(id);
+ } finally {
+ lock.readLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::get] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ if (data == null) {
+ return null;
+ }
+ return JSON.parseObject(data, valueClazz);
+ }
+
+ /**
+ * 获取缓存中数据条目的数量。
+ *
+ * @return 返回缓存的数据数量。
+ */
+ @Override
+ public int getCount() {
+ return dataMap.size();
+ }
+
+ /**
+ * 将参数List中的数据保存到缓存中,同时保证getAll返回的数据列表,与参数列表中数据项的顺序保持一致。
+ *
+ * @param dataList 待缓存的数据列表。
+ */
+ @Override
+ public void putAll(List dataList) {
+ if (CollectionUtils.isEmpty(dataList)) {
+ return;
+ }
+ Map map = dataList.stream()
+ .collect(Collectors.toMap(idGetter, JSON::toJSONString));
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataMap.putAll(map, 1000);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::putAll] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 将数据存入缓存。
+ *
+ * @param id 通常为字典数据的主键。
+ * @param data 字典数据对象。
+ */
+ @Override
+ public void put(K id, V data) {
+ if (id == null || data == null) {
+ return;
+ }
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataMap.fastPut(id, JSON.toJSONString(data));
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::put] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 重新加载,先清空原有数据,在执行putAll的操作。
+ *
+ * @param dataList 待缓存的数据列表。
+ * @param force true则强制刷新,如果false,当缓存中存在数据时不刷新。
+ */
+ @Override
+ public void reload(List dataList, boolean force) {
+ Map map = null;
+ if (CollectionUtils.isNotEmpty(dataList)) {
+ map = dataList.stream().collect(Collectors.toMap(idGetter, JSON::toJSONString));
+ }
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ // 如果不强制刷新,需要先判断缓存中是否存在数据。
+ if (!force && this.getCount() > 0) {
+ return;
+ }
+ dataMap.clear();
+ if (map != null) {
+ dataMap.putAll(map, 1000);
+ }
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::reload] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 删除缓存中指定的键。
+ *
+ * @param id 待删除数据的主键。
+ * @return 返回被删除的对象,如果主键不存在,返回null。
+ */
+ @Override
+ public V invalidate(K id) {
+ if (id == null) {
+ return null;
+ }
+ String data;
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ data = dataMap.remove(id);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::invalidate] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ if (data == null) {
+ return null;
+ }
+ return JSON.parseObject(data, valueClazz);
+ }
+
+ /**
+ * 删除缓存中,参数列表中包含的键。
+ *
+ * @param keys 待删除数据的主键集合。
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void invalidateSet(Set keys) {
+ if (CollectionUtils.isEmpty(keys)) {
+ return;
+ }
+ Object[] keyArray = keys.toArray(new Object[]{});
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataMap.fastRemove((K[]) keyArray);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::invalidateSet] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 清空缓存。
+ */
+ @Override
+ public void invalidateAll() {
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataMap.clear();
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::invalidateAll] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+}
diff --git a/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedisTreeDictionaryCache.java b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedisTreeDictionaryCache.java
new file mode 100644
index 00000000..ddcae022
--- /dev/null
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedisTreeDictionaryCache.java
@@ -0,0 +1,352 @@
+package com.orange.demo.common.redis.cache;
+
+import com.alibaba.fastjson.JSON;
+import lombok.extern.slf4j.Slf4j;
+import com.orange.demo.common.core.exception.RedisCacheAccessException;
+import com.google.common.collect.LinkedListMultimap;
+import com.google.common.collect.Multimap;
+import org.apache.commons.collections4.CollectionUtils;
+import org.redisson.api.RListMultimap;
+import org.redisson.api.RedissonClient;
+
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+/**
+ * 树形字典数据Redis缓存对象。
+ *
+ * @param 字典表主键类型。
+ * @param 字典表对象类型。
+ * @author Jerry
+ * @date 2020-09-24
+ */
+@Slf4j
+public class RedisTreeDictionaryCache extends RedisDictionaryCache {
+
+ /**
+ * 树形数据存储对象。
+ */
+ private final RListMultimap allTreeMap;
+ /**
+ * 获取字典父主键数据的函数对象。
+ */
+ protected final Function parentIdGetter;
+
+ /**
+ * 当前对象的构造器函数。
+ *
+ * @param redissonClient Redisson的客户端对象。
+ * @param dictionaryName 字典表的名称。等同于redis hash对象的key。
+ * @param valueClazz 值对象的Class对象。
+ * @param idGetter 获取当前类主键字段值的函数对象。
+ * @param parentIdGetter 获取当前类父主键字段值的函数对象。
+ * @param 字典主键类型。
+ * @param 字典对象类型
+ * @return 实例化后的树形字典内存缓存对象。
+ */
+ public static RedisTreeDictionaryCache create(
+ RedissonClient redissonClient,
+ String dictionaryName,
+ Class valueClazz,
+ Function idGetter,
+ Function parentIdGetter) {
+ if (idGetter == null) {
+ throw new IllegalArgumentException("IdGetter can't be NULL.");
+ }
+ if (parentIdGetter == null) {
+ throw new IllegalArgumentException("ParentIdGetter can't be NULL.");
+ }
+ return new RedisTreeDictionaryCache<>(
+ redissonClient, dictionaryName, valueClazz, idGetter, parentIdGetter);
+ }
+
+ /**
+ * 构造函数。
+ *
+ * @param redissonClient Redisson的客户端对象。
+ * @param dictionaryName 字典表的名称。等同于redis hash对象的key。
+ * @param valueClazz 值对象的Class对象。
+ * @param idGetter 获取当前类主键字段值的函数对象。
+ * @param parentIdGetter 获取当前类父主键字段值的函数对象。
+ */
+ public RedisTreeDictionaryCache(
+ RedissonClient redissonClient,
+ String dictionaryName,
+ Class valueClazz,
+ Function idGetter,
+ Function parentIdGetter) {
+ super(redissonClient, dictionaryName, valueClazz, idGetter);
+ this.allTreeMap = redissonClient.getListMultimap(dictionaryName + "-TREE-DICT");
+ this.parentIdGetter = parentIdGetter;
+ }
+
+ /**
+ * 获取该父主键的子数据列表。
+ *
+ * @param parentId 父主键Id。如果parentId为null,则返回所有一级节点数据。
+ * @return 子数据列表。
+ */
+ public List getListByParentId(K parentId) {
+ List dataList;
+ String exceptionMessage;
+ try {
+ if (lock.readLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataList = allTreeMap.get(parentId);
+ } finally {
+ lock.readLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisTreeDictionaryCache::getListByParentId] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ if (CollectionUtils.isEmpty(dataList)) {
+ return new LinkedList<>();
+ }
+ List resultList = new LinkedList<>();
+ dataList.forEach(data -> resultList.add(JSON.parseObject(data, valueClazz)));
+ return resultList;
+ }
+
+ /**
+ * 将参数List中的数据保存到缓存中,同时保证getAll返回的数据列表,与参数列表中数据项的顺序保持一致。
+ *
+ * @param dataList 待缓存的数据列表。
+ */
+ @Override
+ public void putAll(List dataList) {
+ if (CollectionUtils.isEmpty(dataList)) {
+ return;
+ }
+ // 锁外执行数据结构组装,降低锁的粒度,提高并发性。
+ Map map = dataList.stream()
+ .collect(Collectors.toMap(idGetter, JSON::toJSONString));
+ Multimap treeMap = LinkedListMultimap.create();
+ for (V data : dataList) {
+ treeMap.put(parentIdGetter.apply(data), JSON.toJSONString(data));
+ }
+ Set>> entries = treeMap.asMap().entrySet();
+ String exceptionMessage;
+ try {
+ if (this.lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataMap.putAll(map, 1000);
+ for (Map.Entry> entry : entries) {
+ allTreeMap.removeAll(entry.getKey());
+ allTreeMap.putAll(entry.getKey(), entry.getValue());
+ }
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisTreeDictionaryCache::putAll] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 将数据存入缓存。
+ *
+ * @param id 通常为字典数据的主键。
+ * @param data 字典数据对象。
+ */
+ @Override
+ public void put(K id, V data) {
+ if (id == null || data == null) {
+ return;
+ }
+ String stringData = JSON.toJSONString(data);
+ K parentId = parentIdGetter.apply(data);
+ String exceptionMessage;
+ try {
+ if (this.lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ String oldData = dataMap.put(id, stringData);
+ if (oldData != null) {
+ allTreeMap.remove(parentId, oldData);
+ }
+ allTreeMap.put(parentId, stringData);
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisTreeDictionaryCache::put] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 行为等同于接口中的描述。这里之所以重写,是因为不确定redisson的读写锁,
+ * 是否为可重入锁。
+ *
+ * @param dataList 待缓存的数据列表。
+ * @param force true则强制刷新,如果false,当缓存中存在数据时不刷新。
+ */
+ @Override
+ public void reload(List dataList, boolean force) {
+ // 锁外执行数据结构组装,降低锁的粒度,提高并发性。
+ Map map = null;
+ Set>> entries = null;
+ if (CollectionUtils.isNotEmpty(dataList)) {
+ map = dataList.stream().collect(Collectors.toMap(idGetter, JSON::toJSONString));
+ Multimap treeMap = LinkedListMultimap.create();
+ for (V data : dataList) {
+ treeMap.put(parentIdGetter.apply(data), JSON.toJSONString(data));
+ }
+ entries = treeMap.asMap().entrySet();
+ }
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ // 如果不强制刷新,需要先判断缓存中是否存在数据。
+ if (!force && this.getCount() > 0) {
+ return;
+ }
+ dataMap.clear();
+ allTreeMap.clear();
+ if (map != null) {
+ dataMap.putAll(map, 1000);
+ for (Map.Entry> entry : entries) {
+ allTreeMap.removeAll(entry.getKey());
+ allTreeMap.putAll(entry.getKey(), entry.getValue());
+ }
+ }
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisDictionaryCache::reload] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 删除缓存中指定的键。
+ *
+ * @param id 待删除数据的主键。
+ * @return 返回被删除的对象,如果主键不存在,返回null。
+ */
+ @Override
+ public V invalidate(K id) {
+ if (id == null) {
+ return null;
+ }
+ V data = null;
+ String exceptionMessage;
+ try {
+ if (this.lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ String stringData = dataMap.remove(id);
+ if (stringData != null) {
+ data = JSON.parseObject(stringData, valueClazz);
+ K parentId = parentIdGetter.apply(data);
+ allTreeMap.remove(parentId, stringData);
+ }
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisTreeDictionaryCache::invalidate] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ return data;
+ }
+
+ /**
+ * 删除缓存中,参数列表中包含的键。
+ *
+ * @param keys 待删除数据的主键集合。
+ */
+ @Override
+ public void invalidateSet(Set keys) {
+ if (CollectionUtils.isEmpty(keys)) {
+ return;
+ }
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ keys.forEach(id -> {
+ if (id != null) {
+ String stringData = dataMap.remove(id);
+ if (stringData != null) {
+ K parentId = parentIdGetter.apply(JSON.parseObject(stringData, valueClazz));
+ allTreeMap.remove(parentId, stringData);
+ }
+ }
+ });
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisTreeDictionaryCache::invalidateSet] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+
+ /**
+ * 清空缓存。
+ */
+ @Override
+ public void invalidateAll() {
+ String exceptionMessage;
+ try {
+ if (lock.writeLock().tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) {
+ try {
+ dataMap.clear();
+ allTreeMap.clear();
+ } finally {
+ lock.writeLock().unlock();
+ }
+ } else {
+ throw new TimeoutException();
+ }
+ } catch (Exception e) {
+ exceptionMessage = String.format(
+ "LOCK Operation of [RedisTreeDictionaryCache::invalidateAll] encountered EXCEPTION [%s] for DICT [%s].",
+ e.getClass().getSimpleName(), valueClazz.getSimpleName());
+ log.warn(exceptionMessage);
+ throw new RedisCacheAccessException(exceptionMessage, e);
+ }
+ }
+}
diff --git a/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedissonCacheConfig.java b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedissonCacheConfig.java
new file mode 100644
index 00000000..9275204a
--- /dev/null
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/RedissonCacheConfig.java
@@ -0,0 +1,67 @@
+package com.orange.demo.common.redis.cache;
+
+import com.google.common.collect.Maps;
+import org.redisson.api.RedissonClient;
+import org.redisson.spring.cache.CacheConfig;
+import org.redisson.spring.cache.RedissonSpringCacheManager;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Map;
+
+/**
+ * 使用Redisson作为Redis的分布式缓存库。
+ *
+ * @author Jerry
+ * @date 2020-09-24
+ */
+@Configuration
+@EnableCaching
+public class RedissonCacheConfig {
+
+ private static final int DEFAULT_TTL = 3600000;
+
+ /**
+ * 定义cache名称、超时时长(毫秒)。
+ */
+ public enum CacheEnum {
+ /**
+ * session下上传文件名的缓存(时间是24小时)。
+ */
+ UPLOAD_FILENAME_CACHE(86400000),
+ /**
+ * 缺省全局缓存(时间是24小时)。
+ */
+ GLOBAL_CACHE(86400000);
+
+ /**
+ * 缓存的时长(单位:毫秒)
+ */
+ private int ttl = DEFAULT_TTL;
+
+ CacheEnum() {
+ }
+
+ CacheEnum(int ttl) {
+ this.ttl = ttl;
+ }
+
+ public int getTtl() {
+ return ttl;
+ }
+ }
+
+ /**
+ * 初始化缓存配置。
+ */
+ @Bean
+ CacheManager cacheManager(RedissonClient redissonClient) {
+ Map config = Maps.newHashMap();
+ for (CacheEnum c : CacheEnum.values()) {
+ config.put(c.name(), new CacheConfig(c.getTtl(), 0));
+ }
+ return new RedissonSpringCacheManager(redissonClient, config);
+ }
+}
diff --git a/orange-demo-single-service/common/common-core/src/main/java/com/orange/demo/common/core/cache/SessionCacheHelper.java b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/SessionCacheHelper.java
similarity index 77%
rename from orange-demo-single-service/common/common-core/src/main/java/com/orange/demo/common/core/cache/SessionCacheHelper.java
rename to orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/SessionCacheHelper.java
index 3c96a02f..52ad4e8f 100644
--- a/orange-demo-single-service/common/common-core/src/main/java/com/orange/demo/common/core/cache/SessionCacheHelper.java
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/cache/SessionCacheHelper.java
@@ -1,5 +1,7 @@
-package com.orange.demo.common.core.cache;
+package com.orange.demo.common.redis.cache;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
import com.orange.demo.common.core.object.TokenData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
@@ -30,7 +32,7 @@ public class SessionCacheHelper {
public void putSessionUploadFile(String filename) {
if (filename != null) {
Set sessionUploadFileSet = null;
- Cache cache = cacheManager.getCache(CacheConfig.CacheEnum.UPLOAD_FILENAME_CACHE.name());
+ Cache cache = cacheManager.getCache(RedissonCacheConfig.CacheEnum.UPLOAD_FILENAME_CACHE.name());
Cache.ValueWrapper valueWrapper = cache.get(TokenData.takeFromRequest().getSessionId());
if (valueWrapper != null) {
sessionUploadFileSet = (Set) valueWrapper.get();
@@ -53,7 +55,7 @@ public class SessionCacheHelper {
if (filename == null) {
return false;
}
- Cache cache = cacheManager.getCache(CacheConfig.CacheEnum.UPLOAD_FILENAME_CACHE.name());
+ Cache cache = cacheManager.getCache(RedissonCacheConfig.CacheEnum.UPLOAD_FILENAME_CACHE.name());
Cache.ValueWrapper valueWrapper = cache.get(TokenData.takeFromRequest().getSessionId());
if (valueWrapper == null) {
return false;
@@ -71,8 +73,8 @@ public class SessionCacheHelper {
if (sessionId == null || tokenData == null) {
return;
}
- Cache cache = cacheManager.getCache(CacheConfig.CacheEnum.GLOBAL_CACHE.name());
- cache.put(sessionId, tokenData);
+ Cache cache = cacheManager.getCache(RedissonCacheConfig.CacheEnum.GLOBAL_CACHE.name());
+ cache.put(sessionId, JSON.toJSONString(tokenData));
}
/**
@@ -82,8 +84,9 @@ public class SessionCacheHelper {
* @return 当前会话的JWT Token对象。
*/
public TokenData getTokenData(String sessionId) {
- Cache cache = cacheManager.getCache(CacheConfig.CacheEnum.GLOBAL_CACHE.name());
- return cache.get(sessionId, TokenData.class);
+ Cache cache = cacheManager.getCache(RedissonCacheConfig.CacheEnum.GLOBAL_CACHE.name());
+ String tokenString = cache.get(sessionId, String.class);
+ return JSONObject.parseObject(tokenString, TokenData.class);
}
/**
@@ -92,7 +95,7 @@ public class SessionCacheHelper {
* @param sessionId 当前会话的SessionId。
*/
public void removeAllSessionCache(String sessionId) {
- for (CacheConfig.CacheEnum c : CacheConfig.CacheEnum.values()) {
+ for (RedissonCacheConfig.CacheEnum c : RedissonCacheConfig.CacheEnum.values()) {
cacheManager.getCache(c.name()).evict(sessionId);
}
}
diff --git a/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/config/JedisConfig.java b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/config/JedisConfig.java
new file mode 100644
index 00000000..6b752e3d
--- /dev/null
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/config/JedisConfig.java
@@ -0,0 +1,52 @@
+package com.orange.demo.common.redis.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.JedisPoolConfig;
+
+/**
+ * Redis配置类。
+ *
+ * @author Jerry
+ * @date 2020-09-24
+ */
+@Configuration
+@ConditionalOnProperty(name = "redis.jedis.enabled", havingValue = "true")
+public class JedisConfig {
+
+ @Value("${redis.jedis.port}")
+ private Integer port;
+
+ @Value("${redis.jedis.host}")
+ private String redisHost;
+
+ @Value("${redis.jedis.timeout}")
+ private int timeout;
+
+ @Value("${redis.jedis.pool.maxTotal}")
+ private Integer maxTotal;
+
+ @Value("${redis.jedis.pool.maxIdle}")
+ private Integer maxIdle;
+
+ @Value("${redis.jedis.pool.minIdle}")
+ private Integer minIdle;
+
+ @Value("${redis.jedis.pool.maxWait}")
+ private Integer maxWait;
+
+ @Bean
+ public JedisPool getJedisPool() {
+ // Jedis配置信息
+ JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
+ jedisPoolConfig.setMaxTotal(maxTotal);
+ jedisPoolConfig.setMaxIdle(maxIdle);
+ jedisPoolConfig.setMinIdle(minIdle);
+ jedisPoolConfig.setMaxWaitMillis(maxWait);
+ jedisPoolConfig.setEvictorShutdownTimeoutMillis(2000);
+ return new JedisPool(jedisPoolConfig, redisHost, port);
+ }
+}
diff --git a/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/config/RedissonConfig.java b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/config/RedissonConfig.java
new file mode 100644
index 00000000..9dace597
--- /dev/null
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/java/com/orange/demo/common/redis/config/RedissonConfig.java
@@ -0,0 +1,50 @@
+package com.orange.demo.common.redis.config;
+
+import org.redisson.Redisson;
+import org.redisson.api.RedissonClient;
+import org.redisson.config.Config;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Redisson配置类。和Jedis一样都是Redis客户端,但是Redisson提供了更多的数据结构抽象。
+ * 这里我们只是使用了Redisson的分布式锁,以及map等数据结构作为字典缓存使用。更多用法请参考其文档。
+ *
+ * @author Jerry
+ * @date 2020-09-24
+ */
+@Configuration
+@ConditionalOnProperty(name = "redis.redisson.enabled", havingValue = "true")
+public class RedissonConfig {
+
+ @Value("${redis.redisson.lockWatchdogTimeout}")
+ private Integer lockWatchdogTimeout;
+
+ @Value("${redis.redisson.address}")
+ private String address;
+
+ @Value("${redis.redisson.timeout}")
+ private Integer timeout;
+
+ @Value("${redis.redisson.pool.poolSize}")
+ private Integer poolSize;
+
+ @Value("${redis.redisson.pool.minIdle}")
+ private Integer minIdle;
+
+ @Bean
+ public RedissonClient redissonClient() {
+ Config config = new Config();
+ // 这里config还支持其他redis集群模式,可根据实际需求更换。
+ // 比如useClusterServers()/useMasterSlaveServers()等。
+ config.setLockWatchdogTimeout(lockWatchdogTimeout)
+ .useSingleServer()
+ .setAddress("redis://" + address)
+ .setConnectionPoolSize(poolSize)
+ .setConnectionMinimumIdleSize(minIdle)
+ .setConnectTimeout(timeout);
+ return Redisson.create(config);
+ }
+}
diff --git a/orange-demo-single-service-for-app/common/common-redis/src/main/resources/META-INF/spring.factories b/orange-demo-single-service-for-app/common/common-redis/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000..87e4c749
--- /dev/null
+++ b/orange-demo-single-service-for-app/common/common-redis/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+com.orange.demo.common.redis.config.JedisConfig,\
+com.orange.demo.common.redis.config.RedissonConfig
\ No newline at end of file
diff --git a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/config/SwaggerAutoConfiguration.java b/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/config/SwaggerAutoConfiguration.java
deleted file mode 100644
index dc189501..00000000
--- a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/config/SwaggerAutoConfiguration.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.orange.demo.common.swagger.config;
-
-import com.orange.demo.common.core.annotation.MyRequestBody;
-import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import springfox.documentation.builders.ApiInfoBuilder;
-import springfox.documentation.builders.PathSelectors;
-import springfox.documentation.builders.RequestHandlerSelectors;
-import springfox.documentation.service.ApiInfo;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
-
-/**
- * 自动加载bean的配置对象。
- *
- * @author Jerry
- * @date 2020-09-24
- */
-@EnableSwagger2
-@EnableKnife4j
-@EnableConfigurationProperties(SwaggerProperties.class)
-@ConditionalOnProperty(prefix = "swagger", name = "enabled")
-public class SwaggerAutoConfiguration {
-
- @Bean
- public Docket upmsDocket(SwaggerProperties properties) {
- return new Docket(DocumentationType.SWAGGER_2)
- .groupName("1. 用户权限分组接口")
- .ignoredParameterTypes(MyRequestBody.class)
- .apiInfo(apiInfo(properties))
- .select()
- .apis(RequestHandlerSelectors.basePackage(properties.getBasePackage() + ".upms.controller"))
- .paths(PathSelectors.any()).build();
- }
-
- @Bean
- public Docket bizDocket(SwaggerProperties properties) {
- return new Docket(DocumentationType.SWAGGER_2)
- .groupName("2. 业务应用分组接口")
- .ignoredParameterTypes(MyRequestBody.class)
- .apiInfo(apiInfo(properties))
- .select()
- .apis(RequestHandlerSelectors.basePackage(properties.getBasePackage() + ".app.controller"))
- .paths(PathSelectors.any()).build();
- }
-
- private ApiInfo apiInfo(SwaggerProperties properties) {
- return new ApiInfoBuilder()
- .title(properties.getTitle())
- .description(properties.getDescription())
- .version(properties.getVersion()).build();
- }
-}
diff --git a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/config/SwaggerProperties.java b/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/config/SwaggerProperties.java
deleted file mode 100644
index 25c3d221..00000000
--- a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/config/SwaggerProperties.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.orange.demo.common.swagger.config;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-/**
- * 配置参数对象。
- *
- * @author Jerry
- * @date 2020-09-24
- */
-@Data
-@ConfigurationProperties("swagger")
-public class SwaggerProperties {
-
- /**
- * 是否开启Swagger。
- */
- private Boolean enabled;
-
- /**
- * Swagger解析的基础包路径。
- **/
- private String basePackage = "";
-
- /**
- * ApiInfo中的标题。
- **/
- private String title = "";
-
- /**
- * ApiInfo中的描述信息。
- **/
- private String description = "";
-
- /**
- * ApiInfo中的版本信息。
- **/
- private String version = "";
-}
diff --git a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/ByteBodyUtils.java b/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/ByteBodyUtils.java
deleted file mode 100644
index 288a8433..00000000
--- a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/ByteBodyUtils.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.orange.demo.common.swagger.plugin;
-
-import cn.hutool.core.lang.Assert;
-import com.orange.demo.common.core.annotation.MyRequestBody;
-import com.github.xiaoymin.knife4j.core.conf.Consts;
-import javassist.*;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import springfox.documentation.service.ResolvedMethodParameter;
-
-import java.util.List;
-
-/**
- * 通过字节码方式动态创建接口参数封装对象。
- *
- * @author Jerry
- * @date 2020-09-24
- */
-@Slf4j
-public class ByteBodyUtils {
- private static final ClassPool CLASS_POOL = ClassPool.getDefault();
-
- public static Class> createDynamicModelClass(String name, List parameters) {
- String clazzName = Consts.BASE_PACKAGE_PREFIX + name;
- try {
- CtClass tmp = CLASS_POOL.getCtClass(clazzName);
- if (tmp != null) {
- tmp.detach();
- }
- } catch (NotFoundException e) {
- // 需要吃掉这个异常。
- }
- CtClass ctClass = CLASS_POOL.makeClass(clazzName);
- try {
- int fieldCount = 0;
- for (ResolvedMethodParameter dynamicParameter : parameters) {
- // 因为在调用这个方法之前,这些参数都包含MyRequestBody注解。
- MyRequestBody myRequestBody =
- dynamicParameter.findAnnotation(MyRequestBody.class).orNull();
- Assert.notNull(myRequestBody);
- String fieldName = dynamicParameter.defaultName().isPresent()
- ? dynamicParameter.defaultName().get() : "parameter";
- if (StringUtils.isNotBlank(myRequestBody.value())) {
- fieldName = myRequestBody.value();
- }
- ctClass.addField(createField(dynamicParameter, fieldName, ctClass));
- fieldCount++;
- }
- if (fieldCount > 0) {
- return ctClass.toClass();
- }
- } catch (Throwable e) {
- log.error(e.getMessage());
- }
- return null;
- }
-
- private static CtField createField(ResolvedMethodParameter parameter, String parameterName, CtClass ctClass)
- throws NotFoundException, CannotCompileException {
- CtField field = new CtField(getFieldType(parameter.getParameterType().getErasedType()), parameterName, ctClass);
- field.setModifiers(Modifier.PUBLIC);
- return field;
- }
-
- private static CtClass getFieldType(Class> propetyType) {
- CtClass fieldType = null;
- try {
- if (!propetyType.isAssignableFrom(Void.class)) {
- fieldType = CLASS_POOL.get(propetyType.getName());
- } else {
- fieldType = CLASS_POOL.get(String.class.getName());
- }
- } catch (NotFoundException e) {
- // 抛异常
- ClassClassPath path = new ClassClassPath(propetyType);
- CLASS_POOL.insertClassPath(path);
- try {
- fieldType = CLASS_POOL.get(propetyType.getName());
- } catch (NotFoundException e1) {
- log.error(e1.getMessage(), e1);
- }
- }
- return fieldType;
- }
-}
diff --git a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/DynamicBodyModelPlugin.java b/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/DynamicBodyModelPlugin.java
deleted file mode 100644
index df4bd54d..00000000
--- a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/DynamicBodyModelPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.orange.demo.common.swagger.plugin;
-
-import com.orange.demo.common.core.annotation.MyRequestBody;
-import com.fasterxml.classmate.TypeResolver;
-import com.google.common.base.CaseFormat;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.core.Ordered;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-import springfox.documentation.service.ResolvedMethodParameter;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.OperationModelsProviderPlugin;
-import springfox.documentation.spi.service.contexts.RequestMappingContext;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 生成参数包装类的插件。
- *
- * @author Jerry
- * @date 2020-09-24
- */
-@Component
-@Order(Ordered.HIGHEST_PRECEDENCE + 200)
-@ConditionalOnProperty(prefix = "swagger", name = "enabled")
-public class DynamicBodyModelPlugin implements OperationModelsProviderPlugin {
-
- private final TypeResolver typeResolver;
-
- public DynamicBodyModelPlugin(TypeResolver typeResolver) {
- this.typeResolver = typeResolver;
- }
-
- @Override
- public void apply(RequestMappingContext context) {
- List parameterTypes = context.getParameters();
- if (CollectionUtils.isEmpty(parameterTypes)) {
- return;
- }
- List bodyParameter = parameterTypes.stream()
- .filter(p -> p.hasParameterAnnotation(MyRequestBody.class)).collect(Collectors.toList());
- if (CollectionUtils.isEmpty(bodyParameter)) {
- return;
- }
- String groupName = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, context.getGroupName());
- String clazzName = groupName + StringUtils.capitalize(context.getName());
- Class> clazz = ByteBodyUtils.createDynamicModelClass(clazzName, bodyParameter);
- if (clazz != null) {
- context.operationModelsBuilder().addInputParam(typeResolver.resolve(clazz));
- }
- }
-
- @Override
- public boolean supports(DocumentationType delimiter) {
- // 支持2.0版本
- return delimiter == DocumentationType.SWAGGER_2;
- }
-}
diff --git a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/DynamicBodyParameterBuilder.java b/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/DynamicBodyParameterBuilder.java
deleted file mode 100644
index bb70370f..00000000
--- a/orange-demo-single-service-for-app/common/common-swagger/src/main/java/com/orange/demo/common/swagger/plugin/DynamicBodyParameterBuilder.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.orange.demo.common.swagger.plugin;
-
-import com.orange.demo.common.core.annotation.MyRequestBody;
-import com.google.common.base.CaseFormat;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.core.Ordered;
-import org.springframework.core.annotation.Order;
-import org.springframework.stereotype.Component;
-import springfox.documentation.builders.ParameterBuilder;
-import springfox.documentation.schema.ModelRef;
-import springfox.documentation.service.Parameter;
-import springfox.documentation.service.ResolvedMethodParameter;
-import springfox.documentation.spi.DocumentationType;
-import springfox.documentation.spi.service.OperationBuilderPlugin;
-import springfox.documentation.spi.service.contexts.OperationContext;
-import springfox.documentation.spi.service.contexts.ParameterContext;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 构建操作接口参数对象的插件。
- *
- * @author Jerry
- * @date 2020-09-24
- */
-@Component
-@Order(Ordered.HIGHEST_PRECEDENCE + 102)
-@ConditionalOnProperty(prefix = "swagger", name = "enabled")
-public class DynamicBodyParameterBuilder implements OperationBuilderPlugin {
-
- @Override
- public void apply(OperationContext context) {
- List methodParameters = context.getParameters();
- List parameters = new ArrayList<>();
- if (CollectionUtils.isNotEmpty(methodParameters)) {
- List bodyParameter = methodParameters.stream()
- .filter(p -> p.hasParameterAnnotation(MyRequestBody.class)).collect(Collectors.toList());
- if (CollectionUtils.isNotEmpty(bodyParameter)) {
- // 构造model
- String groupName = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, context.getGroupName());
- String clazzName = groupName + StringUtils.capitalize(context.getName());
- ResolvedMethodParameter methodParameter = bodyParameter.get(0);
- ParameterContext parameterContext = new ParameterContext(methodParameter,
- new ParameterBuilder(),
- context.getDocumentationContext(),
- context.getGenericsNamingStrategy(),
- context);
- Parameter parameter = parameterContext.parameterBuilder()
- .parameterType("body").modelRef(new ModelRef(clazzName)).name(clazzName).build();
- parameters.add(parameter);
- }
- }
- context.operationBuilder().parameters(parameters);
- }
-
- @Override
- public boolean supports(DocumentationType delimiter) {
- return delimiter == DocumentationType.SWAGGER_2;
- }
-}
diff --git a/orange-demo-single-service-for-app/common/common-swagger/src/main/resources/META-INF/spring.factories b/orange-demo-single-service-for-app/common/common-swagger/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index a7717f2b..00000000
--- a/orange-demo-single-service-for-app/common/common-swagger/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,2 +0,0 @@
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-com.orange.demo.common.swagger.config.SwaggerAutoConfiguration
\ No newline at end of file
diff --git a/orange-demo-single-service-for-app/common/pom.xml b/orange-demo-single-service-for-app/common/pom.xml
index d05fda13..6547f15d 100644
--- a/orange-demo-single-service-for-app/common/pom.xml
+++ b/orange-demo-single-service-for-app/common/pom.xml
@@ -13,7 +13,7 @@
common-core
+ common-redis
common-sequence
- common-swagger
diff --git a/orange-demo-single-service-for-app/pom.xml b/orange-demo-single-service-for-app/pom.xml
index 2293485e..f3871f50 100644
--- a/orange-demo-single-service-for-app/pom.xml
+++ b/orange-demo-single-service-for-app/pom.xml
@@ -33,10 +33,9 @@
2.1.5
1.3.7
1.3.0
+ 3.2.0
+ 3.12.3
2.0.0
- 2.0.5
- 2.9.2
- 1.5.21
diff --git a/orange-demo-single-service-for-app/zz-resource/db-scripts/zz-orange-demo.sql b/orange-demo-single-service-for-app/zz-resource/db-scripts/areacode.sql
similarity index 79%
rename from orange-demo-single-service-for-app/zz-resource/db-scripts/zz-orange-demo.sql
rename to orange-demo-single-service-for-app/zz-resource/db-scripts/areacode.sql
index b4247271..e5069cc0 100644
--- a/orange-demo-single-service-for-app/zz-resource/db-scripts/zz-orange-demo.sql
+++ b/orange-demo-single-service-for-app/zz-resource/db-scripts/areacode.sql
@@ -1,29 +1,27 @@
-CREATE DATABASE `zzdemo-single` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
-USE `zzdemo-single`;
-
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
--- Table structure for zz_area_code
+-- 行政区划表,在以下数据库中执行该脚本。
+-- 主数据源 [localhost:3306/zzdemo-single]
-- ----------------------------
DROP TABLE IF EXISTS `zz_area_code`;
CREATE TABLE `zz_area_code` (
- `area_id` bigint(20) unsigned NOT NULL COMMENT '行政区划主键Id',
- `area_name` varchar(128) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '行政区划名称',
- `area_level` int(11) NOT NULL COMMENT '行政区划级别 (1: 省级别 2: 市级别 3: 区级别)',
- `parent_id` bigint(20) DEFAULT NULL COMMENT '父级行政区划Id',
- PRIMARY KEY (`area_id`) USING BTREE,
- KEY `idx_level` (`area_level`) USING BTREE,
- KEY `idx_area_name` (`area_name`) USING BTREE,
- KEY `idx_parent_id` (`parent_id`) USING BTREE
+ `area_id` bigint(20) unsigned NOT NULL COMMENT '行政区划主键Id',
+ `area_name` varchar(128) COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '行政区划名称',
+ `area_level` int(5) NOT NULL COMMENT '行政区划级别 (1: 省级别 2: 市级别 3: 区级别)',
+ `parent_id` bigint(20) DEFAULT NULL COMMENT '父级行政区划Id',
+ PRIMARY KEY (`area_id`) USING BTREE,
+ KEY `idx_level` (`area_level`) USING BTREE,
+ KEY `idx_area_name` (`area_name`) USING BTREE,
+ KEY `idx_parent_id` (`parent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='行政区划表';
-- ----------------------------
--- Records of zz_area_code
+-- 行政区划数据
-- ----------------------------
BEGIN;
-INSERT INTO `zz_area_code` VALUES (110000000000, '北京市', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (110000000000, '北京市', 1, null);
INSERT INTO `zz_area_code` VALUES (110100000000, '市辖区', 2, 110000000000);
INSERT INTO `zz_area_code` VALUES (110101000000, '东城区', 3, 110100000000);
INSERT INTO `zz_area_code` VALUES (110102000000, '西城区', 3, 110100000000);
@@ -41,7 +39,7 @@ INSERT INTO `zz_area_code` VALUES (110116000000, '怀柔区', 3, 110100000000);
INSERT INTO `zz_area_code` VALUES (110117000000, '平谷区', 3, 110100000000);
INSERT INTO `zz_area_code` VALUES (110118000000, '密云区', 3, 110100000000);
INSERT INTO `zz_area_code` VALUES (110119000000, '延庆区', 3, 110100000000);
-INSERT INTO `zz_area_code` VALUES (120000000000, '天津市', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (120000000000, '天津市', 1, null);
INSERT INTO `zz_area_code` VALUES (120100000000, '市辖区', 2, 120000000000);
INSERT INTO `zz_area_code` VALUES (120101000000, '和平区', 3, 120100000000);
INSERT INTO `zz_area_code` VALUES (120102000000, '河东区', 3, 120100000000);
@@ -59,7 +57,7 @@ INSERT INTO `zz_area_code` VALUES (120116000000, '滨海新区', 3, 120100000000
INSERT INTO `zz_area_code` VALUES (120117000000, '宁河区', 3, 120100000000);
INSERT INTO `zz_area_code` VALUES (120118000000, '静海区', 3, 120100000000);
INSERT INTO `zz_area_code` VALUES (120119000000, '蓟州区', 3, 120100000000);
-INSERT INTO `zz_area_code` VALUES (130000000000, '河北省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (130000000000, '河北省', 1, null);
INSERT INTO `zz_area_code` VALUES (130100000000, '石家庄市', 2, 130000000000);
INSERT INTO `zz_area_code` VALUES (130101000000, '市辖区', 3, 130100000000);
INSERT INTO `zz_area_code` VALUES (130102000000, '长安区', 3, 130100000000);
@@ -273,7 +271,7 @@ INSERT INTO `zz_area_code` VALUES (131128000000, '阜城县', 3, 131100000000);
INSERT INTO `zz_area_code` VALUES (131171000000, '河北衡水高新技术产业开发区', 3, 131100000000);
INSERT INTO `zz_area_code` VALUES (131172000000, '衡水滨湖新区', 3, 131100000000);
INSERT INTO `zz_area_code` VALUES (131182000000, '深州市', 3, 131100000000);
-INSERT INTO `zz_area_code` VALUES (140000000000, '山西省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (140000000000, '山西省', 1, null);
INSERT INTO `zz_area_code` VALUES (140100000000, '太原市', 2, 140000000000);
INSERT INTO `zz_area_code` VALUES (140101000000, '市辖区', 3, 140100000000);
INSERT INTO `zz_area_code` VALUES (140105000000, '小店区', 3, 140100000000);
@@ -418,7 +416,7 @@ INSERT INTO `zz_area_code` VALUES (141129000000, '中阳县', 3, 141100000000);
INSERT INTO `zz_area_code` VALUES (141130000000, '交口县', 3, 141100000000);
INSERT INTO `zz_area_code` VALUES (141181000000, '孝义市', 3, 141100000000);
INSERT INTO `zz_area_code` VALUES (141182000000, '汾阳市', 3, 141100000000);
-INSERT INTO `zz_area_code` VALUES (150000000000, '内蒙古自治区', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (150000000000, '内蒙古自治区', 1, null);
INSERT INTO `zz_area_code` VALUES (150100000000, '呼和浩特市', 2, 150000000000);
INSERT INTO `zz_area_code` VALUES (150101000000, '市辖区', 3, 150100000000);
INSERT INTO `zz_area_code` VALUES (150102000000, '新城区', 3, 150100000000);
@@ -549,7 +547,7 @@ INSERT INTO `zz_area_code` VALUES (152921000000, '阿拉善左旗', 3, 152900000
INSERT INTO `zz_area_code` VALUES (152922000000, '阿拉善右旗', 3, 152900000000);
INSERT INTO `zz_area_code` VALUES (152923000000, '额济纳旗', 3, 152900000000);
INSERT INTO `zz_area_code` VALUES (152971000000, '内蒙古阿拉善经济开发区', 3, 152900000000);
-INSERT INTO `zz_area_code` VALUES (210000000000, '辽宁省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (210000000000, '辽宁省', 1, null);
INSERT INTO `zz_area_code` VALUES (210100000000, '沈阳市', 2, 210000000000);
INSERT INTO `zz_area_code` VALUES (210101000000, '市辖区', 3, 210100000000);
INSERT INTO `zz_area_code` VALUES (210102000000, '和平区', 3, 210100000000);
@@ -678,7 +676,7 @@ INSERT INTO `zz_area_code` VALUES (211404000000, '南票区', 3, 211400000000);
INSERT INTO `zz_area_code` VALUES (211421000000, '绥中县', 3, 211400000000);
INSERT INTO `zz_area_code` VALUES (211422000000, '建昌县', 3, 211400000000);
INSERT INTO `zz_area_code` VALUES (211481000000, '兴城市', 3, 211400000000);
-INSERT INTO `zz_area_code` VALUES (220000000000, '吉林省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (220000000000, '吉林省', 1, null);
INSERT INTO `zz_area_code` VALUES (220100000000, '长春市', 2, 220000000000);
INSERT INTO `zz_area_code` VALUES (220101000000, '市辖区', 3, 220100000000);
INSERT INTO `zz_area_code` VALUES (220102000000, '南关区', 3, 220100000000);
@@ -765,7 +763,7 @@ INSERT INTO `zz_area_code` VALUES (222405000000, '龙井市', 3, 222400000000);
INSERT INTO `zz_area_code` VALUES (222406000000, '和龙市', 3, 222400000000);
INSERT INTO `zz_area_code` VALUES (222424000000, '汪清县', 3, 222400000000);
INSERT INTO `zz_area_code` VALUES (222426000000, '安图县', 3, 222400000000);
-INSERT INTO `zz_area_code` VALUES (230000000000, '黑龙江省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (230000000000, '黑龙江省', 1, null);
INSERT INTO `zz_area_code` VALUES (230100000000, '哈尔滨市', 2, 230000000000);
INSERT INTO `zz_area_code` VALUES (230101000000, '市辖区', 3, 230100000000);
INSERT INTO `zz_area_code` VALUES (230102000000, '道里区', 3, 230100000000);
@@ -925,7 +923,7 @@ INSERT INTO `zz_area_code` VALUES (232761000000, '加格达奇区', 3, 232700000
INSERT INTO `zz_area_code` VALUES (232762000000, '松岭区', 3, 232700000000);
INSERT INTO `zz_area_code` VALUES (232763000000, '新林区', 3, 232700000000);
INSERT INTO `zz_area_code` VALUES (232764000000, '呼中区', 3, 232700000000);
-INSERT INTO `zz_area_code` VALUES (310000000000, '上海市', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (310000000000, '上海市', 1, null);
INSERT INTO `zz_area_code` VALUES (310100000000, '市辖区', 2, 310000000000);
INSERT INTO `zz_area_code` VALUES (310101000000, '黄浦区', 3, 310100000000);
INSERT INTO `zz_area_code` VALUES (310104000000, '徐汇区', 3, 310100000000);
@@ -943,7 +941,7 @@ INSERT INTO `zz_area_code` VALUES (310117000000, '松江区', 3, 310100000000);
INSERT INTO `zz_area_code` VALUES (310118000000, '青浦区', 3, 310100000000);
INSERT INTO `zz_area_code` VALUES (310120000000, '奉贤区', 3, 310100000000);
INSERT INTO `zz_area_code` VALUES (310151000000, '崇明区', 3, 310100000000);
-INSERT INTO `zz_area_code` VALUES (320000000000, '江苏省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (320000000000, '江苏省', 1, null);
INSERT INTO `zz_area_code` VALUES (320100000000, '南京市', 2, 320000000000);
INSERT INTO `zz_area_code` VALUES (320101000000, '市辖区', 3, 320100000000);
INSERT INTO `zz_area_code` VALUES (320102000000, '玄武区', 3, 320100000000);
@@ -1077,7 +1075,7 @@ INSERT INTO `zz_area_code` VALUES (321322000000, '沭阳县', 3, 321300000000);
INSERT INTO `zz_area_code` VALUES (321323000000, '泗阳县', 3, 321300000000);
INSERT INTO `zz_area_code` VALUES (321324000000, '泗洪县', 3, 321300000000);
INSERT INTO `zz_area_code` VALUES (321371000000, '宿迁经济技术开发区', 3, 321300000000);
-INSERT INTO `zz_area_code` VALUES (330000000000, '浙江省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (330000000000, '浙江省', 1, null);
INSERT INTO `zz_area_code` VALUES (330100000000, '杭州市', 2, 330000000000);
INSERT INTO `zz_area_code` VALUES (330101000000, '市辖区', 3, 330100000000);
INSERT INTO `zz_area_code` VALUES (330102000000, '上城区', 3, 330100000000);
@@ -1190,7 +1188,7 @@ INSERT INTO `zz_area_code` VALUES (331125000000, '云和县', 3, 331100000000);
INSERT INTO `zz_area_code` VALUES (331126000000, '庆元县', 3, 331100000000);
INSERT INTO `zz_area_code` VALUES (331127000000, '景宁畲族自治县', 3, 331100000000);
INSERT INTO `zz_area_code` VALUES (331181000000, '龙泉市', 3, 331100000000);
-INSERT INTO `zz_area_code` VALUES (340000000000, '安徽省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (340000000000, '安徽省', 1, null);
INSERT INTO `zz_area_code` VALUES (340100000000, '合肥市', 2, 340000000000);
INSERT INTO `zz_area_code` VALUES (340101000000, '市辖区', 3, 340100000000);
INSERT INTO `zz_area_code` VALUES (340102000000, '瑶海区', 3, 340100000000);
@@ -1343,7 +1341,7 @@ INSERT INTO `zz_area_code` VALUES (341824000000, '绩溪县', 3, 341800000000);
INSERT INTO `zz_area_code` VALUES (341825000000, '旌德县', 3, 341800000000);
INSERT INTO `zz_area_code` VALUES (341871000000, '宣城市经济开发区', 3, 341800000000);
INSERT INTO `zz_area_code` VALUES (341881000000, '宁国市', 3, 341800000000);
-INSERT INTO `zz_area_code` VALUES (350000000000, '福建省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (350000000000, '福建省', 1, null);
INSERT INTO `zz_area_code` VALUES (350100000000, '福州市', 2, 350000000000);
INSERT INTO `zz_area_code` VALUES (350101000000, '市辖区', 3, 350100000000);
INSERT INTO `zz_area_code` VALUES (350102000000, '鼓楼区', 3, 350100000000);
@@ -1447,7 +1445,7 @@ INSERT INTO `zz_area_code` VALUES (350925000000, '周宁县', 3, 350900000000);
INSERT INTO `zz_area_code` VALUES (350926000000, '柘荣县', 3, 350900000000);
INSERT INTO `zz_area_code` VALUES (350981000000, '福安市', 3, 350900000000);
INSERT INTO `zz_area_code` VALUES (350982000000, '福鼎市', 3, 350900000000);
-INSERT INTO `zz_area_code` VALUES (360000000000, '江西省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (360000000000, '江西省', 1, null);
INSERT INTO `zz_area_code` VALUES (360100000000, '南昌市', 2, 360000000000);
INSERT INTO `zz_area_code` VALUES (360101000000, '市辖区', 3, 360100000000);
INSERT INTO `zz_area_code` VALUES (360102000000, '东湖区', 3, 360100000000);
@@ -1570,7 +1568,7 @@ INSERT INTO `zz_area_code` VALUES (361128000000, '鄱阳县', 3, 361100000000);
INSERT INTO `zz_area_code` VALUES (361129000000, '万年县', 3, 361100000000);
INSERT INTO `zz_area_code` VALUES (361130000000, '婺源县', 3, 361100000000);
INSERT INTO `zz_area_code` VALUES (361181000000, '德兴市', 3, 361100000000);
-INSERT INTO `zz_area_code` VALUES (370000000000, '山东省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (370000000000, '山东省', 1, null);
INSERT INTO `zz_area_code` VALUES (370100000000, '济南市', 2, 370000000000);
INSERT INTO `zz_area_code` VALUES (370101000000, '市辖区', 3, 370100000000);
INSERT INTO `zz_area_code` VALUES (370102000000, '历下区', 3, 370100000000);
@@ -1761,7 +1759,7 @@ INSERT INTO `zz_area_code` VALUES (371726000000, '鄄城县', 3, 371700000000);
INSERT INTO `zz_area_code` VALUES (371728000000, '东明县', 3, 371700000000);
INSERT INTO `zz_area_code` VALUES (371771000000, '菏泽经济技术开发区', 3, 371700000000);
INSERT INTO `zz_area_code` VALUES (371772000000, '菏泽高新技术开发区', 3, 371700000000);
-INSERT INTO `zz_area_code` VALUES (410000000000, '河南省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (410000000000, '河南省', 1, null);
INSERT INTO `zz_area_code` VALUES (410100000000, '郑州市', 2, 410000000000);
INSERT INTO `zz_area_code` VALUES (410101000000, '市辖区', 3, 410100000000);
INSERT INTO `zz_area_code` VALUES (410102000000, '中原区', 3, 410100000000);
@@ -1979,7 +1977,7 @@ INSERT INTO `zz_area_code` VALUES (411729000000, '新蔡县', 3, 411700000000);
INSERT INTO `zz_area_code` VALUES (411771000000, '河南驻马店经济开发区', 3, 411700000000);
INSERT INTO `zz_area_code` VALUES (419000000000, '省直辖县级行政区划', 2, 410000000000);
INSERT INTO `zz_area_code` VALUES (419001000000, '济源市', 3, 419000000000);
-INSERT INTO `zz_area_code` VALUES (420000000000, '湖北省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (420000000000, '湖北省', 1, null);
INSERT INTO `zz_area_code` VALUES (420100000000, '武汉市', 2, 420000000000);
INSERT INTO `zz_area_code` VALUES (420101000000, '市辖区', 3, 420100000000);
INSERT INTO `zz_area_code` VALUES (420102000000, '江岸区', 3, 420100000000);
@@ -2111,7 +2109,7 @@ INSERT INTO `zz_area_code` VALUES (429004000000, '仙桃市', 3, 429000000000);
INSERT INTO `zz_area_code` VALUES (429005000000, '潜江市', 3, 429000000000);
INSERT INTO `zz_area_code` VALUES (429006000000, '天门市', 3, 429000000000);
INSERT INTO `zz_area_code` VALUES (429021000000, '神农架林区', 3, 429000000000);
-INSERT INTO `zz_area_code` VALUES (430000000000, '湖南省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (430000000000, '湖南省', 1, null);
INSERT INTO `zz_area_code` VALUES (430100000000, '长沙市', 2, 430000000000);
INSERT INTO `zz_area_code` VALUES (430101000000, '市辖区', 3, 430100000000);
INSERT INTO `zz_area_code` VALUES (430102000000, '芙蓉区', 3, 430100000000);
@@ -2278,7 +2276,7 @@ INSERT INTO `zz_area_code` VALUES (433127000000, '永顺县', 3, 433100000000);
INSERT INTO `zz_area_code` VALUES (433130000000, '龙山县', 3, 433100000000);
INSERT INTO `zz_area_code` VALUES (433172000000, '湖南吉首经济开发区', 3, 433100000000);
INSERT INTO `zz_area_code` VALUES (433173000000, '湖南永顺经济开发区', 3, 433100000000);
-INSERT INTO `zz_area_code` VALUES (440000000000, '广东省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (440000000000, '广东省', 1, null);
INSERT INTO `zz_area_code` VALUES (440100000000, '广州市', 2, 440000000000);
INSERT INTO `zz_area_code` VALUES (440101000000, '市辖区', 3, 440100000000);
INSERT INTO `zz_area_code` VALUES (440103000000, '荔湾区', 3, 440100000000);
@@ -2441,7 +2439,7 @@ INSERT INTO `zz_area_code` VALUES (445303000000, '云安区', 3, 445300000000);
INSERT INTO `zz_area_code` VALUES (445321000000, '新兴县', 3, 445300000000);
INSERT INTO `zz_area_code` VALUES (445322000000, '郁南县', 3, 445300000000);
INSERT INTO `zz_area_code` VALUES (445381000000, '罗定市', 3, 445300000000);
-INSERT INTO `zz_area_code` VALUES (450000000000, '广西壮族自治区', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (450000000000, '广西壮族自治区', 1, null);
INSERT INTO `zz_area_code` VALUES (450100000000, '南宁市', 2, 450000000000);
INSERT INTO `zz_area_code` VALUES (450101000000, '市辖区', 3, 450100000000);
INSERT INTO `zz_area_code` VALUES (450102000000, '兴宁区', 3, 450100000000);
@@ -2581,7 +2579,7 @@ INSERT INTO `zz_area_code` VALUES (451423000000, '龙州县', 3, 451400000000);
INSERT INTO `zz_area_code` VALUES (451424000000, '大新县', 3, 451400000000);
INSERT INTO `zz_area_code` VALUES (451425000000, '天等县', 3, 451400000000);
INSERT INTO `zz_area_code` VALUES (451481000000, '凭祥市', 3, 451400000000);
-INSERT INTO `zz_area_code` VALUES (460000000000, '海南省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (460000000000, '海南省', 1, null);
INSERT INTO `zz_area_code` VALUES (460100000000, '海口市', 2, 460000000000);
INSERT INTO `zz_area_code` VALUES (460101000000, '市辖区', 3, 460100000000);
INSERT INTO `zz_area_code` VALUES (460105000000, '秀英区', 3, 460100000000);
@@ -2615,7 +2613,7 @@ INSERT INTO `zz_area_code` VALUES (469027000000, '乐东黎族自治县', 3, 469
INSERT INTO `zz_area_code` VALUES (469028000000, '陵水黎族自治县', 3, 469000000000);
INSERT INTO `zz_area_code` VALUES (469029000000, '保亭黎族苗族自治县', 3, 469000000000);
INSERT INTO `zz_area_code` VALUES (469030000000, '琼中黎族苗族自治县', 3, 469000000000);
-INSERT INTO `zz_area_code` VALUES (500000000000, '重庆市', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (500000000000, '重庆市', 1, null);
INSERT INTO `zz_area_code` VALUES (500100000000, '市辖区', 2, 500000000000);
INSERT INTO `zz_area_code` VALUES (500101000000, '万州区', 3, 500100000000);
INSERT INTO `zz_area_code` VALUES (500102000000, '涪陵区', 3, 500100000000);
@@ -2656,7 +2654,7 @@ INSERT INTO `zz_area_code` VALUES (500240000000, '石柱土家族自治县', 3,
INSERT INTO `zz_area_code` VALUES (500241000000, '秀山土家族苗族自治县', 3, 500200000000);
INSERT INTO `zz_area_code` VALUES (500242000000, '酉阳土家族苗族自治县', 3, 500200000000);
INSERT INTO `zz_area_code` VALUES (500243000000, '彭水苗族土家族自治县', 3, 500200000000);
-INSERT INTO `zz_area_code` VALUES (510000000000, '四川省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (510000000000, '四川省', 1, null);
INSERT INTO `zz_area_code` VALUES (510100000000, '成都市', 2, 510000000000);
INSERT INTO `zz_area_code` VALUES (510101000000, '市辖区', 3, 510100000000);
INSERT INTO `zz_area_code` VALUES (510104000000, '锦江区', 3, 510100000000);
@@ -2882,7 +2880,7 @@ INSERT INTO `zz_area_code` VALUES (513434000000, '越西县', 3, 513400000000);
INSERT INTO `zz_area_code` VALUES (513435000000, '甘洛县', 3, 513400000000);
INSERT INTO `zz_area_code` VALUES (513436000000, '美姑县', 3, 513400000000);
INSERT INTO `zz_area_code` VALUES (513437000000, '雷波县', 3, 513400000000);
-INSERT INTO `zz_area_code` VALUES (520000000000, '贵州省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (520000000000, '贵州省', 1, null);
INSERT INTO `zz_area_code` VALUES (520100000000, '贵阳市', 2, 520000000000);
INSERT INTO `zz_area_code` VALUES (520101000000, '市辖区', 3, 520100000000);
INSERT INTO `zz_area_code` VALUES (520102000000, '南明区', 3, 520100000000);
@@ -2985,7 +2983,7 @@ INSERT INTO `zz_area_code` VALUES (522729000000, '长顺县', 3, 522700000000);
INSERT INTO `zz_area_code` VALUES (522730000000, '龙里县', 3, 522700000000);
INSERT INTO `zz_area_code` VALUES (522731000000, '惠水县', 3, 522700000000);
INSERT INTO `zz_area_code` VALUES (522732000000, '三都水族自治县', 3, 522700000000);
-INSERT INTO `zz_area_code` VALUES (530000000000, '云南省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (530000000000, '云南省', 1, null);
INSERT INTO `zz_area_code` VALUES (530100000000, '昆明市', 2, 530000000000);
INSERT INTO `zz_area_code` VALUES (530101000000, '市辖区', 3, 530100000000);
INSERT INTO `zz_area_code` VALUES (530102000000, '五华区', 3, 530100000000);
@@ -3139,7 +3137,7 @@ INSERT INTO `zz_area_code` VALUES (533400000000, '迪庆藏族自治州', 2, 530
INSERT INTO `zz_area_code` VALUES (533401000000, '香格里拉市', 3, 533400000000);
INSERT INTO `zz_area_code` VALUES (533422000000, '德钦县', 3, 533400000000);
INSERT INTO `zz_area_code` VALUES (533423000000, '维西傈僳族自治县', 3, 533400000000);
-INSERT INTO `zz_area_code` VALUES (540000000000, '西藏自治区', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (540000000000, '西藏自治区', 1, null);
INSERT INTO `zz_area_code` VALUES (540100000000, '拉萨市', 2, 540000000000);
INSERT INTO `zz_area_code` VALUES (540101000000, '市辖区', 3, 540100000000);
INSERT INTO `zz_area_code` VALUES (540102000000, '城关区', 3, 540100000000);
@@ -3227,7 +3225,7 @@ INSERT INTO `zz_area_code` VALUES (542524000000, '日土县', 3, 542500000000);
INSERT INTO `zz_area_code` VALUES (542525000000, '革吉县', 3, 542500000000);
INSERT INTO `zz_area_code` VALUES (542526000000, '改则县', 3, 542500000000);
INSERT INTO `zz_area_code` VALUES (542527000000, '措勤县', 3, 542500000000);
-INSERT INTO `zz_area_code` VALUES (610000000000, '陕西省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (610000000000, '陕西省', 1, null);
INSERT INTO `zz_area_code` VALUES (610100000000, '西安市', 2, 610000000000);
INSERT INTO `zz_area_code` VALUES (610101000000, '市辖区', 3, 610100000000);
INSERT INTO `zz_area_code` VALUES (610102000000, '新城区', 3, 610100000000);
@@ -3355,7 +3353,7 @@ INSERT INTO `zz_area_code` VALUES (611023000000, '商南县', 3, 611000000000);
INSERT INTO `zz_area_code` VALUES (611024000000, '山阳县', 3, 611000000000);
INSERT INTO `zz_area_code` VALUES (611025000000, '镇安县', 3, 611000000000);
INSERT INTO `zz_area_code` VALUES (611026000000, '柞水县', 3, 611000000000);
-INSERT INTO `zz_area_code` VALUES (620000000000, '甘肃省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (620000000000, '甘肃省', 1, null);
INSERT INTO `zz_area_code` VALUES (620100000000, '兰州市', 2, 620000000000);
INSERT INTO `zz_area_code` VALUES (620101000000, '市辖区', 3, 620100000000);
INSERT INTO `zz_area_code` VALUES (620102000000, '城关区', 3, 620100000000);
@@ -3469,7 +3467,7 @@ INSERT INTO `zz_area_code` VALUES (623024000000, '迭部县', 3, 623000000000);
INSERT INTO `zz_area_code` VALUES (623025000000, '玛曲县', 3, 623000000000);
INSERT INTO `zz_area_code` VALUES (623026000000, '碌曲县', 3, 623000000000);
INSERT INTO `zz_area_code` VALUES (623027000000, '夏河县', 3, 623000000000);
-INSERT INTO `zz_area_code` VALUES (630000000000, '青海省', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (630000000000, '青海省', 1, null);
INSERT INTO `zz_area_code` VALUES (630100000000, '西宁市', 2, 630000000000);
INSERT INTO `zz_area_code` VALUES (630101000000, '市辖区', 3, 630100000000);
INSERT INTO `zz_area_code` VALUES (630102000000, '城东区', 3, 630100000000);
@@ -3524,7 +3522,7 @@ INSERT INTO `zz_area_code` VALUES (632821000000, '乌兰县', 3, 632800000000);
INSERT INTO `zz_area_code` VALUES (632822000000, '都兰县', 3, 632800000000);
INSERT INTO `zz_area_code` VALUES (632823000000, '天峻县', 3, 632800000000);
INSERT INTO `zz_area_code` VALUES (632857000000, '大柴旦行政委员会', 3, 632800000000);
-INSERT INTO `zz_area_code` VALUES (640000000000, '宁夏回族自治区', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (640000000000, '宁夏回族自治区', 1, null);
INSERT INTO `zz_area_code` VALUES (640100000000, '银川市', 2, 640000000000);
INSERT INTO `zz_area_code` VALUES (640101000000, '市辖区', 3, 640100000000);
INSERT INTO `zz_area_code` VALUES (640104000000, '兴庆区', 3, 640100000000);
@@ -3557,7 +3555,7 @@ INSERT INTO `zz_area_code` VALUES (640501000000, '市辖区', 3, 640500000000);
INSERT INTO `zz_area_code` VALUES (640502000000, '沙坡头区', 3, 640500000000);
INSERT INTO `zz_area_code` VALUES (640521000000, '中宁县', 3, 640500000000);
INSERT INTO `zz_area_code` VALUES (640522000000, '海原县', 3, 640500000000);
-INSERT INTO `zz_area_code` VALUES (650000000000, '新疆维吾尔自治区', 1, NULL);
+INSERT INTO `zz_area_code` VALUES (650000000000, '新疆维吾尔自治区', 1, null);
INSERT INTO `zz_area_code` VALUES (650100000000, '乌鲁木齐市', 2, 650000000000);
INSERT INTO `zz_area_code` VALUES (650101000000, '市辖区', 3, 650100000000);
INSERT INTO `zz_area_code` VALUES (650102000000, '天山区', 3, 650100000000);
@@ -3681,634 +3679,4 @@ INSERT INTO `zz_area_code` VALUES (659004000000, '五家渠市', 3, 659000000000
INSERT INTO `zz_area_code` VALUES (659006000000, '铁门关市', 3, 659000000000);
COMMIT;
--- ----------------------------
--- Table structure for zz_class
--- ----------------------------
-DROP TABLE IF EXISTS `zz_class`;
-CREATE TABLE `zz_class` (
- `class_id` bigint(20) NOT NULL COMMENT '班级Id',
- `class_name` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '班级名称',
- `school_id` bigint(20) NOT NULL COMMENT '学校Id',
- `leader_id` bigint(20) NOT NULL COMMENT '学生班长Id',
- `finish_class_hour` int(11) NOT NULL DEFAULT '0' COMMENT '已完成课时数量',
- `class_level` tinyint(4) NOT NULL COMMENT '班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)',
- `create_user_id` bigint(20) NOT NULL COMMENT '创建用户',
- `create_time` datetime NOT NULL COMMENT '班级创建时间',
- `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '班级状态(0: 正常 1: 解散)',
- PRIMARY KEY (`class_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_class
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_class` VALUES (1016971499387228160, '小学一年级随堂班', 1015817732197453824, 1015842628948463616, 15, 0, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016971692685922304, '小学二年级随堂班', 1015818056597508096, 1018000939508568064, 20, 0, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016971755373989888, '小学三年级随堂班', 1015817732197453824, 1015842628948463616, 100, 0, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016971816040402944, '小学四年级随堂班', 1015817732197453824, 1015852853839532032, 0, 0, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016971872105664512, '小学五年级随堂班', 1015818056597508096, 1018001219050541056, 0, 0, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016971931153076224, '小学六年级随堂班', 1015817732197453824, 1015852480873631744, 0, 0, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972016347779072, '小学一年级提高班', 1015817732197453824, 1015842628948463616, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972071955861504, '小学二年级提高班', 1015817732197453824, 1015852480873631744, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972128667045888, '小学三年级提高班', 1015818056597508096, 1018001219050541056, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972187949338624, '小学四年级提高班', 1015817732197453824, 1015852480873631744, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972236452270080, '小学五年级提高班', 1015817732197453824, 1015852480873631744, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972308355223552, '小学六年级提高班', 1015818056597508096, 1018000939508568064, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972406023786496, '小学奥林匹克竞赛班', 1015818056597508096, 1018001219050541056, 0, 1, 1093809448606765057, '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_class` VALUES (1016972484746678272, '小学毕业提分班', 1015818056597508096, 1018000939508568064, 0, 2, 1093809448606765057, '2020-10-17 00:00:00', 1);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_class_course
--- ----------------------------
-DROP TABLE IF EXISTS `zz_class_course`;
-CREATE TABLE `zz_class_course` (
- `class_id` bigint(20) NOT NULL COMMENT '班级Id',
- `course_id` bigint(20) NOT NULL COMMENT '课程Id',
- `course_order` tinyint(4) NOT NULL DEFAULT '0' COMMENT '课程顺序(数值越小越靠前)',
- PRIMARY KEY (`class_id`,`course_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_class_course
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_class_course` VALUES (1016971499387228160, 1016699195411402752, 1);
-INSERT INTO `zz_class_course` VALUES (1016971499387228160, 1016920878164480000, 0);
-INSERT INTO `zz_class_course` VALUES (1016971499387228160, 1016923276064854016, 0);
-INSERT INTO `zz_class_course` VALUES (1016971692685922304, 1016917385529790464, 1);
-INSERT INTO `zz_class_course` VALUES (1016971755373989888, 1016917732260319232, 0);
-INSERT INTO `zz_class_course` VALUES (1016971755373989888, 1016917900699373568, 0);
-INSERT INTO `zz_class_course` VALUES (1016971755373989888, 1016918360520921088, 0);
-INSERT INTO `zz_class_course` VALUES (1016971755373989888, 1016918605715738624, 0);
-INSERT INTO `zz_class_course` VALUES (1016971755373989888, 1016918836729614336, 0);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_class_student
--- ----------------------------
-DROP TABLE IF EXISTS `zz_class_student`;
-CREATE TABLE `zz_class_student` (
- `class_id` bigint(20) NOT NULL COMMENT '班级Id',
- `student_id` bigint(20) NOT NULL COMMENT '学生Id',
- PRIMARY KEY (`class_id`,`student_id`) USING BTREE,
- KEY `idx_student_id` (`student_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_class_student
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_class_student` VALUES (1016971499387228160, 1015842628948463616);
-INSERT INTO `zz_class_student` VALUES (1016971692685922304, 1015842628948463616);
-INSERT INTO `zz_class_student` VALUES (1016971499387228160, 1015852480873631744);
-INSERT INTO `zz_class_student` VALUES (1016971692685922304, 1015852853839532032);
-INSERT INTO `zz_class_student` VALUES (1016972016347779072, 1018000939508568064);
-INSERT INTO `zz_class_student` VALUES (1016972016347779072, 1018001219050541056);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_course
--- ----------------------------
-DROP TABLE IF EXISTS `zz_course`;
-CREATE TABLE `zz_course` (
- `course_id` bigint(20) NOT NULL COMMENT '主键Id',
- `course_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '课程名称',
- `price` decimal(10,2) NOT NULL COMMENT '课程价格',
- `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '课程描述',
- `difficulty` int(11) NOT NULL COMMENT '课程难度(0: 容易 1: 普通 2: 很难)',
- `grade_id` tinyint(4) NOT NULL COMMENT '年级Id',
- `subject_id` tinyint(4) NOT NULL COMMENT '学科Id',
- `class_hour` int(11) NOT NULL COMMENT '课时数量',
- `picture_url` varchar(1024) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '多张课程图片地址',
- `create_user_id` bigint(20) NOT NULL COMMENT '创建用户Id',
- `create_time` datetime NOT NULL COMMENT '创建时间',
- `update_time` datetime NOT NULL COMMENT '最后修改时间',
- PRIMARY KEY (`course_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_course
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_course` VALUES (1016699195411402752, '小学一年级拼音基础练习', 299.00, '小学一年级拼音基础练习', 0, 1, 0, 10, '[{\"name\":\"IMG_0003.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"b09ef09478d8452d908600ff98b6f1ce.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016917385529790464, '小学二年级语文课程', 980.00, '小学二年级课程', 1, 2, 0, 25, '[{\"name\":\"IMG_0455.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"79651a658e88408888f847366fbf98d0.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016917732260319232, '小学三年级语文课程', 1080.00, '小学三年级语文课程', 1, 3, 0, 30, '[{\"name\":\"IMG_0001.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"0d11548eb91142d49a9253c0060d3f94.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016917900699373568, '小学四年级语文课程', 888.00, '小学四年级语文课程', 1, 4, 0, 27, '[{\"name\":\"IMG_0002.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"7358b520e31e4ee0b2b8c4f9c31614d9.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016918360520921088, '小学五年级语文课程', 1199.00, '小学五年级语文课程', 2, 5, 0, 30, '[{\"name\":\"IMG_0004.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"cf804a5e14fb498fa8bf3745cad39bca.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016918605715738624, '小学六年级语文课程', 1288.00, '小学六年级语文课程', 2, 6, 0, 32, '[{\"name\":\"IMG_0006.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"a0d0476fac9c46f08b7ebef597b8765a.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016918836729614336, '天津小学一年级语文课程', 300.00, '天津小学一年级语文课程', 0, 1, 0, 20, '[{\"name\":\"IMG_0003.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"7f64971a69944b0082f21a6036c31efd.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016920152549888000, '天津小学二年级语文课程', 699.00, '天津小学二年级语文课程', 1, 2, 0, 20, '[{\"name\":\"IMG_0007.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"4baf08c1da8741bb808caf09475e49a9.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016920339255136256, '天津小学三年级语文课程', 998.00, '天津小学三年级语文课程', 1, 3, 0, 25, '[{\"name\":\"IMG_0009.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"6bc1eaab831d49708e4b1e0a5d657d61.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 21:22:54');
-INSERT INTO `zz_course` VALUES (1016920878164480000, '小学数学一年级课程', 388.00, '小学数学一年级课程', 0, 1, 1, 15, '[{\"name\":\"IMG_0010.JPG\",\"downloadUri\":\"/admin/coursepaper/course/download\",\"filename\":\"7e9583aba9594a98b1e0268837d2a5d0.JPG\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016921053566078976, '小学数学二年级课程', 700.00, '小学数学二年级课程', 0, 2, 1, 20, '[{\"name\":\"shuxue2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"7a1fdc70976f4820aa019f91514de272.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016921250996162560, '小学数学三年级课程', 700.00, '小学数学三年级课程', 1, 3, 1, 20, '[{\"name\":\"shuxue.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"f14c0f101146453c80607230e842f1c9.jpg\"},{\"name\":\"shuxue2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"b8451e95fa314facaa8a3cd720888574.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016921446102601728, '小学数学四年级课程', 800.00, '小学数学四年级课程', 1, 4, 1, 21, '[{\"name\":\"shuxue2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"78e1cac8c4284c8a82c7ea4bef5162a4.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016921667582824448, '小学数学五年级课程', 900.00, '小学数学五年级课程', 2, 5, 1, 25, '[{\"name\":\"shuxue.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"167967c0c025406483861eed038111a0.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016922210208321536, '小学数学六年级课程', 1099.00, '小学数学六年级课程', 2, 6, 1, 20, '[{\"name\":\"shuxue2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"7f79d414e4b14ce19d75f038306088a9.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016922414236045312, '天津数学一年级课程', 499.00, '天津数学一年级课程', 0, 1, 1, 20, '[{\"name\":\"shuxue.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"59d6f1cea3584a1ab637ab6a69ebacd6.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016922587657932800, '天津数学二年级课程', 500.00, '天津数学二年级课程', 1, 2, 1, 25, '[{\"name\":\"shuxue2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"830a0f67737e4b79a605ecbbd20f9418.jpg\"},{\"name\":\"shuxue.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"5f9be80c275c48bda8a67562276aa04e.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016922752997396480, '天津数学三年级课程', 799.00, '天津数学三年级课程', 2, 3, 1, 24, '[{\"name\":\"shuxue2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"0fb454a0d56843e6b77bfc874f8a4a0f.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016923276064854016, '小学英语一年级课程', 399.00, '小学英语一年级课程', 0, 1, 2, 15, '[{\"name\":\"english.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"44177c3674f543fda24222b8297ef203.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016923512082534400, '小学英语二年级课程', 428.00, '小学英语二年级课程', 0, 2, 2, 15, '[{\"name\":\"english2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"1a775271ccf9436c8b4e92a841556d79.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016924065042796544, '小学英语三年级课程', 666.00, '小学英语三年级课程', 1, 3, 2, 25, '[{\"name\":\"english2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"d9eded33a06d4931ae326cac3871948f.jpg\"},{\"name\":\"english.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"f179474ce95e4210b4e2a04d480c6535.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016924308048187392, '小学英语四年级课程', 700.00, '小学英语四年级课程', 1, 4, 2, 25, '[{\"name\":\"english.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"c71da8ce21b44dd8bb761fa93b09a341.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016924664354312192, '小学英语五年级课程', 805.00, '小学英语五年级课程', 2, 5, 2, 28, '[{\"name\":\"english2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"0d81493585d94962acbcdc81c074224a.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016924985629609984, '小学英语六年级课程', 998.00, '小学英语六年级课程', 2, 6, 2, 30, '[{\"name\":\"english.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"17b2b4380fc746659666f9c51bfa7618.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016925257013661696, '天津英语一年级课程', 499.00, '天津英语一年级课程', 0, 1, 2, 20, '[{\"name\":\"english2.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"dd15b00b79154c398a3daa9fb8cff9f9.jpg\"},{\"name\":\"english.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"2a0b1f0d262649a294a9f647421f5a7e.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1016925420855758848, '天津英语二年级课程', 528.00, '天津英语二年级课程', 1, 2, 2, 23, '[{\"name\":\"english.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"7dc07373076f452eac02d9405ac83479.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-INSERT INTO `zz_course` VALUES (1018007994936070144, '小学一年级语文课程B', 1111.00, '1112222', 0, 1, 1, 23, '[{\"name\":\"微信图片_20190406094309.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"b11699acb7094c11a1c1efa71d53ee19.jpg\"},{\"name\":\"微信图片_20190406094305.jpg\",\"downloadUri\":\"/admin/app/course/download\",\"filename\":\"e248874a47e849e29dd7b699b2685d30.jpg\"}]', 1093809448606765057, '2020-10-17 00:00:00', '2020-10-17 00:00:00');
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_course_trans_stats
--- ----------------------------
-DROP TABLE IF EXISTS `zz_course_trans_stats`;
-CREATE TABLE `zz_course_trans_stats` (
- `stats_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键Id',
- `stats_date` date NOT NULL COMMENT '统计日期',
- `subject_id` tinyint(4) NOT NULL COMMENT '科目Id',
- `grade_id` tinyint(4) NOT NULL COMMENT '年级Id',
- `grade_name` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '年级名称',
- `course_id` bigint(20) NOT NULL COMMENT '课程Id',
- `course_name` varchar(128) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '课程名称',
- `student_attend_count` int(11) NOT NULL COMMENT '学生上课次数',
- `student_flower_amount` int(11) NOT NULL COMMENT '学生献花数量',
- `student_flower_count` int(11) NOT NULL COMMENT '学生献花次数',
- PRIMARY KEY (`stats_id`) USING BTREE,
- UNIQUE KEY `uk_stats_date_subject_id_grade_course_id` (`stats_date`,`grade_id`,`course_id`) USING BTREE,
- KEY `idx_grade_id` (`grade_id`) USING BTREE,
- KEY `idx_course_id` (`course_id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_course_trans_stats
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_course_trans_stats` VALUES (1, '2020-01-10', 0, 1, NULL, 1016699195411402752, '小学一年级拼音基础练习', 1, 0, 0);
-INSERT INTO `zz_course_trans_stats` VALUES (2, '2020-01-10', 0, 2, NULL, 1016917385529790464, '小学二年级语文课程', 2, 55, 1);
-INSERT INTO `zz_course_trans_stats` VALUES (3, '2020-01-10', 0, 3, NULL, 1016917732260319232, '小学三年级语文课程', 2, 118, 2);
-INSERT INTO `zz_course_trans_stats` VALUES (4, '2020-01-10', 0, 4, NULL, 1016917900699373568, '小学四年级语文课程', 0, 40, 1);
-INSERT INTO `zz_course_trans_stats` VALUES (5, '2020-01-11', 0, 1, NULL, 1016699195411402752, '小学一年级拼音基础练习', 3, 119, 2);
-INSERT INTO `zz_course_trans_stats` VALUES (6, '2020-01-11', 0, 2, NULL, 1016917385529790464, '小学二年级语文课程', 1, 36, 1);
-INSERT INTO `zz_course_trans_stats` VALUES (7, '2020-01-11', 0, 3, NULL, 1016917732260319232, '小学三年级语文课程', 1, 147, 2);
-INSERT INTO `zz_course_trans_stats` VALUES (8, '2020-01-11', 0, 4, NULL, 1016917900699373568, '小学四年级语文课程', 0, 76, 1);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_grade
--- ----------------------------
-DROP TABLE IF EXISTS `zz_grade`;
-CREATE TABLE `zz_grade` (
- `grade_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键Id',
- `grade_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '年级名称',
- `status` int(11) NOT NULL COMMENT '是否正在使用(0:不是,1:是)',
- PRIMARY KEY (`grade_id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_grade
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_grade` VALUES (1, '一年级', 1);
-INSERT INTO `zz_grade` VALUES (2, '二年级', 1);
-INSERT INTO `zz_grade` VALUES (3, '三年级', 1);
-INSERT INTO `zz_grade` VALUES (4, '四年级', 1);
-INSERT INTO `zz_grade` VALUES (5, '五年级', 1);
-INSERT INTO `zz_grade` VALUES (6, '六年级', 1);
-INSERT INTO `zz_grade` VALUES (7, '初一', 1);
-INSERT INTO `zz_grade` VALUES (8, '初二', 1);
-INSERT INTO `zz_grade` VALUES (9, '初三', 1);
-INSERT INTO `zz_grade` VALUES (10, '高一', 1);
-INSERT INTO `zz_grade` VALUES (11, '高二', 1);
-INSERT INTO `zz_grade` VALUES (12, '高三', 1);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_material_edition
--- ----------------------------
-DROP TABLE IF EXISTS `zz_material_edition`;
-CREATE TABLE `zz_material_edition` (
- `edition_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键Id',
- `edition_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '教材版本名称',
- `status` int(11) NOT NULL COMMENT '是否正在使用(0:不是,1:是)',
- PRIMARY KEY (`edition_id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_material_edition
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_material_edition` VALUES (1, '苏教版', 1);
-INSERT INTO `zz_material_edition` VALUES (2, '人教版', 1);
-INSERT INTO `zz_material_edition` VALUES (3, '湘教版', 1);
-INSERT INTO `zz_material_edition` VALUES (4, '沪教版', 1);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_school_info
--- ----------------------------
-DROP TABLE IF EXISTS `zz_school_info`;
-CREATE TABLE `zz_school_info` (
- `school_id` bigint(20) NOT NULL COMMENT '学校Id',
- `school_name` varchar(128) COLLATE utf8mb4_bin NOT NULL COMMENT '学校名称',
- `province_id` bigint(20) NOT NULL COMMENT '所在省Id',
- `city_id` bigint(20) NOT NULL COMMENT '所在城市Id',
- PRIMARY KEY (`school_id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_school_info
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_school_info` VALUES (1014065909648330752, '公司总部', 110000000000, 110100000000);
-INSERT INTO `zz_school_info` VALUES (1015817732197453824, '北京校区', 110000000000, 110100000000);
-INSERT INTO `zz_school_info` VALUES (1015818056597508096, '天津校区', 120000000000, 120100000000);
-INSERT INTO `zz_school_info` VALUES (1015818992220901376, '浙江校区', 330000000000, 330100000000);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_student
--- ----------------------------
-DROP TABLE IF EXISTS `zz_student`;
-CREATE TABLE `zz_student` (
- `student_id` bigint(20) NOT NULL COMMENT '学生Id',
- `login_mobile` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '登录手机',
- `student_name` varchar(20) COLLATE utf8mb4_bin NOT NULL COMMENT '学生姓名',
- `province_id` bigint(20) NOT NULL COMMENT '所在省份Id',
- `city_id` bigint(20) NOT NULL COMMENT '所在城市Id',
- `district_id` bigint(20) NOT NULL COMMENT '区县Id',
- `gender` int(11) NOT NULL COMMENT '学生性别 (0: 女生 1: 男生)',
- `birthday` date NOT NULL COMMENT '生日',
- `experience_level` tinyint(4) NOT NULL COMMENT '经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)',
- `total_coin` int(11) NOT NULL DEFAULT '0' COMMENT '总共充值学币数量',
- `left_coin` int(11) NOT NULL DEFAULT '0' COMMENT '可用学币数量',
- `grade_id` int(11) NOT NULL COMMENT '年级Id',
- `school_id` bigint(20) NOT NULL COMMENT '校区Id',
- `register_time` datetime NOT NULL COMMENT '注册时间',
- `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '学生状态 (0: 正常 1: 锁定 2: 注销)',
- PRIMARY KEY (`student_id`) USING BTREE,
- KEY `idx_login_mobile` (`login_mobile`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_student
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_student` VALUES (1015842628948463616, '13834561230', '张三', 110000000000, 110100000000, 110105000000, 1, '2010-08-19', 1, 3412, 1077, 4, 1015817732197453824, '2020-10-17 00:00:00', 0);
-INSERT INTO `zz_student` VALUES (1015852480873631744, '13945651267', '李军', 110000000000, 110100000000, 110107000000, 1, '2011-11-18', 1, 3178, 3024, 3, 1015817732197453824, '2020-10-17 00:00:00', 0);
-INSERT INTO `zz_student` VALUES (1015852853839532032, '13709481736', '王石', 110000000000, 110100000000, 110108000000, 1, '2015-01-15', 0, 3187, 2199, 1, 1015817732197453824, '2020-10-17 00:00:00', 0);
-INSERT INTO `zz_student` VALUES (1018000939508568064, '13700023451', '天津二哥', 120000000000, 120100000000, 120103000000, 1, '2010-06-10', 0, 1287, 634, 3, 1015818056597508096, '2020-10-17 00:00:00', 0);
-INSERT INTO `zz_student` VALUES (1018001219050541056, '13903122987', '南开学霸', 120000000000, 120100000000, 120104000000, 0, '2009-07-17', 2, 8721, 7023, 4, 1015818056597508096, '2020-10-17 00:00:00', 0);
-INSERT INTO `zz_student` VALUES (1023072888777609216, '13920134567', 'aaa', 120000000000, 120100000000, 120103000000, 1, '2020-01-08', 1, 0, 0, 1, 1015818992220901376, '2020-10-17 00:00:00', 0);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_student_action_stats
--- ----------------------------
-DROP TABLE IF EXISTS `zz_student_action_stats`;
-CREATE TABLE `zz_student_action_stats` (
- `stats_id` bigint(20) NOT NULL COMMENT '主键Id',
- `stats_date` date NOT NULL COMMENT '统计日期',
- `stats_month` date DEFAULT NULL COMMENT '统计小时',
- `grade_id` int(11) NOT NULL COMMENT '年级Id',
- `province_id` bigint(20) NOT NULL COMMENT '学生所在省Id',
- `city_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '学生所在城市Id',
- `buy_course_amount` int(11) NOT NULL DEFAULT '0' COMMENT '购课学币数量',
- `buy_course_count` int(11) NOT NULL DEFAULT '0' COMMENT '购买课程次数',
- `buy_video_amount` int(11) NOT NULL DEFAULT '0' COMMENT '购买视频学币数量',
- `buy_video_count` int(11) NOT NULL DEFAULT '0' COMMENT '购买视频次数',
- `buy_paper_amount` int(11) NOT NULL DEFAULT '0' COMMENT '购买作业学币数量',
- `buy_paper_count` int(11) NOT NULL DEFAULT '0' COMMENT '购买作业次数',
- `buy_flower_amount` int(11) NOT NULL DEFAULT '0' COMMENT '购买献花数量',
- `buy_flower_count` int(11) NOT NULL DEFAULT '0' COMMENT '购买献花次数',
- `recharge_coin_amount` int(11) NOT NULL DEFAULT '0' COMMENT '充值学币数量',
- `recharge_coin_count` int(11) NOT NULL DEFAULT '0' COMMENT '充值学币次数',
- `do_course_count` int(11) NOT NULL COMMENT '线下课程上课次数',
- `watch_video_count` int(11) NOT NULL DEFAULT '0' COMMENT '观看视频次数',
- `watch_video_total_second` int(11) NOT NULL COMMENT '购买献花消费学币数量',
- `do_exercise_count` int(11) NOT NULL DEFAULT '0' COMMENT '做题数量',
- `do_exercise_correct_count` int(11) NOT NULL DEFAULT '0' COMMENT '做题正确的数量',
- PRIMARY KEY (`stats_id`) USING BTREE,
- UNIQUE KEY `uk_stats_date_grade_id_region_id` (`stats_date`,`grade_id`,`province_id`,`city_id`) USING BTREE,
- KEY `idx_province_id` (`province_id`) USING BTREE,
- KEY `idx_city_id` (`city_id`) USING BTREE,
- KEY `idx_grade_id` (`grade_id`) USING BTREE,
- KEY `idx_stats_month` (`stats_month`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_student_action_stats
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_student_action_stats` VALUES (1293010719117148160, '2020-01-10', NULL, 1, 110000000000, 110100000000, 16, 5, 0, 0, 14, 2, 123, 3, 2694, 5, 3, 3, 707, 3, 0);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719121342468, '2020-01-10', NULL, 2, 110000000000, 110100000000, 8, 3, 0, 0, 6, 1, 133, 2, 1717, 3, 3, 0, 0, 4, 0);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719121342475, '2020-01-10', NULL, 4, 110000000000, 110100000000, 0, 0, 0, 0, 16, 2, 55, 2, 1881, 4, 2, 6, 2987, 2, 0);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719121342482, '2020-01-10', NULL, 2, 120000000000, 120100000000, 12, 4, 0, 0, 0, 0, 134, 2, 292, 2, 3, 1, 434, 1, 1);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719121342489, '2020-01-10', NULL, 3, 120000000000, 120100000000, 5, 2, 0, 0, 18, 3, 79, 2, 1343, 2, 2, 4, 2266, 5, 5);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719121342497, '2020-01-10', NULL, 4, 120000000000, 120100000000, 10, 3, 0, 0, 33, 4, 212, 4, 766, 2, 3, 2, 1480, 4, 4);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719297503232, '2020-01-11', NULL, 1, 110000000000, 110100000000, 12, 3, 0, 0, 13, 2, 216, 3, 1119, 2, 3, 2, 511, 2, 2);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719297503240, '2020-01-11', NULL, 2, 110000000000, 110100000000, 7, 4, 0, 0, 20, 3, 142, 2, 509, 2, 3, 3, 1699, 3, 3);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719297503248, '2020-01-11', NULL, 3, 110000000000, 110100000000, 2, 1, 0, 0, 11, 2, 158, 3, 1571, 2, 3, 0, 0, 3, 3);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719297503255, '2020-01-11', NULL, 2, 120000000000, 120100000000, 0, 0, 0, 0, 15, 2, 0, 0, 1741, 3, 2, 3, 1280, 3, 3);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719301697539, '2020-01-11', NULL, 3, 120000000000, 120100000000, 3, 2, 0, 0, 0, 0, 176, 3, 1702, 2, 2, 2, 1306, 2, 2);
-INSERT INTO `zz_student_action_stats` VALUES (1293010719301697545, '2020-01-11', NULL, 4, 120000000000, 120100000000, 7, 2, 0, 0, 9, 2, 122, 2, 1257, 3, 0, 3, 1210, 2, 2);
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_student_action_trans
--- ----------------------------
-DROP TABLE IF EXISTS `zz_student_action_trans`;
-CREATE TABLE `zz_student_action_trans` (
- `trans_id` bigint(20) NOT NULL COMMENT '主键Id',
- `student_id` bigint(20) NOT NULL COMMENT '学生Id',
- `student_name` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '学生名称',
- `school_id` bigint(20) NOT NULL COMMENT '学生校区',
- `grade_id` int(11) NOT NULL COMMENT '年级Id',
- `action_type` tinyint(4) NOT NULL COMMENT '行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)',
- `device_type` tinyint(4) NOT NULL COMMENT '设备类型(0: iOS 1: Android 2: PC)',
- `watch_video_seconds` int(11) DEFAULT NULL COMMENT '看视频秒数',
- `flower_count` int(11) DEFAULT NULL COMMENT '购买献花数量',
- `paper_count` int(11) DEFAULT NULL COMMENT '购买作业数量',
- `video_count` int(11) DEFAULT NULL COMMENT '购买视频数量',
- `course_count` int(11) DEFAULT NULL COMMENT '购买课程数量',
- `coin_count` int(11) DEFAULT NULL COMMENT '充值学币数量',
- `exercise_correct_flag` tinyint(4) DEFAULT NULL COMMENT '做题是否正确标记',
- `create_time` datetime NOT NULL COMMENT '发生时间',
- PRIMARY KEY (`trans_id`) USING BTREE,
- KEY `idx_student_id` (`student_id`) USING BTREE,
- KEY `idx_grade_id` (`grade_id`) USING BTREE,
- KEY `idx_action_type` (`action_type`) USING BTREE,
- KEY `idx_create_time` (`create_time`) USING BTREE,
- KEY `idx_device_type` (`action_type`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
-
--- ----------------------------
--- Records of zz_student_action_trans
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_student_action_trans` VALUES (1018423001834328064, 1015841864515588096, '张大', 1015817732197453824, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, 617, NULL, '2020-01-10 11:13:23');
-INSERT INTO `zz_student_action_trans` VALUES (1018803416562667520, 1015841864515588096, '张大', 1015817732197453824, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, 468, NULL, '2020-01-10 11:13:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018803445553696768, 1015841864515588096, '张大', 1015817732197453824, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 548, NULL, '2020-01-10 11:13:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018803590760501248, 1015841864515588096, '张大', 1015817732197453824, 1, 0, 2, NULL, NULL, NULL, NULL, NULL, 250, NULL, '2020-01-10 11:13:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018803838299934720, 1015841864515588096, '张大', 1015817732197453824, 1, 0, 2, NULL, NULL, NULL, NULL, NULL, 811, NULL, '2020-01-10 11:13:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018803855614021632, 1015841864515588096, '张大', 1015817732197453824, 1, 1, 2, NULL, NULL, NULL, NULL, 5, NULL, NULL, '2020-01-10 11:13:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018803873183961088, 1015841864515588096, '张大', 1015817732197453824, 1, 1, 1, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-10 11:13:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018803890552573952, 1015841864515588096, '张大', 1015817732197453824, 1, 1, 0, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-10 11:13:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018803897053745152, 1015841864515588096, '张大', 1015817732197453824, 1, 1, 0, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-10 11:14:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018803910555209728, 1015841864515588096, '张大', 1015817732197453824, 1, 1, 0, NULL, NULL, NULL, NULL, 1, NULL, NULL, '2020-01-10 11:14:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018803926451621888, 1015841864515588096, '张大', 1015817732197453824, 1, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018803940418654208, 1015841864515588096, '张大', 1015817732197453824, 1, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018803955727863808, 1015841864515588096, '张大', 1015817732197453824, 1, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018803973427826688, 1015841864515588096, '张大', 1015817732197453824, 1, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018803982235865088, 1015841864515588096, '张大', 1015817732197453824, 1, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018803988154028032, 1015841864515588096, '张大', 1015817732197453824, 1, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018804009414955008, 1015841864515588096, '张大', 1015817732197453824, 1, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018804025521082368, 1015841864515588096, '张大', 1015817732197453824, 1, 4, 1, 342, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018804040956121088, 1015841864515588096, '张大', 1015817732197453824, 1, 4, 0, 324, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018804057104191488, 1015841864515588096, '张大', 1015817732197453824, 1, 4, 2, 41, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:14:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018804073457782784, 1015841864515588096, '张大', 1015817732197453824, 1, 5, 2, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:15:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018804090696372224, 1015841864515588096, '张大', 1015817732197453824, 1, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:15:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018804111659503616, 1015841864515588096, '张大', 1015817732197453824, 1, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:15:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018804134585569280, 1015841864515588096, '张大', 1015817732197453824, 1, 9, 0, NULL, 15, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:15:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018804139606151168, 1015841864515588096, '张大', 1015817732197453824, 1, 9, 0, NULL, 60, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:15:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018804156295286784, 1015841864515588096, '张大', 1015817732197453824, 1, 9, 1, NULL, 48, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:15:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018804244874792960, 1015841864515588096, '张大', 1015817732197453824, 1, 10, 1, NULL, NULL, 4, NULL, NULL, NULL, NULL, '2020-01-10 11:15:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018804264130842624, 1015841864515588096, '张大', 1015817732197453824, 1, 10, 0, NULL, NULL, 10, NULL, NULL, NULL, NULL, '2020-01-10 11:15:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018806531059879936, 1015841864515588096, '张大', 1015817732197453824, 2, 0, 0, NULL, NULL, NULL, NULL, NULL, 545, NULL, '2020-01-10 11:15:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018806537225506816, 1015841864515588096, '张大', 1015817732197453824, 2, 0, 0, NULL, NULL, NULL, NULL, NULL, 743, NULL, '2020-01-10 11:15:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018806554631868416, 1015841864515588096, '张大', 1015817732197453824, 2, 0, 1, NULL, NULL, NULL, NULL, NULL, 429, NULL, '2020-01-10 11:15:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018806571031597056, 1015841864515588096, '张大', 1015817732197453824, 2, 1, 1, NULL, NULL, NULL, NULL, 3, NULL, NULL, '2020-01-10 11:15:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018806573841780736, 1015841864515588096, '张大', 1015817732197453824, 2, 1, 1, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-10 11:16:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018806589612363776, 1015841864515588096, '张大', 1015817732197453824, 2, 1, 2, NULL, NULL, NULL, NULL, 3, NULL, NULL, '2020-01-10 11:16:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018806602698592256, 1015841864515588096, '张大', 1015817732197453824, 2, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:16:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018806617378656256, 1015841864515588096, '张大', 1015817732197453824, 2, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:16:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018806622076276736, 1015841864515588096, '张大', 1015817732197453824, 2, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:16:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018806639230980096, 1015841864515588096, '张大', 1015817732197453824, 2, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:16:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018806643047796736, 1015841864515588096, '张大', 1015817732197453824, 2, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:16:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018806664732348416, 1015841864515588096, '张大', 1015817732197453824, 2, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:16:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018806668976984064, 1015841864515588096, '张大', 1015817732197453824, 2, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:16:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018806682558140416, 1015841864515588096, '张大', 1015817732197453824, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:16:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018806691030634496, 1015841864515588096, '张大', 1015817732197453824, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:16:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018806709733036032, 1015841864515588096, '张大', 1015817732197453824, 2, 9, 1, NULL, 49, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:16:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018806725126131712, 1015841864515588096, '张大', 1015817732197453824, 2, 9, 0, NULL, 84, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018806755786493952, 1015841864515588096, '张大', 1015817732197453824, 2, 10, 0, NULL, NULL, 6, NULL, NULL, NULL, NULL, '2020-01-10 11:17:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018806774576975872, 1015841864515588096, '张大', 1015817732197453824, 4, 10, 0, NULL, NULL, 8, NULL, NULL, NULL, NULL, '2020-01-10 11:17:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018806780532887552, 1015841864515588096, '张大', 1015817732197453824, 4, 10, 0, NULL, NULL, 8, NULL, NULL, NULL, NULL, '2020-01-10 11:17:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018806796135698432, 1015841864515588096, '张大', 1015817732197453824, 4, 9, 0, NULL, 33, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018806799491141632, 1015841864515588096, '张大', 1015817732197453824, 4, 9, 0, NULL, 22, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018806813844049920, 1015841864515588096, '张大', 1015817732197453824, 4, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:17:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018806817694420992, 1015841864515588096, '张大', 1015817732197453824, 4, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2020-01-10 11:17:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018806836275187712, 1015841864515588096, '张大', 1015817732197453824, 4, 4, 0, 627, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018806840423354368, 1015841864515588096, '张大', 1015817732197453824, 4, 4, 0, 463, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018806858966372352, 1015841864515588096, '张大', 1015817732197453824, 4, 4, 1, 104, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018806862112100352, 1015841864515588096, '张大', 1015817732197453824, 4, 4, 1, 329, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:17:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018806877714911232, 1015841864515588096, '张大', 1015817732197453824, 4, 4, 2, 601, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:18:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018806899365908480, 1015841864515588096, '张大', 1015817732197453824, 4, 4, 2, 863, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:18:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018806913865617408, 1015841864515588096, '张大', 1015817732197453824, 4, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:18:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018806916679995392, 1015841864515588096, '张大', 1015817732197453824, 4, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:18:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018806932240863232, 1015841864515588096, '张大', 1015817732197453824, 4, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:18:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018806950439948288, 1015841864515588096, '张大', 1015817732197453824, 4, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:18:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018806964746719232, 1015841864515588096, '张大', 1015817732197453824, 4, 0, 1, NULL, NULL, NULL, NULL, NULL, 618, NULL, '2020-01-10 11:18:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018806967473016832, 1015841864515588096, '张大', 1015817732197453824, 4, 0, 1, NULL, NULL, NULL, NULL, NULL, 25, NULL, '2020-01-10 11:18:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018806982023057408, 1015841864515588096, '张大', 1015817732197453824, 4, 0, 0, NULL, NULL, NULL, NULL, NULL, 523, NULL, '2020-01-10 11:18:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018806984879378432, 1015841864515588096, '张大', 1015817732197453824, 4, 0, 0, NULL, NULL, NULL, NULL, NULL, 715, NULL, '2020-01-10 11:18:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018807041246629888, 1015842628948463616, '张三', 1015818056597508096, 2, 0, 0, NULL, NULL, NULL, NULL, NULL, 269, NULL, '2020-01-10 11:18:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018807044560130048, 1015842628948463616, '张三', 1015818056597508096, 2, 0, 0, NULL, NULL, NULL, NULL, NULL, 23, NULL, '2020-01-10 11:18:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018807060251021312, 1015842628948463616, '张三', 1015818056597508096, 2, 1, 0, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-10 11:19:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018807064650846208, 1015842628948463616, '张三', 1015818056597508096, 2, 1, 0, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-10 11:19:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018807069302329344, 1015842628948463616, '张三', 1015818056597508096, 2, 1, 0, NULL, NULL, NULL, NULL, 5, NULL, NULL, '2020-01-10 11:19:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018807073211420672, 1015842628948463616, '张三', 1015818056597508096, 2, 1, 0, NULL, NULL, NULL, NULL, 1, NULL, NULL, '2020-01-10 11:19:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018807086876463104, 1015842628948463616, '张三', 1015818056597508096, 2, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018807102311501824, 1015842628948463616, '张三', 1015818056597508096, 2, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018807118379880448, 1015842628948463616, '张三', 1015818056597508096, 2, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018807134397927424, 1015842628948463616, '张三', 1015818056597508096, 2, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018807148918607872, 1015842628948463616, '张三', 1015818056597508096, 2, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018807151863009280, 1015842628948463616, '张三', 1015818056597508096, 2, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018807176013811712, 1015842628948463616, '张三', 1015818056597508096, 2, 4, 1, 434, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:19:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018807190026981376, 1015842628948463616, '张三', 1015818056597508096, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:19:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018807205868867584, 1015842628948463616, '张三', 1015818056597508096, 2, 9, 1, NULL, 100, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:20:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018807221144522752, 1015842628948463616, '张三', 1015818056597508096, 2, 9, 0, NULL, 34, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:20:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018807245962219520, 1015842628948463616, '张三', 1015818056597508096, 3, 9, 0, NULL, 57, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:20:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018807249124724736, 1015842628948463616, '张三', 1015818056597508096, 3, 9, 0, NULL, 22, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:20:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018807263423107072, 1015842628948463616, '张三', 1015818056597508096, 3, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:20:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018807267189592064, 1015842628948463616, '张三', 1015818056597508096, 3, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:20:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018807284394627072, 1015842628948463616, '张三', 1015818056597508096, 3, 10, 0, NULL, NULL, 6, NULL, NULL, NULL, NULL, '2020-01-10 11:20:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018807287661989888, 1015842628948463616, '张三', 1015818056597508096, 3, 10, 0, NULL, NULL, 4, NULL, NULL, NULL, NULL, '2020-01-10 11:20:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018807304527286272, 1015842628948463616, '张三', 1015818056597508096, 3, 10, 2, NULL, NULL, 8, NULL, NULL, NULL, NULL, '2020-01-10 11:20:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018807321082204160, 1015842628948463616, '张三', 1015818056597508096, 3, 5, 2, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:20:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018807323640729600, 1015842628948463616, '张三', 1015818056597508096, 3, 5, 2, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:20:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018807341474910208, 1015842628948463616, '张三', 1015818056597508096, 3, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:20:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018807358168240128, 1015842628948463616, '张三', 1015818056597508096, 3, 4, 1, 109, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018807377902440448, 1015842628948463616, '张三', 1015818056597508096, 3, 4, 0, 923, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018807396172828672, 1015842628948463616, '张三', 1015818056597508096, 3, 4, 2, 598, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018807399939313664, 1015842628948463616, '张三', 1015818056597508096, 3, 4, 2, 636, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018807412731940864, 1015842628948463616, '张三', 1015818056597508096, 3, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018807416288710656, 1015842628948463616, '张三', 1015818056597508096, 3, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018807429895032832, 1015842628948463616, '张三', 1015818056597508096, 3, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018807443853676544, 1015842628948463616, '张三', 1015818056597508096, 3, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018807458953170944, 1015842628948463616, '张三', 1015818056597508096, 3, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:21:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018807471968096256, 1015842628948463616, '张三', 1015818056597508096, 3, 1, 0, NULL, NULL, NULL, NULL, 3, NULL, NULL, '2020-01-10 11:21:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018807475562614784, 1015842628948463616, '张三', 1015818056597508096, 3, 1, 0, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-10 11:21:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018807497494630400, 1015842628948463616, '张三', 1015818056597508096, 3, 0, 1, NULL, NULL, NULL, NULL, NULL, 546, NULL, '2020-01-10 11:21:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018807510580858880, 1015842628948463616, '张三', 1015818056597508096, 3, 0, 2, NULL, NULL, NULL, NULL, NULL, 797, NULL, '2020-01-10 11:22:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018807530558328832, 1015842628948463616, '张三', 1015818056597508096, 4, 0, 2, NULL, NULL, NULL, NULL, NULL, 668, NULL, '2020-01-10 11:22:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018807544810573824, 1015842628948463616, '张三', 1015818056597508096, 4, 0, 2, NULL, NULL, NULL, NULL, NULL, 98, NULL, '2020-01-10 11:22:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018807559650021376, 1015842628948463616, '张三', 1015818056597508096, 4, 1, 2, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-10 11:22:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018807565647876096, 1015842628948463616, '张三', 1015818056597508096, 4, 1, 2, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-10 11:22:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018807581548482560, 1015842628948463616, '张三', 1015818056597508096, 4, 1, 1, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-10 11:22:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018807596224352256, 1015842628948463616, '张三', 1015818056597508096, 4, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:22:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018807598866763776, 1015842628948463616, '张三', 1015818056597508096, 4, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:22:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018807614889005056, 1015842628948463616, '张三', 1015818056597508096, 4, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:22:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018807628856037376, 1015842628948463616, '张三', 1015818056597508096, 4, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:22:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018807632249229312, 1015842628948463616, '张三', 1015818056597508096, 4, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:22:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018807646891544576, 1015842628948463616, '张三', 1015818056597508096, 4, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:22:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018807659432513536, 1015842628948463616, '张三', 1015818056597508096, 4, 4, 0, 931, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:23:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018807675786104832, 1015842628948463616, '张三', 1015818056597508096, 4, 4, 1, 549, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:23:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018807693569953792, 1015842628948463616, '张三', 1015818056597508096, 4, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:23:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018807696216559616, 1015842628948463616, '张三', 1015818056597508096, 4, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:23:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018807710099705856, 1015842628948463616, '张三', 1015818056597508096, 4, 5, 2, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:23:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018807726746898432, 1015842628948463616, '张三', 1015818056597508096, 4, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-10 11:23:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018807743188570112, 1015842628948463616, '张三', 1015818056597508096, 4, 9, 0, NULL, 89, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:23:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018807747508703232, 1015842628948463616, '张三', 1015818056597508096, 4, 9, 0, NULL, 45, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:23:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018807762734026752, 1015842628948463616, '张三', 1015818056597508096, 4, 9, 1, NULL, 26, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:23:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018807779007926272, 1015842628948463616, '张三', 1015818056597508096, 4, 9, 2, NULL, 52, NULL, NULL, NULL, NULL, NULL, '2020-01-10 11:23:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018807795281825792, 1015842628948463616, '张三', 1015818056597508096, 4, 10, 2, NULL, NULL, 9, NULL, NULL, NULL, NULL, '2020-01-10 11:23:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018807814282022912, 1015842628948463616, '张三', 1015818056597508096, 4, 10, 1, NULL, NULL, 9, NULL, NULL, NULL, NULL, '2020-01-10 11:23:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018807818304360448, 1015842628948463616, '张三', 1015818056597508096, 4, 10, 1, NULL, NULL, 10, NULL, NULL, NULL, NULL, '2020-01-10 11:24:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018807839112302592, 1015842628948463616, '张三', 1015818056597508096, 4, 10, 0, NULL, NULL, 5, NULL, NULL, NULL, NULL, '2020-01-10 11:24:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018807937338707968, 1015852480873631744, '李军', 1015817732197453824, 1, 0, 0, NULL, NULL, NULL, NULL, NULL, 868, NULL, '2020-01-11 11:24:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018807958184398848, 1015852480873631744, '李军', 1015817732197453824, 1, 0, 1, NULL, NULL, NULL, NULL, NULL, 251, NULL, '2020-01-11 11:24:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018807973283893248, 1015852480873631744, '李军', 1015817732197453824, 1, 1, 1, NULL, NULL, NULL, NULL, 3, NULL, NULL, '2020-01-11 11:24:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018807976429621248, 1015852480873631744, '李军', 1015817732197453824, 1, 1, 1, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-11 11:24:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018807990446985216, 1015852480873631744, '李军', 1015817732197453824, 1, 1, 0, NULL, NULL, NULL, NULL, 5, NULL, NULL, '2020-01-11 11:24:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018808007266144256, 1015852480873631744, '李军', 1015817732197453824, 1, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:24:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018808010520924160, 1015852480873631744, '李军', 1015817732197453824, 1, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:24:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018808029248491520, 1015852480873631744, '李军', 1015817732197453824, 1, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:24:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018808046189285376, 1015852480873631744, '李军', 1015817732197453824, 1, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:24:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018808049536339968, 1015852480873631744, '李军', 1015817732197453824, 1, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:24:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018808063356571648, 1015852480873631744, '李军', 1015817732197453824, 1, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:25:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018808090606964736, 1015852480873631744, '李军', 1015817732197453824, 1, 4, 0, 331, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:25:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018808105442217984, 1015852480873631744, '李军', 1015817732197453824, 1, 4, 1, 180, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:25:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018808123947487232, 1015852480873631744, '李军', 1015817732197453824, 1, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:25:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018808139374137344, 1015852480873631744, '李军', 1015817732197453824, 1, 5, 2, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:25:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018808163239727104, 1015852480873631744, '李军', 1015817732197453824, 1, 9, 2, NULL, 73, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:25:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018808178884481024, 1015852480873631744, '李军', 1015817732197453824, 1, 9, 1, NULL, 85, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:25:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018808202037039104, 1015852480873631744, '李军', 1015817732197453824, 1, 9, 0, NULL, 58, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:25:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018808225227345920, 1015852480873631744, '李军', 1015817732197453824, 1, 10, 0, NULL, NULL, 3, NULL, NULL, NULL, NULL, '2020-01-11 11:25:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018808239072743424, 1015852480873631744, '李军', 1015817732197453824, 1, 10, 1, NULL, NULL, 10, NULL, NULL, NULL, NULL, '2020-01-11 11:25:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018808259285094400, 1015852480873631744, '李军', 1015817732197453824, 2, 10, 1, NULL, NULL, 6, NULL, NULL, NULL, NULL, '2020-01-11 11:25:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018808281019977728, 1015852480873631744, '李军', 1015817732197453824, 2, 10, 0, NULL, NULL, 6, NULL, NULL, NULL, NULL, '2020-01-11 11:25:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018808284450918400, 1015852480873631744, '李军', 1015817732197453824, 2, 10, 0, NULL, NULL, 8, NULL, NULL, NULL, NULL, '2020-01-11 11:26:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018808301647564800, 1015852480873631744, '李军', 1015817732197453824, 2, 9, 0, NULL, 44, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018808305003008000, 1015852480873631744, '李军', 1015817732197453824, 2, 9, 0, NULL, 98, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018808319687266304, 1015852480873631744, '李军', 1015817732197453824, 2, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:26:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018808334279249920, 1015852480873631744, '李军', 1015817732197453824, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:26:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018808337051684864, 1015852480873631744, '李军', 1015817732197453824, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:26:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018808352482529280, 1015852480873631744, '李军', 1015817732197453824, 2, 4, 1, 829, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018808368341192704, 1015852480873631744, '李军', 1015817732197453824, 2, 4, 2, 143, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018808371201708032, 1015852480873631744, '李军', 1015817732197453824, 2, 4, 2, 727, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018808386959708160, 1015852480873631744, '李军', 1015817732197453824, 2, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018808389941858304, 1015852480873631744, '李军', 1015817732197453824, 2, 3, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018808403061641216, 1015852480873631744, '李军', 1015817732197453824, 2, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:26:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018808417364217856, 1015852480873631744, '李军', 1015817732197453824, 2, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:27:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018808431247364096, 1015852480873631744, '李军', 1015817732197453824, 2, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:27:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018808434900602880, 1015852480873631744, '李军', 1015817732197453824, 2, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:27:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018808450344030208, 1015852480873631744, '李军', 1015817732197453824, 2, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:27:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018808468366954496, 1015852480873631744, '李军', 1015817732197453824, 2, 1, 0, NULL, NULL, NULL, NULL, 1, NULL, NULL, '2020-01-11 11:27:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018808471776923648, 1015852480873631744, '李军', 1015817732197453824, 2, 1, 0, NULL, NULL, NULL, NULL, 1, NULL, NULL, '2020-01-11 11:27:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018808486574428160, 1015852480873631744, '李军', 1015817732197453824, 2, 1, 1, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-11 11:27:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018808489720156160, 1015852480873631744, '李军', 1015817732197453824, 2, 1, 1, NULL, NULL, NULL, NULL, 1, NULL, NULL, '2020-01-11 11:27:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018808519092867072, 1015852480873631744, '李军', 1015817732197453824, 2, 0, 1, NULL, NULL, NULL, NULL, NULL, 23, NULL, '2020-01-11 11:27:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018808533722599424, 1015852480873631744, '李军', 1015817732197453824, 2, 0, 0, NULL, NULL, NULL, NULL, NULL, 486, NULL, '2020-01-11 11:27:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018808549908418560, 1015852480873631744, '李军', 1015817732197453824, 3, 0, 0, NULL, NULL, NULL, NULL, NULL, 937, NULL, '2020-01-11 11:27:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018808553595211776, 1015852480873631744, '李军', 1015817732197453824, 3, 0, 0, NULL, NULL, NULL, NULL, NULL, 634, NULL, '2020-01-11 11:27:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018808567696461824, 1015852480873631744, '李军', 1015817732197453824, 3, 1, 0, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-11 11:28:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018808589381013504, 1015852480873631744, '李军', 1015817732197453824, 3, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018808603381600256, 1015852480873631744, '李军', 1015817732197453824, 3, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018808627708563456, 1015852853839532032, '王石', 1015817732197453824, 3, 2, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018808643911159808, 1015852853839532032, '王石', 1015817732197453824, 3, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018808647878971392, 1015852853839532032, '王石', 1015817732197453824, 3, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018808662647115776, 1015852853839532032, '王石', 1015817732197453824, 3, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018808676190523392, 1015852853839532032, '王石', 1015817732197453824, 3, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:28:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018808679671795712, 1015852853839532032, '王石', 1015817732197453824, 3, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:28:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018808713146535936, 1015841864515588096, '张大', 1015817732197453824, 3, 5, 2, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:28:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018808727696576512, 1015841864515588096, '张大', 1015817732197453824, 3, 9, 2, NULL, 93, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018808730968133632, 1015841864515588096, '张大', 1015817732197453824, 3, 9, 2, NULL, 39, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:28:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018808745056800768, 1015841864515588096, '张大', 1015817732197453824, 3, 9, 0, NULL, 26, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:29:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018808762224087040, 1015841864515588096, '张大', 1015817732197453824, 3, 10, 0, NULL, NULL, 4, NULL, NULL, NULL, NULL, '2020-01-11 11:29:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018808766552608768, 1015841864515588096, '张大', 1015817732197453824, 3, 10, 0, NULL, NULL, 7, NULL, NULL, NULL, NULL, '2020-01-11 11:29:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018808834777157632, 1015841864515588096, '张大', 1015818056597508096, 2, 10, 0, NULL, NULL, 8, NULL, NULL, NULL, NULL, '2020-01-11 11:29:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018808837880942592, 1015841864515588096, '张大', 1015818056597508096, 2, 10, 0, NULL, NULL, 7, NULL, NULL, NULL, NULL, '2020-01-11 11:29:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018808852263211008, 1015841864515588096, '张大', 1015818056597508096, 2, 5, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:29:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018808870055448576, 1015841864515588096, '张大', 1015818056597508096, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:29:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018808872664305664, 1015841864515588096, '张大', 1015818056597508096, 2, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:29:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018808889886117888, 1015841864515588096, '张大', 1015818056597508096, 2, 3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:29:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018808905585397760, 1015841864515588096, '张大', 1015818056597508096, 2, 4, 1, 756, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:29:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018808924665286656, 1015841864515588096, '张大', 1015818056597508096, 2, 4, 2, 35, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:29:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018808927844569088, 1015841864515588096, '张大', 1015818056597508096, 2, 4, 2, 489, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:29:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018808941014683648, 1015841864515588096, '张大', 1015818056597508096, 2, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:30:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018808944089108480, 1015841864515588096, '张大', 1015818056597508096, 2, 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:30:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018808963789754368, 1015841864515588096, '张大', 1015818056597508096, 2, 0, 2, NULL, NULL, NULL, NULL, NULL, 342, NULL, '2020-01-11 11:30:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018808967061311488, 1015841864515588096, '张大', 1015818056597508096, 2, 0, 2, NULL, NULL, NULL, NULL, NULL, 894, NULL, '2020-01-11 11:30:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018808971549216768, 1015841864515588096, '张大', 1015818056597508096, 2, 0, 2, NULL, NULL, NULL, NULL, NULL, 505, NULL, '2020-01-11 11:30:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018809014373060608, 1015841864515588096, '张大', 1015818056597508096, 3, 0, 2, NULL, NULL, NULL, NULL, NULL, 870, NULL, '2020-01-11 11:30:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018809017279713280, 1015841864515588096, '张大', 1015818056597508096, 3, 0, 2, NULL, NULL, NULL, NULL, NULL, 832, NULL, '2020-01-11 11:30:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018809030013620224, 1015841864515588096, '张大', 1015818056597508096, 3, 1, 2, NULL, NULL, NULL, NULL, 1, NULL, NULL, '2020-01-11 11:30:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018809043577999360, 1015841864515588096, '张大', 1015818056597508096, 3, 1, 0, NULL, NULL, NULL, NULL, 2, NULL, NULL, '2020-01-11 11:30:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018809058333560832, 1015841864515588096, '张大', 1015818056597508096, 3, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:30:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018809068521525248, 1015841864515588096, '张大', 1015818056597508096, 3, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:30:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018809083839123456, 1015841864515588096, '张大', 1015818056597508096, 3, 4, 0, 484, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:30:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018809101107073024, 1015841864515588096, '张大', 1015818056597508096, 3, 4, 1, 822, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:31:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018809116709883904, 1015841864515588096, '张大', 1015818056597508096, 3, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:31:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018809119352295424, 1015841864515588096, '张大', 1015818056597508096, 3, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:31:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018809140072157184, 1015841864515588096, '张大', 1015818056597508096, 3, 9, 1, NULL, 92, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:31:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018809153410043904, 1015841864515588096, '张大', 1015818056597508096, 3, 9, 0, NULL, 23, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:31:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018809156404776960, 1015841864515588096, '张大', 1015818056597508096, 3, 9, 0, NULL, 61, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:31:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018809187635564544, 1015841864515588096, '张大', 1015818056597508096, 4, 9, 0, NULL, 26, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:31:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018809205096452096, 1015841864515588096, '张大', 1015818056597508096, 4, 9, 1, NULL, 96, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:31:35');
-INSERT INTO `zz_student_action_trans` VALUES (1018809219889762304, 1015841864515588096, '张大', 1015818056597508096, 4, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:31:40');
-INSERT INTO `zz_student_action_trans` VALUES (1018809223115182080, 1015841864515588096, '张大', 1015818056597508096, 4, 5, 1, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2020-01-11 11:31:45');
-INSERT INTO `zz_student_action_trans` VALUES (1018809241318461440, 1015841864515588096, '张大', 1015818056597508096, 4, 10, 1, NULL, NULL, 4, NULL, NULL, NULL, NULL, '2020-01-11 11:31:50');
-INSERT INTO `zz_student_action_trans` VALUES (1018809244799733760, 1015841864515588096, '张大', 1015818056597508096, 4, 10, 1, NULL, NULL, 5, NULL, NULL, NULL, NULL, '2020-01-11 11:31:55');
-INSERT INTO `zz_student_action_trans` VALUES (1018809259483992064, 1015841864515588096, '张大', 1015818056597508096, 4, 4, 1, 244, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:32:00');
-INSERT INTO `zz_student_action_trans` VALUES (1018809272926736384, 1015841864515588096, '张大', 1015818056597508096, 4, 4, 0, 736, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:32:05');
-INSERT INTO `zz_student_action_trans` VALUES (1018809275388792832, 1015841864515588096, '张大', 1015818056597508096, 4, 4, 0, 230, NULL, NULL, NULL, NULL, NULL, NULL, '2020-01-11 11:32:10');
-INSERT INTO `zz_student_action_trans` VALUES (1018809289016086528, 1015841864515588096, '张大', 1015818056597508096, 4, 1, 0, NULL, NULL, NULL, NULL, 3, NULL, NULL, '2020-01-11 11:32:15');
-INSERT INTO `zz_student_action_trans` VALUES (1018809291985653760, 1015841864515588096, '张大', 1015818056597508096, 4, 1, 0, NULL, NULL, NULL, NULL, 4, NULL, NULL, '2020-01-11 11:32:20');
-INSERT INTO `zz_student_action_trans` VALUES (1018809313879920640, 1015841864515588096, '张大', 1015818056597508096, 4, 0, 0, NULL, NULL, NULL, NULL, NULL, 441, NULL, '2020-01-11 11:32:25');
-INSERT INTO `zz_student_action_trans` VALUES (1018809333760921600, 1015841864515588096, '张大', 1015818056597508096, 4, 0, 1, NULL, NULL, NULL, NULL, NULL, 202, NULL, '2020-01-11 11:32:30');
-INSERT INTO `zz_student_action_trans` VALUES (1018809347316912128, 1015841864515588096, '张大', 1015818056597508096, 4, 0, 2, NULL, NULL, NULL, NULL, NULL, 614, NULL, '2020-01-11 11:32:35');
-COMMIT;
-
--- ----------------------------
--- Table structure for zz_sys_user
--- ----------------------------
-DROP TABLE IF EXISTS `zz_sys_user`;
-CREATE TABLE `zz_sys_user` (
- `user_id` bigint(20) NOT NULL COMMENT '主键Id',
- `login_name` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '用户登录名称',
- `password` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '密码',
- `show_name` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '用户显示名称',
- `user_type` int(11) NOT NULL COMMENT '用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)',
- `head_image_url` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户头像的Url',
- `user_status` int(11) NOT NULL COMMENT '状态(0: 正常 1: 锁定)',
- `create_user_id` bigint(20) NOT NULL COMMENT '创建者',
- `create_username` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '创建用户名',
- `create_time` datetime NOT NULL COMMENT '创建时间',
- `update_time` datetime NOT NULL COMMENT '最后更新时间',
- `deleted_flag` int(11) NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
- PRIMARY KEY (`user_id`) USING BTREE,
- UNIQUE KEY `uk_login_name` (`login_name`) USING BTREE,
- KEY `idx_status` (`user_status`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='系统用户表';
-
--- ----------------------------
--- Records of zz_sys_user
--- ----------------------------
-BEGIN;
-INSERT INTO `zz_sys_user` VALUES (1317453102294503425, 'admin', '$2a$10$xBslnuRm.kzZ3aYbMB/HPe3cdYp1LWQFXGxXadbPkePg2TeVu.EWy', '管理员', 0, 'CHANGE TO YOUR HEAD IMAGE URL!!!', 0, 1317453102294503425, '管理员', '2020-10-17 00:00:00', '2020-10-17 00:00:00', 1);
-INSERT INTO `zz_sys_user` VALUES (1317455515172737024, '111', '$2a$10$oiJwJAALeSAsphcCmZYHcOuiq4fvcNZ3Av8JCSpmHWfYQESbQZeqe', '111', 2, NULL, 0, 1317453102294503425, '管理员', '2020-10-17 21:20:47', '2020-10-17 21:20:50', -1);
-COMMIT;
-
SET FOREIGN_KEY_CHECKS = 1;
diff --git a/orange-demo-single-service-for-app/zz-resource/db-scripts/upms-script.sql b/orange-demo-single-service-for-app/zz-resource/db-scripts/upms-script.sql
new file mode 100644
index 00000000..9fdd27bc
--- /dev/null
+++ b/orange-demo-single-service-for-app/zz-resource/db-scripts/upms-script.sql
@@ -0,0 +1,39 @@
+
+-- ----------------------------
+-- 请仅在下面的数据库链接中执行该脚本。
+-- 主数据源 [localhost:3306/zzdemo-single]
+-- ----------------------------
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- 系统用户表
+-- ----------------------------
+DROP TABLE IF EXISTS `zz_sys_user`;
+CREATE TABLE `zz_sys_user` (
+ `user_id` bigint(20) NOT NULL COMMENT '主键Id',
+ `login_name` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '用户登录名称',
+ `password` varchar(64) COLLATE utf8mb4_bin NOT NULL COMMENT '密码',
+ `show_name` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '用户显示名称',
+ `user_type` int(11) NOT NULL COMMENT '用户类型(0: 管理员 1: 系统管理用户 2: 系统业务用户)',
+ `head_image_url` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户头像的Url',
+ `user_status` int(11) NOT NULL COMMENT '状态(0: 正常 1: 锁定)',
+ `create_user_id` bigint(20) NOT NULL COMMENT '创建者Id',
+ `create_time` datetime NOT NULL COMMENT '创建时间',
+ `update_user_id` bigint(20) NOT NULL COMMENT '更新者Id',
+ `update_time` datetime NOT NULL COMMENT '最后更新时间',
+ `deleted_flag` int(11) NOT NULL COMMENT '删除标记(1: 正常 -1: 已删除)',
+ PRIMARY KEY (`user_id`) USING BTREE,
+ UNIQUE KEY `uk_login_name` (`login_name`) USING BTREE,
+ KEY `idx_status` (`user_status`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT COMMENT='系统用户表';
+
+-- ----------------------------
+-- 管理员账号数据
+-- ----------------------------
+BEGIN;
+INSERT INTO `zz_sys_user` VALUES(1356949260217618433,'admin','$2a$10$kgLilf1w72o13TJJYefgH.ZZuqrxh4PYinBvl5wrrcao7ZCm5Rh.i','管理员',0,'CHANGE TO YOUR HEAD IMAGE URL!!!',0,1356949260217618433,CURDATE(),1356949260217618433,CURDATE(),1);
+COMMIT;
+
+SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
diff --git a/orange-demo-single-service-for-app/zz-resource/docker-files/docker-compose.yml b/orange-demo-single-service-for-app/zz-resource/docker-files/docker-compose.yml
new file mode 100644
index 00000000..94903d49
--- /dev/null
+++ b/orange-demo-single-service-for-app/zz-resource/docker-files/docker-compose.yml
@@ -0,0 +1,16 @@
+version: '3.2'
+
+services:
+
+ redis:
+ container_name: redis
+ build:
+ context: services/redis/
+ args:
+ - REDIS_VER=4
+ ports:
+ - "6379:6379"
+ volumes:
+ - ./services/redis/redis.conf:/usr/local/etc/redis/redis.conf:rw
+ - ./data/redis:/data:rw
+ - ./logs/redis:/var/log/:rw
diff --git a/orange-demo-single-service-for-app/zz-resource/docker-files/services/redis/Dockerfile b/orange-demo-single-service-for-app/zz-resource/docker-files/services/redis/Dockerfile
new file mode 100644
index 00000000..924bd9d6
--- /dev/null
+++ b/orange-demo-single-service-for-app/zz-resource/docker-files/services/redis/Dockerfile
@@ -0,0 +1,13 @@
+ARG REDIS_VER
+
+FROM redis:${REDIS_VER}
+
+COPY redis.conf /usr/local/etc/redis/redis.conf
+CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
+
+# 设置时区为上海
+ENV TZ=Asia/Shanghai
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+# Ubuntu软件源选择中国的服务器
+RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
\ No newline at end of file
diff --git a/orange-demo-single-service-for-app/zz-resource/docker-files/services/redis/redis.conf b/orange-demo-single-service-for-app/zz-resource/docker-files/services/redis/redis.conf
new file mode 100644
index 00000000..2eecfa5a
--- /dev/null
+++ b/orange-demo-single-service-for-app/zz-resource/docker-files/services/redis/redis.conf
@@ -0,0 +1,1307 @@
+# Redis configuration file example.
+#
+# Note that in order to read the configuration file, Redis must be
+# started with the file path as first argument:
+#
+# ./redis-server /path/to/redis.conf
+
+# Note on units: when memory size is needed, it is possible to specify
+# it in the usual form of 1k 5GB 4M and so forth:
+#
+# 1k => 1000 bytes
+# 1kb => 1024 bytes
+# 1m => 1000000 bytes
+# 1mb => 1024*1024 bytes
+# 1g => 1000000000 bytes
+# 1gb => 1024*1024*1024 bytes
+#
+# units are case insensitive so 1GB 1Gb 1gB are all the same.
+
+################################## INCLUDES ###################################
+
+# Include one or more other config files here. This is useful if you
+# have a standard template that goes to all Redis servers but also need
+# to customize a few per-server settings. Include files can include
+# other files, so use this wisely.
+#
+# Notice option "include" won't be rewritten by command "CONFIG REWRITE"
+# from admin or Redis Sentinel. Since Redis always uses the last processed
+# line as value of a configuration directive, you'd better put includes
+# at the beginning of this file to avoid overwriting config change at runtime.
+#
+# If instead you are interested in using includes to override configuration
+# options, it is better to use include as the last line.
+#
+# include /path/to/local.conf
+# include /path/to/other.conf
+
+################################## MODULES #####################################
+
+# Load modules at startup. If the server is not able to load modules
+# it will abort. It is possible to use multiple loadmodule directives.
+#
+# loadmodule /path/to/my_module.so
+# loadmodule /path/to/other_module.so
+
+################################## NETWORK #####################################
+
+# By default, if no "bind" configuration directive is specified, Redis listens
+# for connections from all the network interfaces available on the server.
+# It is possible to listen to just one or multiple selected interfaces using
+# the "bind" configuration directive, followed by one or more IP addresses.
+#
+# Examples:
+#
+# bind 192.168.1.100 10.0.0.1
+# bind 127.0.0.1 ::1
+#
+# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
+# internet, binding to all the interfaces is dangerous and will expose the
+# instance to everybody on the internet. So by default we uncomment the
+# following bind directive, that will force Redis to listen only into
+# the IPv4 lookback interface address (this means Redis will be able to
+# accept connections only from clients running into the same computer it
+# is running).
+#
+# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
+# JUST COMMENT THE FOLLOWING LINE.
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+bind 0.0.0.0
+
+# Protected mode is a layer of security protection, in order to avoid that
+# Redis instances left open on the internet are accessed and exploited.
+#
+# When protected mode is on and if:
+#
+# 1) The server is not binding explicitly to a set of addresses using the
+# "bind" directive.
+# 2) No password is configured.
+#
+# The server only accepts connections from clients connecting from the
+# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain
+# sockets.
+#
+# By default protected mode is enabled. You should disable it only if
+# you are sure you want clients from other hosts to connect to Redis
+# even if no authentication is configured, nor a specific set of interfaces
+# are explicitly listed using the "bind" directive.
+protected-mode yes
+
+# Accept connections on the specified port, default is 6379 (IANA #815344).
+# If port 0 is specified Redis will not listen on a TCP socket.
+port 6379
+
+# TCP listen() backlog.
+#
+# In high requests-per-second environments you need an high backlog in order
+# to avoid slow clients connections issues. Note that the Linux kernel
+# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
+# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
+# in order to get the desired effect.
+tcp-backlog 511
+
+# Unix socket.
+#
+# Specify the path for the Unix socket that will be used to listen for
+# incoming connections. There is no default, so Redis will not listen
+# on a unix socket when not specified.
+#
+# unixsocket /tmp/redis.sock
+# unixsocketperm 700
+
+# Close the connection after a client is idle for N seconds (0 to disable)
+timeout 0
+
+# TCP keepalive.
+#
+# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
+# of communication. This is useful for two reasons:
+#
+# 1) Detect dead peers.
+# 2) Take the connection alive from the point of view of network
+# equipment in the middle.
+#
+# On Linux, the specified value (in seconds) is the period used to send ACKs.
+# Note that to close the connection the double of the time is needed.
+# On other kernels the period depends on the kernel configuration.
+#
+# A reasonable value for this option is 300 seconds, which is the new
+# Redis default starting with Redis 3.2.1.
+tcp-keepalive 300
+
+################################# GENERAL #####################################
+
+# By default Redis does not run as a daemon. Use 'yes' if you need it.
+# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
+daemonize no
+
+# If you run Redis from upstart or systemd, Redis can interact with your
+# supervision tree. Options:
+# supervised no - no supervision interaction
+# supervised upstart - signal upstart by putting Redis into SIGSTOP mode
+# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
+# supervised auto - detect upstart or systemd method based on
+# UPSTART_JOB or NOTIFY_SOCKET environment variables
+# Note: these supervision methods only signal "process is ready."
+# They do not enable continuous liveness pings back to your supervisor.
+supervised no
+
+# If a pid file is specified, Redis writes it where specified at startup
+# and removes it at exit.
+#
+# When the server runs non daemonized, no pid file is created if none is
+# specified in the configuration. When the server is daemonized, the pid file
+# is used even if not specified, defaulting to "/var/run/redis.pid".
+#
+# Creating a pid file is best effort: if Redis is not able to create it
+# nothing bad happens, the server will start and run normally.
+pidfile /var/run/redis_6379.pid
+
+# Specify the server verbosity level.
+# This can be one of:
+# debug (a lot of information, useful for development/testing)
+# verbose (many rarely useful info, but not a mess like the debug level)
+# notice (moderately verbose, what you want in production probably)
+# warning (only very important / critical messages are logged)
+loglevel notice
+
+# Specify the log file name. Also the empty string can be used to force
+# Redis to log on the standard output. Note that if you use standard
+# output for logging but daemonize, logs will be sent to /dev/null
+logfile /var/log/redis_6379.log
+
+# To enable logging to the system logger, just set 'syslog-enabled' to yes,
+# and optionally update the other syslog parameters to suit your needs.
+# syslog-enabled no
+
+# Specify the syslog identity.
+# syslog-ident redis
+
+# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
+# syslog-facility local0
+
+# Set the number of databases. The default database is DB 0, you can select
+# a different one on a per-connection basis using SELECT where
+# dbid is a number between 0 and 'databases'-1
+databases 16
+
+# By default Redis shows an ASCII art logo only when started to log to the
+# standard output and if the standard output is a TTY. Basically this means
+# that normally a logo is displayed only in interactive sessions.
+#
+# However it is possible to force the pre-4.0 behavior and always show a
+# ASCII art logo in startup logs by setting the following option to yes.
+always-show-logo yes
+
+################################ SNAPSHOTTING ################################
+#
+# Save the DB on disk:
+#
+# save
+#
+# Will save the DB if both the given number of seconds and the given
+# number of write operations against the DB occurred.
+#
+# In the example below the behaviour will be to save:
+# after 900 sec (15 min) if at least 1 key changed
+# after 300 sec (5 min) if at least 10 keys changed
+# after 60 sec if at least 10000 keys changed
+#
+# Note: you can disable saving completely by commenting out all "save" lines.
+#
+# It is also possible to remove all the previously configured save
+# points by adding a save directive with a single empty string argument
+# like in the following example:
+#
+# save ""
+
+save 900 1
+save 300 10
+save 60 10000
+
+# By default Redis will stop accepting writes if RDB snapshots are enabled
+# (at least one save point) and the latest background save failed.
+# This will make the user aware (in a hard way) that data is not persisting
+# on disk properly, otherwise chances are that no one will notice and some
+# disaster will happen.
+#
+# If the background saving process will start working again Redis will
+# automatically allow writes again.
+#
+# However if you have setup your proper monitoring of the Redis server
+# and persistence, you may want to disable this feature so that Redis will
+# continue to work as usual even if there are problems with disk,
+# permissions, and so forth.
+stop-writes-on-bgsave-error yes
+
+# Compress string objects using LZF when dump .rdb databases?
+# For default that's set to 'yes' as it's almost always a win.
+# If you want to save some CPU in the saving child set it to 'no' but
+# the dataset will likely be bigger if you have compressible values or keys.
+rdbcompression yes
+
+# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
+# This makes the format more resistant to corruption but there is a performance
+# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
+# for maximum performances.
+#
+# RDB files created with checksum disabled have a checksum of zero that will
+# tell the loading code to skip the check.
+rdbchecksum yes
+
+# The filename where to dump the DB
+dbfilename dump.rdb
+
+# The working directory.
+#
+# The DB will be written inside this directory, with the filename specified
+# above using the 'dbfilename' configuration directive.
+#
+# The Append Only File will also be created inside this directory.
+#
+# Note that you must specify a directory here, not a file name.
+dir ./
+
+################################# REPLICATION #################################
+
+# Master-Slave replication. Use slaveof to make a Redis instance a copy of
+# another Redis server. A few things to understand ASAP about Redis replication.
+#
+# 1) Redis replication is asynchronous, but you can configure a master to
+# stop accepting writes if it appears to be not connected with at least
+# a given number of slaves.
+# 2) Redis slaves are able to perform a partial resynchronization with the
+# master if the replication link is lost for a relatively small amount of
+# time. You may want to configure the replication backlog size (see the next
+# sections of this file) with a sensible value depending on your needs.
+# 3) Replication is automatic and does not need user intervention. After a
+# network partition slaves automatically try to reconnect to masters
+# and resynchronize with them.
+#
+# slaveof
+
+# If the master is password protected (using the "requirepass" configuration
+# directive below) it is possible to tell the slave to authenticate before
+# starting the replication synchronization process, otherwise the master will
+# refuse the slave request.
+#
+# masterauth
+
+# When a slave loses its connection with the master, or when the replication
+# is still in progress, the slave can act in two different ways:
+#
+# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will
+# still reply to client requests, possibly with out of date data, or the
+# data set may just be empty if this is the first synchronization.
+#
+# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
+# an error "SYNC with master in progress" to all the kind of commands
+# but to INFO and SLAVEOF.
+#
+slave-serve-stale-data yes
+
+# You can configure a slave instance to accept writes or not. Writing against
+# a slave instance may be useful to store some ephemeral data (because data
+# written on a slave will be easily deleted after resync with the master) but
+# may also cause problems if clients are writing to it because of a
+# misconfiguration.
+#
+# Since Redis 2.6 by default slaves are read-only.
+#
+# Note: read only slaves are not designed to be exposed to untrusted clients
+# on the internet. It's just a protection layer against misuse of the instance.
+# Still a read only slave exports by default all the administrative commands
+# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
+# security of read only slaves using 'rename-command' to shadow all the
+# administrative / dangerous commands.
+slave-read-only yes
+
+# Replication SYNC strategy: disk or socket.
+#
+# -------------------------------------------------------
+# WARNING: DISKLESS REPLICATION IS EXPERIMENTAL CURRENTLY
+# -------------------------------------------------------
+#
+# New slaves and reconnecting slaves that are not able to continue the replication
+# process just receiving differences, need to do what is called a "full
+# synchronization". An RDB file is transmitted from the master to the slaves.
+# The transmission can happen in two different ways:
+#
+# 1) Disk-backed: The Redis master creates a new process that writes the RDB
+# file on disk. Later the file is transferred by the parent
+# process to the slaves incrementally.
+# 2) Diskless: The Redis master creates a new process that directly writes the
+# RDB file to slave sockets, without touching the disk at all.
+#
+# With disk-backed replication, while the RDB file is generated, more slaves
+# can be queued and served with the RDB file as soon as the current child producing
+# the RDB file finishes its work. With diskless replication instead once
+# the transfer starts, new slaves arriving will be queued and a new transfer
+# will start when the current one terminates.
+#
+# When diskless replication is used, the master waits a configurable amount of
+# time (in seconds) before starting the transfer in the hope that multiple slaves
+# will arrive and the transfer can be parallelized.
+#
+# With slow disks and fast (large bandwidth) networks, diskless replication
+# works better.
+repl-diskless-sync no
+
+# When diskless replication is enabled, it is possible to configure the delay
+# the server waits in order to spawn the child that transfers the RDB via socket
+# to the slaves.
+#
+# This is important since once the transfer starts, it is not possible to serve
+# new slaves arriving, that will be queued for the next RDB transfer, so the server
+# waits a delay in order to let more slaves arrive.
+#
+# The delay is specified in seconds, and by default is 5 seconds. To disable
+# it entirely just set it to 0 seconds and the transfer will start ASAP.
+repl-diskless-sync-delay 5
+
+# Slaves send PINGs to server in a predefined interval. It's possible to change
+# this interval with the repl_ping_slave_period option. The default value is 10
+# seconds.
+#
+# repl-ping-slave-period 10
+
+# The following option sets the replication timeout for:
+#
+# 1) Bulk transfer I/O during SYNC, from the point of view of slave.
+# 2) Master timeout from the point of view of slaves (data, pings).
+# 3) Slave timeout from the point of view of masters (REPLCONF ACK pings).
+#
+# It is important to make sure that this value is greater than the value
+# specified for repl-ping-slave-period otherwise a timeout will be detected
+# every time there is low traffic between the master and the slave.
+#
+# repl-timeout 60
+
+# Disable TCP_NODELAY on the slave socket after SYNC?
+#
+# If you select "yes" Redis will use a smaller number of TCP packets and
+# less bandwidth to send data to slaves. But this can add a delay for
+# the data to appear on the slave side, up to 40 milliseconds with
+# Linux kernels using a default configuration.
+#
+# If you select "no" the delay for data to appear on the slave side will
+# be reduced but more bandwidth will be used for replication.
+#
+# By default we optimize for low latency, but in very high traffic conditions
+# or when the master and slaves are many hops away, turning this to "yes" may
+# be a good idea.
+repl-disable-tcp-nodelay no
+
+# Set the replication backlog size. The backlog is a buffer that accumulates
+# slave data when slaves are disconnected for some time, so that when a slave
+# wants to reconnect again, often a full resync is not needed, but a partial
+# resync is enough, just passing the portion of data the slave missed while
+# disconnected.
+#
+# The bigger the replication backlog, the longer the time the slave can be
+# disconnected and later be able to perform a partial resynchronization.
+#
+# The backlog is only allocated once there is at least a slave connected.
+#
+# repl-backlog-size 1mb
+
+# After a master has no longer connected slaves for some time, the backlog
+# will be freed. The following option configures the amount of seconds that
+# need to elapse, starting from the time the last slave disconnected, for
+# the backlog buffer to be freed.
+#
+# Note that slaves never free the backlog for timeout, since they may be
+# promoted to masters later, and should be able to correctly "partially
+# resynchronize" with the slaves: hence they should always accumulate backlog.
+#
+# A value of 0 means to never release the backlog.
+#
+# repl-backlog-ttl 3600
+
+# The slave priority is an integer number published by Redis in the INFO output.
+# It is used by Redis Sentinel in order to select a slave to promote into a
+# master if the master is no longer working correctly.
+#
+# A slave with a low priority number is considered better for promotion, so
+# for instance if there are three slaves with priority 10, 100, 25 Sentinel will
+# pick the one with priority 10, that is the lowest.
+#
+# However a special priority of 0 marks the slave as not able to perform the
+# role of master, so a slave with priority of 0 will never be selected by
+# Redis Sentinel for promotion.
+#
+# By default the priority is 100.
+slave-priority 100
+
+# It is possible for a master to stop accepting writes if there are less than
+# N slaves connected, having a lag less or equal than M seconds.
+#
+# The N slaves need to be in "online" state.
+#
+# The lag in seconds, that must be <= the specified value, is calculated from
+# the last ping received from the slave, that is usually sent every second.
+#
+# This option does not GUARANTEE that N replicas will accept the write, but
+# will limit the window of exposure for lost writes in case not enough slaves
+# are available, to the specified number of seconds.
+#
+# For example to require at least 3 slaves with a lag <= 10 seconds use:
+#
+# min-slaves-to-write 3
+# min-slaves-max-lag 10
+#
+# Setting one or the other to 0 disables the feature.
+#
+# By default min-slaves-to-write is set to 0 (feature disabled) and
+# min-slaves-max-lag is set to 10.
+
+# A Redis master is able to list the address and port of the attached
+# slaves in different ways. For example the "INFO replication" section
+# offers this information, which is used, among other tools, by
+# Redis Sentinel in order to discover slave instances.
+# Another place where this info is available is in the output of the
+# "ROLE" command of a master.
+#
+# The listed IP and address normally reported by a slave is obtained
+# in the following way:
+#
+# IP: The address is auto detected by checking the peer address
+# of the socket used by the slave to connect with the master.
+#
+# Port: The port is communicated by the slave during the replication
+# handshake, and is normally the port that the slave is using to
+# list for connections.
+#
+# However when port forwarding or Network Address Translation (NAT) is
+# used, the slave may be actually reachable via different IP and port
+# pairs. The following two options can be used by a slave in order to
+# report to its master a specific set of IP and port, so that both INFO
+# and ROLE will report those values.
+#
+# There is no need to use both the options if you need to override just
+# the port or the IP address.
+#
+# slave-announce-ip 5.5.5.5
+# slave-announce-port 1234
+
+################################## SECURITY ###################################
+
+# Require clients to issue AUTH before processing any other
+# commands. This might be useful in environments in which you do not trust
+# others with access to the host running redis-server.
+#
+# This should stay commented out for backward compatibility and because most
+# people do not need auth (e.g. they run their own servers).
+#
+# Warning: since Redis is pretty fast an outside user can try up to
+# 150k passwords per second against a good box. This means that you should
+# use a very strong password otherwise it will be very easy to break.
+#
+# requirepass foobared
+
+# Command renaming.
+#
+# It is possible to change the name of dangerous commands in a shared
+# environment. For instance the CONFIG command may be renamed into something
+# hard to guess so that it will still be available for internal-use tools
+# but not available for general clients.
+#
+# Example:
+#
+# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52
+#
+# It is also possible to completely kill a command by renaming it into
+# an empty string:
+#
+# rename-command CONFIG ""
+#
+# Please note that changing the name of commands that are logged into the
+# AOF file or transmitted to slaves may cause problems.
+
+################################### CLIENTS ####################################
+
+# Set the max number of connected clients at the same time. By default
+# this limit is set to 10000 clients, however if the Redis server is not
+# able to configure the process file limit to allow for the specified limit
+# the max number of allowed clients is set to the current file limit
+# minus 32 (as Redis reserves a few file descriptors for internal uses).
+#
+# Once the limit is reached Redis will close all the new connections sending
+# an error 'max number of clients reached'.
+#
+# maxclients 10000
+
+############################## MEMORY MANAGEMENT ################################
+
+# Set a memory usage limit to the specified amount of bytes.
+# When the memory limit is reached Redis will try to remove keys
+# according to the eviction policy selected (see maxmemory-policy).
+#
+# If Redis can't remove keys according to the policy, or if the policy is
+# set to 'noeviction', Redis will start to reply with errors to commands
+# that would use more memory, like SET, LPUSH, and so on, and will continue
+# to reply to read-only commands like GET.
+#
+# This option is usually useful when using Redis as an LRU or LFU cache, or to
+# set a hard memory limit for an instance (using the 'noeviction' policy).
+#
+# WARNING: If you have slaves attached to an instance with maxmemory on,
+# the size of the output buffers needed to feed the slaves are subtracted
+# from the used memory count, so that network problems / resyncs will
+# not trigger a loop where keys are evicted, and in turn the output
+# buffer of slaves is full with DELs of keys evicted triggering the deletion
+# of more keys, and so forth until the database is completely emptied.
+#
+# In short... if you have slaves attached it is suggested that you set a lower
+# limit for maxmemory so that there is some free RAM on the system for slave
+# output buffers (but this is not needed if the policy is 'noeviction').
+#
+# maxmemory
+
+# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
+# is reached. You can select among five behaviors:
+#
+# volatile-lru -> Evict using approximated LRU among the keys with an expire set.
+# allkeys-lru -> Evict any key using approximated LRU.
+# volatile-lfu -> Evict using approximated LFU among the keys with an expire set.
+# allkeys-lfu -> Evict any key using approximated LFU.
+# volatile-random -> Remove a random key among the ones with an expire set.
+# allkeys-random -> Remove a random key, any key.
+# volatile-ttl -> Remove the key with the nearest expire time (minor TTL)
+# noeviction -> Don't evict anything, just return an error on write operations.
+#
+# LRU means Least Recently Used
+# LFU means Least Frequently Used
+#
+# Both LRU, LFU and volatile-ttl are implemented using approximated
+# randomized algorithms.
+#
+# Note: with any of the above policies, Redis will return an error on write
+# operations, when there are no suitable keys for eviction.
+#
+# At the date of writing these commands are: set setnx setex append
+# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
+# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
+# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
+# getset mset msetnx exec sort
+#
+# The default is:
+#
+# maxmemory-policy noeviction
+
+# LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated
+# algorithms (in order to save memory), so you can tune it for speed or
+# accuracy. For default Redis will check five keys and pick the one that was
+# used less recently, you can change the sample size using the following
+# configuration directive.
+#
+# The default of 5 produces good enough results. 10 Approximates very closely
+# true LRU but costs more CPU. 3 is faster but not very accurate.
+#
+# maxmemory-samples 5
+
+############################# LAZY FREEING ####################################
+
+# Redis has two primitives to delete keys. One is called DEL and is a blocking
+# deletion of the object. It means that the server stops processing new commands
+# in order to reclaim all the memory associated with an object in a synchronous
+# way. If the key deleted is associated with a small object, the time needed
+# in order to execute the DEL command is very small and comparable to most other
+# O(1) or O(log_N) commands in Redis. However if the key is associated with an
+# aggregated value containing millions of elements, the server can block for
+# a long time (even seconds) in order to complete the operation.
+#
+# For the above reasons Redis also offers non blocking deletion primitives
+# such as UNLINK (non blocking DEL) and the ASYNC option of FLUSHALL and
+# FLUSHDB commands, in order to reclaim memory in background. Those commands
+# are executed in constant time. Another thread will incrementally free the
+# object in the background as fast as possible.
+#
+# DEL, UNLINK and ASYNC option of FLUSHALL and FLUSHDB are user-controlled.
+# It's up to the design of the application to understand when it is a good
+# idea to use one or the other. However the Redis server sometimes has to
+# delete keys or flush the whole database as a side effect of other operations.
+# Specifically Redis deletes objects independently of a user call in the
+# following scenarios:
+#
+# 1) On eviction, because of the maxmemory and maxmemory policy configurations,
+# in order to make room for new data, without going over the specified
+# memory limit.
+# 2) Because of expire: when a key with an associated time to live (see the
+# EXPIRE command) must be deleted from memory.
+# 3) Because of a side effect of a command that stores data on a key that may
+# already exist. For example the RENAME command may delete the old key
+# content when it is replaced with another one. Similarly SUNIONSTORE
+# or SORT with STORE option may delete existing keys. The SET command
+# itself removes any old content of the specified key in order to replace
+# it with the specified string.
+# 4) During replication, when a slave performs a full resynchronization with
+# its master, the content of the whole database is removed in order to
+# load the RDB file just transfered.
+#
+# In all the above cases the default is to delete objects in a blocking way,
+# like if DEL was called. However you can configure each case specifically
+# in order to instead release memory in a non-blocking way like if UNLINK
+# was called, using the following configuration directives:
+
+lazyfree-lazy-eviction no
+lazyfree-lazy-expire no
+lazyfree-lazy-server-del no
+slave-lazy-flush no
+
+############################## APPEND ONLY MODE ###############################
+
+# By default Redis asynchronously dumps the dataset on disk. This mode is
+# good enough in many applications, but an issue with the Redis process or
+# a power outage may result into a few minutes of writes lost (depending on
+# the configured save points).
+#
+# The Append Only File is an alternative persistence mode that provides
+# much better durability. For instance using the default data fsync policy
+# (see later in the config file) Redis can lose just one second of writes in a
+# dramatic event like a server power outage, or a single write if something
+# wrong with the Redis process itself happens, but the operating system is
+# still running correctly.
+#
+# AOF and RDB persistence can be enabled at the same time without problems.
+# If the AOF is enabled on startup Redis will load the AOF, that is the file
+# with the better durability guarantees.
+#
+# Please check http://redis.io/topics/persistence for more information.
+
+appendonly no
+
+# The name of the append only file (default: "appendonly.aof")
+
+appendfilename "appendonly.aof"
+
+# The fsync() call tells the Operating System to actually write data on disk
+# instead of waiting for more data in the output buffer. Some OS will really flush
+# data on disk, some other OS will just try to do it ASAP.
+#
+# Redis supports three different modes:
+#
+# no: don't fsync, just let the OS flush the data when it wants. Faster.
+# always: fsync after every write to the append only log. Slow, Safest.
+# everysec: fsync only one time every second. Compromise.
+#
+# The default is "everysec", as that's usually the right compromise between
+# speed and data safety. It's up to you to understand if you can relax this to
+# "no" that will let the operating system flush the output buffer when
+# it wants, for better performances (but if you can live with the idea of
+# some data loss consider the default persistence mode that's snapshotting),
+# or on the contrary, use "always" that's very slow but a bit safer than
+# everysec.
+#
+# More details please check the following article:
+# http://antirez.com/post/redis-persistence-demystified.html
+#
+# If unsure, use "everysec".
+
+# appendfsync always
+appendfsync everysec
+# appendfsync no
+
+# When the AOF fsync policy is set to always or everysec, and a background
+# saving process (a background save or AOF log background rewriting) is
+# performing a lot of I/O against the disk, in some Linux configurations
+# Redis may block too long on the fsync() call. Note that there is no fix for
+# this currently, as even performing fsync in a different thread will block
+# our synchronous write(2) call.
+#
+# In order to mitigate this problem it's possible to use the following option
+# that will prevent fsync() from being called in the main process while a
+# BGSAVE or BGREWRITEAOF is in progress.
+#
+# This means that while another child is saving, the durability of Redis is
+# the same as "appendfsync none". In practical terms, this means that it is
+# possible to lose up to 30 seconds of log in the worst scenario (with the
+# default Linux settings).
+#
+# If you have latency problems turn this to "yes". Otherwise leave it as
+# "no" that is the safest pick from the point of view of durability.
+
+no-appendfsync-on-rewrite no
+
+# Automatic rewrite of the append only file.
+# Redis is able to automatically rewrite the log file implicitly calling
+# BGREWRITEAOF when the AOF log size grows by the specified percentage.
+#
+# This is how it works: Redis remembers the size of the AOF file after the
+# latest rewrite (if no rewrite has happened since the restart, the size of
+# the AOF at startup is used).
+#
+# This base size is compared to the current size. If the current size is
+# bigger than the specified percentage, the rewrite is triggered. Also
+# you need to specify a minimal size for the AOF file to be rewritten, this
+# is useful to avoid rewriting the AOF file even if the percentage increase
+# is reached but it is still pretty small.
+#
+# Specify a percentage of zero in order to disable the automatic AOF
+# rewrite feature.
+
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+
+# An AOF file may be found to be truncated at the end during the Redis
+# startup process, when the AOF data gets loaded back into memory.
+# This may happen when the system where Redis is running
+# crashes, especially when an ext4 filesystem is mounted without the
+# data=ordered option (however this can't happen when Redis itself
+# crashes or aborts but the operating system still works correctly).
+#
+# Redis can either exit with an error when this happens, or load as much
+# data as possible (the default now) and start if the AOF file is found
+# to be truncated at the end. The following option controls this behavior.
+#
+# If aof-load-truncated is set to yes, a truncated AOF file is loaded and
+# the Redis server starts emitting a log to inform the user of the event.
+# Otherwise if the option is set to no, the server aborts with an error
+# and refuses to start. When the option is set to no, the user requires
+# to fix the AOF file using the "redis-check-aof" utility before to restart
+# the server.
+#
+# Note that if the AOF file will be found to be corrupted in the middle
+# the server will still exit with an error. This option only applies when
+# Redis will try to read more data from the AOF file but not enough bytes
+# will be found.
+aof-load-truncated yes
+
+# When rewriting the AOF file, Redis is able to use an RDB preamble in the
+# AOF file for faster rewrites and recoveries. When this option is turned
+# on the rewritten AOF file is composed of two different stanzas:
+#
+# [RDB file][AOF tail]
+#
+# When loading Redis recognizes that the AOF file starts with the "REDIS"
+# string and loads the prefixed RDB file, and continues loading the AOF
+# tail.
+#
+# This is currently turned off by default in order to avoid the surprise
+# of a format change, but will at some point be used as the default.
+aof-use-rdb-preamble no
+
+################################ LUA SCRIPTING ###############################
+
+# Max execution time of a Lua script in milliseconds.
+#
+# If the maximum execution time is reached Redis will log that a script is
+# still in execution after the maximum allowed time and will start to
+# reply to queries with an error.
+#
+# When a long running script exceeds the maximum execution time only the
+# SCRIPT KILL and SHUTDOWN NOSAVE commands are available. The first can be
+# used to stop a script that did not yet called write commands. The second
+# is the only way to shut down the server in the case a write command was
+# already issued by the script but the user doesn't want to wait for the natural
+# termination of the script.
+#
+# Set it to 0 or a negative value for unlimited execution without warnings.
+lua-time-limit 5000
+
+################################ REDIS CLUSTER ###############################
+#
+# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+# WARNING EXPERIMENTAL: Redis Cluster is considered to be stable code, however
+# in order to mark it as "mature" we need to wait for a non trivial percentage
+# of users to deploy it in production.
+# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#
+# Normal Redis instances can't be part of a Redis Cluster; only nodes that are
+# started as cluster nodes can. In order to start a Redis instance as a
+# cluster node enable the cluster support uncommenting the following:
+#
+# cluster-enabled yes
+
+# Every cluster node has a cluster configuration file. This file is not
+# intended to be edited by hand. It is created and updated by Redis nodes.
+# Every Redis Cluster node requires a different cluster configuration file.
+# Make sure that instances running in the same system do not have
+# overlapping cluster configuration file names.
+#
+# cluster-config-file nodes-6379.conf
+
+# Cluster node timeout is the amount of milliseconds a node must be unreachable
+# for it to be considered in failure state.
+# Most other internal time limits are multiple of the node timeout.
+#
+# cluster-node-timeout 15000
+
+# A slave of a failing master will avoid to start a failover if its data
+# looks too old.
+#
+# There is no simple way for a slave to actually have an exact measure of
+# its "data age", so the following two checks are performed:
+#
+# 1) If there are multiple slaves able to failover, they exchange messages
+# in order to try to give an advantage to the slave with the best
+# replication offset (more data from the master processed).
+# Slaves will try to get their rank by offset, and apply to the start
+# of the failover a delay proportional to their rank.
+#
+# 2) Every single slave computes the time of the last interaction with
+# its master. This can be the last ping or command received (if the master
+# is still in the "connected" state), or the time that elapsed since the
+# disconnection with the master (if the replication link is currently down).
+# If the last interaction is too old, the slave will not try to failover
+# at all.
+#
+# The point "2" can be tuned by user. Specifically a slave will not perform
+# the failover if, since the last interaction with the master, the time
+# elapsed is greater than:
+#
+# (node-timeout * slave-validity-factor) + repl-ping-slave-period
+#
+# So for example if node-timeout is 30 seconds, and the slave-validity-factor
+# is 10, and assuming a default repl-ping-slave-period of 10 seconds, the
+# slave will not try to failover if it was not able to talk with the master
+# for longer than 310 seconds.
+#
+# A large slave-validity-factor may allow slaves with too old data to failover
+# a master, while a too small value may prevent the cluster from being able to
+# elect a slave at all.
+#
+# For maximum availability, it is possible to set the slave-validity-factor
+# to a value of 0, which means, that slaves will always try to failover the
+# master regardless of the last time they interacted with the master.
+# (However they'll always try to apply a delay proportional to their
+# offset rank).
+#
+# Zero is the only value able to guarantee that when all the partitions heal
+# the cluster will always be able to continue.
+#
+# cluster-slave-validity-factor 10
+
+# Cluster slaves are able to migrate to orphaned masters, that are masters
+# that are left without working slaves. This improves the cluster ability
+# to resist to failures as otherwise an orphaned master can't be failed over
+# in case of failure if it has no working slaves.
+#
+# Slaves migrate to orphaned masters only if there are still at least a
+# given number of other working slaves for their old master. This number
+# is the "migration barrier". A migration barrier of 1 means that a slave
+# will migrate only if there is at least 1 other working slave for its master
+# and so forth. It usually reflects the number of slaves you want for every
+# master in your cluster.
+#
+# Default is 1 (slaves migrate only if their masters remain with at least
+# one slave). To disable migration just set it to a very large value.
+# A value of 0 can be set but is useful only for debugging and dangerous
+# in production.
+#
+# cluster-migration-barrier 1
+
+# By default Redis Cluster nodes stop accepting queries if they detect there
+# is at least an hash slot uncovered (no available node is serving it).
+# This way if the cluster is partially down (for example a range of hash slots
+# are no longer covered) all the cluster becomes, eventually, unavailable.
+# It automatically returns available as soon as all the slots are covered again.
+#
+# However sometimes you want the subset of the cluster which is working,
+# to continue to accept queries for the part of the key space that is still
+# covered. In order to do so, just set the cluster-require-full-coverage
+# option to no.
+#
+# cluster-require-full-coverage yes
+
+# In order to setup your cluster make sure to read the documentation
+# available at http://redis.io web site.
+
+########################## CLUSTER DOCKER/NAT support ########################
+
+# In certain deployments, Redis Cluster nodes address discovery fails, because
+# addresses are NAT-ted or because ports are forwarded (the typical case is
+# Docker and other containers).
+#
+# In order to make Redis Cluster working in such environments, a static
+# configuration where each node knows its public address is needed. The
+# following two options are used for this scope, and are:
+#
+# * cluster-announce-ip
+# * cluster-announce-port
+# * cluster-announce-bus-port
+#
+# Each instruct the node about its address, client port, and cluster message
+# bus port. The information is then published in the header of the bus packets
+# so that other nodes will be able to correctly map the address of the node
+# publishing the information.
+#
+# If the above options are not used, the normal Redis Cluster auto-detection
+# will be used instead.
+#
+# Note that when remapped, the bus port may not be at the fixed offset of
+# clients port + 10000, so you can specify any port and bus-port depending
+# on how they get remapped. If the bus-port is not set, a fixed offset of
+# 10000 will be used as usually.
+#
+# Example:
+#
+# cluster-announce-ip 10.1.1.5
+# cluster-announce-port 6379
+# cluster-announce-bus-port 6380
+
+################################## SLOW LOG ###################################
+
+# The Redis Slow Log is a system to log queries that exceeded a specified
+# execution time. The execution time does not include the I/O operations
+# like talking with the client, sending the reply and so forth,
+# but just the time needed to actually execute the command (this is the only
+# stage of command execution where the thread is blocked and can not serve
+# other requests in the meantime).
+#
+# You can configure the slow log with two parameters: one tells Redis
+# what is the execution time, in microseconds, to exceed in order for the
+# command to get logged, and the other parameter is the length of the
+# slow log. When a new command is logged the oldest one is removed from the
+# queue of logged commands.
+
+# The following time is expressed in microseconds, so 1000000 is equivalent
+# to one second. Note that a negative number disables the slow log, while
+# a value of zero forces the logging of every command.
+slowlog-log-slower-than 10000
+
+# There is no limit to this length. Just be aware that it will consume memory.
+# You can reclaim memory used by the slow log with SLOWLOG RESET.
+slowlog-max-len 128
+
+################################ LATENCY MONITOR ##############################
+
+# The Redis latency monitoring subsystem samples different operations
+# at runtime in order to collect data related to possible sources of
+# latency of a Redis instance.
+#
+# Via the LATENCY command this information is available to the user that can
+# print graphs and obtain reports.
+#
+# The system only logs operations that were performed in a time equal or
+# greater than the amount of milliseconds specified via the
+# latency-monitor-threshold configuration directive. When its value is set
+# to zero, the latency monitor is turned off.
+#
+# By default latency monitoring is disabled since it is mostly not needed
+# if you don't have latency issues, and collecting data has a performance
+# impact, that while very small, can be measured under big load. Latency
+# monitoring can easily be enabled at runtime using the command
+# "CONFIG SET latency-monitor-threshold " if needed.
+latency-monitor-threshold 0
+
+############################# EVENT NOTIFICATION ##############################
+
+# Redis can notify Pub/Sub clients about events happening in the key space.
+# This feature is documented at http://redis.io/topics/notifications
+#
+# For instance if keyspace events notification is enabled, and a client
+# performs a DEL operation on key "foo" stored in the Database 0, two
+# messages will be published via Pub/Sub:
+#
+# PUBLISH __keyspace@0__:foo del
+# PUBLISH __keyevent@0__:del foo
+#
+# It is possible to select the events that Redis will notify among a set
+# of classes. Every class is identified by a single character:
+#
+# K Keyspace events, published with __keyspace@__ prefix.
+# E Keyevent events, published with __keyevent@__ prefix.
+# g Generic commands (non-type specific) like DEL, EXPIRE, RENAME, ...
+# $ String commands
+# l List commands
+# s Set commands
+# h Hash commands
+# z Sorted set commands
+# x Expired events (events generated every time a key expires)
+# e Evicted events (events generated when a key is evicted for maxmemory)
+# A Alias for g$lshzxe, so that the "AKE" string means all the events.
+#
+# The "notify-keyspace-events" takes as argument a string that is composed
+# of zero or multiple characters. The empty string means that notifications
+# are disabled.
+#
+# Example: to enable list and generic events, from the point of view of the
+# event name, use:
+#
+# notify-keyspace-events Elg
+#
+# Example 2: to get the stream of the expired keys subscribing to channel
+# name __keyevent@0__:expired use:
+#
+# notify-keyspace-events Ex
+#
+# By default all notifications are disabled because most users don't need
+# this feature and the feature has some overhead. Note that if you don't
+# specify at least one of K or E, no events will be delivered.
+notify-keyspace-events ""
+
+############################### ADVANCED CONFIG ###############################
+
+# Hashes are encoded using a memory efficient data structure when they have a
+# small number of entries, and the biggest entry does not exceed a given
+# threshold. These thresholds can be configured using the following directives.
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+
+# Lists are also encoded in a special way to save a lot of space.
+# The number of entries allowed per internal list node can be specified
+# as a fixed maximum size or a maximum number of elements.
+# For a fixed maximum size, use -5 through -1, meaning:
+# -5: max size: 64 Kb <-- not recommended for normal workloads
+# -4: max size: 32 Kb <-- not recommended
+# -3: max size: 16 Kb <-- probably not recommended
+# -2: max size: 8 Kb <-- good
+# -1: max size: 4 Kb <-- good
+# Positive numbers mean store up to _exactly_ that number of elements
+# per list node.
+# The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size),
+# but if your use case is unique, adjust the settings as necessary.
+list-max-ziplist-size -2
+
+# Lists may also be compressed.
+# Compress depth is the number of quicklist ziplist nodes from *each* side of
+# the list to *exclude* from compression. The head and tail of the list
+# are always uncompressed for fast push/pop operations. Settings are:
+# 0: disable all list compression
+# 1: depth 1 means "don't start compressing until after 1 node into the list,
+# going from either the head or tail"
+# So: [head]->node->node->...->node->[tail]
+# [head], [tail] will always be uncompressed; inner nodes will compress.
+# 2: [head]->[next]->node->node->...->node->[prev]->[tail]
+# 2 here means: don't compress head or head->next or tail->prev or tail,
+# but compress all nodes between them.
+# 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail]
+# etc.
+list-compress-depth 0
+
+# Sets have a special encoding in just one case: when a set is composed
+# of just strings that happen to be integers in radix 10 in the range
+# of 64 bit signed integers.
+# The following configuration setting sets the limit in the size of the
+# set in order to use this special memory saving encoding.
+set-max-intset-entries 512
+
+# Similarly to hashes and lists, sorted sets are also specially encoded in
+# order to save a lot of space. This encoding is only used when the length and
+# elements of a sorted set are below the following limits:
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+
+# HyperLogLog sparse representation bytes limit. The limit includes the
+# 16 bytes header. When an HyperLogLog using the sparse representation crosses
+# this limit, it is converted into the dense representation.
+#
+# A value greater than 16000 is totally useless, since at that point the
+# dense representation is more memory efficient.
+#
+# The suggested value is ~ 3000 in order to have the benefits of
+# the space efficient encoding without slowing down too much PFADD,
+# which is O(N) with the sparse encoding. The value can be raised to
+# ~ 10000 when CPU is not a concern, but space is, and the data set is
+# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
+hll-sparse-max-bytes 3000
+
+# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
+# order to help rehashing the main Redis hash table (the one mapping top-level
+# keys to values). The hash table implementation Redis uses (see dict.c)
+# performs a lazy rehashing: the more operation you run into a hash table
+# that is rehashing, the more rehashing "steps" are performed, so if the
+# server is idle the rehashing is never complete and some more memory is used
+# by the hash table.
+#
+# The default is to use this millisecond 10 times every second in order to
+# actively rehash the main dictionaries, freeing memory when possible.
+#
+# If unsure:
+# use "activerehashing no" if you have hard latency requirements and it is
+# not a good thing in your environment that Redis can reply from time to time
+# to queries with 2 milliseconds delay.
+#
+# use "activerehashing yes" if you don't have such hard requirements but
+# want to free memory asap when possible.
+activerehashing yes
+
+# The client output buffer limits can be used to force disconnection of clients
+# that are not reading data from the server fast enough for some reason (a
+# common reason is that a Pub/Sub client can't consume messages as fast as the
+# publisher can produce them).
+#
+# The limit can be set differently for the three different classes of clients:
+#
+# normal -> normal clients including MONITOR clients
+# slave -> slave clients
+# pubsub -> clients subscribed to at least one pubsub channel or pattern
+#
+# The syntax of every client-output-buffer-limit directive is the following:
+#
+# client-output-buffer-limit
+#
+# A client is immediately disconnected once the hard limit is reached, or if
+# the soft limit is reached and remains reached for the specified number of
+# seconds (continuously).
+# So for instance if the hard limit is 32 megabytes and the soft limit is
+# 16 megabytes / 10 seconds, the client will get disconnected immediately
+# if the size of the output buffers reach 32 megabytes, but will also get
+# disconnected if the client reaches 16 megabytes and continuously overcomes
+# the limit for 10 seconds.
+#
+# By default normal clients are not limited because they don't receive data
+# without asking (in a push way), but just after a request, so only
+# asynchronous clients may create a scenario where data is requested faster
+# than it can read.
+#
+# Instead there is a default limit for pubsub and slave clients, since
+# subscribers and slaves receive data in a push fashion.
+#
+# Both the hard or the soft limit can be disabled by setting them to zero.
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+
+# Client query buffers accumulate new commands. They are limited to a fixed
+# amount by default in order to avoid that a protocol desynchronization (for
+# instance due to a bug in the client) will lead to unbound memory usage in
+# the query buffer. However you can configure it here if you have very special
+# needs, such us huge multi/exec requests or alike.
+#
+# client-query-buffer-limit 1gb
+
+# In the Redis protocol, bulk requests, that are, elements representing single
+# strings, are normally limited ot 512 mb. However you can change this limit
+# here.
+#
+# proto-max-bulk-len 512mb
+
+# Redis calls an internal function to perform many background tasks, like
+# closing connections of clients in timeout, purging expired keys that are
+# never requested, and so forth.
+#
+# Not all tasks are performed with the same frequency, but Redis checks for
+# tasks to perform according to the specified "hz" value.
+#
+# By default "hz" is set to 10. Raising the value will use more CPU when
+# Redis is idle, but at the same time will make Redis more responsive when
+# there are many keys expiring at the same time, and timeouts may be
+# handled with more precision.
+#
+# The range is between 1 and 500, however a value over 100 is usually not
+# a good idea. Most users should use the default of 10 and raise this up to
+# 100 only in environments where very low latency is required.
+hz 10
+
+# When a child rewrites the AOF file, if the following option is enabled
+# the file will be fsync-ed every 32 MB of data generated. This is useful
+# in order to commit the file to the disk more incrementally and avoid
+# big latency spikes.
+aof-rewrite-incremental-fsync yes
+
+# Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good
+# idea to start with the default settings and only change them after investigating
+# how to improve the performances and how the keys LFU change over time, which
+# is possible to inspect via the OBJECT FREQ command.
+#
+# There are two tunable parameters in the Redis LFU implementation: the
+# counter logarithm factor and the counter decay time. It is important to
+# understand what the two parameters mean before changing them.
+#
+# The LFU counter is just 8 bits per key, it's maximum value is 255, so Redis
+# uses a probabilistic increment with logarithmic behavior. Given the value
+# of the old counter, when a key is accessed, the counter is incremented in
+# this way:
+#
+# 1. A random number R between 0 and 1 is extracted.
+# 2. A probability P is calculated as 1/(old_value*lfu_log_factor+1).
+# 3. The counter is incremented only if R < P.
+#
+# The default lfu-log-factor is 10. This is a table of how the frequency
+# counter changes with a different number of accesses with different
+# logarithmic factors:
+#
+# +--------+------------+------------+------------+------------+------------+
+# | factor | 100 hits | 1000 hits | 100K hits | 1M hits | 10M hits |
+# +--------+------------+------------+------------+------------+------------+
+# | 0 | 104 | 255 | 255 | 255 | 255 |
+# +--------+------------+------------+------------+------------+------------+
+# | 1 | 18 | 49 | 255 | 255 | 255 |
+# +--------+------------+------------+------------+------------+------------+
+# | 10 | 10 | 18 | 142 | 255 | 255 |
+# +--------+------------+------------+------------+------------+------------+
+# | 100 | 8 | 11 | 49 | 143 | 255 |
+# +--------+------------+------------+------------+------------+------------+
+#
+# NOTE: The above table was obtained by running the following commands:
+#
+# redis-benchmark -n 1000000 incr foo
+# redis-cli object freq foo
+#
+# NOTE 2: The counter initial value is 5 in order to give new objects a chance
+# to accumulate hits.
+#
+# The counter decay time is the time, in minutes, that must elapse in order
+# for the key counter to be divided by two (or decremented if it has a value
+# less <= 10).
+#
+# The default value for the lfu-decay-time is 1. A Special value of 0 means to
+# decay the counter every time it happens to be scanned.
+#
+# lfu-log-factor 10
+# lfu-decay-time 1
+
+########################### ACTIVE DEFRAGMENTATION #######################
+#
+# WARNING THIS FEATURE IS EXPERIMENTAL. However it was stress tested
+# even in production and manually tested by multiple engineers for some
+# time.
+#
+# What is active defragmentation?
+# -------------------------------
+#
+# Active (online) defragmentation allows a Redis server to compact the
+# spaces left between small allocations and deallocations of data in memory,
+# thus allowing to reclaim back memory.
+#
+# Fragmentation is a natural process that happens with every allocator (but
+# less so with Jemalloc, fortunately) and certain workloads. Normally a server
+# restart is needed in order to lower the fragmentation, or at least to flush
+# away all the data and create it again. However thanks to this feature
+# implemented by Oran Agra for Redis 4.0 this process can happen at runtime
+# in an "hot" way, while the server is running.
+#
+# Basically when the fragmentation is over a certain level (see the
+# configuration options below) Redis will start to create new copies of the
+# values in contiguous memory regions by exploiting certain specific Jemalloc
+# features (in order to understand if an allocation is causing fragmentation
+# and to allocate it in a better place), and at the same time, will release the
+# old copies of the data. This process, repeated incrementally for all the keys
+# will cause the fragmentation to drop back to normal values.
+#
+# Important things to understand:
+#
+# 1. This feature is disabled by default, and only works if you compiled Redis
+# to use the copy of Jemalloc we ship with the source code of Redis.
+# This is the default with Linux builds.
+#
+# 2. You never need to enable this feature if you don't have fragmentation
+# issues.
+#
+# 3. Once you experience fragmentation, you can enable this feature when
+# needed with the command "CONFIG SET activedefrag yes".
+#
+# The configuration parameters are able to fine tune the behavior of the
+# defragmentation process. If you are not sure about what they mean it is
+# a good idea to leave the defaults untouched.
+
+# Enabled active defragmentation
+# activedefrag yes
+
+# Minimum amount of fragmentation waste to start active defrag
+# active-defrag-ignore-bytes 100mb
+
+# Minimum percentage of fragmentation to start active defrag
+# active-defrag-threshold-lower 10
+
+# Maximum percentage of fragmentation at which we use maximum effort
+# active-defrag-threshold-upper 100
+
+# Minimal effort for defrag in CPU percentage
+# active-defrag-cycle-min 25
+
+# Maximal effort for defrag in CPU percentage
+# active-defrag-cycle-max 75
+
diff --git a/orange-demo-single-service/.DS_Store b/orange-demo-single-service/.DS_Store
new file mode 100644
index 00000000..5008ddfc
Binary files /dev/null and b/orange-demo-single-service/.DS_Store differ
diff --git a/orange-demo-single-service/README.md b/orange-demo-single-service/README.md
index d73e7ded..0939c817 100644
--- a/orange-demo-single-service/README.md
+++ b/orange-demo-single-service/README.md
@@ -1,10 +1,15 @@
### 服务接口文档
---
-- Knife4j
- - 服务启动后,Knife4j的文档入口地址 [http://localhost:8082/doc.html#/plus](http://localhost:8082/doc.html#/plus)
- Postman
- 无需启动服务,即可将当前工程的接口导出成Postman格式。在工程的common/common-tools/模块下,找到ExportApiApp文件,并执行main函数。
### 服务启动环境依赖
---
+执行docker-compose up -d 命令启动下面依赖的服务。
+执行docker-compose down 命令停止下面服务。
+
+- Redis
+ - 版本:4
+ - 端口: 6379
+ - 推荐客户端工具 [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesktopManager)
diff --git a/orange-demo-single-service/application/pom.xml b/orange-demo-single-service/application/pom.xml
index d363bf8c..bf938c73 100644
--- a/orange-demo-single-service/application/pom.xml
+++ b/orange-demo-single-service/application/pom.xml
@@ -20,6 +20,11 @@
common-core
1.0.0
+
+ com.orange.demo
+ common-redis
+ 1.0.0
+
com.orange.demo
common-sequence
@@ -30,11 +35,6 @@
application-common
1.0.0
-
- com.orange.demo
- common-swagger
- 1.0.0
-
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/AreaCodeController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/AreaCodeController.java
index 4b5da13a..e5a23a7f 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/AreaCodeController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/AreaCodeController.java
@@ -1,6 +1,5 @@
package com.orange.demo.app.controller;
-import io.swagger.annotations.Api;
import cn.jimmyshi.beanquery.BeanQuery;
import com.orange.demo.app.model.AreaCode;
import com.orange.demo.app.service.AreaCodeService;
@@ -20,7 +19,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "行政区划数据访问接口")
@RestController
@RequestMapping("/admin/app/areaCode")
public class AreaCodeController {
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseController.java
index 3813bf0e..9f237c88 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseController.java
@@ -16,10 +16,8 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
-import com.orange.demo.common.core.cache.SessionCacheHelper;
+import com.orange.demo.common.redis.cache.SessionCacheHelper;
import com.orange.demo.config.ApplicationConfig;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -35,7 +33,6 @@ import javax.validation.groups.Default;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "课程数据管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/course")
@@ -56,14 +53,6 @@ public class CourseController {
* @param courseDto 新增对象。
* @return 应答结果对象,包含新增对象主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {
- "course.courseId",
- "course.priceStart",
- "course.priceEnd",
- "course.classHourStart",
- "course.classHourEnd",
- "course.createTimeStart",
- "course.createTimeEnd"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("course") CourseDto courseDto) {
String errorMessage = MyCommonUtil.getModelValidationError(courseDto);
@@ -87,13 +76,6 @@ public class CourseController {
* @param courseDto 更新对象。
* @return 应答结果对象。
*/
- @ApiOperationSupport(ignoreParameters = {
- "course.priceStart",
- "course.priceEnd",
- "course.classHourStart",
- "course.classHourEnd",
- "course.createTimeStart",
- "course.createTimeEnd"})
@PostMapping("/update")
public ResponseResult update(@MyRequestBody("course") CourseDto courseDto) {
String errorMessage = MyCommonUtil.getModelValidationError(courseDto, Default.class, UpdateGroup.class);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseTransStatsController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseTransStatsController.java
index 143cd647..7d7d1a60 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseTransStatsController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/CourseTransStatsController.java
@@ -9,7 +9,6 @@ import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -22,7 +21,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "课程统计管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/courseTransStats")
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/GradeController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/GradeController.java
index 2f194135..b010d46e 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/GradeController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/GradeController.java
@@ -12,8 +12,6 @@ import com.orange.demo.common.core.object.ResponseResult;
import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -27,7 +25,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "年级管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/grade")
@@ -42,7 +39,6 @@ public class GradeController {
* @param gradeDto 新增对象。
* @return 应答结果对象,包含新增对象主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {"grade.gradeId"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("grade") GradeDto gradeDto) {
String errorMessage = MyCommonUtil.getModelValidationError(gradeDto);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/SchoolInfoController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/SchoolInfoController.java
index 883b572d..dbc105f4 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/SchoolInfoController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/SchoolInfoController.java
@@ -11,8 +11,6 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -26,7 +24,6 @@ import javax.validation.groups.Default;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "校区数据管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/schoolInfo")
@@ -41,7 +38,6 @@ public class SchoolInfoController {
* @param schoolInfoDto 新增对象。
* @return 应答结果对象,包含新增对象主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {"schoolInfo.schoolId"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("schoolInfo") SchoolInfoDto schoolInfoDto) {
String errorMessage = MyCommonUtil.getModelValidationError(schoolInfoDto);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionStatsController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionStatsController.java
index dd74a044..e1c0b29b 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionStatsController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionStatsController.java
@@ -9,7 +9,6 @@ import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -22,7 +21,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "学生行为统计管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/studentActionStats")
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionTransController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionTransController.java
index ae79f0b1..5616b293 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionTransController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentActionTransController.java
@@ -10,8 +10,6 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -25,7 +23,6 @@ import javax.validation.groups.Default;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "学生行为流水管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/studentActionTrans")
@@ -40,10 +37,6 @@ public class StudentActionTransController {
* @param studentActionTransDto 新增对象。
* @return 应答结果对象,包含新增对象主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {
- "studentActionTrans.transId",
- "studentActionTrans.createTimeStart",
- "studentActionTrans.createTimeEnd"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto);
@@ -67,9 +60,6 @@ public class StudentActionTransController {
* @param studentActionTransDto 更新对象。
* @return 应答结果对象。
*/
- @ApiOperationSupport(ignoreParameters = {
- "studentActionTrans.createTimeStart",
- "studentActionTrans.createTimeEnd"})
@PostMapping("/update")
public ResponseResult update(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto, Default.class, UpdateGroup.class);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentClassController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentClassController.java
index 686ceae6..0ef85178 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentClassController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentClassController.java
@@ -10,8 +10,6 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -26,7 +24,6 @@ import java.util.stream.Collectors;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "班级数据管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/studentClass")
@@ -45,7 +42,6 @@ public class StudentClassController {
* @param studentClassDto 新增对象。
* @return 应答结果对象,包含新增对象主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {"studentClass.classId"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("studentClass") StudentClassDto studentClassDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentClassDto);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentController.java
index f6c4ab2b..72502afe 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/controller/StudentController.java
@@ -11,8 +11,6 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.UpdateGroup;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -26,7 +24,6 @@ import javax.validation.groups.Default;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "学生数据管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/app/student")
@@ -41,13 +38,6 @@ public class StudentController {
* @param studentDto 新增对象。
* @return 应答结果对象,包含新增对象主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {
- "student.studentId",
- "student.searchString",
- "student.birthdayStart",
- "student.birthdayEnd",
- "student.registerTimeStart",
- "student.registerTimeEnd"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("student") StudentDto studentDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentDto);
@@ -71,12 +61,6 @@ public class StudentController {
* @param studentDto 更新对象。
* @return 应答结果对象。
*/
- @ApiOperationSupport(ignoreParameters = {
- "student.searchString",
- "student.birthdayStart",
- "student.birthdayEnd",
- "student.registerTimeStart",
- "student.registerTimeEnd"})
@PostMapping("/update")
public ResponseResult update(@MyRequestBody("student") StudentDto studentDto) {
String errorMessage = MyCommonUtil.getModelValidationError(studentDto, Default.class, UpdateGroup.class);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassCourseDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassCourseDto.java
index 14be5386..eb512610 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassCourseDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassCourseDto.java
@@ -2,8 +2,6 @@ package com.orange.demo.app.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -14,28 +12,24 @@ import javax.validation.constraints.*;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("ClassCourseDto对象")
@Data
public class ClassCourseDto {
/**
* 班级Id。
*/
- @ApiModelProperty(value = "班级Id", required = true)
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
private Long classId;
/**
* 课程Id。
*/
- @ApiModelProperty(value = "课程Id", required = true)
@NotNull(message = "数据验证失败,课程Id不能为空!", groups = {UpdateGroup.class})
private Long courseId;
/**
* 课程顺序(数值越小越靠前)。
*/
- @ApiModelProperty(value = "课程顺序(数值越小越靠前)", required = true)
@NotNull(message = "数据验证失败,课程顺序(数值越小越靠前)不能为空!", groups = {UpdateGroup.class})
private Integer courseOrder;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassStudentDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassStudentDto.java
index 975c567f..d9b1362d 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassStudentDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/ClassStudentDto.java
@@ -2,8 +2,6 @@ package com.orange.demo.app.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -14,21 +12,18 @@ import javax.validation.constraints.*;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("ClassStudentDto对象")
@Data
public class ClassStudentDto {
/**
* 班级Id。
*/
- @ApiModelProperty(value = "班级Id", required = true)
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
private Long classId;
/**
* 学生Id。
*/
- @ApiModelProperty(value = "学生Id", required = true)
@NotNull(message = "数据验证失败,学生Id不能为空!", groups = {UpdateGroup.class})
private Long studentId;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseDto.java
index 91148d9a..e1514d1f 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseDto.java
@@ -5,8 +5,6 @@ import com.orange.demo.common.core.validator.ConstDictRef;
import com.orange.demo.app.model.constant.CourseDifficult;
import com.orange.demo.application.common.constant.Subject;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -19,41 +17,35 @@ import java.math.BigDecimal;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("CourseDto对象")
@Data
public class CourseDto {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
private Long courseId;
/**
* 课程名称。
*/
- @ApiModelProperty(value = "课程名称", required = true)
@NotBlank(message = "数据验证失败,课程名称不能为空!")
private String courseName;
/**
* 课程价格。
*/
- @ApiModelProperty(value = "课程价格", required = true)
@NotNull(message = "数据验证失败,课程价格不能为空!")
private BigDecimal price;
/**
* 课程描述。
*/
- @ApiModelProperty(value = "课程描述")
private String description;
/**
* 课程难度(0: 容易 1: 普通 2: 很难)。
*/
- @ApiModelProperty(value = "课程难度(0: 容易 1: 普通 2: 很难)", required = true)
@NotNull(message = "数据验证失败,课程难度不能为空!")
@ConstDictRef(constDictClass = CourseDifficult.class, message = "数据验证失败,课程难度为无效值!")
private Integer difficulty;
@@ -61,14 +53,12 @@ public class CourseDto {
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,所属年级不能为空!")
private Integer gradeId;
/**
* 学科Id。
*/
- @ApiModelProperty(value = "学科Id", required = true)
@NotNull(message = "数据验证失败,所属学科不能为空!")
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属学科为无效值!")
private Integer subjectId;
@@ -76,50 +66,42 @@ public class CourseDto {
/**
* 课时数量。
*/
- @ApiModelProperty(value = "课时数量", required = true)
@NotNull(message = "数据验证失败,课时数量不能为空!")
private Integer classHour;
/**
* 多张课程图片地址。
*/
- @ApiModelProperty(value = "多张课程图片地址", required = true)
@NotBlank(message = "数据验证失败,课程图片不能为空!")
private String pictureUrl;
/**
* price 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "price 范围过滤起始值(>=)")
private BigDecimal priceStart;
/**
* price 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "price 范围过滤结束值(<=)")
private BigDecimal priceEnd;
/**
* classHour 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "classHour 范围过滤起始值(>=)")
private Integer classHourStart;
/**
* classHour 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "classHour 范围过滤结束值(<=)")
private Integer classHourEnd;
/**
* createTime 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "createTime 范围过滤起始值(>=)")
private String createTimeStart;
/**
* createTime 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "createTime 范围过滤结束值(<=)")
private String createTimeEnd;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseTransStatsDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseTransStatsDto.java
index 23d5d244..5e561f94 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseTransStatsDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/CourseTransStatsDto.java
@@ -4,8 +4,6 @@ import com.orange.demo.common.core.validator.UpdateGroup;
import com.orange.demo.common.core.validator.ConstDictRef;
import com.orange.demo.application.common.constant.Subject;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -18,28 +16,24 @@ import java.util.Date;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("CourseTransStatsDto对象")
@Data
public class CourseTransStatsDto {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
private Long statsId;
/**
* 统计日期。
*/
- @ApiModelProperty(value = "统计日期", required = true)
@NotNull(message = "数据验证失败,统计日期不能为空!")
private Date statsDate;
/**
* 科目Id。
*/
- @ApiModelProperty(value = "科目Id", required = true)
@NotNull(message = "数据验证失败,所属科目不能为空!")
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属科目为无效值!")
private Integer subjectId;
@@ -47,59 +41,50 @@ public class CourseTransStatsDto {
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,所属年级不能为空!")
private Integer gradeId;
/**
* 年级名称。
*/
- @ApiModelProperty(value = "年级名称")
private String gradeName;
/**
* 课程Id。
*/
- @ApiModelProperty(value = "课程Id", required = true)
@NotNull(message = "数据验证失败,课程Id不能为空!")
private Long courseId;
/**
* 课程名称。
*/
- @ApiModelProperty(value = "课程名称")
private String courseName;
/**
* 学生上课次数。
*/
- @ApiModelProperty(value = "学生上课次数", required = true)
@NotNull(message = "数据验证失败,上课次数不能为空!")
private Integer studentAttendCount;
/**
* 学生献花数量。
*/
- @ApiModelProperty(value = "学生献花数量", required = true)
@NotNull(message = "数据验证失败,献花数量不能为空!")
private Integer studentFlowerAmount;
/**
* 学生献花次数。
*/
- @ApiModelProperty(value = "学生献花次数", required = true)
@NotNull(message = "数据验证失败,献花次数不能为空!")
private Integer studentFlowerCount;
/**
* statsDate 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
private String statsDateStart;
/**
* statsDate 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
private String statsDateEnd;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/GradeDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/GradeDto.java
index 892f35f5..1117ef81 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/GradeDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/GradeDto.java
@@ -2,8 +2,6 @@ package com.orange.demo.app.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -14,21 +12,18 @@ import javax.validation.constraints.*;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("GradeDto对象")
@Data
public class GradeDto {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
private Integer gradeId;
/**
* 年级名称。
*/
- @ApiModelProperty(value = "年级名称", required = true)
@NotBlank(message = "数据验证失败,年级名称不能为空!")
private String gradeName;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/SchoolInfoDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/SchoolInfoDto.java
index a6bac9b7..3fe410ab 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/SchoolInfoDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/SchoolInfoDto.java
@@ -2,8 +2,6 @@ package com.orange.demo.app.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -14,35 +12,30 @@ import javax.validation.constraints.*;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("SchoolInfoDto对象")
@Data
public class SchoolInfoDto {
/**
* 学校Id。
*/
- @ApiModelProperty(value = "学校Id", required = true)
@NotNull(message = "数据验证失败,学校Id不能为空!", groups = {UpdateGroup.class})
private Long schoolId;
/**
* 学校名称。
*/
- @ApiModelProperty(value = "学校名称", required = true)
@NotBlank(message = "数据验证失败,学校名称不能为空!")
private String schoolName;
/**
* 所在省Id。
*/
- @ApiModelProperty(value = "所在省Id", required = true)
@NotNull(message = "数据验证失败,所在省份不能为空!")
private Long provinceId;
/**
* 所在城市Id。
*/
- @ApiModelProperty(value = "所在城市Id", required = true)
@NotNull(message = "数据验证失败,所在城市不能为空!")
private Long cityId;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionStatsDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionStatsDto.java
index 558c7395..a61034f2 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionStatsDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionStatsDto.java
@@ -2,8 +2,6 @@ package com.orange.demo.app.dto;
import com.orange.demo.common.core.validator.UpdateGroup;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -16,165 +14,141 @@ import java.util.Date;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentActionStatsDto对象")
@Data
public class StudentActionStatsDto {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
private Long statsId;
/**
* 统计日期。
*/
- @ApiModelProperty(value = "统计日期", required = true)
@NotNull(message = "数据验证失败,统计日期不能为空!")
private Date statsDate;
/**
* 统计小时。
*/
- @ApiModelProperty(value = "统计小时")
private Date statsMonth;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,所属年级不能为空!")
private Integer gradeId;
/**
* 学生所在省Id。
*/
- @ApiModelProperty(value = "学生所在省Id", required = true)
@NotNull(message = "数据验证失败,所在省份不能为空!")
private Long provinceId;
/**
* 学生所在城市Id。
*/
- @ApiModelProperty(value = "学生所在城市Id", required = true)
@NotNull(message = "数据验证失败,所在城市不能为空!", groups = {UpdateGroup.class})
private Long cityId;
/**
* 购课学币数量。
*/
- @ApiModelProperty(value = "购课学币数量", required = true)
@NotNull(message = "数据验证失败,购课学币数量不能为空!", groups = {UpdateGroup.class})
private Integer buyCourseAmount;
/**
* 购买课程次数。
*/
- @ApiModelProperty(value = "购买课程次数", required = true)
@NotNull(message = "数据验证失败,购买课程次数不能为空!", groups = {UpdateGroup.class})
private Integer buyCourseCount;
/**
* 购买视频学币数量。
*/
- @ApiModelProperty(value = "购买视频学币数量", required = true)
@NotNull(message = "数据验证失败,购买视频学币数量不能为空!", groups = {UpdateGroup.class})
private Integer buyVideoAmount;
/**
* 购买视频次数。
*/
- @ApiModelProperty(value = "购买视频次数", required = true)
@NotNull(message = "数据验证失败,购买视频次数不能为空!", groups = {UpdateGroup.class})
private Integer buyVideoCount;
/**
* 购买作业学币数量。
*/
- @ApiModelProperty(value = "购买作业学币数量", required = true)
@NotNull(message = "数据验证失败,购买作业学币数量不能为空!", groups = {UpdateGroup.class})
private Integer buyPaperAmount;
/**
* 购买作业次数。
*/
- @ApiModelProperty(value = "购买作业次数", required = true)
@NotNull(message = "数据验证失败,购买作业次数不能为空!", groups = {UpdateGroup.class})
private Integer buyPaperCount;
/**
* 购买献花数量。
*/
- @ApiModelProperty(value = "购买献花数量", required = true)
@NotNull(message = "数据验证失败,购买献花数量不能为空!", groups = {UpdateGroup.class})
private Integer buyFlowerAmount;
/**
* 购买献花次数。
*/
- @ApiModelProperty(value = "购买献花次数", required = true)
@NotNull(message = "数据验证失败,购买献花次数不能为空!", groups = {UpdateGroup.class})
private Integer buyFlowerCount;
/**
* 充值学币数量。
*/
- @ApiModelProperty(value = "充值学币数量", required = true)
@NotNull(message = "数据验证失败,充值学币数量不能为空!", groups = {UpdateGroup.class})
private Integer rechargeCoinAmount;
/**
* 充值学币次数。
*/
- @ApiModelProperty(value = "充值学币次数", required = true)
@NotNull(message = "数据验证失败,充值学币次数不能为空!", groups = {UpdateGroup.class})
private Integer rechargeCoinCount;
/**
* 线下课程上课次数。
*/
- @ApiModelProperty(value = "线下课程上课次数", required = true)
@NotNull(message = "数据验证失败,线下课程上课次数不能为空!")
private Integer doCourseCount;
/**
* 观看视频次数。
*/
- @ApiModelProperty(value = "观看视频次数", required = true)
@NotNull(message = "数据验证失败,观看视频次数不能为空!", groups = {UpdateGroup.class})
private Integer watchVideoCount;
/**
* 购买献花消费学币数量。
*/
- @ApiModelProperty(value = "购买献花消费学币数量", required = true)
@NotNull(message = "数据验证失败,购买献花消费学币数量不能为空!")
private Integer watchVideoTotalSecond;
/**
* 做题数量。
*/
- @ApiModelProperty(value = "做题数量", required = true)
@NotNull(message = "数据验证失败,做题数量不能为空!", groups = {UpdateGroup.class})
private Integer doExerciseCount;
/**
* 做题正确的数量。
*/
- @ApiModelProperty(value = "做题正确的数量", required = true)
@NotNull(message = "数据验证失败,做题正确的数量不能为空!", groups = {UpdateGroup.class})
private Integer doExerciseCorrectCount;
/**
* statsDate 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
private String statsDateStart;
/**
* statsDate 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
private String statsDateEnd;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionTransDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionTransDto.java
index c1783936..c01ec0cb 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionTransDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentActionTransDto.java
@@ -5,8 +5,6 @@ import com.orange.demo.common.core.validator.ConstDictRef;
import com.orange.demo.application.common.constant.StudentActionType;
import com.orange.demo.application.common.constant.DeviceType;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -19,49 +17,42 @@ import java.util.Date;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentActionTransDto对象")
@Data
public class StudentActionTransDto {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id", required = true)
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
private Long transId;
/**
* 学生Id。
*/
- @ApiModelProperty(value = "学生Id", required = true)
@NotNull(message = "数据验证失败,学生Id不能为空!")
private Long studentId;
/**
* 学生名称。
*/
- @ApiModelProperty(value = "学生名称", required = true)
@NotBlank(message = "数据验证失败,学生名称不能为空!")
private String studentName;
/**
* 学生校区。
*/
- @ApiModelProperty(value = "学生校区", required = true)
@NotNull(message = "数据验证失败,学生校区不能为空!")
private Long schoolId;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,学生年级不能为空!")
private Integer gradeId;
/**
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
*/
- @ApiModelProperty(value = "行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)", required = true)
@NotNull(message = "数据验证失败,行为类型不能为空!")
@ConstDictRef(constDictClass = StudentActionType.class, message = "数据验证失败,行为类型为无效值!")
private Integer actionType;
@@ -69,7 +60,6 @@ public class StudentActionTransDto {
/**
* 设备类型(0: iOS 1: Android 2: PC)。
*/
- @ApiModelProperty(value = "设备类型(0: iOS 1: Android 2: PC)", required = true)
@NotNull(message = "数据验证失败,设备类型不能为空!")
@ConstDictRef(constDictClass = DeviceType.class, message = "数据验证失败,设备类型为无效值!")
private Integer deviceType;
@@ -77,61 +67,51 @@ public class StudentActionTransDto {
/**
* 看视频秒数。
*/
- @ApiModelProperty(value = "看视频秒数")
private Integer watchVideoSeconds;
/**
* 购买献花数量。
*/
- @ApiModelProperty(value = "购买献花数量")
private Integer flowerCount;
/**
* 购买作业数量。
*/
- @ApiModelProperty(value = "购买作业数量")
private Integer paperCount;
/**
* 购买视频数量。
*/
- @ApiModelProperty(value = "购买视频数量")
private Integer videoCount;
/**
* 购买课程数量。
*/
- @ApiModelProperty(value = "购买课程数量")
private Integer courseCount;
/**
* 充值学币数量。
*/
- @ApiModelProperty(value = "充值学币数量")
private Integer coinCount;
/**
* 做题是否正确标记。
*/
- @ApiModelProperty(value = "做题是否正确标记")
private Integer exerciseCorrectFlag;
/**
* 发生时间。
*/
- @ApiModelProperty(value = "发生时间", required = true)
@NotNull(message = "数据验证失败,发生时间不能为空!")
private Date createTime;
/**
* createTime 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "createTime 范围过滤起始值(>=)")
private String createTimeStart;
/**
* createTime 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "createTime 范围过滤结束值(<=)")
private String createTimeEnd;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentClassDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentClassDto.java
index c6c11ef7..03f19b85 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentClassDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentClassDto.java
@@ -4,8 +4,6 @@ import com.orange.demo.common.core.validator.UpdateGroup;
import com.orange.demo.common.core.validator.ConstDictRef;
import com.orange.demo.app.model.constant.ClassLevel;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -16,49 +14,42 @@ import javax.validation.constraints.*;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentClassDto对象")
@Data
public class StudentClassDto {
/**
* 班级Id。
*/
- @ApiModelProperty(value = "班级Id", required = true)
@NotNull(message = "数据验证失败,班级Id不能为空!", groups = {UpdateGroup.class})
private Long classId;
/**
* 班级名称。
*/
- @ApiModelProperty(value = "班级名称", required = true)
@NotBlank(message = "数据验证失败,班级名称不能为空!")
private String className;
/**
* 学校Id。
*/
- @ApiModelProperty(value = "学校Id", required = true)
@NotNull(message = "数据验证失败,所属校区不能为空!")
private Long schoolId;
/**
* 学生班长Id。
*/
- @ApiModelProperty(value = "学生班长Id", required = true)
@NotNull(message = "数据验证失败,学生班长不能为空!")
private Long leaderId;
/**
* 已完成课时数量。
*/
- @ApiModelProperty(value = "已完成课时数量", required = true)
@NotNull(message = "数据验证失败,已完成课时不能为空!", groups = {UpdateGroup.class})
private Integer finishClassHour;
/**
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
*/
- @ApiModelProperty(value = "班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)", required = true)
@NotNull(message = "数据验证失败,班级级别不能为空!")
@ConstDictRef(constDictClass = ClassLevel.class, message = "数据验证失败,班级级别为无效值!")
private Integer classLevel;
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentDto.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentDto.java
index 1fe0a22e..084ceddd 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentDto.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/dto/StudentDto.java
@@ -6,8 +6,6 @@ import com.orange.demo.application.common.constant.Gender;
import com.orange.demo.application.common.constant.ExpLevel;
import com.orange.demo.application.common.constant.StudentStatus;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.*;
@@ -20,56 +18,48 @@ import java.util.Date;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentDto对象")
@Data
public class StudentDto {
/**
* 学生Id。
*/
- @ApiModelProperty(value = "学生Id", required = true)
@NotNull(message = "数据验证失败,学生Id不能为空!", groups = {UpdateGroup.class})
private Long studentId;
/**
* 登录手机。
*/
- @ApiModelProperty(value = "登录手机", required = true)
@NotBlank(message = "数据验证失败,手机号码不能为空!")
private String loginMobile;
/**
* 学生姓名。
*/
- @ApiModelProperty(value = "学生姓名", required = true)
@NotBlank(message = "数据验证失败,学生姓名不能为空!")
private String studentName;
/**
* 所在省份Id。
*/
- @ApiModelProperty(value = "所在省份Id", required = true)
@NotNull(message = "数据验证失败,所在省份不能为空!")
private Long provinceId;
/**
* 所在城市Id。
*/
- @ApiModelProperty(value = "所在城市Id", required = true)
@NotNull(message = "数据验证失败,所在城市不能为空!")
private Long cityId;
/**
* 区县Id。
*/
- @ApiModelProperty(value = "区县Id", required = true)
@NotNull(message = "数据验证失败,所在区县不能为空!")
private Long districtId;
/**
* 学生性别 (0: 女生 1: 男生)。
*/
- @ApiModelProperty(value = "学生性别 (0: 女生 1: 男生)", required = true)
@NotNull(message = "数据验证失败,学生性别不能为空!")
@ConstDictRef(constDictClass = Gender.class, message = "数据验证失败,学生性别为无效值!")
private Integer gender;
@@ -77,14 +67,12 @@ public class StudentDto {
/**
* 生日。
*/
- @ApiModelProperty(value = "生日", required = true)
@NotNull(message = "数据验证失败,出生日期不能为空!")
private Date birthday;
/**
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
*/
- @ApiModelProperty(value = "经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)", required = true)
@NotNull(message = "数据验证失败,经验等级不能为空!")
@ConstDictRef(constDictClass = ExpLevel.class, message = "数据验证失败,经验等级为无效值!")
private Integer experienceLevel;
@@ -92,35 +80,30 @@ public class StudentDto {
/**
* 总共充值学币数量。
*/
- @ApiModelProperty(value = "总共充值学币数量", required = true)
@NotNull(message = "数据验证失败,充值学币不能为空!", groups = {UpdateGroup.class})
private Integer totalCoin;
/**
* 可用学币数量。
*/
- @ApiModelProperty(value = "可用学币数量", required = true)
@NotNull(message = "数据验证失败,剩余学币不能为空!", groups = {UpdateGroup.class})
private Integer leftCoin;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id", required = true)
@NotNull(message = "数据验证失败,年级不能为空!")
private Integer gradeId;
/**
* 校区Id。
*/
- @ApiModelProperty(value = "校区Id", required = true)
@NotNull(message = "数据验证失败,所属校区不能为空!")
private Long schoolId;
/**
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
*/
- @ApiModelProperty(value = "学生状态 (0: 正常 1: 锁定 2: 注销)", required = true)
@NotNull(message = "数据验证失败,学生状态不能为空!", groups = {UpdateGroup.class})
@ConstDictRef(constDictClass = StudentStatus.class, message = "数据验证失败,学生状态为无效值!")
private Integer status;
@@ -128,30 +111,25 @@ public class StudentDto {
/**
* birthday 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "birthday 范围过滤起始值(>=)")
private String birthdayStart;
/**
* birthday 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "birthday 范围过滤结束值(<=)")
private String birthdayEnd;
/**
* registerTime 范围过滤起始值(>=)。
*/
- @ApiModelProperty(value = "registerTime 范围过滤起始值(>=)")
private String registerTimeStart;
/**
* registerTime 范围过滤结束值(<=)。
*/
- @ApiModelProperty(value = "registerTime 范围过滤结束值(<=)")
private String registerTimeEnd;
/**
* login_mobile / student_name LIKE搜索字符串。
*/
- @ApiModelProperty(value = "LIKE模糊搜索字符串")
private String searchString;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/Grade.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/Grade.java
index 51c08bba..83310ef5 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/Grade.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/Grade.java
@@ -1,6 +1,5 @@
package com.orange.demo.app.model;
-import com.alibaba.fastjson.annotation.JSONField;
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
import lombok.Data;
import javax.persistence.*;
@@ -32,7 +31,6 @@ public class Grade {
/**
* 逻辑删除标记字段(1: 正常 -1: 已删除)。
*/
- @JSONField(serialize = false)
@DeletedFlagColumn
private Integer status;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/StudentClass.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/StudentClass.java
index 8e84b818..f421fae9 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/StudentClass.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/model/StudentClass.java
@@ -1,6 +1,5 @@
package com.orange.demo.app.model;
-import com.alibaba.fastjson.annotation.JSONField;
import com.orange.demo.app.model.constant.ClassLevel;
import com.orange.demo.common.core.annotation.RelationDict;
import com.orange.demo.common.core.annotation.RelationConstDict;
@@ -77,7 +76,6 @@ public class StudentClass {
/**
* 逻辑删除标记字段(1: 正常 -1: 已删除)。
*/
- @JSONField(serialize = false)
@DeletedFlagColumn
private Integer status;
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/service/impl/GradeServiceImpl.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/service/impl/GradeServiceImpl.java
index f458720b..58787818 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/service/impl/GradeServiceImpl.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/service/impl/GradeServiceImpl.java
@@ -2,12 +2,14 @@ package com.orange.demo.app.service.impl;
import com.orange.demo.common.core.base.service.BaseDictService;
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
-import com.orange.demo.common.core.cache.MapDictionaryCache;
+import com.orange.demo.common.redis.cache.RedisDictionaryCache;
import com.orange.demo.app.service.GradeService;
import com.orange.demo.app.dao.GradeMapper;
import com.orange.demo.app.model.Grade;
+import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import javax.annotation.PostConstruct;
/**
* 年级字典数据操作服务类。
@@ -20,10 +22,17 @@ public class GradeServiceImpl extends BaseDictService implements
@Autowired
private GradeMapper gradeMapper;
+ @Autowired
+ private RedissonClient redissonClient;
public GradeServiceImpl() {
super();
- this.dictionaryCache = MapDictionaryCache.create(Grade::getGradeId);
+ }
+
+ @PostConstruct
+ public void init() {
+ this.dictionaryCache = RedisDictionaryCache.create(
+ redissonClient, "Grade", Grade.class, Grade::getGradeId);
}
/**
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/AreaCodeVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/AreaCodeVo.java
index 8fa34c7b..a2263ff7 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/AreaCodeVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/AreaCodeVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -10,31 +8,26 @@ import lombok.Data;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("行政区划实体对象")
@Data
public class AreaCodeVo {
/**
* 行政区划主键Id
*/
- @ApiModelProperty(value = "行政区划主键Id", required = true)
private Long areaId;
/**
* 行政区划名称
*/
- @ApiModelProperty(value = "行政区划名称")
private String areaName;
/**
* 行政区划级别 (1: 省级别 2: 市级别 3: 区级别)
*/
- @ApiModelProperty(value = "行政区划级别")
private Integer areaLevel;
/**
* 父级行政区划Id
*/
- @ApiModelProperty(value = "父级行政区划Id")
private Long parentId;
}
\ No newline at end of file
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassCourseVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassCourseVo.java
index e6b9eed8..1d6b845c 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassCourseVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassCourseVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -10,25 +8,21 @@ import lombok.Data;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("ClassCourseVO实体对象")
@Data
public class ClassCourseVo {
/**
* 班级Id。
*/
- @ApiModelProperty(value = "班级Id")
private Long classId;
/**
* 课程Id。
*/
- @ApiModelProperty(value = "课程Id")
private Long courseId;
/**
* 课程顺序(数值越小越靠前)。
*/
- @ApiModelProperty(value = "课程顺序(数值越小越靠前)")
private Integer courseOrder;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassStudentVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassStudentVo.java
index 52a1ecf2..ae74a260 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassStudentVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/ClassStudentVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -10,19 +8,16 @@ import lombok.Data;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("ClassStudentVO实体对象")
@Data
public class ClassStudentVo {
/**
* 班级Id。
*/
- @ApiModelProperty(value = "班级Id")
private Long classId;
/**
* 学生Id。
*/
- @ApiModelProperty(value = "学生Id")
private Long studentId;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseTransStatsVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseTransStatsVo.java
index 8400fea8..4d65ba57 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseTransStatsVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseTransStatsVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -13,79 +11,66 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("CourseTransStatsVO实体对象")
@Data
public class CourseTransStatsVo {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id")
private Long statsId;
/**
* 统计日期。
*/
- @ApiModelProperty(value = "统计日期")
private Date statsDate;
/**
* 科目Id。
*/
- @ApiModelProperty(value = "科目Id")
private Integer subjectId;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id")
private Integer gradeId;
/**
* 年级名称。
*/
- @ApiModelProperty(value = "年级名称")
private String gradeName;
/**
* 课程Id。
*/
- @ApiModelProperty(value = "课程Id")
private Long courseId;
/**
* 课程名称。
*/
- @ApiModelProperty(value = "课程名称")
private String courseName;
/**
* 学生上课次数。
*/
- @ApiModelProperty(value = "学生上课次数")
private Integer studentAttendCount;
/**
* 学生献花数量。
*/
- @ApiModelProperty(value = "学生献花数量")
private Integer studentFlowerAmount;
/**
* 学生献花次数。
*/
- @ApiModelProperty(value = "学生献花次数")
private Integer studentFlowerCount;
/**
* gradeId 字典关联数据。
*/
- @ApiModelProperty(value = "gradeId 字典关联数据")
private Map gradeIdDictMap;
/**
* subjectId 常量字典关联数据。
*/
- @ApiModelProperty(value = "subjectId 常量字典关联数据")
private Map subjectIdDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseVo.java
index f51ab57b..89b1e50e 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/CourseVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@@ -14,103 +12,86 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("CourseVO实体对象")
@Data
public class CourseVo {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id")
private Long courseId;
/**
* 课程名称。
*/
- @ApiModelProperty(value = "课程名称")
private String courseName;
/**
* 课程价格。
*/
- @ApiModelProperty(value = "课程价格")
private BigDecimal price;
/**
* 课程描述。
*/
- @ApiModelProperty(value = "课程描述")
private String description;
/**
* 课程难度(0: 容易 1: 普通 2: 很难)。
*/
- @ApiModelProperty(value = "课程难度(0: 容易 1: 普通 2: 很难)")
private Integer difficulty;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id")
private Integer gradeId;
/**
* 学科Id。
*/
- @ApiModelProperty(value = "学科Id")
private Integer subjectId;
/**
* 课时数量。
*/
- @ApiModelProperty(value = "课时数量")
private Integer classHour;
/**
* 多张课程图片地址。
*/
- @ApiModelProperty(value = "多张课程图片地址")
private String pictureUrl;
/**
* 创建用户Id。
*/
- @ApiModelProperty(value = "创建用户Id")
private Long createUserId;
/**
* 创建时间。
*/
- @ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 最后修改时间。
*/
- @ApiModelProperty(value = "最后修改时间")
private Date updateTime;
/**
* courseId 的多对多关联表数据对象,数据对应类型为ClassCourseVo。
*/
- @ApiModelProperty(value = "courseId 的多对多关联表数据对象,数据对应类型为ClassCourseVo")
private Map classCourse;
/**
* gradeId 字典关联数据。
*/
- @ApiModelProperty(value = "gradeId 字典关联数据")
private Map gradeIdDictMap;
/**
* difficulty 常量字典关联数据。
*/
- @ApiModelProperty(value = "difficulty 常量字典关联数据")
private Map difficultyDictMap;
/**
* subjectId 常量字典关联数据。
*/
- @ApiModelProperty(value = "subjectId 常量字典关联数据")
private Map subjectIdDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/GradeVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/GradeVo.java
index 2292bef6..7e936c62 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/GradeVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/GradeVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -10,19 +8,16 @@ import lombok.Data;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("GradeVO实体对象")
@Data
public class GradeVo {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id")
private Integer gradeId;
/**
* 年级名称。
*/
- @ApiModelProperty(value = "年级名称")
private String gradeName;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/SchoolInfoVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/SchoolInfoVo.java
index c884930f..bfc57e86 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/SchoolInfoVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/SchoolInfoVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Map;
@@ -12,43 +10,36 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("SchoolInfoVO实体对象")
@Data
public class SchoolInfoVo {
/**
* 学校Id。
*/
- @ApiModelProperty(value = "学校Id")
private Long schoolId;
/**
* 学校名称。
*/
- @ApiModelProperty(value = "学校名称")
private String schoolName;
/**
* 所在省Id。
*/
- @ApiModelProperty(value = "所在省Id")
private Long provinceId;
/**
* 所在城市Id。
*/
- @ApiModelProperty(value = "所在城市Id")
private Long cityId;
/**
* provinceId 字典关联数据。
*/
- @ApiModelProperty(value = "provinceId 字典关联数据")
private Map provinceIdDictMap;
/**
* cityId 字典关联数据。
*/
- @ApiModelProperty(value = "cityId 字典关联数据")
private Map cityIdDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionStatsVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionStatsVo.java
index 43501c5d..7864fa6d 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionStatsVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionStatsVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -13,151 +11,126 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentActionStatsVO实体对象")
@Data
public class StudentActionStatsVo {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id")
private Long statsId;
/**
* 统计日期。
*/
- @ApiModelProperty(value = "统计日期")
private Date statsDate;
/**
* 统计小时。
*/
- @ApiModelProperty(value = "统计小时")
private Date statsMonth;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id")
private Integer gradeId;
/**
* 学生所在省Id。
*/
- @ApiModelProperty(value = "学生所在省Id")
private Long provinceId;
/**
* 学生所在城市Id。
*/
- @ApiModelProperty(value = "学生所在城市Id")
private Long cityId;
/**
* 购课学币数量。
*/
- @ApiModelProperty(value = "购课学币数量")
private Integer buyCourseAmount;
/**
* 购买课程次数。
*/
- @ApiModelProperty(value = "购买课程次数")
private Integer buyCourseCount;
/**
* 购买视频学币数量。
*/
- @ApiModelProperty(value = "购买视频学币数量")
private Integer buyVideoAmount;
/**
* 购买视频次数。
*/
- @ApiModelProperty(value = "购买视频次数")
private Integer buyVideoCount;
/**
* 购买作业学币数量。
*/
- @ApiModelProperty(value = "购买作业学币数量")
private Integer buyPaperAmount;
/**
* 购买作业次数。
*/
- @ApiModelProperty(value = "购买作业次数")
private Integer buyPaperCount;
/**
* 购买献花数量。
*/
- @ApiModelProperty(value = "购买献花数量")
private Integer buyFlowerAmount;
/**
* 购买献花次数。
*/
- @ApiModelProperty(value = "购买献花次数")
private Integer buyFlowerCount;
/**
* 充值学币数量。
*/
- @ApiModelProperty(value = "充值学币数量")
private Integer rechargeCoinAmount;
/**
* 充值学币次数。
*/
- @ApiModelProperty(value = "充值学币次数")
private Integer rechargeCoinCount;
/**
* 线下课程上课次数。
*/
- @ApiModelProperty(value = "线下课程上课次数")
private Integer doCourseCount;
/**
* 观看视频次数。
*/
- @ApiModelProperty(value = "观看视频次数")
private Integer watchVideoCount;
/**
* 购买献花消费学币数量。
*/
- @ApiModelProperty(value = "购买献花消费学币数量")
private Integer watchVideoTotalSecond;
/**
* 做题数量。
*/
- @ApiModelProperty(value = "做题数量")
private Integer doExerciseCount;
/**
* 做题正确的数量。
*/
- @ApiModelProperty(value = "做题正确的数量")
private Integer doExerciseCorrectCount;
/**
* gradeId 字典关联数据。
*/
- @ApiModelProperty(value = "gradeId 字典关联数据")
private Map gradeIdDictMap;
/**
* provinceId 字典关联数据。
*/
- @ApiModelProperty(value = "provinceId 字典关联数据")
private Map provinceIdDictMap;
/**
* cityId 字典关联数据。
*/
- @ApiModelProperty(value = "cityId 字典关联数据")
private Map cityIdDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionTransVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionTransVo.java
index 6cf24396..38c749ed 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionTransVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentActionTransVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -13,121 +11,101 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentActionTransVO实体对象")
@Data
public class StudentActionTransVo {
/**
* 主键Id。
*/
- @ApiModelProperty(value = "主键Id")
private Long transId;
/**
* 学生Id。
*/
- @ApiModelProperty(value = "学生Id")
private Long studentId;
/**
* 学生名称。
*/
- @ApiModelProperty(value = "学生名称")
private String studentName;
/**
* 学生校区。
*/
- @ApiModelProperty(value = "学生校区")
private Long schoolId;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id")
private Integer gradeId;
/**
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
*/
- @ApiModelProperty(value = "行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)")
private Integer actionType;
/**
* 设备类型(0: iOS 1: Android 2: PC)。
*/
- @ApiModelProperty(value = "设备类型(0: iOS 1: Android 2: PC)")
private Integer deviceType;
/**
* 看视频秒数。
*/
- @ApiModelProperty(value = "看视频秒数")
private Integer watchVideoSeconds;
/**
* 购买献花数量。
*/
- @ApiModelProperty(value = "购买献花数量")
private Integer flowerCount;
/**
* 购买作业数量。
*/
- @ApiModelProperty(value = "购买作业数量")
private Integer paperCount;
/**
* 购买视频数量。
*/
- @ApiModelProperty(value = "购买视频数量")
private Integer videoCount;
/**
* 购买课程数量。
*/
- @ApiModelProperty(value = "购买课程数量")
private Integer courseCount;
/**
* 充值学币数量。
*/
- @ApiModelProperty(value = "充值学币数量")
private Integer coinCount;
/**
* 做题是否正确标记。
*/
- @ApiModelProperty(value = "做题是否正确标记")
private Integer exerciseCorrectFlag;
/**
* 发生时间。
*/
- @ApiModelProperty(value = "发生时间")
private Date createTime;
/**
* schoolId 字典关联数据。
*/
- @ApiModelProperty(value = "schoolId 字典关联数据")
private Map schoolIdDictMap;
/**
* gradeId 字典关联数据。
*/
- @ApiModelProperty(value = "gradeId 字典关联数据")
private Map gradeIdDictMap;
/**
* actionType 常量字典关联数据。
*/
- @ApiModelProperty(value = "actionType 常量字典关联数据")
private Map actionTypeDictMap;
/**
* deviceType 常量字典关联数据。
*/
- @ApiModelProperty(value = "deviceType 常量字典关联数据")
private Map deviceTypeDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentClassVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentClassVo.java
index c8808215..987912cf 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentClassVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentClassVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -13,73 +11,61 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentClassVO实体对象")
@Data
public class StudentClassVo {
/**
* 班级Id。
*/
- @ApiModelProperty(value = "班级Id")
private Long classId;
/**
* 班级名称。
*/
- @ApiModelProperty(value = "班级名称")
private String className;
/**
* 学校Id。
*/
- @ApiModelProperty(value = "学校Id")
private Long schoolId;
/**
* 学生班长Id。
*/
- @ApiModelProperty(value = "学生班长Id")
private Long leaderId;
/**
* 已完成课时数量。
*/
- @ApiModelProperty(value = "已完成课时数量")
private Integer finishClassHour;
/**
* 班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)。
*/
- @ApiModelProperty(value = "班级级别(0: 初级班 1: 培优班 2: 冲刺提分班 3: 竞赛班)")
private Integer classLevel;
/**
* 创建用户。
*/
- @ApiModelProperty(value = "创建用户")
private Long createUserId;
/**
* 班级创建时间。
*/
- @ApiModelProperty(value = "班级创建时间")
private Date createTime;
/**
* schoolId 字典关联数据。
*/
- @ApiModelProperty(value = "schoolId 字典关联数据")
private Map schoolIdDictMap;
/**
* leaderId 字典关联数据。
*/
- @ApiModelProperty(value = "leaderId 字典关联数据")
private Map leaderIdDictMap;
/**
* classLevel 常量字典关联数据。
*/
- @ApiModelProperty(value = "classLevel 常量字典关联数据")
private Map classLevelDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentVo.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentVo.java
index 210914f4..78862b1e 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentVo.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/app/vo/StudentVo.java
@@ -1,7 +1,5 @@
package com.orange.demo.app.vo;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@@ -13,145 +11,121 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@ApiModel("StudentVO实体对象")
@Data
public class StudentVo {
/**
* 学生Id。
*/
- @ApiModelProperty(value = "学生Id")
private Long studentId;
/**
* 登录手机。
*/
- @ApiModelProperty(value = "登录手机")
private String loginMobile;
/**
* 学生姓名。
*/
- @ApiModelProperty(value = "学生姓名")
private String studentName;
/**
* 所在省份Id。
*/
- @ApiModelProperty(value = "所在省份Id")
private Long provinceId;
/**
* 所在城市Id。
*/
- @ApiModelProperty(value = "所在城市Id")
private Long cityId;
/**
* 区县Id。
*/
- @ApiModelProperty(value = "区县Id")
private Long districtId;
/**
* 学生性别 (0: 女生 1: 男生)。
*/
- @ApiModelProperty(value = "学生性别 (0: 女生 1: 男生)")
private Integer gender;
/**
* 生日。
*/
- @ApiModelProperty(value = "生日")
private Date birthday;
/**
* 经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)。
*/
- @ApiModelProperty(value = "经验等级 (0: 初级 1: 中级 2: 高级 3: 资深)")
private Integer experienceLevel;
/**
* 总共充值学币数量。
*/
- @ApiModelProperty(value = "总共充值学币数量")
private Integer totalCoin;
/**
* 可用学币数量。
*/
- @ApiModelProperty(value = "可用学币数量")
private Integer leftCoin;
/**
* 年级Id。
*/
- @ApiModelProperty(value = "年级Id")
private Integer gradeId;
/**
* 校区Id。
*/
- @ApiModelProperty(value = "校区Id")
private Long schoolId;
/**
* 注册时间。
*/
- @ApiModelProperty(value = "注册时间")
private Date registerTime;
/**
* 学生状态 (0: 正常 1: 锁定 2: 注销)。
*/
- @ApiModelProperty(value = "学生状态 (0: 正常 1: 锁定 2: 注销)")
private Integer status;
/**
* provinceId 字典关联数据。
*/
- @ApiModelProperty(value = "provinceId 字典关联数据")
private Map provinceIdDictMap;
/**
* cityId 字典关联数据。
*/
- @ApiModelProperty(value = "cityId 字典关联数据")
private Map cityIdDictMap;
/**
* districtId 字典关联数据。
*/
- @ApiModelProperty(value = "districtId 字典关联数据")
private Map districtIdDictMap;
/**
* gradeId 字典关联数据。
*/
- @ApiModelProperty(value = "gradeId 字典关联数据")
private Map gradeIdDictMap;
/**
* schoolId 字典关联数据。
*/
- @ApiModelProperty(value = "schoolId 字典关联数据")
private Map schoolIdDictMap;
/**
* gender 常量字典关联数据。
*/
- @ApiModelProperty(value = "gender 常量字典关联数据")
private Map genderDictMap;
/**
* experienceLevel 常量字典关联数据。
*/
- @ApiModelProperty(value = "experienceLevel 常量字典关联数据")
private Map experienceLevelDictMap;
/**
* status 常量字典关联数据。
*/
- @ApiModelProperty(value = "status 常量字典关联数据")
private Map statusDictMap;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/config/ApplicationConfig.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/config/ApplicationConfig.java
index 95711baa..d0ffac73 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/config/ApplicationConfig.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/config/ApplicationConfig.java
@@ -43,4 +43,9 @@ public class ApplicationConfig {
* 授信ip列表,没有填写表示全部信任。多个ip之间逗号分隔,如: http://10.10.10.1:8080,http://10.10.10.2:8080
*/
private String credentialIpList;
+ /**
+ * Session的用户权限在Redis中的过期时间(秒)。
+ * 缺省值是 one day
+ */
+ private int permRedisExpiredSeconds = 86400;
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/interceptor/AuthenticationInterceptor.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/interceptor/AuthenticationInterceptor.java
index 6a322992..11beacee 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/interceptor/AuthenticationInterceptor.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/interceptor/AuthenticationInterceptor.java
@@ -11,13 +11,16 @@ import com.orange.demo.common.core.object.ResponseResult;
import com.orange.demo.common.core.object.TokenData;
import com.orange.demo.common.core.util.ApplicationContextHolder;
import com.orange.demo.common.core.util.JwtUtil;
-import com.orange.demo.common.core.cache.SessionCacheHelper;
+import com.orange.demo.common.core.util.RedisKeyUtil;
+import com.orange.demo.common.redis.cache.SessionCacheHelper;
import io.jsonwebtoken.Claims;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -36,13 +39,15 @@ import java.util.stream.Collectors;
@Slf4j
public class AuthenticationInterceptor implements HandlerInterceptor {
- private ApplicationConfig appConfig =
+ private final ApplicationConfig appConfig =
ApplicationContextHolder.getBean("applicationConfig");
- private SessionCacheHelper cacheHelper =
+ private final JedisPool jedisPool = ApplicationContextHolder.getBean(JedisPool.class);
+
+ private final SessionCacheHelper cacheHelper =
ApplicationContextHolder.getBean("sessionCacheHelper");
- private SysPermService sysPermService =
+ private final SysPermService sysPermService =
ApplicationContextHolder.getBean(SysPermService.class);
private static SysPermWhitelistService sysPermWhitelistService =
@@ -90,13 +95,13 @@ public class AuthenticationInterceptor implements HandlerInterceptor {
TokenData.addToRequest(tokenData);
// 如果url在权限资源白名单中,则不需要进行鉴权操作
if (Boolean.FALSE.equals(tokenData.getIsAdmin()) && !whitelistPermSet.contains(url)) {
- Set urlSet = sysPermService.getCacheableSysPermSetByUserId(
- tokenData.getSessionId(), tokenData.getUserId());
- if (!urlSet.contains(url)) {
- response.setStatus(HttpServletResponse.SC_FORBIDDEN);
- this.outputResponseMessage(response,
- ResponseResult.error(ErrorCodeEnum.NO_OPERATION_PERMISSION));
- return false;
+ try (Jedis jedis = jedisPool.getResource()) {
+ if (!jedis.sismember(RedisKeyUtil.makeSessionPermIdKeyForRedis(tokenData.getSessionId()), url)) {
+ response.setStatus(HttpServletResponse.SC_FORBIDDEN);
+ this.outputResponseMessage(response,
+ ResponseResult.error(ErrorCodeEnum.NO_OPERATION_PERMISSION));
+ return false;
+ }
}
}
if (JwtUtil.needToRefresh(c)) {
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/LoginController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/LoginController.java
index e2d79b8f..b3134a85 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/LoginController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/LoginController.java
@@ -1,10 +1,6 @@
package com.orange.demo.upms.controller;
import com.alibaba.fastjson.JSONObject;
-import com.github.xiaoymin.knife4j.annotations.ApiSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
import lombok.extern.slf4j.Slf4j;
import com.orange.demo.config.ApplicationConfig;
import com.orange.demo.upms.service.*;
@@ -19,7 +15,7 @@ import com.orange.demo.common.core.constant.ErrorCodeEnum;
import com.orange.demo.common.core.object.ResponseResult;
import com.orange.demo.common.core.object.TokenData;
import com.orange.demo.common.core.util.*;
-import com.orange.demo.common.core.cache.SessionCacheHelper;
+import com.orange.demo.common.redis.cache.SessionCacheHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.*;
@@ -34,8 +30,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@ApiSupport(order = 1)
-@Api(tags = "用户登录接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/login")
@@ -63,12 +57,6 @@ public class LoginController {
* @param password 密码。
* @return 应答结果对象,其中包括JWT的Token数据,以及菜单列表。
*/
- @ApiImplicitParams({
- // 这里包含密码密文,仅用于方便开发期间的接口测试,集成测试和发布阶段,需要将当前注解去掉。
- // 如果您重新生成了公钥和私钥,请替换password的缺省值。
- @ApiImplicitParam(name = "loginName", defaultValue = "admin"),
- @ApiImplicitParam(name = "password", defaultValue = "IP3ccke3GhH45iGHB5qP9p7iZw6xUyj28Ju10rnBiPKOI35sc%2BjI7%2FdsjOkHWMfUwGYGfz8ik31HC2Ruk%2Fhkd9f6RPULTHj7VpFdNdde2P9M4mQQnFBAiPM7VT9iW3RyCtPlJexQ3nAiA09OqG%2F0sIf1kcyveSrulxembARDbDo%3D")
- })
@NoAuthInterface
@PostMapping("/doLogin")
public ResponseResult doLogin(
@@ -104,18 +92,20 @@ public class LoginController {
tokenData.setShowName(user.getShowName());
tokenData.setIsAdmin(isAdmin);
cacheHelper.putTokenData(sessionId, tokenData);
- List menuList;
+ Collection menuList;
+ Collection permCodeList;
if (isAdmin) {
menuList = sysMenuService.getAllMenuList();
+ permCodeList = sysPermCodeService.getAllPermCodeList();
} else {
menuList = sysMenuService.getMenuListByUserId(user.getUserId());
- List permCodeList = sysPermCodeService.getPermCodeListByUserId(user.getUserId());
- jsonData.put("permCodeList", permCodeList);
+ permCodeList = sysPermCodeService.getPermCodeListByUserId(user.getUserId());
}
jsonData.put("menuList", menuList);
+ jsonData.put("permCodeList", permCodeList);
if (user.getUserType() != SysUserType.TYPE_ADMIN) {
// 缓存用户的权限资源
- sysPermService.putUserSysPermCache(sessionId, user.getUserId(), isAdmin);
+ sysPermService.putUserSysPermCache(sessionId, user.getUserId());
}
return ResponseResult.success(jsonData);
}
@@ -128,6 +118,7 @@ public class LoginController {
@PostMapping("/doLogout")
public ResponseResult doLogout() {
TokenData tokenData = TokenData.takeFromRequest();
+ sysPermService.removeUserSysPermCache(tokenData.getSessionId());
cacheHelper.removeAllSessionCache(tokenData.getSessionId());
return ResponseResult.success();
}
@@ -148,15 +139,17 @@ public class LoginController {
JSONObject jsonData = new JSONObject();
jsonData.put("showName", tokenData.getShowName());
jsonData.put("isAdmin", tokenData.getIsAdmin());
- List menuList;
+ Collection menuList;
+ Collection permCodeList;
if (tokenData.getIsAdmin()) {
menuList = sysMenuService.getAllMenuList();
+ permCodeList = sysPermCodeService.getAllPermCodeList();
} else {
menuList = sysMenuService.getMenuListByUserId(tokenData.getUserId());
- List permCodeList = sysPermCodeService.getPermCodeListByUserId(tokenData.getUserId());
- jsonData.put("permCodeList", permCodeList);
+ permCodeList = sysPermCodeService.getPermCodeListByUserId(tokenData.getUserId());
}
jsonData.put("menuList", menuList);
+ jsonData.put("permCodeList", permCodeList);
return ResponseResult.success(jsonData);
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysMenuController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysMenuController.java
index 9bef8c32..82c4b41d 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysMenuController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysMenuController.java
@@ -1,7 +1,5 @@
package com.orange.demo.upms.controller;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import com.orange.demo.upms.dto.SysMenuDto;
import com.orange.demo.upms.vo.SysMenuVo;
@@ -24,7 +22,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "菜单管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/sysMenu")
@@ -41,7 +38,6 @@ public class SysMenuController {
* @return 应答结果对象,包含新增菜单的主键Id。
*/
@SuppressWarnings("unchecked")
- @ApiOperationSupport(ignoreParameters = {"sysMenu.menuId"})
@PostMapping("/add")
public ResponseResult add(
@MyRequestBody("sysMenu") SysMenuDto sysMenuDto, @MyRequestBody String permCodeIdListString) {
@@ -126,9 +122,9 @@ public class SysMenuController {
*
* @return 应答结果对象,包含全部菜单数据列表。
*/
- @GetMapping("/list")
+ @PostMapping("/list")
public ResponseResult> list() {
- List sysMenuList = sysMenuService.getAllListByOrder("menuType", "showOrder");
+ List sysMenuList = sysMenuService.getAllListByOrder("showOrder");
return ResponseResult.success(MyModelUtil.copyCollectionTo(sysMenuList, SysMenuVo.class));
}
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermCodeController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermCodeController.java
index 6c03aff6..f997524a 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermCodeController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermCodeController.java
@@ -1,7 +1,5 @@
package com.orange.demo.upms.controller;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import com.orange.demo.upms.dto.SysPermCodeDto;
import com.orange.demo.upms.vo.SysPermCodeVo;
@@ -25,7 +23,6 @@ import java.util.*;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "权限字管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/sysPermCode")
@@ -42,7 +39,6 @@ public class SysPermCodeController {
* @return 应答结果对象,包含新增权限字的主键Id。
*/
@SuppressWarnings("unchecked")
- @ApiOperationSupport(ignoreParameters = {"sysPermCode.permCodeId"})
@PostMapping("/add")
public ResponseResult add(
@MyRequestBody("sysPermCode") SysPermCodeDto sysPermCodeDto, @MyRequestBody String permIdListString) {
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermController.java
index 31348888..65dec199 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermController.java
@@ -1,7 +1,5 @@
package com.orange.demo.upms.controller;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import lombok.extern.slf4j.Slf4j;
@@ -27,7 +25,6 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "权限资源管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/sysPerm")
@@ -42,7 +39,6 @@ public class SysPermController {
* @param sysPermDto 新增权限资源对象。
* @return 应答结果对象,包含新增权限资源的主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {"sysPerm.permId"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("sysPerm") SysPermDto sysPermDto) {
String errorMessage = MyCommonUtil.getModelValidationError(sysPermDto);
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermModuleController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermModuleController.java
index b59ea5ce..4b22c12f 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermModuleController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysPermModuleController.java
@@ -1,7 +1,5 @@
package com.orange.demo.upms.controller;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import com.orange.demo.upms.dto.SysPermModuleDto;
import com.orange.demo.upms.vo.SysPermModuleVo;
@@ -29,7 +27,6 @@ import java.util.Map;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "权限资源模块管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/sysPermModule")
@@ -44,7 +41,6 @@ public class SysPermModuleController {
* @param sysPermModuleDto 新增权限资源模块对象。
* @return 应答结果对象,包含新增权限资源模块的主键Id。
*/
- @ApiOperationSupport(ignoreParameters = {"sysPermModule.moduleId"})
@PostMapping("/add")
public ResponseResult add(@MyRequestBody("sysPermModule") SysPermModuleDto sysPermModuleDto) {
String errorMessage = MyCommonUtil.getModelValidationError(sysPermModuleDto);
@@ -121,7 +117,7 @@ public class SysPermModuleController {
*
* @return 应答结果对象,包含权限资源模块列表。
*/
- @GetMapping("/list")
+ @PostMapping("/list")
public ResponseResult> list() {
List permModuleList = sysPermModuleService.getAllListByOrder("showOrder");
return ResponseResult.success(MyModelUtil.copyCollectionTo(permModuleList, SysPermModuleVo.class));
@@ -132,7 +128,7 @@ public class SysPermModuleController {
*
* @return 应答结果对象,包含树状列表,结构为权限资源模块和权限资源之间的树状关系。
*/
- @GetMapping("/listAll")
+ @PostMapping("/listAll")
public ResponseResult>> listAll() {
List sysPermModuleList = sysPermModuleService.getPermModuleAndPermList();
List> resultList = new LinkedList<>();
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysRoleController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysRoleController.java
index 6424148b..581da380 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysRoleController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysRoleController.java
@@ -1,7 +1,5 @@
package com.orange.demo.upms.controller;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import lombok.extern.slf4j.Slf4j;
@@ -32,7 +30,6 @@ import java.util.stream.Collectors;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "角色管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/sysRole")
@@ -51,7 +48,6 @@ public class SysRoleController {
* @return 应答结果对象,包含新增角色的主键Id。
*/
@SuppressWarnings("unchecked")
- @ApiOperationSupport(ignoreParameters = {"sysRole.roleId", "sysRole.createTimeStart", "sysRole.createTimeEnd"})
@PostMapping("/add")
public ResponseResult add(
@MyRequestBody("sysRole") SysRoleDto sysRoleDto, @MyRequestBody String menuIdListString) {
@@ -80,7 +76,6 @@ public class SysRoleController {
* @return 应答结果对象。
*/
@SuppressWarnings("unchecked")
- @ApiOperationSupport(ignoreParameters = {"sysRole.createTimeStart", "sysRole.createTimeEnd"})
@PostMapping("/update")
public ResponseResult update(
@MyRequestBody("sysRole") SysRoleDto sysRoleDto, @MyRequestBody String menuIdListString) {
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysUserController.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysUserController.java
index 29bbc262..9058bfff 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysUserController.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/controller/SysUserController.java
@@ -12,8 +12,6 @@ import com.orange.demo.common.core.annotation.MyRequestBody;
import com.orange.demo.common.core.validator.AddGroup;
import com.orange.demo.common.core.validator.UpdateGroup;
import com.orange.demo.config.ApplicationConfig;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.beans.factory.annotation.Autowired;
@@ -28,7 +26,6 @@ import javax.validation.groups.Default;
* @author Jerry
* @date 2020-09-24
*/
-@Api(tags = "用户管理管理接口")
@Slf4j
@RestController
@RequestMapping("/admin/upms/sysUser")
@@ -49,10 +46,6 @@ public class SysUserController {
* @return 应答结果对象,包含新增用户的主键Id。
*/
@SuppressWarnings("unchecked")
- @ApiOperationSupport(ignoreParameters = {
- "sysUser.userId",
- "sysUser.createTimeStart",
- "sysUser.createTimeEnd"})
@PostMapping("/add")
public ResponseResult add(
@MyRequestBody("sysUser") SysUserDto sysUserDto, @MyRequestBody String roleIdListString) {
@@ -78,9 +71,6 @@ public class SysUserController {
* @return 应答结果对象。
*/
@SuppressWarnings("unchecked")
- @ApiOperationSupport(ignoreParameters = {
- "sysUser.createTimeStart",
- "sysUser.createTimeEnd"})
@PostMapping("/update")
public ResponseResult update(
@MyRequestBody("sysUser") SysUserDto sysUserDto, @MyRequestBody String roleIdListString) {
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/SysPermMapper.java b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/SysPermMapper.java
index bed98b90..43ce9fd9 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/SysPermMapper.java
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/SysPermMapper.java
@@ -20,7 +20,7 @@ public interface SysPermMapper extends BaseDaoMapper {
* @param userId 用户Id。
* @return 该用户的权限标识列表。
*/
- List getPermListByUserId(@Param("userId") Long userId);
+ List getPermListByUserId(@Param("userId") Long userId);
/**
* 查询权限资源地址的用户列表。同时返回详细的分配路径。
diff --git a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/mapper/SysMenuMapper.xml b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/mapper/SysMenuMapper.xml
index 28d10f56..10080ef3 100644
--- a/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/mapper/SysMenuMapper.xml
+++ b/orange-demo-single-service/application/src/main/java/com/orange/demo/upms/dao/mapper/SysMenuMapper.xml
@@ -18,7 +18,7 @@