update
parent
14a0cb0a74
commit
e4a9e1d5d7
22
pom.xml
22
pom.xml
|
@ -15,7 +15,7 @@
|
|||
<servlet.version>2.5</servlet.version>
|
||||
<mybatis.version>3.2.7</mybatis.version>
|
||||
<mybatis.spring.version>1.1.1</mybatis.spring.version>
|
||||
<mybatis.generator.core.version>1.3.2</mybatis.generator.core.version>
|
||||
<mybatis.generator.core.version>1.4.0</mybatis.generator.core.version>
|
||||
<file_encoding>utf-8</file_encoding>
|
||||
<jdk.verion>1.8</jdk.verion>
|
||||
<powermock.version>1.7.1</powermock.version>
|
||||
|
@ -269,11 +269,11 @@
|
|||
<!-- <artifactId>did-sdk</artifactId>-->
|
||||
<!-- <version>1.0-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>cn.enncloud.ceres</groupId>
|
||||
<artifactId>ceres</artifactId>
|
||||
<version>1.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.enncloud.ceres</groupId>-->
|
||||
<!-- <artifactId>ceres</artifactId>-->
|
||||
<!-- <version>1.1.0-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
|
@ -293,6 +293,14 @@
|
|||
<version>4.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.hbase/hbase-client -->
|
||||
<dependency>
|
||||
<groupId>org.apache.hbase</groupId>
|
||||
<artifactId>hbase-client</artifactId>
|
||||
<version>1.3.5</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>java-utils</finalName>
|
||||
|
@ -302,7 +310,7 @@
|
|||
<plugin>
|
||||
<groupId>org.mybatis.generator</groupId>
|
||||
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<version>${mybatis.generator.core.version}</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<overwrite>true</overwrite>
|
||||
|
|
|
@ -0,0 +1,737 @@
|
|||
<scheme name="Monokai Sublime Text 3" version="142" parent_scheme="Darcula">
|
||||
<option name="FONT_SCALE" value="1.0" />
|
||||
<metaInfo>
|
||||
<property name="created">2020-02-28T15:33:09</property>
|
||||
<property name="ide">idea</property>
|
||||
<property name="ideVersion">2019.3.3.0.0</property>
|
||||
<property name="modified">2020-02-28T15:33:36</property>
|
||||
<property name="originalScheme">Monokai Sublime Text 3</property>
|
||||
</metaInfo>
|
||||
<option name="LINE_SPACING" value="1.1" />
|
||||
<option name="EDITOR_FONT_SIZE" value="14" />
|
||||
<option name="EDITOR_FONT_NAME" value="DejaVu Sans Mono for Powerline" />
|
||||
<option name="CONSOLE_FONT_NAME" value="Menlo" />
|
||||
<option name="CONSOLE_LIGATURES" value="true" />
|
||||
<colors>
|
||||
<option name="ADDED_LINES_COLOR" value="295622" />
|
||||
<option name="CARET_ROW_COLOR" value="404040" />
|
||||
<option name="CONSOLE_BACKGROUND_KEY" value="313335" />
|
||||
<option name="FILESTATUS_MERGED" value="9876aa" />
|
||||
<option name="GUTTER_BACKGROUND" value="3c3f41" />
|
||||
<option name="INDENT_GUIDE" value="414141" />
|
||||
<option name="METHOD_SEPARATORS_COLOR" value="565656" />
|
||||
<option name="MODIFIED_LINES_COLOR" value="415f69" />
|
||||
<option name="NOTIFICATION_BACKGROUND" value="7e661c" />
|
||||
<option name="RIGHT_MARGIN_COLOR" value="414141" />
|
||||
<option name="SELECTED_INDENT_GUIDE" value="9c9c96" />
|
||||
<option name="SELECTION_BACKGROUND" value="8d4300" />
|
||||
<option name="SELECTION_FOREGROUND" value="d9e1de" />
|
||||
<option name="WHITESPACES" value="505050" />
|
||||
</colors>
|
||||
<attributes>
|
||||
<option name="ABSTRACT_CLASS_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ANNOTATION_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ANONYMOUS_CLASS_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="BAD_CHARACTER">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ff0000" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="BASH.HERE_DOC">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="e6db74" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="BASH.INTERNAL_COMMAND">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="c57633" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="BASH.REDIRECTION">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a2a2a2" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
<option name="EFFECT_TYPE" value="1" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="BREAKPOINT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="3a2323" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="Block comment">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CLASS_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_BLACK_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="3c3f41" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_CYAN_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="6969" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_ERROR_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="e6db74" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_MAGENTA_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="983498" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_NORMAL_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
<option name="BACKGROUND" value="313335" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_SELECTED_PARAMETER">
|
||||
<value />
|
||||
</option>
|
||||
<option name="CONSOLE_SYSTEM_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CONSOLE_USER_INPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CTRL_CLICKABLE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="8362d7" />
|
||||
<option name="EFFECT_COLOR" value="8362d7" />
|
||||
<option name="EFFECT_TYPE" value="1" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_INVALID_STRING_ESCAPE_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ff0000" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_KEYWORD1_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_KEYWORD2_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_KEYWORD3_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_KEYWORD4_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_LINE_COMMENT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_MULTI_LINE_COMMENT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_NUMBER_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_STRING_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="e6db74" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="CUSTOM_VALID_STRING_ESCAPE_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_ATTRIBUTE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_BRACES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_BRACKETS">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_CLASS_NAME">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_CLASS_REFERENCE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_COMMA">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_CONSTANT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_DOC_COMMENT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_DOC_COMMENT_TAG">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_DOC_MARKUP">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_DOT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_ENTITY">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_FUNCTION_CALL">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a7ec21" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_FUNCTION_DECLARATION">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a7ec21" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_GLOBAL_VARIABLE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_IDENTIFIER">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_INSTANCE_FIELD">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_INSTANCE_METHOD">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a7ec21" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_INTERFACE_NAME">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_INVALID_STRING_ESCAPE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ff0000" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_KEYWORD">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_LABEL">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_LINE_COMMENT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_LOCAL_VARIABLE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_METADATA">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_NUMBER">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_OPERATION_SIGN">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_PARAMETER">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_PARENTHS">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_PREDEFINED_SYMBOL">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_SEMICOLON">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_STATIC_FIELD">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_STATIC_METHOD">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a7ec21" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_STRING">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="e6db74" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_TAG">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_TEMPLATE_LANGUAGE_COLOR">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEFAULT_VALID_STRING_ESCAPE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DELETED_TEXT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="272822" />
|
||||
<option name="BACKGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DEPRECATED_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
<option name="EFFECT_COLOR" value="d3b129" />
|
||||
<option name="EFFECT_TYPE" value="3" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DIFF_CONFLICT">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="45302b" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="8f5247" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DIFF_INSERTED">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="294436" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="447152" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DIFF_MODIFIED">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="385570" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="43698d" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DOC_COMMENT_TAG_VALUE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="DUPLICATE_FROM_SERVER">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="5e5339" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ENUM_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ERL_MACRO">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ERL_PARENTHESES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ERRORS_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="EFFECT_COLOR" value="bc3f3c" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="bc3f3c" />
|
||||
<option name="EFFECT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="FOLDED_TEXT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
<option name="BACKGROUND" value="383830" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="GENERIC_SERVER_ERROR_OR_WARNING">
|
||||
<value>
|
||||
<option name="EFFECT_COLOR" value="f49810" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="f49810" />
|
||||
<option name="EFFECT_TYPE" value="1" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IDENTIFIER_UNDER_CARET_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="6a6a6a" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE.HEADER">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="808080" />
|
||||
<option name="FONT_TYPE" value="1" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IGNORE.SECTION">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="808080" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="IMPLICIT_ANONYMOUS_CLASS_PARAMETER_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INFO_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="EFFECT_COLOR" value="aeae80" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="aeae80" />
|
||||
<option name="EFFECT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INJECTED_LANGUAGE_FRAGMENT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INSTANCE_FIELD_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INSTANCE_FINAL_FIELD_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="INTERFACE_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_BRACES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_BRACKETS">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_COMMA">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_DOT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_INVALID_STRING_ESCAPE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ff0000" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_KEYWORD">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_NUMBER">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_OPERATION_SIGN">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_PARENTH">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_SEMICOLON">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_STRING">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="e6db74" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JAVA_VALID_STRING_ESCAPE">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ae81ff" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="JS.GLOBAL_VARIABLE" baseAttributes="DEFAULT_GLOBAL_VARIABLE" />
|
||||
<option name="KOTLIN_SMART_CAST_RECEIVER">
|
||||
<value />
|
||||
</option>
|
||||
<option name="KOTLIN_SMART_CAST_VALUE">
|
||||
<value />
|
||||
</option>
|
||||
<option name="KOTLIN_SMART_CONSTANT">
|
||||
<value />
|
||||
</option>
|
||||
<option name="LOG_ERROR_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f92672" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="LOG_EXPIRED_ENTRY">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="75715e" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="LOG_WARNING_OUTPUT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f9faf4" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="List/map to object conversion" baseAttributes="JAVA_NUMBER" />
|
||||
<option name="MATCHED_BRACE_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ff8647" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_CALL_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a7ec21" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="METHOD_DECLARATION_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a7ec21" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="NOT_TOP_FRAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="616987" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="NOT_USED_ELEMENT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="808080" />
|
||||
<option name="EFFECT_COLOR" value="808080" />
|
||||
<option name="EFFECT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PARAMETER_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="ff8100" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PHP_EXEC_COMMAND_ID">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="e6db74" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="SEARCH_RESULT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="6a6a6a" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="SONARLINT_SELECTED">
|
||||
<value>
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
<option name="EFFECT_COLOR" value="947315" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="STATIC_FIELD_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="STATIC_FINAL_FIELD_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="9d65ff" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="STATIC_METHOD_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="89df00" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="TEMPLATE_VARIABLE_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="TEXT">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
<option name="BACKGROUND" value="313335" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="TEXT_SEARCH_RESULT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="425f44" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
<option name="EFFECT_COLOR" value="56ac48" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="425f44" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="TODO_DEFAULT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="a8c023" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="a74c0" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="TYPE_PARAMETER_NAME_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="66d9ef" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="TYPO">
|
||||
<value>
|
||||
<option name="EFFECT_COLOR" value="867f27" />
|
||||
<option name="EFFECT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="UNMATCHED_BRACE_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="d1243b" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="Unresolved reference access">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="f8f8f2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="WARNING_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="52503a" />
|
||||
<option name="FONT_TYPE" value="2" />
|
||||
<option name="EFFECT_COLOR" value="d3b129" />
|
||||
<option name="EFFECT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="WRITE_IDENTIFIER_UNDER_CARET_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="5f5f5f" />
|
||||
<option name="FONT_TYPE" value="1" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="WRITE_SEARCH_RESULT_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="BACKGROUND" value="6a6a6a" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="WRONG_REFERENCES_ATTRIBUTES">
|
||||
<value>
|
||||
<option name="FOREGROUND" value="bc3f3c" />
|
||||
<option name="EFFECT_COLOR" value="bc3f3c" />
|
||||
<option name="ERROR_STRIPE_COLOR" value="bc3f3c" />
|
||||
<option name="EFFECT_TYPE" value="2" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="XML_ATTRIBUTE_NAME" baseAttributes="DEFAULT_ATTRIBUTE" />
|
||||
<option name="XML_ENTITY_REFERENCE" baseAttributes="DEFAULT_ENTITY" />
|
||||
<option name="XML_PROLOGUE" baseAttributes="TEXT" />
|
||||
<option name="XML_TAG" baseAttributes="DEFAULT_TAG" />
|
||||
<option name="XML_TAG_DATA" baseAttributes="TEXT" />
|
||||
<option name="XML_TAG_NAME" baseAttributes="DEFAULT_KEYWORD" />
|
||||
</attributes>
|
||||
</scheme>
|
|
@ -0,0 +1,62 @@
|
|||
package com.lk.phr.dao.phr;
|
||||
|
||||
import com.lk.phr.model.phr.UserHistoryModel;
|
||||
import com.lk.phr.model.phr.UserHistoryModelWithBLOBs;
|
||||
|
||||
public interface UserHistoryDao {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insert(UserHistoryModelWithBLOBs record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insertSelective(UserHistoryModelWithBLOBs record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
UserHistoryModelWithBLOBs selectByPrimaryKey(Long id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKeySelective(UserHistoryModelWithBLOBs record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKeyWithBLOBs(UserHistoryModelWithBLOBs record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table user_history
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKey(UserHistoryModel record);
|
||||
}
|
|
@ -0,0 +1,404 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.lk.phr.dao.phr.UserHistoryDao">
|
||||
<resultMap id="BaseResultMap" type="com.lk.phr.model.phr.UserHistoryModel">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="org_id" jdbcType="BIGINT" property="orgId" />
|
||||
<result column="medical" jdbcType="BIT" property="medical" />
|
||||
<result column="flag" jdbcType="INTEGER" property="flag" />
|
||||
<result column="updated" jdbcType="TIMESTAMP" property="updated" />
|
||||
<result column="created" jdbcType="TIMESTAMP" property="created" />
|
||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||
<result column="seq_no" jdbcType="BIGINT" property="seqNo" />
|
||||
<result column="out_no" jdbcType="VARCHAR" property="outNo" />
|
||||
<result column="check_type_name" jdbcType="VARCHAR" property="checkTypeName" />
|
||||
<result column="check_type_code" jdbcType="VARCHAR" property="checkTypeCode" />
|
||||
<result column="score" jdbcType="DOUBLE" property="score" />
|
||||
<result column="evaluate" jdbcType="VARCHAR" property="evaluate" />
|
||||
<result column="check_addr" jdbcType="VARCHAR" property="checkAddr" />
|
||||
<result column="check_organization" jdbcType="VARCHAR" property="checkOrganization" />
|
||||
<result column="device_code" jdbcType="VARCHAR" property="deviceCode" />
|
||||
<result column="device_no" jdbcType="VARCHAR" property="deviceNo" />
|
||||
<result column="entropy_score" jdbcType="DOUBLE" property="entropyScore" />
|
||||
<result column="phr_uid" jdbcType="BIGINT" property="phrUid" />
|
||||
<result column="check_sub_type" jdbcType="VARCHAR" property="checkSubType" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.lk.phr.model.phr.UserHistoryModelWithBLOBs">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<result column="face_url" jdbcType="LONGVARCHAR" property="faceUrl" />
|
||||
<result column="tongue_url" jdbcType="LONGVARCHAR" property="tongueUrl" />
|
||||
<result column="base_of_tongue_url" jdbcType="LONGVARCHAR" property="baseOfTongueUrl" />
|
||||
<result column="obj_json" jdbcType="LONGVARCHAR" property="objJson" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, user_id, org_id, medical, flag, updated, created, source, seq_no, out_no, check_type_name,
|
||||
check_type_code, score, evaluate, check_addr, check_organization, device_code, device_no,
|
||||
entropy_score, phr_uid, check_sub_type
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
face_url, tongue_url, base_of_tongue_url, obj_json
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from user_history
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from user_history
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.lk.phr.model.phr.UserHistoryModelWithBLOBs">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into user_history (id, user_id, org_id,
|
||||
medical, flag, updated,
|
||||
created, source, seq_no,
|
||||
out_no, check_type_name, check_type_code,
|
||||
score, evaluate, check_addr,
|
||||
check_organization, device_code, device_no,
|
||||
entropy_score, phr_uid, check_sub_type,
|
||||
face_url, tongue_url, base_of_tongue_url,
|
||||
obj_json)
|
||||
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{orgId,jdbcType=BIGINT},
|
||||
#{medical,jdbcType=BIT}, #{flag,jdbcType=INTEGER}, #{updated,jdbcType=TIMESTAMP},
|
||||
#{created,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{seqNo,jdbcType=BIGINT},
|
||||
#{outNo,jdbcType=VARCHAR}, #{checkTypeName,jdbcType=VARCHAR}, #{checkTypeCode,jdbcType=VARCHAR},
|
||||
#{score,jdbcType=DOUBLE}, #{evaluate,jdbcType=VARCHAR}, #{checkAddr,jdbcType=VARCHAR},
|
||||
#{checkOrganization,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR}, #{deviceNo,jdbcType=VARCHAR},
|
||||
#{entropyScore,jdbcType=DOUBLE}, #{phrUid,jdbcType=BIGINT}, #{checkSubType,jdbcType=VARCHAR},
|
||||
#{faceUrl,jdbcType=LONGVARCHAR}, #{tongueUrl,jdbcType=LONGVARCHAR}, #{baseOfTongueUrl,jdbcType=LONGVARCHAR},
|
||||
#{objJson,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.lk.phr.model.phr.UserHistoryModelWithBLOBs">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into user_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="orgId != null">
|
||||
org_id,
|
||||
</if>
|
||||
<if test="medical != null">
|
||||
medical,
|
||||
</if>
|
||||
<if test="flag != null">
|
||||
flag,
|
||||
</if>
|
||||
<if test="updated != null">
|
||||
updated,
|
||||
</if>
|
||||
<if test="created != null">
|
||||
created,
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source,
|
||||
</if>
|
||||
<if test="seqNo != null">
|
||||
seq_no,
|
||||
</if>
|
||||
<if test="outNo != null">
|
||||
out_no,
|
||||
</if>
|
||||
<if test="checkTypeName != null">
|
||||
check_type_name,
|
||||
</if>
|
||||
<if test="checkTypeCode != null">
|
||||
check_type_code,
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score,
|
||||
</if>
|
||||
<if test="evaluate != null">
|
||||
evaluate,
|
||||
</if>
|
||||
<if test="checkAddr != null">
|
||||
check_addr,
|
||||
</if>
|
||||
<if test="checkOrganization != null">
|
||||
check_organization,
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code,
|
||||
</if>
|
||||
<if test="deviceNo != null">
|
||||
device_no,
|
||||
</if>
|
||||
<if test="entropyScore != null">
|
||||
entropy_score,
|
||||
</if>
|
||||
<if test="phrUid != null">
|
||||
phr_uid,
|
||||
</if>
|
||||
<if test="checkSubType != null">
|
||||
check_sub_type,
|
||||
</if>
|
||||
<if test="faceUrl != null">
|
||||
face_url,
|
||||
</if>
|
||||
<if test="tongueUrl != null">
|
||||
tongue_url,
|
||||
</if>
|
||||
<if test="baseOfTongueUrl != null">
|
||||
base_of_tongue_url,
|
||||
</if>
|
||||
<if test="objJson != null">
|
||||
obj_json,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orgId != null">
|
||||
#{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="medical != null">
|
||||
#{medical,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="flag != null">
|
||||
#{flag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="updated != null">
|
||||
#{updated,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="created != null">
|
||||
#{created,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
#{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="seqNo != null">
|
||||
#{seqNo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="outNo != null">
|
||||
#{outNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkTypeName != null">
|
||||
#{checkTypeName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkTypeCode != null">
|
||||
#{checkTypeCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
#{score,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="evaluate != null">
|
||||
#{evaluate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkAddr != null">
|
||||
#{checkAddr,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkOrganization != null">
|
||||
#{checkOrganization,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
#{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceNo != null">
|
||||
#{deviceNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="entropyScore != null">
|
||||
#{entropyScore,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="phrUid != null">
|
||||
#{phrUid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="checkSubType != null">
|
||||
#{checkSubType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="faceUrl != null">
|
||||
#{faceUrl,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="tongueUrl != null">
|
||||
#{tongueUrl,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="baseOfTongueUrl != null">
|
||||
#{baseOfTongueUrl,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="objJson != null">
|
||||
#{objJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.lk.phr.model.phr.UserHistoryModelWithBLOBs">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update user_history
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orgId != null">
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="medical != null">
|
||||
medical = #{medical,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="flag != null">
|
||||
flag = #{flag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="updated != null">
|
||||
updated = #{updated,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="created != null">
|
||||
created = #{created,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="seqNo != null">
|
||||
seq_no = #{seqNo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="outNo != null">
|
||||
out_no = #{outNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkTypeName != null">
|
||||
check_type_name = #{checkTypeName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkTypeCode != null">
|
||||
check_type_code = #{checkTypeCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score = #{score,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="evaluate != null">
|
||||
evaluate = #{evaluate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkAddr != null">
|
||||
check_addr = #{checkAddr,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="checkOrganization != null">
|
||||
check_organization = #{checkOrganization,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceNo != null">
|
||||
device_no = #{deviceNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="entropyScore != null">
|
||||
entropy_score = #{entropyScore,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="phrUid != null">
|
||||
phr_uid = #{phrUid,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="checkSubType != null">
|
||||
check_sub_type = #{checkSubType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="faceUrl != null">
|
||||
face_url = #{faceUrl,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="tongueUrl != null">
|
||||
tongue_url = #{tongueUrl,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="baseOfTongueUrl != null">
|
||||
base_of_tongue_url = #{baseOfTongueUrl,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="objJson != null">
|
||||
obj_json = #{objJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.lk.phr.model.phr.UserHistoryModelWithBLOBs">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update user_history
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
||||
medical = #{medical,jdbcType=BIT},
|
||||
flag = #{flag,jdbcType=INTEGER},
|
||||
updated = #{updated,jdbcType=TIMESTAMP},
|
||||
created = #{created,jdbcType=TIMESTAMP},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
seq_no = #{seqNo,jdbcType=BIGINT},
|
||||
out_no = #{outNo,jdbcType=VARCHAR},
|
||||
check_type_name = #{checkTypeName,jdbcType=VARCHAR},
|
||||
check_type_code = #{checkTypeCode,jdbcType=VARCHAR},
|
||||
score = #{score,jdbcType=DOUBLE},
|
||||
evaluate = #{evaluate,jdbcType=VARCHAR},
|
||||
check_addr = #{checkAddr,jdbcType=VARCHAR},
|
||||
check_organization = #{checkOrganization,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
device_no = #{deviceNo,jdbcType=VARCHAR},
|
||||
entropy_score = #{entropyScore,jdbcType=DOUBLE},
|
||||
phr_uid = #{phrUid,jdbcType=BIGINT},
|
||||
check_sub_type = #{checkSubType,jdbcType=VARCHAR},
|
||||
face_url = #{faceUrl,jdbcType=LONGVARCHAR},
|
||||
tongue_url = #{tongueUrl,jdbcType=LONGVARCHAR},
|
||||
base_of_tongue_url = #{baseOfTongueUrl,jdbcType=LONGVARCHAR},
|
||||
obj_json = #{objJson,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.lk.phr.model.phr.UserHistoryModel">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update user_history
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
org_id = #{orgId,jdbcType=BIGINT},
|
||||
medical = #{medical,jdbcType=BIT},
|
||||
flag = #{flag,jdbcType=INTEGER},
|
||||
updated = #{updated,jdbcType=TIMESTAMP},
|
||||
created = #{created,jdbcType=TIMESTAMP},
|
||||
source = #{source,jdbcType=VARCHAR},
|
||||
seq_no = #{seqNo,jdbcType=BIGINT},
|
||||
out_no = #{outNo,jdbcType=VARCHAR},
|
||||
check_type_name = #{checkTypeName,jdbcType=VARCHAR},
|
||||
check_type_code = #{checkTypeCode,jdbcType=VARCHAR},
|
||||
score = #{score,jdbcType=DOUBLE},
|
||||
evaluate = #{evaluate,jdbcType=VARCHAR},
|
||||
check_addr = #{checkAddr,jdbcType=VARCHAR},
|
||||
check_organization = #{checkOrganization,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
device_no = #{deviceNo,jdbcType=VARCHAR},
|
||||
entropy_score = #{entropyScore,jdbcType=DOUBLE},
|
||||
phr_uid = #{phrUid,jdbcType=BIGINT},
|
||||
check_sub_type = #{checkSubType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,745 @@
|
|||
package com.lk.phr.model.phr;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table user_history
|
||||
*/
|
||||
public class UserHistoryModel {
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* id
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 用户中心用户ID
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.user_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 用户中心组织ID
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.org_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 诊断类型(1中医,2西医,3中西医结合)
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.medical
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Boolean medical;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 删除标志(0:正常,1:删除)
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.flag
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 更新时间
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.updated
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date updated;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 创建时间
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.created
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Date created;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 来源
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.source
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 序列号(唯一索引)
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.seq_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long seqNo;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 外部流水号
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.out_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String outNo;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 检查类型名称
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.check_type_name
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String checkTypeName;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 检查类型代码
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.check_type_code
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String checkTypeCode;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 体检分值
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.score
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Double score;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 体检对应评价
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.evaluate
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String evaluate;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 体检地址
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.check_addr
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String checkAddr;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 体检机构
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.check_organization
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String checkOrganization;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 设备编码
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.device_code
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String deviceCode;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 设备唯一序号
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.device_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String deviceNo;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 熵值分数
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.entropy_score
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Double entropyScore;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* phr体系内用户id
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.phr_uid
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Long phrUid;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 检查子类型 如问卷类型
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.check_sub_type
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String checkSubType;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.id
|
||||
*
|
||||
* @return the value of user_history.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.id
|
||||
*
|
||||
* @param id the value for user_history.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.user_id
|
||||
*
|
||||
* @return the value of user_history.user_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.user_id
|
||||
*
|
||||
* @param userId the value for user_history.user_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.org_id
|
||||
*
|
||||
* @return the value of user_history.org_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getOrgId() {
|
||||
return orgId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.org_id
|
||||
*
|
||||
* @param orgId the value for user_history.org_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setOrgId(Long orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.medical
|
||||
*
|
||||
* @return the value of user_history.medical
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean getMedical() {
|
||||
return medical;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.medical
|
||||
*
|
||||
* @param medical the value for user_history.medical
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setMedical(Boolean medical) {
|
||||
this.medical = medical;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.flag
|
||||
*
|
||||
* @return the value of user_history.flag
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.flag
|
||||
*
|
||||
* @param flag the value for user_history.flag
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setFlag(Integer flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.updated
|
||||
*
|
||||
* @return the value of user_history.updated
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Date getUpdated() {
|
||||
return updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.updated
|
||||
*
|
||||
* @param updated the value for user_history.updated
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setUpdated(Date updated) {
|
||||
this.updated = updated;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.created
|
||||
*
|
||||
* @return the value of user_history.created
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Date getCreated() {
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.created
|
||||
*
|
||||
* @param created the value for user_history.created
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setCreated(Date created) {
|
||||
this.created = created;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.source
|
||||
*
|
||||
* @return the value of user_history.source
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.source
|
||||
*
|
||||
* @param source the value for user_history.source
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setSource(String source) {
|
||||
this.source = source == null ? null : source.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.seq_no
|
||||
*
|
||||
* @return the value of user_history.seq_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getSeqNo() {
|
||||
return seqNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.seq_no
|
||||
*
|
||||
* @param seqNo the value for user_history.seq_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setSeqNo(Long seqNo) {
|
||||
this.seqNo = seqNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.out_no
|
||||
*
|
||||
* @return the value of user_history.out_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getOutNo() {
|
||||
return outNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.out_no
|
||||
*
|
||||
* @param outNo the value for user_history.out_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setOutNo(String outNo) {
|
||||
this.outNo = outNo == null ? null : outNo.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.check_type_name
|
||||
*
|
||||
* @return the value of user_history.check_type_name
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getCheckTypeName() {
|
||||
return checkTypeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.check_type_name
|
||||
*
|
||||
* @param checkTypeName the value for user_history.check_type_name
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setCheckTypeName(String checkTypeName) {
|
||||
this.checkTypeName = checkTypeName == null ? null : checkTypeName.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.check_type_code
|
||||
*
|
||||
* @return the value of user_history.check_type_code
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getCheckTypeCode() {
|
||||
return checkTypeCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.check_type_code
|
||||
*
|
||||
* @param checkTypeCode the value for user_history.check_type_code
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setCheckTypeCode(String checkTypeCode) {
|
||||
this.checkTypeCode = checkTypeCode == null ? null : checkTypeCode.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.score
|
||||
*
|
||||
* @return the value of user_history.score
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Double getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.score
|
||||
*
|
||||
* @param score the value for user_history.score
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setScore(Double score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.evaluate
|
||||
*
|
||||
* @return the value of user_history.evaluate
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getEvaluate() {
|
||||
return evaluate;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.evaluate
|
||||
*
|
||||
* @param evaluate the value for user_history.evaluate
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setEvaluate(String evaluate) {
|
||||
this.evaluate = evaluate == null ? null : evaluate.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.check_addr
|
||||
*
|
||||
* @return the value of user_history.check_addr
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getCheckAddr() {
|
||||
return checkAddr;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.check_addr
|
||||
*
|
||||
* @param checkAddr the value for user_history.check_addr
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setCheckAddr(String checkAddr) {
|
||||
this.checkAddr = checkAddr == null ? null : checkAddr.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.check_organization
|
||||
*
|
||||
* @return the value of user_history.check_organization
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getCheckOrganization() {
|
||||
return checkOrganization;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.check_organization
|
||||
*
|
||||
* @param checkOrganization the value for user_history.check_organization
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setCheckOrganization(String checkOrganization) {
|
||||
this.checkOrganization = checkOrganization == null ? null : checkOrganization.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.device_code
|
||||
*
|
||||
* @return the value of user_history.device_code
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.device_code
|
||||
*
|
||||
* @param deviceCode the value for user_history.device_code
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode == null ? null : deviceCode.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.device_no
|
||||
*
|
||||
* @return the value of user_history.device_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getDeviceNo() {
|
||||
return deviceNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.device_no
|
||||
*
|
||||
* @param deviceNo the value for user_history.device_no
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setDeviceNo(String deviceNo) {
|
||||
this.deviceNo = deviceNo == null ? null : deviceNo.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.entropy_score
|
||||
*
|
||||
* @return the value of user_history.entropy_score
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Double getEntropyScore() {
|
||||
return entropyScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.entropy_score
|
||||
*
|
||||
* @param entropyScore the value for user_history.entropy_score
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setEntropyScore(Double entropyScore) {
|
||||
this.entropyScore = entropyScore;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.phr_uid
|
||||
*
|
||||
* @return the value of user_history.phr_uid
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Long getPhrUid() {
|
||||
return phrUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.phr_uid
|
||||
*
|
||||
* @param phrUid the value for user_history.phr_uid
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setPhrUid(Long phrUid) {
|
||||
this.phrUid = phrUid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.check_sub_type
|
||||
*
|
||||
* @return the value of user_history.check_sub_type
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getCheckSubType() {
|
||||
return checkSubType;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.check_sub_type
|
||||
*
|
||||
* @param checkSubType the value for user_history.check_sub_type
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setCheckSubType(String checkSubType) {
|
||||
this.checkSubType = checkSubType == null ? null : checkSubType.trim();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,146 @@
|
|||
package com.lk.phr.model.phr;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class was generated by MyBatis Generator.
|
||||
* This class corresponds to the database table user_history
|
||||
*/
|
||||
public class UserHistoryModelWithBLOBs extends UserHistoryModel {
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 面诊图片
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.face_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String faceUrl;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 舌诊图片
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.tongue_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String tongueUrl;
|
||||
|
||||
/**
|
||||
* Database Column Remarks:
|
||||
* 舌底图片
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.base_of_tongue_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String baseOfTongueUrl;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column user_history.obj_json
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String objJson;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.face_url
|
||||
*
|
||||
* @return the value of user_history.face_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getFaceUrl() {
|
||||
return faceUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.face_url
|
||||
*
|
||||
* @param faceUrl the value for user_history.face_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setFaceUrl(String faceUrl) {
|
||||
this.faceUrl = faceUrl == null ? null : faceUrl.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.tongue_url
|
||||
*
|
||||
* @return the value of user_history.tongue_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getTongueUrl() {
|
||||
return tongueUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.tongue_url
|
||||
*
|
||||
* @param tongueUrl the value for user_history.tongue_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setTongueUrl(String tongueUrl) {
|
||||
this.tongueUrl = tongueUrl == null ? null : tongueUrl.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.base_of_tongue_url
|
||||
*
|
||||
* @return the value of user_history.base_of_tongue_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getBaseOfTongueUrl() {
|
||||
return baseOfTongueUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.base_of_tongue_url
|
||||
*
|
||||
* @param baseOfTongueUrl the value for user_history.base_of_tongue_url
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setBaseOfTongueUrl(String baseOfTongueUrl) {
|
||||
this.baseOfTongueUrl = baseOfTongueUrl == null ? null : baseOfTongueUrl.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column user_history.obj_json
|
||||
*
|
||||
* @return the value of user_history.obj_json
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getObjJson() {
|
||||
return objJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column user_history.obj_json
|
||||
*
|
||||
* @param objJson the value for user_history.obj_json
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setObjJson(String objJson) {
|
||||
this.objJson = objJson == null ? null : objJson.trim();
|
||||
}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
package me.ehlxr;
|
||||
|
||||
import cn.enncloud.ceres.utils.NamedThreadFactory;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author lixiangrong
|
||||
* @date 2018/8/27
|
||||
*/
|
||||
public class ScheduledThreadPoolExecutorTest {
|
||||
|
||||
private ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1, new NamedThreadFactory("TestTimer", true));
|
||||
private ScheduledFuture<?> scheduledFuture;
|
||||
private static CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
|
||||
private void start() {
|
||||
scheduledFuture = scheduledThreadPoolExecutor.scheduleAtFixedRate(() -> {
|
||||
System.out.println(scheduledThreadPoolExecutor.getQueue() + " " + Thread.currentThread().getName());
|
||||
|
||||
scheduledFuture.cancel(false);
|
||||
// System.out.println(scheduledThreadPoolExecutor.remove(pingCommand));
|
||||
// System.out.println(scheduledThreadPoolExecutor.getRemoveOnCancelPolicy());
|
||||
// scheduledThreadPoolExecutor.setRemoveOnCancelPolicy(true);
|
||||
System.out.println(scheduledThreadPoolExecutor.getQueue() + " " + Thread.currentThread().getName());
|
||||
// System.out.println(scheduledThreadPoolExecutor.getActiveCount());
|
||||
|
||||
countDownLatch.countDown();
|
||||
}, 2, 5, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
ScheduledThreadPoolExecutorTest test = new ScheduledThreadPoolExecutorTest();
|
||||
test.start();
|
||||
countDownLatch.await();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,276 @@
|
|||
package me.ehlxr.hbase;
|
||||
|
||||
import me.ehlxr.utils.Pair;
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.HBaseConfiguration;
|
||||
import org.apache.hadoop.hbase.HColumnDescriptor;
|
||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
import org.apache.hadoop.hbase.TableName;
|
||||
import org.apache.hadoop.hbase.client.*;
|
||||
import org.apache.hadoop.hbase.filter.FilterList;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ehlxr
|
||||
*/
|
||||
public class HBaseUtils {
|
||||
private static Connection connection;
|
||||
|
||||
static {
|
||||
Configuration configuration = HBaseConfiguration.create();
|
||||
configuration.set("hbase.zookeeper.property.clientPort", "2181");
|
||||
// 如果是集群 则主机名用逗号分隔
|
||||
configuration.set("hbase.zookeeper.quorum", "127.0.0.1");
|
||||
// configuration.set("hbase.master", "127.0.0.1:16000");
|
||||
try {
|
||||
connection = ConnectionFactory.createConnection(configuration);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 HBase 表
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param columnFamilies 列族的数组
|
||||
*/
|
||||
public static boolean createTable(String tableName, List<String> columnFamilies) {
|
||||
try {
|
||||
HBaseAdmin admin = (HBaseAdmin) connection.getAdmin();
|
||||
if (admin.tableExists(tableName)) {
|
||||
return false;
|
||||
}
|
||||
HTableDescriptor tableDescriptor = new HTableDescriptor(TableName.valueOf(tableName));
|
||||
columnFamilies.forEach(columnFamily -> {
|
||||
HColumnDescriptor columnDescriptor = new HColumnDescriptor(columnFamily);
|
||||
columnDescriptor.setMaxVersions(1);
|
||||
tableDescriptor.addFamily(columnDescriptor);
|
||||
});
|
||||
admin.createTable(tableDescriptor);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除 hBase 表
|
||||
*
|
||||
* @param tableName 表名
|
||||
*/
|
||||
public static boolean deleteTable(String tableName) {
|
||||
try {
|
||||
HBaseAdmin admin = (HBaseAdmin) connection.getAdmin();
|
||||
// 删除表前需要先禁用表
|
||||
admin.disableTable(tableName);
|
||||
admin.deleteTable(tableName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param rowKey 唯一标识
|
||||
* @param columnFamilyName 列族名
|
||||
* @param qualifier 列标识
|
||||
* @param value 数据
|
||||
*/
|
||||
public static boolean putRow(String tableName, String rowKey, String columnFamilyName, String qualifier,
|
||||
String value) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Put put = new Put(Bytes.toBytes(rowKey));
|
||||
put.addColumn(Bytes.toBytes(columnFamilyName), Bytes.toBytes(qualifier), Bytes.toBytes(value));
|
||||
table.put(put);
|
||||
table.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param rowKey 唯一标识
|
||||
* @param columnFamilyName 列族名
|
||||
* @param pairList 列标识和值的集合
|
||||
*/
|
||||
public static boolean putRow(String tableName, String rowKey, String columnFamilyName, List<Pair<String, String>> pairList) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Put put = new Put(Bytes.toBytes(rowKey));
|
||||
pairList.forEach(pair -> put.addColumn(Bytes.toBytes(columnFamilyName), Bytes.toBytes(pair.getKey()), Bytes.toBytes(pair.getValue())));
|
||||
table.put(put);
|
||||
table.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据 rowKey 获取指定行的数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param rowKey 唯一标识
|
||||
*/
|
||||
public static Result getRow(String tableName, String rowKey) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Get get = new Get(Bytes.toBytes(rowKey));
|
||||
return table.get(get);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取指定行指定列 (cell) 的最新版本的数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param rowKey 唯一标识
|
||||
* @param columnFamily 列族
|
||||
* @param qualifier 列标识
|
||||
*/
|
||||
public static String getCell(String tableName, String rowKey, String columnFamily, String qualifier) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Get get = new Get(Bytes.toBytes(rowKey));
|
||||
if (!get.isCheckExistenceOnly()) {
|
||||
get.addColumn(Bytes.toBytes(columnFamily), Bytes.toBytes(qualifier));
|
||||
Result result = table.get(get);
|
||||
byte[] resultValue = result.getValue(Bytes.toBytes(columnFamily), Bytes.toBytes(qualifier));
|
||||
return Bytes.toString(resultValue);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检索全表
|
||||
*
|
||||
* @param tableName 表名
|
||||
*/
|
||||
public static ResultScanner getScanner(String tableName) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Scan scan = new Scan();
|
||||
return table.getScanner(scan);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 检索表中指定数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param filterList 过滤器
|
||||
*/
|
||||
|
||||
public static ResultScanner getScanner(String tableName, FilterList filterList) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Scan scan = new Scan();
|
||||
scan.setFilter(filterList);
|
||||
return table.getScanner(scan);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检索表中指定数据
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param startRowKey 起始 RowKey
|
||||
* @param endRowKey 终止 RowKey
|
||||
* @param filterList 过滤器
|
||||
*/
|
||||
|
||||
public static ResultScanner getScanner(String tableName, String startRowKey, String endRowKey,
|
||||
FilterList filterList) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Scan scan = new Scan();
|
||||
scan.setStartRow(Bytes.toBytes(startRowKey));
|
||||
scan.setStopRow(Bytes.toBytes(endRowKey));
|
||||
scan.setFilter(filterList);
|
||||
return table.getScanner(scan);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定行记录
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param rowKey 唯一标识
|
||||
*/
|
||||
public static boolean deleteRow(String tableName, String rowKey) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Delete delete = new Delete(Bytes.toBytes(rowKey));
|
||||
table.delete(delete);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除指定行的指定列
|
||||
*
|
||||
* @param tableName 表名
|
||||
* @param rowKey 唯一标识
|
||||
* @param familyName 列族
|
||||
* @param qualifier 列标识
|
||||
*/
|
||||
public static boolean deleteColumn(String tableName, String rowKey, String familyName,
|
||||
String qualifier) {
|
||||
try {
|
||||
Table table = connection.getTable(TableName.valueOf(tableName));
|
||||
Delete delete = new Delete(Bytes.toBytes(rowKey));
|
||||
delete.addColumn(Bytes.toBytes(familyName), Bytes.toBytes(qualifier));
|
||||
table.delete(delete);
|
||||
table.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package me.ehlxr.hbase;
|
||||
|
||||
import me.ehlxr.utils.Pair;
|
||||
import org.apache.hadoop.hbase.client.Result;
|
||||
import org.apache.hadoop.hbase.client.ResultScanner;
|
||||
import org.apache.hadoop.hbase.filter.CompareFilter;
|
||||
import org.apache.hadoop.hbase.filter.FilterList;
|
||||
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lixiangrong
|
||||
* @since 2020/2/26.
|
||||
*/
|
||||
public class Main {
|
||||
private static final String TABLE_NAME = "class";
|
||||
private static final String TEACHER = "teacher";
|
||||
private static final String STUDENT = "student";
|
||||
|
||||
public static void main(String[] args) {
|
||||
createTable();
|
||||
insertData();
|
||||
getScanner();
|
||||
// deleteTable();
|
||||
}
|
||||
|
||||
|
||||
private static void createTable() {
|
||||
// 新建表
|
||||
List<String> columnFamilies = Arrays.asList(TEACHER, STUDENT);
|
||||
boolean table = HBaseUtils.createTable(TABLE_NAME, columnFamilies);
|
||||
System.out.println("表创建结果:" + table);
|
||||
}
|
||||
|
||||
private static void insertData() {
|
||||
List<Pair<String, String>> pairs1 = Arrays.asList(new Pair<>("name", "Tom"),
|
||||
new Pair<>("age", "22"),
|
||||
new Pair<>("gender", "1"));
|
||||
HBaseUtils.putRow(TABLE_NAME, "rowKey1", STUDENT, pairs1);
|
||||
|
||||
List<Pair<String, String>> pairs2 = Arrays.asList(new Pair<>("name", "Jack"),
|
||||
new Pair<>("age", "33"),
|
||||
new Pair<>("gender", "2"));
|
||||
HBaseUtils.putRow(TABLE_NAME, "rowKey2", STUDENT, pairs2);
|
||||
|
||||
List<Pair<String, String>> pairs3 = Arrays.asList(new Pair<>("name", "Mike"),
|
||||
new Pair<>("age", "44"),
|
||||
new Pair<>("gender", "1"));
|
||||
HBaseUtils.putRow(TABLE_NAME, "rowKey3", STUDENT, pairs3);
|
||||
}
|
||||
|
||||
|
||||
private static void getRow() {
|
||||
Result result = HBaseUtils.getRow(TABLE_NAME, "rowKey1");
|
||||
if (result != null) {
|
||||
System.out.println(Bytes
|
||||
.toString(result.getValue(Bytes.toBytes(STUDENT), Bytes.toBytes("name"))));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void getCell() {
|
||||
String cell = HBaseUtils.getCell(TABLE_NAME, "rowKey2", STUDENT, "age");
|
||||
System.out.println("cell age :" + cell);
|
||||
|
||||
}
|
||||
|
||||
private static void getScanner() {
|
||||
ResultScanner scanner = HBaseUtils.getScanner(TABLE_NAME);
|
||||
if (scanner != null) {
|
||||
scanner.forEach(result -> System.out.println(Bytes.toString(result.getRow()) + "->" + Bytes
|
||||
.toString(result.getValue(Bytes.toBytes(STUDENT), Bytes.toBytes("name")))));
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void getScannerWithFilter() {
|
||||
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ALL);
|
||||
SingleColumnValueFilter nameFilter = new SingleColumnValueFilter(Bytes.toBytes(STUDENT),
|
||||
Bytes.toBytes("name"), CompareFilter.CompareOp.EQUAL, Bytes.toBytes("Jack"));
|
||||
filterList.addFilter(nameFilter);
|
||||
ResultScanner scanner = HBaseUtils.getScanner(TABLE_NAME, filterList);
|
||||
if (scanner != null) {
|
||||
scanner.forEach(result -> System.out.println(Bytes.toString(result.getRow()) + "->" + Bytes
|
||||
.toString(result.getValue(Bytes.toBytes(STUDENT), Bytes.toBytes("name")))));
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
|
||||
private static void deleteColumn() {
|
||||
boolean b = HBaseUtils.deleteColumn(TABLE_NAME, "rowKey2", STUDENT, "age");
|
||||
System.out.println("删除结果: " + b);
|
||||
}
|
||||
|
||||
private static void deleteRow() {
|
||||
boolean b = HBaseUtils.deleteRow(TABLE_NAME, "rowKey2");
|
||||
System.out.println("删除结果: " + b);
|
||||
}
|
||||
|
||||
private static void deleteTable() {
|
||||
boolean b = HBaseUtils.deleteTable(TABLE_NAME);
|
||||
System.out.println("删除结果: " + b);
|
||||
}
|
||||
}
|
|
@ -1,17 +1,5 @@
|
|||
package me.ehlxr.utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.http.HttpEntity;
|
||||
|
@ -26,9 +14,7 @@ import org.apache.http.config.Registry;
|
|||
import org.apache.http.config.RegistryBuilder;
|
||||
import org.apache.http.cookie.Cookie;
|
||||
import org.apache.http.cookie.CookieOrigin;
|
||||
import org.apache.http.cookie.CookieSpec;
|
||||
import org.apache.http.cookie.CookieSpecProvider;
|
||||
import org.apache.http.cookie.MalformedCookieException;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.BasicCookieStore;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
|
@ -37,339 +23,345 @@ import org.apache.http.impl.cookie.BestMatchSpecFactory;
|
|||
import org.apache.http.impl.cookie.BrowserCompatSpec;
|
||||
import org.apache.http.impl.cookie.BrowserCompatSpecFactory;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ehlxr
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class HttpClientUtil {
|
||||
private static Log log = LogFactory.getLog(HttpClientUtil.class);
|
||||
private static final int timeOut = 300000;// timeOut(Millisecond)
|
||||
private static final int BUFFERSIZE = 2048;
|
||||
private static final int TIME_OUT = 300000;
|
||||
private static final int BUFFERSIZE = 2048;
|
||||
private static Log log = LogFactory.getLog(HttpClientUtil.class);
|
||||
|
||||
private static Registry<CookieSpecProvider> getRegistry() {
|
||||
return RegistryBuilder.<CookieSpecProvider> create().register(CookieSpecs.BEST_MATCH, new BestMatchSpecFactory())
|
||||
.register(CookieSpecs.BROWSER_COMPATIBILITY, new BrowserCompatSpecFactory()).register("easy", getCookieProvider()).build();
|
||||
}
|
||||
private static Registry<CookieSpecProvider> getRegistry() {
|
||||
return RegistryBuilder.<CookieSpecProvider>create().register(CookieSpecs.BEST_MATCH, new BestMatchSpecFactory())
|
||||
.register(CookieSpecs.BROWSER_COMPATIBILITY, new BrowserCompatSpecFactory()).register("easy", getCookieProvider()).build();
|
||||
}
|
||||
|
||||
private static CookieSpecProvider getCookieProvider() {
|
||||
return new CookieSpecProvider() {
|
||||
public CookieSpec create(HttpContext arg0) {
|
||||
// TODO Auto-generated method stub
|
||||
return new BrowserCompatSpec() {
|
||||
@Override
|
||||
public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException {
|
||||
// Oh, I am easy
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
private static CookieSpecProvider getCookieProvider() {
|
||||
return arg0 -> {
|
||||
// TODO Auto-generated method stub
|
||||
return new BrowserCompatSpec() {
|
||||
@Override
|
||||
public void validate(Cookie cookie, CookieOrigin origin) {
|
||||
// Oh, I am easy
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
public static String sendPostParamDefaultCookie(String url, Map<String, String> postParam) throws Exception {
|
||||
String result = null;
|
||||
StringBuffer out = null;
|
||||
CloseableHttpClient httpclient = null;
|
||||
HttpPost postmethod = null;
|
||||
RequestConfig requestConfig = null;
|
||||
HttpEntity entity = null;
|
||||
CloseableHttpResponse response = null;
|
||||
BasicCookieStore cookieStore = null;
|
||||
Registry<CookieSpecProvider> r = null;
|
||||
List<NameValuePair> nvps = null;
|
||||
BufferedReader br = null;
|
||||
InputStreamReader isr = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
out = new StringBuffer();// 返回数据
|
||||
cookieStore = new BasicCookieStore();
|
||||
r = getRegistry();
|
||||
postmethod = new HttpPost(url);
|
||||
requestConfig = RequestConfig.custom().setCookieSpec("easy").setConnectionRequestTimeout(timeOut).setConnectTimeout(timeOut)
|
||||
.setSocketTimeout(timeOut).build();
|
||||
httpclient = HttpClients.custom().setDefaultCookieSpecRegistry(r).setDefaultRequestConfig(requestConfig)
|
||||
.setDefaultCookieStore(cookieStore).build();
|
||||
nvps = new ArrayList<NameValuePair>();
|
||||
if (postParam != null && postParam.size() != 0) {
|
||||
for (String param : postParam.keySet()) {
|
||||
nvps.add(new BasicNameValuePair(param, postParam.get(param)));
|
||||
}
|
||||
}
|
||||
postmethod.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
|
||||
response = httpclient.execute(postmethod);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
entity = response.getEntity();
|
||||
inputStream = entity.getContent();
|
||||
isr = new InputStreamReader(inputStream, "UTF-8");
|
||||
br = new BufferedReader(isr);
|
||||
int count = 0;
|
||||
char[] b = new char[BUFFERSIZE];
|
||||
while ((count = br.read(b, 0, BUFFERSIZE)) != -1) {
|
||||
out.append(new String(b, 0, count));
|
||||
}
|
||||
} else {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
} finally {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
if (isr != null) {
|
||||
isr.close();
|
||||
}
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
if (postmethod != null) {
|
||||
postmethod.releaseConnection();
|
||||
}
|
||||
if (httpclient != null) {
|
||||
httpclient.close();
|
||||
}
|
||||
result = out.toString();
|
||||
out.setLength(0);
|
||||
out = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static String sendPostParamDefaultCookie(String url, Map<String, String> postParam) throws Exception {
|
||||
String result;
|
||||
StringBuffer out = null;
|
||||
CloseableHttpClient httpclient = null;
|
||||
HttpPost postmethod = null;
|
||||
RequestConfig requestConfig;
|
||||
HttpEntity entity;
|
||||
CloseableHttpResponse response = null;
|
||||
BasicCookieStore cookieStore;
|
||||
Registry<CookieSpecProvider> r;
|
||||
List<NameValuePair> nvps;
|
||||
BufferedReader br = null;
|
||||
InputStreamReader isr = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
out = new StringBuffer();// 返回数据
|
||||
cookieStore = new BasicCookieStore();
|
||||
r = getRegistry();
|
||||
postmethod = new HttpPost(url);
|
||||
requestConfig = RequestConfig.custom().setCookieSpec("easy").setConnectionRequestTimeout(TIME_OUT).setConnectTimeout(TIME_OUT)
|
||||
.setSocketTimeout(TIME_OUT).build();
|
||||
httpclient = HttpClients.custom().setDefaultCookieSpecRegistry(r).setDefaultRequestConfig(requestConfig)
|
||||
.setDefaultCookieStore(cookieStore).build();
|
||||
nvps = new ArrayList<>();
|
||||
if (postParam != null && postParam.size() != 0) {
|
||||
for (String param : postParam.keySet()) {
|
||||
nvps.add(new BasicNameValuePair(param, postParam.get(param)));
|
||||
}
|
||||
}
|
||||
postmethod.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
|
||||
response = httpclient.execute(postmethod);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
entity = response.getEntity();
|
||||
inputStream = entity.getContent();
|
||||
isr = new InputStreamReader(inputStream, StandardCharsets.UTF_8);
|
||||
br = new BufferedReader(isr);
|
||||
int count;
|
||||
char[] b = new char[BUFFERSIZE];
|
||||
while ((count = br.read(b, 0, BUFFERSIZE)) != -1) {
|
||||
out.append(new String(b, 0, count));
|
||||
}
|
||||
} else {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
} finally {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
if (isr != null) {
|
||||
isr.close();
|
||||
}
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
if (postmethod != null) {
|
||||
postmethod.releaseConnection();
|
||||
}
|
||||
if (httpclient != null) {
|
||||
httpclient.close();
|
||||
}
|
||||
result = out.toString();
|
||||
out.setLength(0);
|
||||
out = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String sendPostParam(String url, Map<String, String> postParam) throws Exception {
|
||||
log.debug("请求地址:" + url);
|
||||
String result = null;
|
||||
StringBuffer out = null;
|
||||
CloseableHttpClient httpclient = null;
|
||||
HttpPost postmethod = null;
|
||||
RequestConfig requestConfig = null;
|
||||
HttpEntity entity = null;
|
||||
CloseableHttpResponse response = null;
|
||||
List<NameValuePair> nvps = null;
|
||||
BufferedReader br = null;
|
||||
InputStreamReader isr = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
out = new StringBuffer();// 返回数据
|
||||
httpclient = HttpClients.createDefault();
|
||||
postmethod = new HttpPost(url);
|
||||
requestConfig = RequestConfig.custom().setConnectionRequestTimeout(timeOut).setConnectTimeout(timeOut).setSocketTimeout(timeOut)
|
||||
.build();
|
||||
postmethod.setConfig(requestConfig);
|
||||
nvps = new ArrayList<NameValuePair>();
|
||||
if (postParam != null && postParam.size() != 0) {
|
||||
for (String param : postParam.keySet()) {
|
||||
nvps.add(new BasicNameValuePair(param, postParam.get(param)));
|
||||
}
|
||||
}
|
||||
postmethod.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
|
||||
response = httpclient.execute(postmethod);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
entity = response.getEntity();
|
||||
inputStream = entity.getContent();
|
||||
isr = new InputStreamReader(inputStream, "UTF-8");
|
||||
br = new BufferedReader(isr);
|
||||
int count = 0;
|
||||
char[] b = new char[BUFFERSIZE];
|
||||
while ((count = br.read(b, 0, BUFFERSIZE)) != -1) {
|
||||
out.append(new String(b, 0, count));
|
||||
}
|
||||
} else {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
} finally {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
if (isr != null) {
|
||||
isr.close();
|
||||
}
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
if (postmethod != null) {
|
||||
postmethod.releaseConnection();
|
||||
}
|
||||
if (httpclient != null) {
|
||||
httpclient.close();
|
||||
}
|
||||
result = out.toString();
|
||||
out.setLength(0);
|
||||
out = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static String sendPostParam(String url, Map<String, String> postParam) throws Exception {
|
||||
log.debug("请求地址:" + url);
|
||||
String result = null;
|
||||
StringBuffer out = null;
|
||||
CloseableHttpClient httpclient = null;
|
||||
HttpPost postmethod = null;
|
||||
RequestConfig requestConfig = null;
|
||||
HttpEntity entity = null;
|
||||
CloseableHttpResponse response = null;
|
||||
List<NameValuePair> nvps = null;
|
||||
BufferedReader br = null;
|
||||
InputStreamReader isr = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
out = new StringBuffer();// 返回数据
|
||||
httpclient = HttpClients.createDefault();
|
||||
postmethod = new HttpPost(url);
|
||||
requestConfig = RequestConfig.custom().setConnectionRequestTimeout(TIME_OUT).setConnectTimeout(TIME_OUT).setSocketTimeout(TIME_OUT)
|
||||
.build();
|
||||
postmethod.setConfig(requestConfig);
|
||||
nvps = new ArrayList<NameValuePair>();
|
||||
if (postParam != null && postParam.size() != 0) {
|
||||
for (String param : postParam.keySet()) {
|
||||
nvps.add(new BasicNameValuePair(param, postParam.get(param)));
|
||||
}
|
||||
}
|
||||
postmethod.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
|
||||
response = httpclient.execute(postmethod);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
entity = response.getEntity();
|
||||
inputStream = entity.getContent();
|
||||
isr = new InputStreamReader(inputStream, "UTF-8");
|
||||
br = new BufferedReader(isr);
|
||||
int count = 0;
|
||||
char[] b = new char[BUFFERSIZE];
|
||||
while ((count = br.read(b, 0, BUFFERSIZE)) != -1) {
|
||||
out.append(new String(b, 0, count));
|
||||
}
|
||||
} else {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
} finally {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
if (isr != null) {
|
||||
isr.close();
|
||||
}
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
if (postmethod != null) {
|
||||
postmethod.releaseConnection();
|
||||
}
|
||||
if (httpclient != null) {
|
||||
httpclient.close();
|
||||
}
|
||||
result = out.toString();
|
||||
out.setLength(0);
|
||||
out = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String sendPostJSONData(String url, String json) throws Exception {
|
||||
System.out.println("请求地址:" + url);
|
||||
String result = null;
|
||||
StringBuffer out = null;
|
||||
CloseableHttpClient httpclient = null;
|
||||
HttpPost postmethod = null;
|
||||
RequestConfig requestConfig = null;
|
||||
HttpEntity entity = null;
|
||||
StringEntity strentity = null;
|
||||
CloseableHttpResponse response = null;
|
||||
BufferedReader br = null;
|
||||
InputStreamReader isr = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
out = new StringBuffer();// 返回数据
|
||||
httpclient = HttpClients.createDefault();
|
||||
postmethod = new HttpPost(url);
|
||||
requestConfig = RequestConfig.custom().setConnectionRequestTimeout(timeOut).setConnectTimeout(timeOut).setSocketTimeout(timeOut)
|
||||
.build();
|
||||
postmethod.setConfig(requestConfig);
|
||||
strentity = new StringEntity(URLEncoder.encode(json.toString(), "UTF-8"));
|
||||
postmethod.addHeader("Content-Type", "application/json");
|
||||
postmethod.setEntity(strentity);
|
||||
response = httpclient.execute(postmethod);
|
||||
System.out.println(response);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
entity = response.getEntity();
|
||||
inputStream = entity.getContent();
|
||||
isr = new InputStreamReader(inputStream, "UTF-8");
|
||||
br = new BufferedReader(isr);
|
||||
int count = 0;
|
||||
char[] b = new char[BUFFERSIZE];
|
||||
while ((count = br.read(b, 0, BUFFERSIZE)) != -1) {
|
||||
out.append(new String(b, 0, count));
|
||||
}
|
||||
} else {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
} finally {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
if (isr != null) {
|
||||
isr.close();
|
||||
}
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
if (postmethod != null) {
|
||||
postmethod.releaseConnection();
|
||||
}
|
||||
if (httpclient != null) {
|
||||
httpclient.close();
|
||||
}
|
||||
result = out.toString();
|
||||
out.setLength(0);
|
||||
out = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static String sendPostJSONData(String url, String json) throws Exception {
|
||||
System.out.println("请求地址:" + url);
|
||||
String result = null;
|
||||
StringBuffer out = null;
|
||||
CloseableHttpClient httpclient = null;
|
||||
HttpPost postmethod = null;
|
||||
RequestConfig requestConfig = null;
|
||||
HttpEntity entity = null;
|
||||
StringEntity strentity = null;
|
||||
CloseableHttpResponse response = null;
|
||||
BufferedReader br = null;
|
||||
InputStreamReader isr = null;
|
||||
InputStream inputStream = null;
|
||||
try {
|
||||
out = new StringBuffer();// 返回数据
|
||||
httpclient = HttpClients.createDefault();
|
||||
postmethod = new HttpPost(url);
|
||||
requestConfig = RequestConfig.custom().setConnectionRequestTimeout(TIME_OUT).setConnectTimeout(TIME_OUT).setSocketTimeout(TIME_OUT)
|
||||
.build();
|
||||
postmethod.setConfig(requestConfig);
|
||||
strentity = new StringEntity(URLEncoder.encode(json.toString(), "UTF-8"));
|
||||
postmethod.addHeader("Content-Type", "application/json");
|
||||
postmethod.setEntity(strentity);
|
||||
response = httpclient.execute(postmethod);
|
||||
System.out.println(response);
|
||||
int statusCode = response.getStatusLine().getStatusCode();
|
||||
if (statusCode == HttpStatus.SC_OK) {
|
||||
entity = response.getEntity();
|
||||
inputStream = entity.getContent();
|
||||
isr = new InputStreamReader(inputStream, "UTF-8");
|
||||
br = new BufferedReader(isr);
|
||||
int count = 0;
|
||||
char[] b = new char[BUFFERSIZE];
|
||||
while ((count = br.read(b, 0, BUFFERSIZE)) != -1) {
|
||||
out.append(new String(b, 0, count));
|
||||
}
|
||||
} else {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.append(SystemConstants.SYSTEM_ERROR);
|
||||
} finally {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
if (isr != null) {
|
||||
isr.close();
|
||||
}
|
||||
if (inputStream != null) {
|
||||
inputStream.close();
|
||||
}
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
if (postmethod != null) {
|
||||
postmethod.releaseConnection();
|
||||
}
|
||||
if (httpclient != null) {
|
||||
httpclient.close();
|
||||
}
|
||||
result = out.toString();
|
||||
out.setLength(0);
|
||||
out = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 向指定URL发送GET方法的请求
|
||||
*
|
||||
* @param url
|
||||
* 发送请求的URL
|
||||
* @return URL 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendGet(String url) {
|
||||
String result = "";
|
||||
BufferedReader in = null;
|
||||
try {
|
||||
URL realUrl = new URL(url);
|
||||
// 打开和URL之间的连接
|
||||
URLConnection connection = realUrl.openConnection();
|
||||
// 设置通用的请求属性
|
||||
connection.setRequestProperty("accept", "*/*");
|
||||
connection.setRequestProperty("connection", "Keep-Alive");
|
||||
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
||||
// 建立实际的连接
|
||||
connection.connect();
|
||||
// 定义 BufferedReader输入流来读取URL的响应
|
||||
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result += line;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("发送GET请求出现异常!" + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 使用finally块来关闭输入流
|
||||
finally {
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
e2.printStackTrace();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 向指定URL发送GET方法的请求
|
||||
*
|
||||
* @param url 发送请求的URL
|
||||
* @return URL 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendGet(String url) {
|
||||
String result = "";
|
||||
BufferedReader in = null;
|
||||
try {
|
||||
URL realUrl = new URL(url);
|
||||
// 打开和URL之间的连接
|
||||
URLConnection connection = realUrl.openConnection();
|
||||
// 设置通用的请求属性
|
||||
connection.setRequestProperty("accept", "*/*");
|
||||
connection.setRequestProperty("connection", "Keep-Alive");
|
||||
connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
||||
// 建立实际的连接
|
||||
connection.connect();
|
||||
// 定义 BufferedReader输入流来读取URL的响应
|
||||
in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result += line;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("发送GET请求出现异常!" + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 使用finally块来关闭输入流
|
||||
finally {
|
||||
try {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
e2.printStackTrace();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 向指定 URL 发送POST方法的请求
|
||||
*
|
||||
* @param url
|
||||
* 发送请求的 URL
|
||||
* @param param
|
||||
* 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||
* @return 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendPost(String url, String param) {
|
||||
PrintWriter out = null;
|
||||
BufferedReader in = null;
|
||||
String result = "";
|
||||
try {
|
||||
URL realUrl = new URL(url);
|
||||
// 打开和URL之间的连接
|
||||
URLConnection conn = realUrl.openConnection();
|
||||
// 设置通用的请求属性
|
||||
conn.setRequestProperty("accept", "*/*");
|
||||
conn.setRequestProperty("connection", "Keep-Alive");
|
||||
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
||||
// 发送POST请求必须设置如下两行
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
// 获取URLConnection对象对应的输出流
|
||||
out = new PrintWriter(conn.getOutputStream());
|
||||
// 发送请求参数
|
||||
out.print(param);
|
||||
// flush输出流的缓冲
|
||||
out.flush();
|
||||
// 定义BufferedReader输入流来读取URL的响应
|
||||
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result += line;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("发送 POST 请求出现异常!" + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 使用finally块来关闭输出流、输入流
|
||||
finally {
|
||||
try {
|
||||
if (out != null) {
|
||||
out.close();
|
||||
}
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 向指定 URL 发送POST方法的请求
|
||||
*
|
||||
* @param url 发送请求的 URL
|
||||
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
|
||||
* @return 所代表远程资源的响应结果
|
||||
*/
|
||||
public static String sendPost(String url, String param) {
|
||||
PrintWriter out = null;
|
||||
BufferedReader in = null;
|
||||
String result = "";
|
||||
try {
|
||||
URL realUrl = new URL(url);
|
||||
// 打开和URL之间的连接
|
||||
URLConnection conn = realUrl.openConnection();
|
||||
// 设置通用的请求属性
|
||||
conn.setRequestProperty("accept", "*/*");
|
||||
conn.setRequestProperty("connection", "Keep-Alive");
|
||||
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
|
||||
// 发送POST请求必须设置如下两行
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
// 获取URLConnection对象对应的输出流
|
||||
out = new PrintWriter(conn.getOutputStream());
|
||||
// 发送请求参数
|
||||
out.print(param);
|
||||
// flush输出流的缓冲
|
||||
out.flush();
|
||||
// 定义BufferedReader输入流来读取URL的响应
|
||||
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
String line;
|
||||
while ((line = in.readLine()) != null) {
|
||||
result += line;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("发送 POST 请求出现异常!" + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 使用finally块来关闭输出流、输入流
|
||||
finally {
|
||||
try {
|
||||
if (out != null) {
|
||||
out.close();
|
||||
}
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
package me.ehlxr.utils;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>A convenience class to represent name-value pairs.</p>
|
||||
*
|
||||
* @since JavaFX 2.0 (javafx.util.Pair;)
|
||||
*/
|
||||
public class Pair<K, V> implements Serializable {
|
||||
|
||||
/**
|
||||
* Key of this <code>Pair</code>.
|
||||
*/
|
||||
private K key;
|
||||
|
||||
/**
|
||||
* Gets the key for this pair.
|
||||
*
|
||||
* @return key for this pair
|
||||
*/
|
||||
public K getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Value of this this <code>Pair</code>.
|
||||
*/
|
||||
private V value;
|
||||
|
||||
/**
|
||||
* Gets the value for this pair.
|
||||
*
|
||||
* @return value for this pair
|
||||
*/
|
||||
public V getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new pair
|
||||
*
|
||||
* @param key The key for this pair
|
||||
* @param value The value to use for this pair
|
||||
*/
|
||||
public Pair(K key, V value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p><code>String</code> representation of this
|
||||
* <code>Pair</code>.</p>
|
||||
*
|
||||
* <p>The default name/value delimiter '=' is always used.</p>
|
||||
*
|
||||
* @return <code>String</code> representation of this <code>Pair</code>
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return key + "=" + value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Generate a hash code for this <code>Pair</code>.</p>
|
||||
*
|
||||
* <p>The hash code is calculated using both the name and
|
||||
* the value of the <code>Pair</code>.</p>
|
||||
*
|
||||
* @return hash code for this <code>Pair</code>
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// name's hashCode is multiplied by an arbitrary prime number (13)
|
||||
// in order to make sure there is a difference in the hashCode between
|
||||
// these two parameters:
|
||||
// name: a value: aa
|
||||
// name: aa value: a
|
||||
return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Test this <code>Pair</code> for equality with another
|
||||
* <code>Object</code>.</p>
|
||||
*
|
||||
* <p>If the <code>Object</code> to be tested is not a
|
||||
* <code>Pair</code> or is <code>null</code>, then this method
|
||||
* returns <code>false</code>.</p>
|
||||
*
|
||||
* <p>Two <code>Pair</code>s are considered equal if and only if
|
||||
* both the names and values are equal.</p>
|
||||
*
|
||||
* @param o the <code>Object</code> to test for
|
||||
* equality with this <code>Pair</code>
|
||||
* @return <code>true</code> if the given <code>Object</code> is
|
||||
* equal to this <code>Pair</code> else <code>false</code>
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o instanceof Pair) {
|
||||
Pair pair = (Pair) o;
|
||||
if (key != null ? !key.equals(pair.key) : pair.key != null)
|
||||
return false;
|
||||
if (value != null ? !value.equals(pair.value) : pair.value != null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE generatorConfiguration
|
||||
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||
<generatorConfiguration>
|
||||
<context id="MySQL" targetRuntime="MyBatis3">
|
||||
<!--<context id="MySQL" targetRuntime="MyBatis3DynamicSql">-->
|
||||
<context id="MySQL" targetRuntime="MyBatis3">
|
||||
<commentGenerator>
|
||||
<property name="suppressDate" value="true"/>
|
||||
<property name="suppressAllComments" value="true"/>
|
||||
<property name="suppressAllComments" value="false"/>
|
||||
<property name="addRemarkComments" value="true"/>
|
||||
</commentGenerator>
|
||||
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.3.166/wins-dsp-new" userId="root" password="pxene">
|
||||
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://10.39.32.45:32125/phr-web" userId="root" password="root">
|
||||
</jdbcConnection>
|
||||
<javaTypeResolver>
|
||||
<property name="forceBigDecimals" value="false"/>
|
||||
</javaTypeResolver>
|
||||
<javaModelGenerator targetPackage="com.pxene.dsp.archer.model" targetProject="src/main/java">
|
||||
<javaModelGenerator targetPackage="com.lk.phr.model.phr" targetProject="src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
<property name="trimStrings" value="true"/>
|
||||
</javaModelGenerator>
|
||||
<sqlMapGenerator targetPackage="com.pxene.dsp.archer.dao" targetProject="src/main/java">
|
||||
<sqlMapGenerator targetPackage="com.lk.phr.dao.phr" targetProject="src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
</sqlMapGenerator>
|
||||
<javaClientGenerator type="XMLMAPPER" targetPackage="com.pxene.dsp.archer.dao" targetProject="src/main/java">
|
||||
<javaClientGenerator type="XMLMAPPER" targetPackage="com.lk.phr.dao.phr" targetProject="src/main/java">
|
||||
<property name="enableSubPackages" value="true"/>
|
||||
</javaClientGenerator>
|
||||
<table tableName="dsp_t_ad_group_creative" domainObjectName="AdGroupCreativeModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true" />
|
||||
<!--<javaClientGenerator type="ANNOTATEDMAPPER" targetPackage="com.lk.phr.dao.phr" targetProject="src/main/java">-->
|
||||
<!-- <property name="enableSubPackages" value="true"/>-->
|
||||
<!--</javaClientGenerator>-->
|
||||
<!--<table tableName="evaluation_data" domainObjectName="EvaluationDataModel" mapperName="EvaluationDataDao"-->
|
||||
<!-- enableCountByExample="false"-->
|
||||
<!-- enableDeleteByExample="false"-->
|
||||
<!-- enableSelectByExample="false"-->
|
||||
<!-- enableUpdateByExample="false"/>-->
|
||||
<!--<table tableName="evaluation_data_ext" domainObjectName="EvaluationDataExtModel" mapperName="EvaluationDataExtDao"-->
|
||||
<!-- enableCountByExample="false"-->
|
||||
<!-- enableDeleteByExample="false"-->
|
||||
<!-- enableSelectByExample="false"-->
|
||||
<!-- enableUpdateByExample="false"/>-->
|
||||
<!--<table tableName="evaluation_record" domainObjectName="EvaluationRecordModel" mapperName="EvaluationRecordDao"-->
|
||||
<!-- enableCountByExample="false"-->
|
||||
<!-- enableDeleteByExample="false"-->
|
||||
<!-- enableSelectByExample="false"-->
|
||||
<!-- enableUpdateByExample="false"/>-->
|
||||
<!--<table tableName="evaluation_result" domainObjectName="EvaluationResultModel" mapperName="EvaluationResultDao"-->
|
||||
<!-- enableCountByExample="false"-->
|
||||
<!-- enableDeleteByExample="false"-->
|
||||
<!-- enableSelectByExample="false"-->
|
||||
<!-- enableUpdateByExample="false"/>-->
|
||||
|
||||
<table tableName="user_history" domainObjectName="UserHistoryModel" mapperName="UserHistoryDao"
|
||||
enableCountByExample="false"
|
||||
enableDeleteByExample="false"
|
||||
enableSelectByExample="false"
|
||||
enableUpdateByExample="false"/>
|
||||
|
||||
<!--
|
||||
<table tableName="dsp_t_advertiser" domainObjectName="AdvertiserModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true" />
|
||||
<table tableName="dsp_t_open_request_data" domainObjectName="OpenRequestDataModel" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"></table>
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
||||
<!--
|
||||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>hbase.rootdir</name>
|
||||
<value>file:///usr/local/var/hbase</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.zookeeper.property.clientPort</name>
|
||||
<value>2181</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.zookeeper.property.dataDir</name>
|
||||
<value>/usr/local/var/zookeeper</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.zookeeper.dns.interface</name>
|
||||
<value>lo0</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.regionserver.dns.interface</name>
|
||||
<value>lo0</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hbase.master.dns.interface</name>
|
||||
<value>lo0</value>
|
||||
</property>
|
||||
|
||||
</configuration>
|
Loading…
Reference in New Issue