diff --git a/.gitignore b/.gitignore
index a1c2a23..ee44a96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,2 @@
-# Compiled class file
-*.class
-
-# Log file
-*.log
-
-# BlueJ files
-*.ctxt
-
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
-
-# Package Files #
-*.jar
-*.war
-*.nar
-*.ear
-*.zip
-*.tar.gz
-*.rar
-
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
+.idea
+target
diff --git a/.idea/CommonUtil.iml b/.idea/CommonUtil.iml
deleted file mode 100644
index 78b2cc5..0000000
--- a/.idea/CommonUtil.iml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index a55e7a1..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index bf436c3..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 299eb42..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/intellij-javadocs-4.0.1.xml b/.idea/intellij-javadocs-4.0.1.xml
deleted file mode 100644
index 6bd07b1..0000000
--- a/.idea/intellij-javadocs-4.0.1.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-
-
-
-
- UPDATE
- false
- true
-
- METHOD
- FIELD
- TYPE
-
-
- PROTECTED
- DEFAULT
- PUBLIC
-
-
-
-
-
- ^.*(public|protected|private)*.+interface\s+\w+.*
- /**\n
- * The interface ${name}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
- */
-
-
- ^.*(public|protected|private)*.+enum\s+\w+.*
- /**\n
- * The enum ${name}.\n
- */
-
-
- ^.*(public|protected|private)*.+class\s+\w+.*
- /**\n
- * The type ${name}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
- */
-
-
- .+
- /**\n
- * The type ${name}.\n
- */
-
-
-
-
- .+
- /**\n
- * Instantiates a new ${name}.\n
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
-
-
- ^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+
- /**\n
- * Gets ${partName}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${partName}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- ^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+
- /**\n
- * Sets ${partName}.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${partName}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- ^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+
- /**\n
- * The entry point of application.\n
-
- <#if element.parameterList.parameters?has_content>
- *\n
-</#if>
- * @param ${element.parameterList.parameters[0].name} the input arguments\n
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
- .+
- /**\n
- * ${name}<#if isNotVoid> ${return}</#if>.\n
-<#if element.typeParameters?has_content> * \n
-</#if>
-<#list element.typeParameters as typeParameter>
- * @param <${typeParameter.name}> the type parameter\n
-</#list>
-<#if element.parameterList.parameters?has_content>
- *\n
-</#if>
-<#list element.parameterList.parameters as parameter>
- * @param ${parameter.name} the ${paramNames[parameter.name]}\n
-</#list>
-<#if isNotVoid>
- *\n
- * @return the ${return}\n
-</#if>
-<#if element.throwsList.referenceElements?has_content>
- *\n
-</#if>
-<#list element.throwsList.referenceElements as exception>
- * @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
-</#list>
- */
-
-
-
-
- ^.*(public|protected|private)*.+static.*(\w\s\w)+.+
- /**\n
- * The constant ${element.getName()}.\n
- */
-
-
- ^.*(public|protected|private)*.*(\w\s\w)+.+
- /**\n
- <#if element.parent.isInterface()>
- * The constant ${element.getName()}.\n
-<#else>
- * The ${name}.\n
-</#if> */
-
-
- .+
- /**\n
- <#if element.parent.isEnum()>
- *${name} ${typeName}.\n
-<#else>
- * The ${name}.\n
-</#if>*/
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
deleted file mode 100644
index 9687c92..0000000
--- a/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 4b661a5..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/0/3/0398ccd0f49298b10a3d76a47800d2ebecd49859 b/.idea/sonarlint/issuestore/0/3/0398ccd0f49298b10a3d76a47800d2ebecd49859
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/0/6/06f65155ec73600b9fc5c4dc2883d4bb84d8e284 b/.idea/sonarlint/issuestore/0/6/06f65155ec73600b9fc5c4dc2883d4bb84d8e284
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/1/1/1195786afcb95315b3ec156ea91e7166c2c2cf10 b/.idea/sonarlint/issuestore/1/1/1195786afcb95315b3ec156ea91e7166c2c2cf10
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/1/4/14399913ca07717830f9b08ee87644884fc2959a b/.idea/sonarlint/issuestore/1/4/14399913ca07717830f9b08ee87644884fc2959a
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/1/5/157e0e9285b69e300624f35e79300c0ed6098936 b/.idea/sonarlint/issuestore/1/5/157e0e9285b69e300624f35e79300c0ed6098936
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/1/7/1759e0760a24aae1fd0b2b5d7d8622112c621b0e b/.idea/sonarlint/issuestore/1/7/1759e0760a24aae1fd0b2b5d7d8622112c621b0e
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/1/9/19affac2f7e5749f37c36532ef281eec1befbd05 b/.idea/sonarlint/issuestore/1/9/19affac2f7e5749f37c36532ef281eec1befbd05
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/1/c/1c4b500508bae883bea47d0637c267e8c57d7580 b/.idea/sonarlint/issuestore/1/c/1c4b500508bae883bea47d0637c267e8c57d7580
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/2/1/21fd7f9a07ee140f9ce9ae11bbe161bdd456cbc8 b/.idea/sonarlint/issuestore/2/1/21fd7f9a07ee140f9ce9ae11bbe161bdd456cbc8
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/2/4/24139dae656713ba861751fb2c2ac38839349a7a b/.idea/sonarlint/issuestore/2/4/24139dae656713ba861751fb2c2ac38839349a7a
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/2/b/2b5e0787fcb106c7e2c215b9201949810fe97d18 b/.idea/sonarlint/issuestore/2/b/2b5e0787fcb106c7e2c215b9201949810fe97d18
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/4/1/416390ba57649e9f4e6365934e9a6827cca3ffed b/.idea/sonarlint/issuestore/4/1/416390ba57649e9f4e6365934e9a6827cca3ffed
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/4/9/490c965ee8a02ce158895987485283bb4b666ab6 b/.idea/sonarlint/issuestore/4/9/490c965ee8a02ce158895987485283bb4b666ab6
deleted file mode 100644
index 9f4a040..0000000
--- a/.idea/sonarlint/issuestore/4/9/490c965ee8a02ce158895987485283bb4b666ab6
+++ /dev/null
@@ -1,12 +0,0 @@
-
-N
-java:S2864"4Iterate over the "entrySet" instead of the "keySet".(q8Ɏ/
-
-java:S1319"mThe return type of this method should be an interface such as "Map" rather than the implementation "HashMap".(ةH8Ɏ/
-e java:S112"FDefine and throw a dedicated exception instead of using a generic one.(Ş8Ɏ/
-
-java:S1319"kThe type of the "uri" object should be an interface such as "Map" rather than the implementation "HashMap".(إ8Ɏ/
-
-java:S1130"lRemove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.(Ş8Ɏ/
-i
-java:S2095"IUse try-with-resources or close this "MongoClient" in a "finally" clause.(8Ɏ/
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/4/a/4a24c23f6158d7abc5657040e232691adcee44ac b/.idea/sonarlint/issuestore/4/a/4a24c23f6158d7abc5657040e232691adcee44ac
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/4/f/4ffd3a6de814df96de78c74e6c16f964b4fe9a03 b/.idea/sonarlint/issuestore/4/f/4ffd3a6de814df96de78c74e6c16f964b4fe9a03
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/6/4/644b718a1d63acca44c411c399624e16ce98e11c b/.idea/sonarlint/issuestore/6/4/644b718a1d63acca44c411c399624e16ce98e11c
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/6/5/65fb0f3f093182fd2ca42f4eb1116d36adc8a868 b/.idea/sonarlint/issuestore/6/5/65fb0f3f093182fd2ca42f4eb1116d36adc8a868
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/6/b/6b5bb34dca0a1a09968bad0dc5ab4ad5434df80e b/.idea/sonarlint/issuestore/6/b/6b5bb34dca0a1a09968bad0dc5ab4ad5434df80e
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/6/f/6f823bd3fbefd4cf49e9d51ea41235329137be8c b/.idea/sonarlint/issuestore/6/f/6f823bd3fbefd4cf49e9d51ea41235329137be8c
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/7/4/74438aca9f4a48488fe204b00a7429cabb247abb b/.idea/sonarlint/issuestore/7/4/74438aca9f4a48488fe204b00a7429cabb247abb
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/7/7/776a6d7b367518db3108c641270f9c6311fa1150 b/.idea/sonarlint/issuestore/7/7/776a6d7b367518db3108c641270f9c6311fa1150
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/8/0/80bf55a45d89443866509f377d2b4f56db7fda1b b/.idea/sonarlint/issuestore/8/0/80bf55a45d89443866509f377d2b4f56db7fda1b
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/8/9/899c5b5653c6a42950622470eb34ab3cd5851009 b/.idea/sonarlint/issuestore/8/9/899c5b5653c6a42950622470eb34ab3cd5851009
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d b/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/9/f/9f5f569cdcb2cd35235adfef521ccd334b295f84 b/.idea/sonarlint/issuestore/9/f/9f5f569cdcb2cd35235adfef521ccd334b295f84
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/a/4/a43b6e3feeba3336586237a758acfa97b791be5b b/.idea/sonarlint/issuestore/a/4/a43b6e3feeba3336586237a758acfa97b791be5b
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/a/5/a5cc2925ca8258af241be7e5b0381edf30266302 b/.idea/sonarlint/issuestore/a/5/a5cc2925ca8258af241be7e5b0381edf30266302
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/a/7/a7482e3aea73010d528b7d36a1714c752a72fa1d b/.idea/sonarlint/issuestore/a/7/a7482e3aea73010d528b7d36a1714c752a72fa1d
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/b/2/b28def072d697c755d8047d7c4fc36e92d284e43 b/.idea/sonarlint/issuestore/b/2/b28def072d697c755d8047d7c4fc36e92d284e43
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/b/c/bc46480ac8ea27c54208391c0607483f70591f52 b/.idea/sonarlint/issuestore/b/c/bc46480ac8ea27c54208391c0607483f70591f52
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/c/1/c131e8dffaaace66f248f9071023b60be7b277a4 b/.idea/sonarlint/issuestore/c/1/c131e8dffaaace66f248f9071023b60be7b277a4
deleted file mode 100644
index 61b3d6b..0000000
--- a/.idea/sonarlint/issuestore/c/1/c131e8dffaaace66f248f9071023b60be7b277a4
+++ /dev/null
@@ -1,9 +0,0 @@
-
-z java:S116"[Rename this field "sniffer_interval" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ԋ8ѪɎ/
-` java:S112"FDefine and throw a dedicated exception instead of using a generic one.(Ʋ8ѪɎ/
-w java:S116"XRename this field "failure_delay" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8ѪɎ/
-C
-java:S1604"(Make this anonymous inner class a lambda(큥8ѪɎ/
-v java:S116"\Rename this field "max_retry_timeout" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(8ѪɎ/
-
-java:S1130"lRemove the declaration of thrown exception 'java.lang.Exception', as it cannot be thrown from method's body.(Ʋ8ѪɎ/
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/c/d/cd089ae45ce870c45e434019e8f1ed4f066cd425 b/.idea/sonarlint/issuestore/c/d/cd089ae45ce870c45e434019e8f1ed4f066cd425
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/d/f/df021943680d67b4f49e98599f4bb0e86803c590 b/.idea/sonarlint/issuestore/d/f/df021943680d67b4f49e98599f4bb0e86803c590
deleted file mode 100644
index a191a95..0000000
--- a/.idea/sonarlint/issuestore/d/f/df021943680d67b4f49e98599f4bb0e86803c590
+++ /dev/null
@@ -1,2 +0,0 @@
-
-squid:S1697"~Either reverse the equality operator in the "propertiesPathPrefix" null test, or reverse the logical operator that follows it.(̚8ۅ.
\ No newline at end of file
diff --git a/.idea/sonarlint/issuestore/e/0/e00232faab93cb27b9940f780c75123903d70b1c b/.idea/sonarlint/issuestore/e/0/e00232faab93cb27b9940f780c75123903d70b1c
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/e/7/e7ba402f75a71f1f452cbf16986ed26aa0c6f1b5 b/.idea/sonarlint/issuestore/e/7/e7ba402f75a71f1f452cbf16986ed26aa0c6f1b5
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/f/c/fc37a8cb3cd4e86789b6dcadf3271e6894269266 b/.idea/sonarlint/issuestore/f/c/fc37a8cb3cd4e86789b6dcadf3271e6894269266
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/f/d/fdadf7a612307c5bb8e90739949b439a1891d886 b/.idea/sonarlint/issuestore/f/d/fdadf7a612307c5bb8e90739949b439a1891d886
deleted file mode 100644
index e69de29..0000000
diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb
deleted file mode 100644
index d0df8d4..0000000
--- a/.idea/sonarlint/issuestore/index.pb
+++ /dev/null
@@ -1,76 +0,0 @@
-
-Y
-)src/main/resources/application.properties,0\6\06f65155ec73600b9fc5c4dc2883d4bb84d8e284
-i
-9src/test/java/site/cnkj/utils/CommonApplicationTests.java,6\f\6f823bd3fbefd4cf49e9d51ea41235329137be8c
-7
-LICENSE,0\3\0398ccd0f49298b10a3d76a47800d2ebecd49859
-:
-
-.gitignore,a\5\a5cc2925ca8258af241be7e5b0381edf30266302
->
-.gitattributes,2\4\24139dae656713ba861751fb2c2ac38839349a7a
-9
- README.md,8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d
-k
-;src/main/java/site/cnkj/common/config/AsyncExecutePool.java,4\1\416390ba57649e9f4e6365934e9a6827cca3ffed
-p
-@src/main/java/site/cnkj/common/config/AsyncThreadPoolConfig.java,8\0\80bf55a45d89443866509f377d2b4f56db7fda1b
-t
-Dsrc/main/java/site/cnkj/common/config/ElasticsearchClientConfig.java,c/1/c131e8dffaaace66f248f9071023b60be7b277a4
-f
-6src/main/java/site/cnkj/common/config/RedisConfig.java,2\b\2b5e0787fcb106c7e2c215b9201949810fe97d18
-m
-=src/main/java/site/cnkj/common/config/RestTemplateConfig.java,f\c\fc37a8cb3cd4e86789b6dcadf3271e6894269266
-i
-9src/main/java/site/cnkj/common/object/redis/Receiver.java,4\a\4a24c23f6158d7abc5657040e232691adcee44ac
-m
-=src/main/java/site/cnkj/common/object/servlet/BaseResult.java,1\9\19affac2f7e5749f37c36532ef281eec1befbd05
-m
-=src/main/java/site/cnkj/common/object/servlet/CommonInfo.java,6\b\6b5bb34dca0a1a09968bad0dc5ab4ad5434df80e
-m
-=src/main/java/site/cnkj/common/object/servlet/DataResult.java,1\c\1c4b500508bae883bea47d0637c267e8c57d7580
-s
-Csrc/main/java/site/cnkj/common/object/servlet/ResponseBodyCode.java,b\c\bc46480ac8ea27c54208391c0607483f70591f52
-l
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 8d3e42f..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100644
index 5a60c2c..0000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,1180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- range
- size
- redisTemplate.delete
- listRemove
- public long rightPush
- MongoClient
- group
- get
- BOOTSTRAP_SERVERS_CONFIG
- ----------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- true
- DEFINITION_ORDER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1574318981558
-
-
- 1574318981558
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1574320188766
-
-
-
- 1574320188766
-
-
- 1574321436529
-
-
-
- 1574321436529
-
-
- 1574323845093
-
-
-
- 1574323845093
-
-
- 1574324452589
-
-
-
- 1574324452589
-
-
- 1574324574660
-
-
-
- 1574324574660
-
-
- 1574325130810
-
-
-
- 1574325130810
-
-
- 1574325149223
-
-
-
- 1574325149223
-
-
- 1574407956134
-
-
-
- 1574407956134
-
-
- 1574411837384
-
-
-
- 1574411837384
-
-
- 1574411942406
-
-
-
- 1574411942406
-
-
- 1574672317445
-
-
-
- 1574672317445
-
-
- 1574672730578
-
-
-
- 1574672730578
-
-
- 1574819212177
-
-
-
- 1574819212177
-
-
- 1574835930667
-
-
-
- 1574835930667
-
-
- 1575513135743
-
-
-
- 1575513135743
-
-
- 1576052500071
-
-
-
- 1576052500071
-
-
- 1576053081227
-
-
-
- 1576053081227
-
-
- 1576053595567
-
-
-
- 1576053595567
-
-
- 1577179466914
-
-
-
- 1577179466914
-
-
- 1577438196875
-
-
-
- 1577438196875
-
-
- 1579420465866
-
-
-
- 1579420465866
-
-
- 1597628792278
-
-
-
- 1597628792278
-
-
- 1597629876924
-
-
-
- 1597629876924
-
-
- 1612840009845
-
-
-
- 1612840009845
-
-
- 1612840186807
-
-
-
- 1612840186807
-
-
- 1615280926031
-
-
-
- 1615280926031
-
-
- 1616493647106
-
-
-
- 1616493647106
-
-
- 1616568687426
-
-
-
- 1616568687426
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- file://$PROJECT_DIR$/src/main/java/site/cnkj/common/utils/http/SSH2Util.java
- 153
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1.8
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/README.md b/README.md
index 92c5073..4ca3b25 100644
--- a/README.md
+++ b/README.md
@@ -9,15 +9,17 @@
* [CommonUtil-sources.jar](https://github.com/carolcoral/CommonUtil/releases/download/2.0.2/CommonUtil-2.0.2-sources.jar)
## Log
-> `2021年3月24日 11:24:53` fix some bugs and change mongoClient init. [Use MongoClientInit](https://github.com/carolcoral/CommonUtil/wiki/MongoClientInit).
+> `2021-10-29 13:51:03` add and fix some methods.Update version to 2.1.0.
-> `2021年2月9日 11:09:13` change folder and fix some bug.
+> `2021-3-24 11:24:53` fix some bugs and change mongoClient init. [Use MongoClientInit](https://github.com/carolcoral/CommonUtil/wiki/MongoClientInit).
-> `2020年8月20日 16:49:23` new class [MongoClientsInit](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/MongoClientsInit.java) for create muti mongoClient.More info to see [How to use MongoClientsInit](https://carolcoral.github.io/Article/JAVA/Java%E6%9E%84%E5%BB%BA%E5%A4%9Amongo%E6%95%B0%E6%8D%AE%E6%BA%90%E5%AE%A2%E6%88%B7%E7%AB%AF)
+> `2021-2-9 11:09:13` change folder and fix some bug.
-> `2020年7月21日 11:20:14` fix some expire bug from [RedisUtil](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/RedisUtil.java).
+> `2020-8-20 16:49:23` new class [MongoClientsInit](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/MongoClientsInit.java) for create muti mongoClient.More info to see [How to use MongoClientsInit](https://carolcoral.github.io/Article/JAVA/Java%E6%9E%84%E5%BB%BA%E5%A4%9Amongo%E6%95%B0%E6%8D%AE%E6%BA%90%E5%AE%A2%E6%88%B7%E7%AB%AF)
-> `2020年7月20日 14:17:00` New date function `String formatDateByReg(String date_format, int parseInt)` for format date by The date-format [DateUtil](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/DateUtil.java).For example like this:
+> `2020-7-21 11:20:14` fix some expire bug from [RedisUtil](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/RedisUtil.java).
+
+> `2020-7-20 14:17:00` New date function `String formatDateByReg(String date_format, int parseInt)` for format date by The date-format [DateUtil](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/DateUtil.java).For example like this:
```java
public static void main(String[] args) {
@@ -50,7 +52,7 @@ current date_format is: YYYY-MM-dd HH:mm:ss
current format result is:2020-07-20 14:15:08
```
-> `2019年12月27日 17:20:34` Demo to show how to operation Protobuf in java.[Java中使用ProtoBuf数据](https://github.com/carolcoral/CommonUtil/wiki/Java中使用ProtoBuf数据)
+> `2019-12-27 17:20:34` Demo to show how to operation Protobuf in java.[Java中使用ProtoBuf数据](https://github.com/carolcoral/CommonUtil/wiki/Java中使用ProtoBuf数据)
> `2019-12-05 14:33:23` New class for remotely connect to the server and execute the script.[SSH2Util](https://github.com/carolcoral/CommonUtil/blob/master/src/main/java/site/cnkj/utils/SSH2Util.java)
diff --git a/pom.xml b/pom.xml
index 41a501f..970fc8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
site.cnkj
CommonUtil
jar
- 2.0.2
+ 2.1.0
org.springframework.boot
diff --git a/src/main/java/site/cnkj/common/config/RedisConfig.java b/src/main/java/site/cnkj/common/config/RedisConfig.java
index fe58883..053b108 100644
--- a/src/main/java/site/cnkj/common/config/RedisConfig.java
+++ b/src/main/java/site/cnkj/common/config/RedisConfig.java
@@ -12,7 +12,7 @@ import org.springframework.data.redis.listener.PatternTopic;
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
import org.springframework.data.redis.serializer.StringRedisSerializer;
-import site.cnkj.common.object.redis.Receiver;
+import site.cnkj.common.object.Receiver;
import site.cnkj.common.utils.data.RedisUtil;
/**
diff --git a/src/main/java/site/cnkj/common/object/BaseResult.java b/src/main/java/site/cnkj/common/object/BaseResult.java
new file mode 100644
index 0000000..c0b0e9f
--- /dev/null
+++ b/src/main/java/site/cnkj/common/object/BaseResult.java
@@ -0,0 +1,16 @@
+package site.cnkj.common.object;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * Created by rx on 2018/9/17.
+ */
+@Data
+public class BaseResult implements Serializable {
+
+ private int code;
+ private String desc;
+
+}
diff --git a/src/main/java/site/cnkj/common/object/ReasonEnumeration.java b/src/main/java/site/cnkj/common/object/ReasonEnumeration.java
deleted file mode 100644
index 14f8246..0000000
--- a/src/main/java/site/cnkj/common/object/ReasonEnumeration.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package site.cnkj.common.object;
-
-import java.util.HashMap;
-
-/*
- * @author LXW
- * @create 2020/4/21 11:16
- * @Description 异常原因枚举值
- */
-public class ReasonEnumeration {
-
- public static HashMap reasonEnumeration = new HashMap<>();
-
- public static final class CODE{
-
- public static final class Header{
- public static final String IMEI = "100001";
- public static final String IMSI = "100002";
- public static final String IDFA = "100003";
- public static final String OAID = "100004";
- public static final String HWID = "100005";
- public static final String UID = "100006";
- }
-
- /**
- * params
- */
- public static final class Params{
- public static final String contentId = "200001";
- public static final String marketingId = "200002";
- public static final String songListId = "200003";
- public static final String songId = "200004";
- public static final String songName = "200005";
- public static final String contentIdRange = "200006";
- public static final String rateLevelRange = "200007";
- public static final String isOnlineRange = "200008";
- public static final String beginTime = "200009";
- public static final String logId = "200010";
- public static final String videoIdMvIdConcertId = "200011";
- public static final String rateLevel = "200012";
- public static final String vmsParamsE = "200013";
- public static final String vmsParamsERange = "200014";
- public static final String codeRange = "200015";
- public static final String requestTimeRange = "200016";
- public static final String requestTime = "200017";
- public static final String resourceTypeRange = "200018";
- }
-
- /**
- * RequestParams
- */
- public static final class RequestParams{}
-
- /**
- * ResponseBody
- */
- public static final class ResponseBody{}
- }
-
- static {
- reasonEnumeration.put(CODE.Header.IMEI, "IMEI的值不符合规范,数据丢弃");
- reasonEnumeration.put(CODE.Header.IMSI, "IMSI的值不符合规范,数据丢弃");
- reasonEnumeration.put(CODE.Header.IDFA, "IDFA的值长度不符合规范,数据丢弃");
- reasonEnumeration.put(CODE.Header.OAID, "OAID的值不符合规范,数据丢弃");
- reasonEnumeration.put(CODE.Header.HWID, "HWID的值不符合规范,数据丢弃");
- reasonEnumeration.put(CODE.Header.UID, "UID的值等于15586008224920247234882,UID被强制转换成空值");
- reasonEnumeration.put(CODE.Params.contentId, "params.contentId字段不存在或值为空,数据丢弃");
- reasonEnumeration.put(CODE.Params.marketingId, "params.marketingId字段不存在,数据丢弃");
- reasonEnumeration.put(CODE.Params.songListId, "params.songListId字段不存在,设置默认值为空值");
- reasonEnumeration.put(CODE.Params.songId, "params.songId字段不存在,设置默认值为空值");
- reasonEnumeration.put(CODE.Params.songName, "params.songName字段不存在,数据丢弃");
- reasonEnumeration.put(CODE.Params.contentIdRange, "params.contentId字段值不在范围内,数据丢弃");
- reasonEnumeration.put(CODE.Params.rateLevel, "params.rateLevel字段不存在或值为空");
- reasonEnumeration.put(CODE.Params.rateLevelRange, "params.rateLevel字段不在范围内");
- reasonEnumeration.put(CODE.Params.isOnlineRange, "params.isOnline字段不存在或不在范围内,params.isOnline设置默认值");
- reasonEnumeration.put(CODE.Params.beginTime, "params.beginTime字段不存在或值为空,数据丢弃");
- reasonEnumeration.put(CODE.Params.logId, "params.logId字段不存在或值为空,数据丢弃");
- reasonEnumeration.put(CODE.Params.videoIdMvIdConcertId, "params中不存在videoId、mvId、concertId或对应的值为空,数据丢弃");
- reasonEnumeration.put(CODE.Params.vmsParamsE, "params.E字段参位值数量不正确");
- reasonEnumeration.put(CODE.Params.vmsParamsERange, "params.E字段参位值不在范围内");
- reasonEnumeration.put(CODE.Params.codeRange, "params.code字段不存在或值为空");
- reasonEnumeration.put(CODE.Params.requestTimeRange, "params.requestTime字段不符合时间戳格式");
- reasonEnumeration.put(CODE.Params.requestTime, "params.requestTime字段不存在或值为空");
- reasonEnumeration.put(CODE.Params.resourceTypeRange, "params.resourceType字段值不在范围内");
- }
-
-}
diff --git a/src/main/java/site/cnkj/common/object/redis/Receiver.java b/src/main/java/site/cnkj/common/object/Receiver.java
similarity index 82%
rename from src/main/java/site/cnkj/common/object/redis/Receiver.java
rename to src/main/java/site/cnkj/common/object/Receiver.java
index 43fe727..85530b6 100644
--- a/src/main/java/site/cnkj/common/object/redis/Receiver.java
+++ b/src/main/java/site/cnkj/common/object/Receiver.java
@@ -1,4 +1,4 @@
-package site.cnkj.common.object.redis;
+package site.cnkj.common.object;
/*
* @version 1.0 created by LXW on 2019/1/9 16:17
diff --git a/src/main/java/site/cnkj/common/object/ResponseDataResult.java b/src/main/java/site/cnkj/common/object/ResponseDataResult.java
new file mode 100644
index 0000000..efb3595
--- /dev/null
+++ b/src/main/java/site/cnkj/common/object/ResponseDataResult.java
@@ -0,0 +1,27 @@
+package site.cnkj.common.object;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import site.cnkj.common.enumeration.ResponseStatusEnum;
+
+/*
+ * @version 1.0 created by LXW on 2019/7/22 11:04
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class ResponseDataResult extends BaseResult {
+
+ private T data;
+
+ public ResponseDataResult(ResponseStatusEnum responseStatusEnum) {
+ this.setCode(responseStatusEnum.getCode());
+ this.setDesc(responseStatusEnum.getDesc());
+ }
+
+ public ResponseDataResult(T data) {
+ this.data = data;
+ }
+
+ public ResponseDataResult() {
+ }
+}
diff --git a/src/main/java/site/cnkj/common/object/servlet/BaseResult.java b/src/main/java/site/cnkj/common/object/servlet/BaseResult.java
deleted file mode 100644
index 8cb8497..0000000
--- a/src/main/java/site/cnkj/common/object/servlet/BaseResult.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package site.cnkj.common.object.servlet;
-
-import lombok.Data;
-
-/**
- * Created by rx on 2018/9/17.
- */
-@Data
-public class BaseResult {
-
- private String code;
- private String desc;
-
-}
diff --git a/src/main/java/site/cnkj/common/object/servlet/CommonInfo.java b/src/main/java/site/cnkj/common/object/servlet/CommonInfo.java
deleted file mode 100644
index 6d1b3ff..0000000
--- a/src/main/java/site/cnkj/common/object/servlet/CommonInfo.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package site.cnkj.common.object.servlet;
-
-/*
- * @version 1.0 created by LXW on 2019/3/12 14:17
- */
-@Deprecated
-public class CommonInfo {
-
- /**
- * @Desc ResponseCode for servlet request callback
- * @Version delete from 0.3.5 version and replace by cn.migu.log.common.object.servlet.ResponseBodyCode
- */
- @Deprecated
- public static class ResponseCode{
- public static final String SUCCESS = "000000";//成功
- public static final String FAILED = "100000";//结果异常
- public static final String WARNING = "200000";//警告
- public static final String ERROR = "300000";//程序故障
- public static final String TIMEOUT = "999999"; //登录过期
-
- public class Desc{
- public static final String SUCCESS = "SUCCESS";//成功
- public static final String FAILED = "FAILED";//结果异常
- public static final String WARNING = "WARNING";//警告
- public static final String ERROR = "ERROR";//程序故障
- public static final String NULL_URL = "请求URL不存在";
- public static final String EXIST_ERROR = "该条目已存在";
- public static final String NOT_EXIST_ERROR = "该条目不存在";
- public static final String NOT_NUMERIC = "分隔符数量不是正整数";
- public static final String OUT_RANGE_ERROR = "分隔符数量过长";
- public static final String NOT_EQUAL_ERROR = "分隔符数量不一致";
- public static final String NULL_PARAM = "必填字段不存在";
- public static final String PARAM_ERROR = "字段值错误";
- public static final String ITEM_REFERENCE = "该条目已被引用";
- public static final String NOT_REFRESH_ITEM = "存在未刷新的条目";
- public static final String OFFLINE_MACHINE = "机器已下线";
- public static final String NOT_OFFLINE_ITEM = "该条目未下线";
- public static final String RUNNING_REFRESH = "上次刷新未完成";
- public static final String REFRESH_TIMEOUT = "刷新超时";
- public static final String SCRIPT_ERROR = "请求脚本执行失败";
- public static final String ERROR_CRON = "cron表达式错误";
- }
- }
-
-}
diff --git a/src/main/java/site/cnkj/common/object/servlet/DataResult.java b/src/main/java/site/cnkj/common/object/servlet/DataResult.java
deleted file mode 100644
index a6b1d69..0000000
--- a/src/main/java/site/cnkj/common/object/servlet/DataResult.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package site.cnkj.common.object.servlet;
-
-import com.alibaba.fastjson.JSONObject;
-import lombok.Data;
-
-/*
- * @version 1.0 created by LXW on 2019/7/22 11:04
- */
-@Data
-public class DataResult extends BaseResult {
-
- private Object data;
-
- @Override
- public String toString() {
- return JSONObject.toJSONString(this);
- }
-}
diff --git a/src/main/java/site/cnkj/common/object/servlet/ResponseBodyCode.java b/src/main/java/site/cnkj/common/object/servlet/ResponseBodyCode.java
deleted file mode 100644
index c159ee0..0000000
--- a/src/main/java/site/cnkj/common/object/servlet/ResponseBodyCode.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package site.cnkj.common.object.servlet;
-
-/*
- * @author LXW
- * @create 2021/2/8 15:04
- * @Description
- */
-public enum ResponseBodyCode {
-
- SUCCESS("000000"), FAILED("100000"), WARNING("200000"), ERROR("300000");
-
-
- private String code;
-
- ResponseBodyCode(String code){
- this.code = code;
- }
-
- public String getCode(){
- return this.code;
- }
-
-}
diff --git a/src/main/java/site/cnkj/common/utils/bean/ReflectionUtil.java b/src/main/java/site/cnkj/common/utils/bean/ReflectionUtil.java
new file mode 100644
index 0000000..4153a7c
--- /dev/null
+++ b/src/main/java/site/cnkj/common/utils/bean/ReflectionUtil.java
@@ -0,0 +1,137 @@
+package site.cnkj.common.utils.bean;
+
+import org.springframework.util.ReflectionUtils;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+public class ReflectionUtil extends ReflectionUtils {
+
+ /**
+ * 类上是否包含注解
+ *
+ * @date 2021-08-10 15:30:34
+ * @author liuzhengyang
+ * @param clazz 类Class
+ * @param aClazz 注解Class
+ * @return boolean
+ */
+ public static boolean containsAnnotation(Class> clazz, Class extends Annotation> aClazz) {
+ Annotation[] annotations = clazz.getAnnotations();
+ for (Annotation annotation : annotations) {
+ if (annotation.annotationType() == aClazz) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static Type getGenericParameter(Class> clazz) {
+ while(clazz != null && !(clazz.getGenericSuperclass() instanceof ParameterizedType)) {
+ clazz = clazz.getSuperclass();
+ }
+ if (clazz != null) {
+ return ((ParameterizedType)clazz.getGenericSuperclass()).getActualTypeArguments()[0];
+ } else {
+ throw new IllegalArgumentException("Invalid argument, argument's super class must specify type parameters");
+ }
+ }
+
+ public static Class getSuperClassGenericType(final Class clazz, final int index) {
+ Type genType = clazz.getGenericSuperclass();
+ for(Class superClass = clazz; !(genType instanceof ParameterizedType); genType = superClass.getGenericSuperclass()) {
+ if (superClass == Object.class) {
+ return Object.class;
+ }
+ superClass = superClass.getSuperclass();
+ }
+ Type[] params = ((ParameterizedType)genType).getActualTypeArguments();
+ if (index < params.length && index >= 0) {
+ if (!(params[index] instanceof Class) && params[index] instanceof ParameterizedType) {
+ ParameterizedType pType = (ParameterizedType)params[index];
+ return (Class)pType.getRawType();
+ } else {
+ return (Class)params[index];
+ }
+ } else {
+ return Object.class;
+ }
+ }
+
+ public static Class getSuperClassGenericTypeCollectionGenType(final Class clazz, final int index, final int collectionGenindex) {
+ Type genType = clazz.getGenericSuperclass();
+ if (!(genType instanceof ParameterizedType)) {
+ return Object.class;
+ } else {
+ Type[] params = ((ParameterizedType)genType).getActualTypeArguments();
+ if (index < params.length && index >= 0) {
+ if (!(params[index] instanceof Class) && params[index] instanceof ParameterizedType) {
+ ParameterizedType pType = (ParameterizedType)params[index];
+ return (Class)pType.getActualTypeArguments()[collectionGenindex];
+ } else {
+ return (Class)params[index];
+ }
+ } else {
+ return Object.class;
+ }
+ }
+ }
+
+ public static Object newInstance(final Class clazz, final int index) {
+ try {
+ return getSuperClassGenericType(clazz, index).newInstance();
+ } catch (IllegalAccessException | InstantiationException var3) {
+ var3.printStackTrace();
+ }
+ return null;
+ }
+
+ public static List getAllField(Object obj) {
+ List fieldList = new ArrayList();
+ for(Class tempClass = obj.getClass(); tempClass != null; tempClass = tempClass.getSuperclass()) {
+ fieldList.addAll(Arrays.asList(tempClass.getDeclaredFields()));
+ }
+ return fieldList;
+ }
+
+ public static List getAllFieldByClazz(Class clazz) {
+ List fieldList = new ArrayList();
+
+ for(Class tempClass = clazz; tempClass != null; tempClass = tempClass.getSuperclass()) {
+ fieldList.addAll(Arrays.asList(tempClass.getDeclaredFields()));
+ }
+ return fieldList;
+ }
+
+ public static Field findFieldForAll(Object obj, String name) {
+ List fieldList = getAllField(obj);
+ Iterator var3 = fieldList.iterator();
+ Field f;
+ do {
+ if (!var3.hasNext()) {
+ return null;
+ }
+ f = (Field)var3.next();
+ } while(!f.getName().equals(name));
+ return f;
+ }
+
+ public static Object getFieldValueForAll(Object obj, String name) {
+ Field f = findFieldForAll(obj, name);
+ f.setAccessible(true);
+ try {
+ return f.get(obj);
+ } catch (Exception var4) {
+ var4.printStackTrace();
+ }
+ return null;
+ }
+
+
+}
diff --git a/src/main/java/site/cnkj/common/utils/data/GlobalId.java b/src/main/java/site/cnkj/common/utils/data/GlobalId.java
new file mode 100644
index 0000000..bc26b80
--- /dev/null
+++ b/src/main/java/site/cnkj/common/utils/data/GlobalId.java
@@ -0,0 +1,167 @@
+package site.cnkj.common.utils.data;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.StringJoiner;
+
+public class GlobalId {
+
+ private static final Logger log = LoggerFactory.getLogger(GlobalId.class);
+ private long twepoch = 1420041600000L;
+ private static long workerIdBits = 5L;
+ private static long datacenterIdBits = 5L;
+ private static long maxWorkerId;
+ private static long maxDatacenterId;
+ private long sequenceBits = 12L;
+ private long workerIdShift;
+ private long datacenterIdShift;
+ private long timestampLeftShift;
+ private long sequenceMask;
+ private long workerId;
+ private long datacenterId;
+ private long sequence;
+ private long lastTimestamp;
+ private static GlobalId defaultGlobalId;
+
+ public GlobalId() {
+ this.workerIdShift = this.sequenceBits;
+ this.sequenceMask = ~(-1L << (int)this.sequenceBits);
+ this.sequence = 0L;
+ this.lastTimestamp = -1L;
+ this.workerId = 0L;
+ this.datacenterId = 0L;
+ this.build();
+ }
+
+ public static long getDatacenterIdByIp(String ipAddr) {
+ byte[] mac = (ipAddr + UUIDUtil.longUuid()).getBytes();
+ long id = (255L & (long)mac[mac.length - 2] | 65280L & (long)mac[mac.length - 1] << 8) >> 6;
+ id %= maxDatacenterId + 1L;
+ return id;
+ }
+
+ public static long getDatacenterIdByIp() {
+ return getDatacenterIdByIp(getIpAddress());
+ }
+
+ public static String getIpAddress() {
+ String ipAddr = "0.0.0.0";
+
+ try {
+ InetAddress ip = InetAddress.getLocalHost();
+ ipAddr = ip.getHostAddress();
+ } catch (Exception var2) {
+ log.warn("获取ip错误");
+ }
+
+ return ipAddr;
+ }
+
+ public static long getMaxWorkerId(long datacenterId) {
+ StringBuilder mpid = new StringBuilder();
+ mpid.append(datacenterId);
+ String mac = getMac();
+ mpid.append(StringUtils.isEmpty(mac) ? UUIDUtil.longUuid() : mac);
+ mpid.append(UUIDUtil.longUuid());
+ return (long)(mpid.toString().hashCode() & '\uffff') % (maxWorkerId + 1L);
+ }
+
+ public static String getMac() {
+ try {
+ InetAddress ip = InetAddress.getLocalHost();
+ NetworkInterface network = NetworkInterface.getByInetAddress(ip);
+ if (network == null) {
+ return "";
+ }
+
+ byte[] mac = network.getHardwareAddress();
+ if (null != mac) {
+ StringJoiner j = new StringJoiner("-");
+
+ for(int i = 0; i < mac.length; ++i) {
+ j.add(String.format("%02X", mac[i]));
+ }
+
+ return j.toString();
+ }
+ } catch (Exception var5) {
+ log.warn(" get Mac: " + var5.getMessage());
+ }
+
+ return "";
+ }
+
+ public GlobalId(long workerId, long datacenterId) {
+ this.workerIdShift = this.sequenceBits;
+ this.sequenceMask = ~(-1L << (int)this.sequenceBits);
+ this.sequence = 0L;
+ this.lastTimestamp = -1L;
+ this.build();
+ if (workerId <= maxWorkerId && workerId >= 0L) {
+ if (datacenterId <= maxDatacenterId && datacenterId >= 0L) {
+ this.workerId = workerId;
+ this.datacenterId = datacenterId;
+ } else {
+ throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
+ }
+ } else {
+ throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
+ }
+ }
+
+ private void build() {
+ this.datacenterIdShift = this.sequenceBits + workerIdBits;
+ this.timestampLeftShift = this.sequenceBits + workerIdBits + datacenterIdBits;
+ }
+
+ public synchronized long nextId() {
+ long timestamp = this.timeGen();
+ if (timestamp < this.lastTimestamp) {
+ throw new RuntimeException(String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", this.lastTimestamp - timestamp));
+ } else {
+ if (this.lastTimestamp == timestamp) {
+ this.sequence = this.sequence + 1L & this.sequenceMask;
+ if (this.sequence == 0L) {
+ timestamp = this.tilNextMillis(this.lastTimestamp);
+ }
+ } else {
+ this.sequence = 0L;
+ }
+
+ this.lastTimestamp = timestamp;
+ return timestamp - this.twepoch << (int)this.timestampLeftShift | this.datacenterId << (int)this.datacenterIdShift | this.workerId << (int)this.workerIdShift | this.sequence;
+ }
+ }
+
+ protected long tilNextMillis(long lastTimestamp) {
+ long timestamp;
+ for(timestamp = this.timeGen(); timestamp <= lastTimestamp; timestamp = this.timeGen()) {
+ }
+
+ return timestamp;
+ }
+
+ protected long timeGen() {
+ return System.currentTimeMillis();
+ }
+
+ public static GlobalId initialDefault(long datacenterId, long workerId) {
+ defaultGlobalId = new GlobalId(workerId, datacenterId);
+ return defaultGlobalId;
+ }
+
+ public static long generateNextId() {
+ return defaultGlobalId.nextId();
+ }
+
+ static {
+ maxWorkerId = ~(-1L << (int)workerIdBits);
+ maxDatacenterId = ~(-1L << (int)datacenterIdBits);
+ defaultGlobalId = new GlobalId(getMaxWorkerId(getDatacenterIdByIp()), getDatacenterIdByIp());
+ }
+
+}
diff --git a/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java b/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java
index e044037..3d1faa2 100644
--- a/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java
+++ b/src/main/java/site/cnkj/common/utils/data/KafkaUtil.java
@@ -1,13 +1,26 @@
package site.cnkj.common.utils.data;
import com.alibaba.fastjson.JSONObject;
+import com.sun.corba.se.spi.orbutil.threadpool.NoSuchWorkQueueException;
+import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
+import org.apache.kafka.clients.producer.KafkaProducer;
+import org.apache.kafka.clients.producer.ProducerRecord;
+import org.apache.kafka.common.KafkaException;
import org.apache.kafka.common.PartitionInfo;
import org.apache.kafka.common.TopicPartition;
+import org.apache.kafka.common.errors.AuthorizationException;
+import org.apache.kafka.common.errors.IllegalSaslStateException;
+import org.apache.kafka.common.errors.OutOfOrderSequenceException;
+import org.apache.kafka.common.errors.ProducerFencedException;
import site.cnkj.common.utils.http.HttpCommonUtil;
import site.cnkj.common.utils.logger.LoggerUtil;
+import java.time.Duration;
import java.util.*;
+import java.util.concurrent.BlockingQueue;
+import java.util.stream.Collectors;
/*
* @version 1.0 created by LXW on 2019/11/20 10:20
@@ -20,6 +33,52 @@ public class KafkaUtil {
private static final String VALUE_DESERIALIZER = "value.deserializer";
private static final String STRING_DESERIALIZER = "org.apache.kafka.common.serialization.StringDeserializer";
+ public static boolean producer(Map properties, Object source, String... topics){
+ KafkaProducer