Commit 361e6184 by Thinkpad

Merge branch 'master' of

https://gitlab.eoffcn.com/ys65701/tiku_APP_APITest.git

Conflicts:
	tiku_App/src/resources/test.properties
parents 8d74d49a 8039f5f3
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<libelement value="jar://$MODULE_DIR$/lib/commons-codec-1.9.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/commons-logging-1.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/fluent-hc-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpclient-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpclient-cache-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpclient-win-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpcore-4.4.4.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpmime-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jna-4.1.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jna-platform-4.1.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/json_simple-1.1.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/testng-6.9.12.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/bcprov-ext-jdk15on-154.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/bcprov-jdk15on-154.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/commons-io-2.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/commons-lang3-3.4.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/dbunit-2.5.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/fluent-hc-4.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/groovy-2.4.7.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/gson-2.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/hamcrest-all-1.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jackson-annotations-2.8.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jackson-core-2.8.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jackson-databind-2.8.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/javax.servlet-5.1.12.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/json-path-3.0.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/json-schema-validator-3.0.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/mysql-connector-java-5.1.30-bin.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-beans-4.3.2.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-core-4.3.2.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-security-core-4.1.3.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-security-oauth2-2.0.11.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-web-4.2.6.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jcommander-1.30.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jxl.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/groovy-json-2.4.6.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/groovy-xml-2.4.6.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/hamcrest-core-1.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/hamcrest-library-1.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/rest-assured-3.0.1.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/tagsoup-1.2.1.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/com.google.guava_1.6.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/saxon-8.7.jar!/" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
</src_description>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="commons-codec-1.9.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-codec-1.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-logging-1.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-logging-1.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="fluent-hc-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/fluent-hc-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpclient-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpclient-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpclient-cache-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpclient-cache-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpclient-win-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpclient-win-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpcore-4.4.4.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpcore-4.4.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpmime-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpmime-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jna-4.1.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jna-4.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jna-platform-4.1.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jna-platform-4.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="json_simple-1.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json_simple-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="testng-6.9.12.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/testng-6.9.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="bcprov-ext-jdk15on-154.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/bcprov-ext-jdk15on-154.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="bcprov-jdk15on-154.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/bcprov-jdk15on-154.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-io-2.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-io-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-lang3-3.4.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-lang3-3.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="dbunit-2.5.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/dbunit-2.5.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="fluent-hc-4.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/fluent-hc-4.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="groovy-2.4.7.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/groovy-2.4.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gson-2.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/gson-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="hamcrest-all-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/hamcrest-all-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jackson-annotations-2.8.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jackson-annotations-2.8.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jackson-core-2.8.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jackson-core-2.8.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jackson-databind-2.8.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jackson-databind-2.8.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="javax.servlet-5.1.12.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/javax.servlet-5.1.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="json-path-3.0.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json-path-3.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="json-schema-validator-3.0.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json-schema-validator-3.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="mysql-connector-java-5.1.30-bin.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/mysql-connector-java-5.1.30-bin.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-beans-4.3.2.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-beans-4.3.2.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-core-4.3.2.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-core-4.3.2.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-security-core-4.1.3.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-security-core-4.1.3.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-security-oauth2-2.0.11.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-security-oauth2-2.0.11.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-web-4.2.6.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-web-4.2.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="inheritedJdk" />
<orderEntry type="module-library">
<library name="jcommander-1.30.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jcommander-1.30.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jxl.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jxl.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="groovy-json-2.4.6.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/groovy-json-2.4.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="groovy-xml-2.4.6.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/groovy-xml-2.4.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="hamcrest-core-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="hamcrest-library-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/hamcrest-library-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="rest-assured-3.0.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/rest-assured-3.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="tagsoup-1.2.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/tagsoup-1.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="com.google.guava_1.6.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/com.google.guava_1.6.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="saxon-8.7.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/saxon-8.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<libelement value="jar://$MODULE_DIR$/lib/commons-codec-1.9.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/commons-logging-1.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/fluent-hc-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpclient-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpclient-cache-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpclient-win-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpcore-4.4.4.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/httpmime-4.5.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jna-4.1.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jna-platform-4.1.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/json_simple-1.1.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/testng-6.9.12.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/bcprov-ext-jdk15on-154.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/bcprov-jdk15on-154.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/commons-io-2.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/commons-lang3-3.4.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/dbunit-2.5.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/fluent-hc-4.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/groovy-2.4.7.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/gson-2.5.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/hamcrest-all-1.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jackson-annotations-2.8.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jackson-core-2.8.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jackson-databind-2.8.2.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/javax.servlet-5.1.12.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/json-path-3.0.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/json-schema-validator-3.0.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/mysql-connector-java-5.1.30-bin.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-beans-4.3.2.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-core-4.3.2.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-security-core-4.1.3.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-security-oauth2-2.0.11.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/spring-web-4.2.6.RELEASE.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jcommander-1.30.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/jxl.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/groovy-json-2.4.6.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/groovy-xml-2.4.6.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/hamcrest-core-1.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/hamcrest-library-1.3.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/rest-assured-3.0.1.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/tagsoup-1.2.1.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/com.google.guava_1.6.0.jar!/" />
<libelement value="jar://$MODULE_DIR$/lib/saxon-8.7.jar!/" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
</src_description>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="commons-codec-1.9.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-codec-1.9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-logging-1.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-logging-1.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="fluent-hc-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/fluent-hc-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpclient-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpclient-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpclient-cache-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpclient-cache-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpclient-win-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpclient-win-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpcore-4.4.4.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpcore-4.4.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="httpmime-4.5.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/httpmime-4.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jna-4.1.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jna-4.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jna-platform-4.1.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jna-platform-4.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="json_simple-1.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json_simple-1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="testng-6.9.12.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/testng-6.9.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="bcprov-ext-jdk15on-154.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/bcprov-ext-jdk15on-154.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="bcprov-jdk15on-154.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/bcprov-jdk15on-154.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-io-2.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-io-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="commons-lang3-3.4.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/commons-lang3-3.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="dbunit-2.5.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/dbunit-2.5.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="fluent-hc-4.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/fluent-hc-4.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="groovy-2.4.7.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/groovy-2.4.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="gson-2.5.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/gson-2.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="hamcrest-all-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/hamcrest-all-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jackson-annotations-2.8.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jackson-annotations-2.8.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jackson-core-2.8.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jackson-core-2.8.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jackson-databind-2.8.2.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jackson-databind-2.8.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="javax.servlet-5.1.12.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/javax.servlet-5.1.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="json-path-3.0.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json-path-3.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="json-schema-validator-3.0.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/json-schema-validator-3.0.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="mysql-connector-java-5.1.30-bin.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/mysql-connector-java-5.1.30-bin.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-beans-4.3.2.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-beans-4.3.2.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-core-4.3.2.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-core-4.3.2.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-security-core-4.1.3.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-security-core-4.1.3.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-security-oauth2-2.0.11.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-security-oauth2-2.0.11.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="spring-web-4.2.6.RELEASE.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/spring-web-4.2.6.RELEASE.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="inheritedJdk" />
<orderEntry type="module-library">
<library name="jcommander-1.30.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jcommander-1.30.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="jxl.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/jxl.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="groovy-json-2.4.6.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/groovy-json-2.4.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="groovy-xml-2.4.6.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/groovy-xml-2.4.6.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="hamcrest-core-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/hamcrest-core-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="hamcrest-library-1.3.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/hamcrest-library-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="rest-assured-3.0.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/rest-assured-3.0.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="tagsoup-1.2.1.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/tagsoup-1.2.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="com.google.guava_1.6.0.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/com.google.guava_1.6.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="saxon-8.7.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/lib/saxon-8.7.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
\ No newline at end of file
tiku_App/out/tiku1.jpg

192 KB | W: | H:

tiku_App/out/tiku1.jpg

342 KB | W: | H:

tiku_App/out/tiku1.jpg
tiku_App/out/tiku1.jpg
tiku_App/out/tiku1.jpg
tiku_App/out/tiku1.jpg
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Failed suite-ys">
<test name="Default test-ys">
<classes>
<class name="com.puhui.test.RenMai_APITest">
<methods>
<include name="f" invocation-numbers="34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 "/>
</methods>
</class>
</classes>
</test>
</suite>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Failed suite-ys">
<test name="Default test-ys">
<classes>
<class name="com.puhui.test.RenMai_APITest">
<methods>
<include name="f" invocation-numbers="34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 "/>
</methods>
</class>
</classes>
</test>
</suite>
package com.offcn.TestUnti;
import java.io.*;
import java.net.URL;
import java.security.*;
import java.security.cert.*;
import javax.net.ssl.*;
public class InstallCert {
public static void main(String[] args) throws Exception {
String host;
int port;
char[] passphrase;
if ((args.length == 1) || (args.length == 2)) {
String[] c = args[0].split(":");
host = c[0];
port = (c.length == 1) ? 443 : Integer.parseInt(c[1]);
String p = (args.length == 1) ? "changeit" : args[1];
passphrase = p.toCharArray();
} else {
System.out.println("Usage: java InstallCert <host>[:port] [passphrase]");
return;
}
File file = new File("jssecacerts");
if (file.isFile() == false) {
char SEP = File.separatorChar;
File dir = new File(System.getProperty("java.home") + SEP
+ "lib" + SEP + "security");
file = new File(dir, "jssecacerts");
if (file.isFile() == false) {
file = new File(dir, "cacerts");
}
}
System.out.println("Loading KeyStore " + file + "...");
InputStream in = new FileInputStream(file);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(in, passphrase);
in.close();
SSLContext context = SSLContext.getInstance("TLS");
TrustManagerFactory tmf =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(ks);
X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0];
SavingTrustManager tm = new SavingTrustManager(defaultTrustManager);
context.init(null, new TrustManager[] {tm}, null);
SSLSocketFactory factory = context.getSocketFactory();
System.out.println("Opening connection to " + host + ":" + port + "...");
SSLSocket socket = (SSLSocket)factory.createSocket(host, port);
socket.setSoTimeout(10000);
try {
System.out.println("Starting SSL handshake...");
socket.startHandshake();
socket.close();
System.out.println();
System.out.println("No errors, certificate is already trusted");
} catch (SSLException e) {
System.out.println();
e.printStackTrace(System.out);
}
X509Certificate[] chain = tm.chain;
if (chain == null) {
System.out.println("Could not obtain server certificate chain");
return;
}
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
System.out.println();
System.out.println("Server sent " + chain.length + " certificate(s):");
System.out.println();
MessageDigest sha1 = MessageDigest.getInstance("SHA1");
MessageDigest md5 = MessageDigest.getInstance("MD5");
for (int i = 0; i < chain.length; i++) {
X509Certificate cert = chain[i];
System.out.println
(" " + (i + 1) + " Subject " + cert.getSubjectDN());
System.out.println(" Issuer " + cert.getIssuerDN());
sha1.update(cert.getEncoded());
System.out.println(" sha1 " + toHexString(sha1.digest()));
md5.update(cert.getEncoded());
System.out.println(" md5 " + toHexString(md5.digest()));
System.out.println();
}
System.out.println("Enter certificate to add to trusted keystore or 'q' to quit: [1]");
String line = reader.readLine().trim();
int k;
try {
k = (line.length() == 0) ? 0 : Integer.parseInt(line) - 1;
} catch (NumberFormatException e) {
System.out.println("KeyStore not changed");
return;
}
X509Certificate cert = chain[k];
String alias = host + "-" + (k + 1);
ks.setCertificateEntry(alias, cert);
OutputStream out = new FileOutputStream("jssecacerts");
ks.store(out, passphrase);
out.close();
System.out.println();
System.out.println(cert);
System.out.println();
System.out.println
("Added certificate to keystore 'jssecacerts' using alias '"
+ alias + "'");
}
private static final char[] HEXDIGITS = "0123456789abcdef".toCharArray();
private static String toHexString(byte[] bytes) {
StringBuilder sb = new StringBuilder(bytes.length * 3);
for (int b : bytes) {
b &= 0xff;
sb.append(HEXDIGITS[b >> 4]);
sb.append(HEXDIGITS[b & 15]);
sb.append(' ');
}
return sb.toString();
}
private static class SavingTrustManager implements X509TrustManager {
private final X509TrustManager tm;
private X509Certificate[] chain;
SavingTrustManager(X509TrustManager tm) {
this.tm = tm;
}
public X509Certificate[] getAcceptedIssuers() {
throw new UnsupportedOperationException();
}
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
throw new UnsupportedOperationException();
}
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
this.chain = chain;
tm.checkServerTrusted(chain, authType);
}
}
}
package com.offcn.TestUnti;
import java.io.*;
import java.net.URL;
import java.security.*;
import java.security.cert.*;
import javax.net.ssl.*;
public class InstallCert {
public static void main(String[] args) throws Exception {
String host;
int port;
char[] passphrase;
if ((args.length == 1) || (args.length == 2)) {
String[] c = args[0].split(":");
host = c[0];
port = (c.length == 1) ? 443 : Integer.parseInt(c[1]);
String p = (args.length == 1) ? "changeit" : args[1];
passphrase = p.toCharArray();
} else {
System.out.println("Usage: java InstallCert <host>[:port] [passphrase]");
return;
}
File file = new File("jssecacerts");
if (file.isFile() == false) {
char SEP = File.separatorChar;
File dir = new File(System.getProperty("java.home") + SEP
+ "lib" + SEP + "security");
file = new File(dir, "jssecacerts");
if (file.isFile() == false) {
file = new File(dir, "cacerts");
}
}
System.out.println("Loading KeyStore " + file + "...");
InputStream in = new FileInputStream(file);
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(in, passphrase);
in.close();
SSLContext context = SSLContext.getInstance("TLS");
TrustManagerFactory tmf =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
tmf.init(ks);
X509TrustManager defaultTrustManager = (X509TrustManager)tmf.getTrustManagers()[0];
SavingTrustManager tm = new SavingTrustManager(defaultTrustManager);
context.init(null, new TrustManager[] {tm}, null);
SSLSocketFactory factory = context.getSocketFactory();
System.out.println("Opening connection to " + host + ":" + port + "...");
SSLSocket socket = (SSLSocket)factory.createSocket(host, port);
socket.setSoTimeout(10000);
try {
System.out.println("Starting SSL handshake...");
socket.startHandshake();
socket.close();
System.out.println();
System.out.println("No errors, certificate is already trusted");
} catch (SSLException e) {
System.out.println();
e.printStackTrace(System.out);
}
X509Certificate[] chain = tm.chain;
if (chain == null) {
System.out.println("Could not obtain server certificate chain");
return;
}
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
System.out.println();
System.out.println("Server sent " + chain.length + " certificate(s):");
System.out.println();
MessageDigest sha1 = MessageDigest.getInstance("SHA1");
MessageDigest md5 = MessageDigest.getInstance("MD5");
for (int i = 0; i < chain.length; i++) {
X509Certificate cert = chain[i];
System.out.println
(" " + (i + 1) + " Subject " + cert.getSubjectDN());
System.out.println(" Issuer " + cert.getIssuerDN());
sha1.update(cert.getEncoded());
System.out.println(" sha1 " + toHexString(sha1.digest()));
md5.update(cert.getEncoded());
System.out.println(" md5 " + toHexString(md5.digest()));
System.out.println();
}
System.out.println("Enter certificate to add to trusted keystore or 'q' to quit: [1]");
String line = reader.readLine().trim();
int k;
try {
k = (line.length() == 0) ? 0 : Integer.parseInt(line) - 1;
} catch (NumberFormatException e) {
System.out.println("KeyStore not changed");
return;
}
X509Certificate cert = chain[k];
String alias = host + "-" + (k + 1);
ks.setCertificateEntry(alias, cert);
OutputStream out = new FileOutputStream("jssecacerts");
ks.store(out, passphrase);
out.close();
System.out.println();
System.out.println(cert);
System.out.println();
System.out.println
("Added certificate to keystore 'jssecacerts' using alias '"
+ alias + "'");
}
private static final char[] HEXDIGITS = "0123456789abcdef".toCharArray();
private static String toHexString(byte[] bytes) {
StringBuilder sb = new StringBuilder(bytes.length * 3);
for (int b : bytes) {
b &= 0xff;
sb.append(HEXDIGITS[b >> 4]);
sb.append(HEXDIGITS[b & 15]);
sb.append(' ');
}
return sb.toString();
}
private static class SavingTrustManager implements X509TrustManager {
private final X509TrustManager tm;
private X509Certificate[] chain;
SavingTrustManager(X509TrustManager tm) {
this.tm = tm;
}
public X509Certificate[] getAcceptedIssuers() {
throw new UnsupportedOperationException();
}
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
throw new UnsupportedOperationException();
}
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
this.chain = chain;
tm.checkServerTrusted(chain, authType);
}
}
}
package com.offcn.TestUnti;
import io.restassured.RestAssured;
import io.restassured.config.RestAssuredConfig;
import io.restassured.config.SSLConfig;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static io.restassured.http.ContentType.JSON;
/**
* Created by puhui on 16/9/14.
*/
public class MockServerTestUtil {
static RestAssured ra;
public static RestAssured getLocalRAEnv(){
if (ra == null){
ra = new RestAssured();
ra.config = RestAssuredConfig.newConfig().sslConfig(SSLConfig.sslConfig().allowAllHostnames());
ra.baseURI = "http://127.0.0.1";
ra.port = 30800;
}
return ra;
}
public static void sendSingleMessageResponse(String mobile, String messageContent){
Response re = getLocalRAEnv().given().
param("token", "faketoken").
param("senderId", 1).
param("senderName", "iqianjin").
param("mobile", mobile).
param("messageContent", messageContent).
param("bsCode", "sbcode").
when().get("/api/v1/message/getSend").thenReturn();
re.getBody().print();
re.then().statusCode( 200 );
}
//batchNo批次号非必要参数,
// messageContent messageContents 单条内容和多条容不能共存,优先单一内容发送,多条内容发送是与发送号码一一对应的。
public static JsonPath sendmutiMessageResponse(List<String> mobiles, List<String> messageContents){
Map<String, Object> jsonAsMap = new HashMap();
jsonAsMap.put("senderName","testmuti");
jsonAsMap.put("messageContents",messageContents);
jsonAsMap.put("mobiles",mobiles);
jsonAsMap.put("bscode","fakebscode");
Response re = getLocalRAEnv().given().contentType(JSON).body(jsonAsMap).
when(). post("/api/v1/message/send").thenReturn();
re.getBody().print();
re.then().statusCode( 200 );
return re.getBody().jsonPath();
}
public static JsonPath getSingleMessageResponse(String mobile){
Response re = getLocalRAEnv().given().
param("mobile", mobile).
when(). get("/api/v1/message/query").thenReturn();
re.getBody().print();
re.then().statusCode( 200 );
return re.getBody().jsonPath();
}
}
package com.offcn.TestUnti;
import io.restassured.RestAssured;
import io.restassured.config.RestAssuredConfig;
import io.restassured.config.SSLConfig;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static io.restassured.http.ContentType.JSON;
/**
* Created by puhui on 16/9/14.
*/
public class MockServerTestUtil {
static RestAssured ra;
public static RestAssured getLocalRAEnv(){
if (ra == null){
ra = new RestAssured();
ra.config = RestAssuredConfig.newConfig().sslConfig(SSLConfig.sslConfig().allowAllHostnames());
ra.baseURI = "http://127.0.0.1";
ra.port = 30800;
}
return ra;
}
public static void sendSingleMessageResponse(String mobile, String messageContent){
Response re = getLocalRAEnv().given().
param("token", "faketoken").
param("senderId", 1).
param("senderName", "iqianjin").
param("mobile", mobile).
param("messageContent", messageContent).
param("bsCode", "sbcode").
when().get("/api/v1/message/getSend").thenReturn();
re.getBody().print();
re.then().statusCode( 200 );
}
//batchNo批次号非必要参数,
// messageContent messageContents 单条内容和多条容不能共存,优先单一内容发送,多条内容发送是与发送号码一一对应的。
public static JsonPath sendmutiMessageResponse(List<String> mobiles, List<String> messageContents){
Map<String, Object> jsonAsMap = new HashMap();
jsonAsMap.put("senderName","testmuti");
jsonAsMap.put("messageContents",messageContents);
jsonAsMap.put("mobiles",mobiles);
jsonAsMap.put("bscode","fakebscode");
Response re = getLocalRAEnv().given().contentType(JSON).body(jsonAsMap).
when(). post("/api/v1/message/send").thenReturn();
re.getBody().print();
re.then().statusCode( 200 );
return re.getBody().jsonPath();
}
public static JsonPath getSingleMessageResponse(String mobile){
Response re = getLocalRAEnv().given().
param("mobile", mobile).
when(). get("/api/v1/message/query").thenReturn();
re.getBody().print();
re.then().statusCode( 200 );
return re.getBody().jsonPath();
}
}
package com.offcn.TestUnti;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
import org.springframework.security.oauth2.client.OAuth2RestTemplate;
import org.springframework.security.oauth2.client.token.DefaultAccessTokenRequest;
import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import com.offcn.process.BasicsGM;
import com.offcn.system.system;
import com.offcn.test.APITest_tk;
import java.util.Arrays;
public class OAuthTokenUnti {
public APITest_tk RAPI;
// private static OAuth2AccessToken token;
public static OAuth2AccessToken token;
public static void main(String[] args) {
String strToken=OAuthTokenUnti.getOathToken("gmysx").getValue();
System.out.println("strToken="+strToken);
}
public static OAuth2AccessToken getOathToken(String system){
if(token == null){
OAuth2RestTemplate restTemplate = new OAuth2RestTemplate(getResource(system),new DefaultOAuth2ClientContext(new DefaultAccessTokenRequest()));
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
restTemplate.setMessageConverters(Arrays.<HttpMessageConverter<?>> asList(converter));
token = restTemplate.getAccessToken();
}
return token;
}
private static ClientCredentialsResourceDetails getResource(String system){
ClientCredentialsResourceDetails resource = new ClientCredentialsResourceDetails();
system tem=(system)(BasicsGM.map.get(system));
resource.setAccessTokenUri(tem.getAccess_token_uri());
resource.setClientId(tem.getClient_id());
resource.setClientSecret(tem.getClient_secret());
resource.setGrantType(tem.getGrant_type());
return resource;
}
}
package com.offcn.TestUnti;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext;
import org.springframework.security.oauth2.client.OAuth2RestTemplate;
import org.springframework.security.oauth2.client.token.DefaultAccessTokenRequest;
import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import com.offcn.process.BasicsGM;
import com.offcn.system.system;
import com.offcn.test.APITest_tk;
import java.util.Arrays;
public class OAuthTokenUnti {
public APITest_tk RAPI;
// private static OAuth2AccessToken token;
public static OAuth2AccessToken token;
public static void main(String[] args) {
String strToken=OAuthTokenUnti.getOathToken("gmysx").getValue();
System.out.println("strToken="+strToken);
}
public static OAuth2AccessToken getOathToken(String system){
if(token == null){
OAuth2RestTemplate restTemplate = new OAuth2RestTemplate(getResource(system),new DefaultOAuth2ClientContext(new DefaultAccessTokenRequest()));
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
restTemplate.setMessageConverters(Arrays.<HttpMessageConverter<?>> asList(converter));
token = restTemplate.getAccessToken();
}
return token;
}
private static ClientCredentialsResourceDetails getResource(String system){
ClientCredentialsResourceDetails resource = new ClientCredentialsResourceDetails();
system tem=(system)(BasicsGM.map.get(system));
resource.setAccessTokenUri(tem.getAccess_token_uri());
resource.setClientId(tem.getClient_id());
resource.setClientSecret(tem.getClient_secret());
resource.setGrantType(tem.getGrant_type());
return resource;
}
}
......@@ -30,38 +30,35 @@ import net.sf.json.JSONObject;
/**
* .IIP获取user_id及token接口
* 86、添加估分职位
*
* @author lyy
* @author puhui
*
*/
public class getUserIdBySsoI extends TK implements API {
public class addExaminePosition extends TK implements API {
public String parameter;//参数集合
public String sso_id;//用户id
public String phone;//用户手机号
public String code;//手机验证码
public String login_type;//第三方登录方式
public String user_id;//用户id
public String item_id;//考试项目id
public String question_id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter_get(parameter, "user_id").trim();
sso_id = MapUtil.getParameter(parameter, "sso_id").trim();
if ((!sso_id.equals("")) && sso_id.equals("code")) {
sso_id="3620016";
parameter = parameter.replace("\"sso_id\":code", "\"sso_id\":\""+ sso_id + "\"");
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("user_id=code", "user_id="+ user_id );
}
data.put("parameter", parameter);
return data;
}
......@@ -69,8 +66,7 @@ public class getUserIdBySsoI extends TK implements API {
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
//Response re = RequestDataUtils.Post_token(data, Url,tk_token);
Response re = RequestDataUtils.Post_NOToken(data, Url);
Response re = RequestDataUtils.Get_token_all(data, Url, tk_token);
return re;
}
......@@ -80,7 +76,7 @@ public class getUserIdBySsoI extends TK implements API {
boolean result = true;
String failReason = "";
String json = re.asString();
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
......@@ -93,8 +89,9 @@ public class getUserIdBySsoI extends TK implements API {
if (json.length() != 0) {
String msg=StringUtils.decodeUnicode(getMsg(re));
String code=getCode(re);
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
......@@ -110,46 +107,33 @@ public class getUserIdBySsoI extends TK implements API {
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && jp.getString("data")!=null){
String custom=data.get("custom").toString();
String[] ArrayString=StringUtils.getArrayString(custom,",");
if(!StringUtils.VerificationString(jp.getString("data"),ArrayString)){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ jp.getString("data") + ".";
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("0".equals(code)){
String token=jp.getString("data.token");
tk_token = MapUtil.killQuotes(token, "\"");//保存token
System.out.println("tk_token=====" + tk_token);
//是否验证数据库
if (!isProduct) {
// if(phone.length()<60){
// if(!(dataPhone.equals(act_phone) && (dataPhone.equals(phone)))){
// result = result && false;
// failReason = failReason + "t_user info phone is not in DB;";
// }
// }
//
// if(login_type.length()<60){
// if(!(datalogin_type.equals(act_login_type) && (datalogin_type.equals(login_type)))){
// result = result && false;
// failReason = failReason + "t_user info system is not in DB;";
// }
// }
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
......
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 67.删除题本中的题目
*
* @author puhui
*
*/
public class deleteNote extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
id = MapUtil.getParameter(parameter, "id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id=item_id_L;
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!id.equals("")) && id.equals("code")) {
id="629";
parameter = parameter.replace("\"id\":code", "\"id\":\""+ id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 65-2.在做题的时候删除:
*
* @author puhui
*
*/
public class deleteNoteFromQuestion extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String question_id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
question_id = MapUtil.getParameter(parameter, "question_id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id=item_id_L;
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!question_id.equals("")) && question_id.equals("code")) {
question_id=question_id_L;
parameter = parameter.replace("\"question_id\":code", "\"question_id\":\""+ question_id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 85、获取估分考试
*
* @author puhui
*
*/
public class getEstimateInfo extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String exam_id;//考试项目id
public String question_id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter_get(parameter, "user_id").trim();
exam_id = MapUtil.getParameter_get(parameter, "exam_id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("user_id=code", "user_id="+ user_id );
}
if ((!exam_id.equals("")) && exam_id.equals("code")) {
exam_id= L_exam_id;
parameter = parameter.replace("exam_id=code", "exam_id="+ exam_id );
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Get_token_all(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MyDateUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.BasicsGM;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 89.增加获取估分试卷json url和做题记录的接口
*
* 返回 recordId
*
*/
public class getEstimatePaperJson extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String paper_id;//
public String record_id;//
public String examine_paper_id;//
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
paper_id = MapUtil.getParameter(parameter, "paper_id").trim();
record_id = MapUtil.getParameter(parameter, "record_id").trim();
examine_paper_id = MapUtil.getParameter(parameter, "examine_paper_id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!paper_id.equals("")) && paper_id.equals("code")) {
paper_id=paper_id_L;
parameter = parameter.replace("\"paper_id\":code", "\"paper_id\":\""+ paper_id + "\"");
}
if ((!record_id.equals("")) && record_id.equals("code")) {
record_id=record_id_L;
parameter = parameter.replace("\"record_id\":code", "\"record_id\":\""+ record_id + "\"");
}
if ((!examine_paper_id.equals("")) && examine_paper_id.equals("code")) {
examine_paper_id=examine_paper_id_L;//查询examine_paper表,examine_paper_id列,并且examine_id列存在
parameter = parameter.replace("\"examine_paper_id\":code", "\"examine_paper_id\":\""+ examine_paper_id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("试卷信息查询成功".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 39-1.获取消息中心列表
*
* @author puhui
*
*/
public class getMsg extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String subtype_id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
subtype_id = MapUtil.getParameter(parameter, "subtype_id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id="88";
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!subtype_id.equals("")) && subtype_id.equals("code")) {
subtype_id="3";
parameter = parameter.replace("\"subtype_id\":code", "\"subtype_id\":\""+ subtype_id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 63.我的题本(分类)接口
*
* @author puhui
*
*/
public class getMyNotebookByCate extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String subtype_id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
subtype_id = MapUtil.getParameter(parameter, "subtype_id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id="88";
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!subtype_id.equals("")) && subtype_id.equals("code")) {
subtype_id="3";
parameter = parameter.replace("\"subtype_id\":code", "\"subtype_id\":\""+ subtype_id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 69.我的题本中根据分类id拿取对应题目
*
* @author puhui
*
*/
public class getMyNotebookByCateId extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
id = MapUtil.getParameter(parameter, "id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id=item_id_L;
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!id.equals("")) && id.equals("code")) {
id=question_id_L;
parameter = parameter.replace("\"id\":code", "\"id\":\""+ id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 64.我的题本(时间)接口
*
* @author puhui
*
*/
public class getMyNotebookByTime extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String subtype_id;//练习册类别id
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
subtype_id = MapUtil.getParameter(parameter, "subtype_id").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id="88";
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!subtype_id.equals("")) && subtype_id.equals("code")) {
subtype_id="3";
parameter = parameter.replace("\"subtype_id\":code", "\"subtype_id\":\""+ subtype_id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("接口响应成功!".equals(msg)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
......@@ -60,6 +60,15 @@ public class releaseScoreToStudent extends TK implements API {
record_id =rs_bankcard.getString("use_id");
parameter = MapUtil.getValue("parameter", data);
record_id_excel = MapUtil.getParameter(parameter, "record_id").trim();
if ((!record_id_excel.equals("")) && record_id_excel.equals("code")) {
nwn_record_id = record_id;
}
} catch (Exception e) {
......@@ -74,9 +83,12 @@ public class releaseScoreToStudent extends TK implements API {
parameter = MapUtil.getValue("parameter", data);
record_id_excel = MapUtil.getParameter(parameter, "record_id").trim();
if ((!record_id_excel.equals("")) && record_id_excel.equals("code")) {
parameter = parameter.replace("\"record_id\":code", "\"record_id\":\""+ record_id + "\"");
parameter = parameter.replace("\"record_id\":code", "\"record_id\":"+ record_id );
}else {
parameter = parameter.replace("\"record_id\":old", "\"record_id\":"+ nwn_record_id );
}
data.put("parameter", parameter);
return data;
......@@ -93,8 +105,15 @@ public class releaseScoreToStudent extends TK implements API {
parameter = MapUtil.getValue("parameter", data);
String tikuString= MapUtil.getParameter(parameter, "appid").trim();
tikuString = MapUtil.killQuotes(tikuString, "\"");
record_id_excel = MapUtil.getParameter(parameter, "record_id").trim();
jsonAsMap.put("record_id", record_id);
if ((!record_id_excel.equals("")) && record_id_excel.equals("code")) {
jsonAsMap.put("record_id", record_id);
}else {
jsonAsMap.put("record_id", nwn_record_id);
}
jsonAsMap.put("appid", tikuString);
MyRequest myRequest=new MyRequest();
......
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.io.File;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import org.json.simple.JSONArray;
import com.offcn.TestUnti.Log;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.MySqlUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.TestUnti.VerificationMethod;
import com.offcn.TestUnti.aliOCR;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.TestUnti.ListUtil;
import net.sf.json.JSONObject;
/**
* 100.图片搜题
*
* @author puhui
*
*/
public class searchQuestionDetailByImage extends TK implements API {
public String parameter;//参数集合
public String user_id;//用户id
public String item_id;//考试项目id
public String question_id;//练习册类别id
public String image;//图片
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
user_id = MapUtil.getParameter(parameter, "user_id").trim();
item_id = MapUtil.getParameter(parameter, "item_id").trim();
question_id = MapUtil.getParameter(parameter, "question_id").trim();
image = MapUtil.getParameter(parameter, "image").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!item_id.equals("")) && item_id.equals("code")) {
item_id="88";
parameter = parameter.replace("\"item_id\":code", "\"item_id\":\""+ item_id + "\"");
}
if ((!question_id.equals("")) && question_id.equals("code")) {
question_id=question_id_L;
parameter = parameter.replace("\"question_id\":code", "\"question_id\":\""+ question_id + "\"");
}
if ((!image.equals("")) && image.equals("code")) {
image=aliOCR.encodeImgageToBase64(new File("out/tiku1.jpg"));
parameter = parameter.replace("\"image\":code", "\"image\":\""+ image + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Response re = RequestDataUtils.Post_token(data, Url, tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("code") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("msg") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("试题信息返回成功".equals(msg)){
image_id_L=jp.getString("data.image_id");
image_id_L=image_id_L.substring(1, image_id_L.length()-1);
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
package com.offcn.api.tk.app3;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import java.util.HashMap;
import java.util.Map;
import com.offcn.TestUnti.MapUtil;
import com.offcn.TestUnti.RequestDataUtils;
import com.offcn.TestUnti.StringUtils;
import com.offcn.interfaces.API;
import com.offcn.process.TK;
import com.offcn.system.MyRequest;
import com.offcn.TestUnti.ListUtil;
/**
*
* @Description: 用户反馈
* @author:lyy
* @date:
* @version V1.0
*/
public class userFeedback extends TK implements API {
public String parameter;//参数集合
public String image_id;//由搜题接口返回的图片id (32位)
public String user_id;//用户id
public String question_id;//试题id
public String feedback;//用户反馈内容 1:满意 0 不满意
@Override
public void initialize(HashMap<String, Object> data) {
if (!isProduct && data.get("CleanDB").toString().contains("Y")) {
cleanUser_FromDB();//清除注册用户根据user_id
}
}
@Override
public HashMap<String, Object> handleInput(HashMap<String, Object> data) {
// 获取parameter对应的内容
parameter = MapUtil.getValue("parameter", data);
image_id = MapUtil.getParameter(parameter, "image_id").trim();
user_id = MapUtil.getParameter(parameter, "user_id").trim();
question_id = MapUtil.getParameter(parameter, "question_id").trim();
feedback = MapUtil.getParameter(parameter, "feedback").trim();
if ((!user_id.equals("")) && user_id.equals("code")) {
user_id=ListUtil.getListValue(user_idList,0);
parameter = parameter.replace("\"user_id\":code", "\"user_id\":\""+ user_id + "\"");
}
if ((!question_id.equals("")) && question_id.equals("code")) {
question_id = question_id;
// exam_id = "1";
parameter = parameter.replace("\"question_id\":code", "\"question_id\":\""+ question_id + "\"");
}
if ((!image_id.equals("")) && image_id.equals("code")) {
image_id = image_id;
// origin_id = "1";
parameter = parameter.replace("\"image_id\":code", "\"image_id\":\""+ image_id + "\"");
}
data.put("parameter", parameter);
return data;
}
@Override
public Response SendRequest(HashMap<String, Object> data, String Url,
String Request) {
Map<String, String> headers=new HashMap<String, String>();
headers.put("Authorization", tk_token);
Map<String, String> jsonString=new HashMap<String, String>();
jsonString.put("user_id", user_id);
jsonString.put("image_id", image_id);
jsonString.put("question_id", question_id);
jsonString.put("feedback", feedback);
MyRequest myRequest=new MyRequest();
myRequest.setHeaders(headers);
myRequest.setRequest(Request);
myRequest.setUrl(Url);
myRequest.setFormParameter(jsonString);
Response re = RequestDataUtils.RestAssuredApi(data,myRequest);
//Response re = RequestDataUtils.Post_token(data, Url,tk_token);
return re;
}
@Override
public String handleOutput(Response re, HashMap<String, Object> data) {
JsonPath jp = re.body().jsonPath();
boolean result = true;
String failReason = "";
String json = StringUtils.decodeUnicode(re.asString());
if ((data.get("statusCode") != null)
&& (!data.get("statusCode").toString()
.equals(String.valueOf(re.getStatusCode())))) {
result = result && false;
failReason = failReason + "statusCode is expected "
+ data.get("statusCode").toString() + " but actually "
+ String.valueOf(re.getStatusCode()) + ". ";
}
if (json.length() != 0) {
String msg=jp.getString("message");
String code=jp.getString("retcode");
if ((data.get("code") != null ) && (code != null) && (!code.equals(data.get("code").toString()))) {
result = result && false;
failReason = failReason + "code is expected "
+ data.get("code").toString() + " but actually "
+ jp.getString("retcode") + ".";
}
if ((data.get("msg") != null) && (msg != null) && (!msg.equals(data.get("msg").toString()))) {
result = result && false;
failReason = failReason + "msg is expected "
+ data.get("msg").toString() + " but actually "
+ jp.getString("retcode") + ".";
}
if(data.get("custom") != null && json!=null){
//如果自定义结果包含多个希望结果,也就是有逗号,那么就切割,包含比较。
if(data.get("custom").toString().contains(",")){
String [] strCustomStrings=data.get("custom").toString().split(",");
for(int i=0;i<strCustomStrings.length;i++){
if(!json.contains(strCustomStrings[i])){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ strCustomStrings[i] + ".";
break;
}
}
}else{//如果只有一个希望结果,就直接包含比较。
if(!json.contains(data.get("custom").toString())){
result = result && false;
failReason = failReason + "custom is expected "
+ data.get("custom").toString() + " but actually "
+ data.get("custom").toString() + ".";
}
}
}
if("0".equals(code)){
}
}
if (result)
return "Pass";
else
return "Fail:" + failReason;
}
}
......@@ -90,7 +90,7 @@ public class APITest_tk extends BasicsGM{
//数据回写
// HashMap<String, Object> ExpectResult=MapUtil.Expect(data);
// SheetUtils sheet = new SheetUtils("DataAllWff.xls", "Output");
// SheetUtils sheet = new SheetUtils("DataAllMr.xls", "Output");
// sheet.writeExcel(
// data.get("NO").toString(),
// data.get("TCNO").toString() + "_Step" + data.get("Step").toString(),
......
<?xml version="1.0" encoding="UTF-8"?>
<customers>
<customer active="false">
<xml_name>王炎炎</xml_name>
<xml_idNo>130426199201270329</xml_idNo>
<xml_bankNo>6227000210250635768</xml_bankNo>
<xml_phone>18230065651</xml_phone>
</customer>
<customer active="true">
<xml_name>王炎炎</xml_name>
<xml_idNo>130426199201270329</xml_idNo>
<xml_bankNo>6227000210250635768</xml_bankNo>
<xml_phone>18230065651</xml_phone>
</customer>
<?xml version="1.0" encoding="UTF-8"?>
<customers>
<customer active="false">
<xml_name>王炎炎</xml_name>
<xml_idNo>130426199201270329</xml_idNo>
<xml_bankNo>6227000210250635768</xml_bankNo>
<xml_phone>18230065651</xml_phone>
</customer>
<customer active="true">
<xml_name>王炎炎</xml_name>
<xml_idNo>130426199201270329</xml_idNo>
<xml_bankNo>6227000210250635768</xml_bankNo>
<xml_phone>18230065651</xml_phone>
</customer>
</customers>
\ No newline at end of file
xls=DataAll.xls
sheet=IIP
mysql_local_Online=local
Percentage=60
\ No newline at end of file
//package test;
//
//
//
//import com.puhui.bestbuy.common.domain.wx.Token;
//import com.puhui.bestbuy.common.domain.wx.WeixinOauth2Token;
//import com.puhui.bestbuy.common.domain.wx.WeixinUserInfo;
//import com.puhui.bestbuy.common.domain.wx.WeixinUserList;
//import net.sf.json.JSONArray;
//import net.sf.json.JSONException;
//import net.sf.json.JSONObject;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import java.security.MessageDigest;
//import java.security.NoSuchAlgorithmException;
//import java.util.Arrays;
//import java.util.List;
//
//
///**
// * @ClassName: UserUtil.java
// * @Title: 权限控制工具类
// * @Description: 权限控制工具类
// */
//public class UserUtil {
//
// private static final String errcode = "errcode";
//
// private static final String errmsg = "errmsg";
//
// private static Logger log = LoggerFactory.getLogger(UserUtil.class);
//
// public static Token getToken(String appid, String appsecret) {
// Token token = null;
// String requestUrl = WeixinParameter.token_url.replace("APPID", appid)
// .replace("APPSECRET", appsecret);
// // 发起GET请求获取凭证
// JSONObject jsonObject = CommonUtil
// .httpsRequest(requestUrl, "GET", null);
//
// if (null != jsonObject) {
// try {
// token = new Token();
// token.setAccessToken(jsonObject.getString("access_token"));
// token.setExpiresIn(jsonObject.getInt("expires_in"));
// log.info("[UserUtil][getToken]获取token成功{}", jsonObject.getString("access_token"));
// } catch (JSONException e) {
// token = null;
// // 获取token失败
// log.error("[UserUtil][getToken]获取token失败 errcode:{} errmsg:{}",
// jsonObject.getInt(errcode),
// jsonObject.getString(errmsg));
// log.error("获取token失败", e);
// }
// }
// return token;
// }
//
// /**
// * 获取用户信息
// *
// * @param accessToken 接口访问凭证
// * @param openId 用户标识
// * @return WeixinUserInfo
// */
// public static WeixinUserInfo getUserInfo(String accessToken, String openId) {
// WeixinUserInfo weixinUserInfo = new WeixinUserInfo();
// // 拼接请求地址
// String requestUrl = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID";
// requestUrl = requestUrl.replace("ACCESS_TOKEN", accessToken).replace(
// "OPENID", openId);
// // 获取用户信息
// JSONObject jsonObject = CommonUtil.httpsRequest(requestUrl, "GET", null);
//
// if (null != jsonObject) {
// log.info("[UserUtil][getUserInfo][jsonObject]="
// + jsonObject.toString());
// // 用户的标识
// weixinUserInfo.setOpenId(openId);
// // 关注状态(1是关注,0是未关注),未关注时获取不到其余信息
// weixinUserInfo.setSubscribe(jsonObject.getInt("subscribe"));
// if (jsonObject.getInt("subscribe") == 1) {
// // 用户关注时间
// weixinUserInfo.setSubscribeTime(jsonObject
// .getString("subscribe_time"));
// // 昵称
// weixinUserInfo.setNickname(jsonObject.getString("nickname"));
// // 用户的性别(1是男性,2是女性,0是未知)
// weixinUserInfo.setSex(jsonObject.getInt("sex"));
// // 用户所在国家
// weixinUserInfo.setCountry(jsonObject.getString("country"));
// // 用户所在省份
// weixinUserInfo.setProvince(jsonObject.getString("province"));
// // 用户所在城市
// weixinUserInfo.setCity(jsonObject.getString("city"));
// // 用户的语言,简体中文为zh_CN
// weixinUserInfo.setLanguage(jsonObject.getString("language"));
// // 用户头像
// weixinUserInfo.setHeadImgUrl(jsonObject.getString("headimgurl"));
// }
// }
// return weixinUserInfo;
// }
//
// /**
// * 校验签名
// *
// * @param token 绑定TOKEN
// * @param signature 微信加密签名
// * @param timestamp 时间戳
// * @param nonce 随机数
// * @return
// */
// public static boolean checkSignature(String token, String signature,
// String timestamp, String nonce) {
//
// // 对token、timestamp和nonce按字典排序
// String[] paramArr = new String[]{token, timestamp, nonce};
// Arrays.sort(paramArr);
//
// // 将排序后的结果拼接成一个字符串
// String content = paramArr[0].concat(paramArr[1]).concat(paramArr[2]);
//
// String ciphertext = null;
// try {
// MessageDigest md = MessageDigest.getInstance("SHA-1");
// // 对接后的字符串进行sha1加密
// byte[] digest = md.digest(content.getBytes());
// ciphertext = CommonUtil.byteToStr(digest);
// } catch (NoSuchAlgorithmException e) {
// log.error("验签失败", e);
// }
//
// // 将sha1加密后的字符串与signature进行对比
// log.info("ciphertext:" + ciphertext);
// return ciphertext != null ? ciphertext.equalsIgnoreCase(signature)
// : false;
// }
//
// /**
// * 获取网页授权凭证
// *
// * @param appId 公众账号的唯一标识
// * @param appSecret 公众账号的密钥
// * @param code
// * @return WeixinAouth2Token
// */
// public static WeixinOauth2Token getOauth2AccessToken(String appId,
// String appSecret, String code) {
// WeixinOauth2Token wat = null;
// // 拼接请求地址
// String requestUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
// requestUrl = requestUrl.replace("APPID", appId);
// requestUrl = requestUrl.replace("SECRET", appSecret);
// requestUrl = requestUrl.replace("CODE", code);
// // 获取网页授权凭证
// JSONObject jsonObject = CommonUtil
// .httpsRequest(requestUrl, "GET", null);
// if (null != jsonObject) {
// try {
// wat = new WeixinOauth2Token();
// wat.setAccessToken(jsonObject.getString("access_token"));
// wat.setExpiresIn(jsonObject.getInt("expires_in"));
// wat.setRefreshToken(jsonObject.getString("refresh_token"));
// wat.setOpenId(jsonObject.getString("openid"));
// wat.setScope(jsonObject.getString("scope"));
// } catch (Exception e) {
// wat = null;
// int errorCode = jsonObject.getInt(errcode);
// String errorMsg = jsonObject.getString(errmsg);
// log.error(
// "[UserUtil][getOauth2AccessToken]获取网页授权凭证失败 errcode:{} errmsg:{}",
// errorCode, errorMsg);
// log.error("获取网页授权凭证失败", e);
// }
// }
// return wat;
// }
//
// /**
// * 获取关注者列表
// *
// * @param accessToken 调用接口凭证
// * @param nextOpenId 第一个拉取的openId,不填默认从头开始拉取
// * @return WeixinUserList
// */
// @SuppressWarnings({"unchecked", "deprecation"})
// public static WeixinUserList getUserList(String accessToken,
// String nextOpenId) {
// WeixinUserList weixinUserList = new WeixinUserList();
//
// if (null == nextOpenId)
// nextOpenId = "";
//
// // 拼接请求地址
// String requestUrl = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID";
// requestUrl = requestUrl.replace("ACCESS_TOKEN", accessToken).replace(
// "NEXT_OPENID", nextOpenId);
// // 获取关注者列表
// JSONObject jsonObject = CommonUtil
// .httpsRequest(requestUrl, "GET", null);
// // 如果请求成功
// if (null != jsonObject) {
// weixinUserList.setTotal(jsonObject.getInt("total"));
// weixinUserList.setCount(jsonObject.getInt("count"));
// weixinUserList.setNextOpenId(jsonObject
// .getString("next_openid"));
// JSONObject dataObject = (JSONObject) jsonObject.get("data");
// weixinUserList.setOpenIdList(JSONArray.toList(
// dataObject.getJSONArray("openid"), List.class));
//
// }
// return weixinUserList;
// }
//
//}
//package test;
//
//
//
//import com.puhui.bestbuy.common.domain.wx.Token;
//import com.puhui.bestbuy.common.domain.wx.WeixinOauth2Token;
//import com.puhui.bestbuy.common.domain.wx.WeixinUserInfo;
//import com.puhui.bestbuy.common.domain.wx.WeixinUserList;
//import net.sf.json.JSONArray;
//import net.sf.json.JSONException;
//import net.sf.json.JSONObject;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import java.security.MessageDigest;
//import java.security.NoSuchAlgorithmException;
//import java.util.Arrays;
//import java.util.List;
//
//
///**
// * @ClassName: UserUtil.java
// * @Title: 权限控制工具类
// * @Description: 权限控制工具类
// */
//public class UserUtil {
//
// private static final String errcode = "errcode";
//
// private static final String errmsg = "errmsg";
//
// private static Logger log = LoggerFactory.getLogger(UserUtil.class);
//
// public static Token getToken(String appid, String appsecret) {
// Token token = null;
// String requestUrl = WeixinParameter.token_url.replace("APPID", appid)
// .replace("APPSECRET", appsecret);
// // 发起GET请求获取凭证
// JSONObject jsonObject = CommonUtil
// .httpsRequest(requestUrl, "GET", null);
//
// if (null != jsonObject) {
// try {
// token = new Token();
// token.setAccessToken(jsonObject.getString("access_token"));
// token.setExpiresIn(jsonObject.getInt("expires_in"));
// log.info("[UserUtil][getToken]获取token成功{}", jsonObject.getString("access_token"));
// } catch (JSONException e) {
// token = null;
// // 获取token失败
// log.error("[UserUtil][getToken]获取token失败 errcode:{} errmsg:{}",
// jsonObject.getInt(errcode),
// jsonObject.getString(errmsg));
// log.error("获取token失败", e);
// }
// }
// return token;
// }
//
// /**
// * 获取用户信息
// *
// * @param accessToken 接口访问凭证
// * @param openId 用户标识
// * @return WeixinUserInfo
// */
// public static WeixinUserInfo getUserInfo(String accessToken, String openId) {
// WeixinUserInfo weixinUserInfo = new WeixinUserInfo();
// // 拼接请求地址
// String requestUrl = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID";
// requestUrl = requestUrl.replace("ACCESS_TOKEN", accessToken).replace(
// "OPENID", openId);
// // 获取用户信息
// JSONObject jsonObject = CommonUtil.httpsRequest(requestUrl, "GET", null);
//
// if (null != jsonObject) {
// log.info("[UserUtil][getUserInfo][jsonObject]="
// + jsonObject.toString());
// // 用户的标识
// weixinUserInfo.setOpenId(openId);
// // 关注状态(1是关注,0是未关注),未关注时获取不到其余信息
// weixinUserInfo.setSubscribe(jsonObject.getInt("subscribe"));
// if (jsonObject.getInt("subscribe") == 1) {
// // 用户关注时间
// weixinUserInfo.setSubscribeTime(jsonObject
// .getString("subscribe_time"));
// // 昵称
// weixinUserInfo.setNickname(jsonObject.getString("nickname"));
// // 用户的性别(1是男性,2是女性,0是未知)
// weixinUserInfo.setSex(jsonObject.getInt("sex"));
// // 用户所在国家
// weixinUserInfo.setCountry(jsonObject.getString("country"));
// // 用户所在省份
// weixinUserInfo.setProvince(jsonObject.getString("province"));
// // 用户所在城市
// weixinUserInfo.setCity(jsonObject.getString("city"));
// // 用户的语言,简体中文为zh_CN
// weixinUserInfo.setLanguage(jsonObject.getString("language"));
// // 用户头像
// weixinUserInfo.setHeadImgUrl(jsonObject.getString("headimgurl"));
// }
// }
// return weixinUserInfo;
// }
//
// /**
// * 校验签名
// *
// * @param token 绑定TOKEN
// * @param signature 微信加密签名
// * @param timestamp 时间戳
// * @param nonce 随机数
// * @return
// */
// public static boolean checkSignature(String token, String signature,
// String timestamp, String nonce) {
//
// // 对token、timestamp和nonce按字典排序
// String[] paramArr = new String[]{token, timestamp, nonce};
// Arrays.sort(paramArr);
//
// // 将排序后的结果拼接成一个字符串
// String content = paramArr[0].concat(paramArr[1]).concat(paramArr[2]);
//
// String ciphertext = null;
// try {
// MessageDigest md = MessageDigest.getInstance("SHA-1");
// // 对接后的字符串进行sha1加密
// byte[] digest = md.digest(content.getBytes());
// ciphertext = CommonUtil.byteToStr(digest);
// } catch (NoSuchAlgorithmException e) {
// log.error("验签失败", e);
// }
//
// // 将sha1加密后的字符串与signature进行对比
// log.info("ciphertext:" + ciphertext);
// return ciphertext != null ? ciphertext.equalsIgnoreCase(signature)
// : false;
// }
//
// /**
// * 获取网页授权凭证
// *
// * @param appId 公众账号的唯一标识
// * @param appSecret 公众账号的密钥
// * @param code
// * @return WeixinAouth2Token
// */
// public static WeixinOauth2Token getOauth2AccessToken(String appId,
// String appSecret, String code) {
// WeixinOauth2Token wat = null;
// // 拼接请求地址
// String requestUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
// requestUrl = requestUrl.replace("APPID", appId);
// requestUrl = requestUrl.replace("SECRET", appSecret);
// requestUrl = requestUrl.replace("CODE", code);
// // 获取网页授权凭证
// JSONObject jsonObject = CommonUtil
// .httpsRequest(requestUrl, "GET", null);
// if (null != jsonObject) {
// try {
// wat = new WeixinOauth2Token();
// wat.setAccessToken(jsonObject.getString("access_token"));
// wat.setExpiresIn(jsonObject.getInt("expires_in"));
// wat.setRefreshToken(jsonObject.getString("refresh_token"));
// wat.setOpenId(jsonObject.getString("openid"));
// wat.setScope(jsonObject.getString("scope"));
// } catch (Exception e) {
// wat = null;
// int errorCode = jsonObject.getInt(errcode);
// String errorMsg = jsonObject.getString(errmsg);
// log.error(
// "[UserUtil][getOauth2AccessToken]获取网页授权凭证失败 errcode:{} errmsg:{}",
// errorCode, errorMsg);
// log.error("获取网页授权凭证失败", e);
// }
// }
// return wat;
// }
//
// /**
// * 获取关注者列表
// *
// * @param accessToken 调用接口凭证
// * @param nextOpenId 第一个拉取的openId,不填默认从头开始拉取
// * @return WeixinUserList
// */
// @SuppressWarnings({"unchecked", "deprecation"})
// public static WeixinUserList getUserList(String accessToken,
// String nextOpenId) {
// WeixinUserList weixinUserList = new WeixinUserList();
//
// if (null == nextOpenId)
// nextOpenId = "";
//
// // 拼接请求地址
// String requestUrl = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=ACCESS_TOKEN&next_openid=NEXT_OPENID";
// requestUrl = requestUrl.replace("ACCESS_TOKEN", accessToken).replace(
// "NEXT_OPENID", nextOpenId);
// // 获取关注者列表
// JSONObject jsonObject = CommonUtil
// .httpsRequest(requestUrl, "GET", null);
// // 如果请求成功
// if (null != jsonObject) {
// weixinUserList.setTotal(jsonObject.getInt("total"));
// weixinUserList.setCount(jsonObject.getInt("count"));
// weixinUserList.setNextOpenId(jsonObject
// .getString("next_openid"));
// JSONObject dataObject = (JSONObject) jsonObject.get("data");
// weixinUserList.setOpenIdList(JSONArray.toList(
// dataObject.getJSONArray("openid"), List.class));
//
// }
// return weixinUserList;
// }
//
//}
<?xml version="1.0" encoding="UTF-8"?>
<package_name name="com.puhui.api.zy">
<class_name name="support"></class_name>
<father_class_name name="ZY"></father_class_name>
<implements_name name="获取所支持银行列表"></implements_name>
<!-- 参数:name是参数名,标签内容是备注-->
<parameters>
<!--
<parameter name="openId">openId</parameter>
<parameter name="openId111">openId111</parameter>
<parameter name="productName">商品名称</parameter>
<parameter name="busiId">商户Id(更美)</parameter>
<parameter name="busiName">商户名称 </parameter>
<parameter name="productPrice">商户价格</parameter>
<parameter name="sqlRs">查询结果</parameter>
-->
</parameters>
<initialize_Disable>false</initialize_Disable>
<initializes>
<initialize name="insert">"insert into huimai.bestbuy_sub_busi (busi_id,sub_busi_name,busi_id_third,create_time) "+ "values('999','" + thirdBusi.get("busiName") + "','" + thirdBusi.get("busiId") + "', NOW())"</initialize>
<initialize name="delelt"></initialize>
<initialize name="update"></initialize>
<initialize name="select" value="sqlRs">"selecrt * from word"</initialize>
</initializes>
<handleInput_Disable>false</handleInput_Disable>
<handleInput_replaces>
<handleInput_replace name="openId" type="code" >data_ext.get("openId").toString()</handleInput_replace>
<handleInput_replace name="busiId" type="code" >thirdBusi.get("busiId")</handleInput_replace>
<handleInput_replace name="busiName" type="code" >thirdBusi.get("busiName")</handleInput_replace>
</handleInput_replaces>
<handleInputs_Verifications>
<handleInputs_Verification name="productName"></handleInputs_Verification>
<handleInputs_Verification name="productPrice"></handleInputs_Verification>
</handleInputs_Verifications>
<SendRequest_Disable>true</SendRequest_Disable>
<SendRequest name="Get"></SendRequest>
<handleOutput_Disable>false</handleOutput_Disable>
<handleOutput_saves>
<handleOutput_save name="productId">
<handleOutput>prod_ids.add(productId);</handleOutput>
<handleOutput>data_ext.put("productId", productId);</handleOutput>
</handleOutput_save>
</handleOutput_saves>
<handleOutput_Table name="huimai.bestbuy_goods">"id=" + productId</handleOutput_Table>
</package_name>
<?xml version="1.0" encoding="UTF-8"?>
<package_name name="com.puhui.api.zy">
<class_name name="support"></class_name>
<father_class_name name="ZY"></father_class_name>
<implements_name name="获取所支持银行列表"></implements_name>
<!-- 参数:name是参数名,标签内容是备注-->
<parameters>
<!--
<parameter name="openId">openId</parameter>
<parameter name="openId111">openId111</parameter>
<parameter name="productName">商品名称</parameter>
<parameter name="busiId">商户Id(更美)</parameter>
<parameter name="busiName">商户名称 </parameter>
<parameter name="productPrice">商户价格</parameter>
<parameter name="sqlRs">查询结果</parameter>
-->
</parameters>
<initialize_Disable>false</initialize_Disable>
<initializes>
<initialize name="insert">"insert into huimai.bestbuy_sub_busi (busi_id,sub_busi_name,busi_id_third,create_time) "+ "values('999','" + thirdBusi.get("busiName") + "','" + thirdBusi.get("busiId") + "', NOW())"</initialize>
<initialize name="delelt"></initialize>
<initialize name="update"></initialize>
<initialize name="select" value="sqlRs">"selecrt * from word"</initialize>
</initializes>
<handleInput_Disable>false</handleInput_Disable>
<handleInput_replaces>
<handleInput_replace name="openId" type="code" >data_ext.get("openId").toString()</handleInput_replace>
<handleInput_replace name="busiId" type="code" >thirdBusi.get("busiId")</handleInput_replace>
<handleInput_replace name="busiName" type="code" >thirdBusi.get("busiName")</handleInput_replace>
</handleInput_replaces>
<handleInputs_Verifications>
<handleInputs_Verification name="productName"></handleInputs_Verification>
<handleInputs_Verification name="productPrice"></handleInputs_Verification>
</handleInputs_Verifications>
<SendRequest_Disable>true</SendRequest_Disable>
<SendRequest name="Get"></SendRequest>
<handleOutput_Disable>false</handleOutput_Disable>
<handleOutput_saves>
<handleOutput_save name="productId">
<handleOutput>prod_ids.add(productId);</handleOutput>
<handleOutput>data_ext.put("productId", productId);</handleOutput>
</handleOutput_save>
</handleOutput_saves>
<handleOutput_Table name="huimai.bestbuy_goods">"id=" + productId</handleOutput_Table>
</package_name>
<?xml version="1.0" encoding="UTF-8"?>
<package_name name="com.puhui.api.rgxs">
<class_name name="commitOrderApprove"></class_name>
<father_class_name name="GM"></father_class_name>
<implements_name name="订单模式,人工信审-结论"></implements_name>
<!-- 参数:name是参数名,标签内容是备注-->
<parameters>
<parameter name="Description">用例名称</parameter>
<parameter name="auditRecordId">人工信审工单处理记录表ID</parameter>
<parameter name="audit_result">人工信审结论</parameter>
<parameter name="engine_result">决策引擎结论</parameter>
</parameters>
<initialize_Disable>false</initialize_Disable>
<initializes>
<initialize name="insert">"insert into huimai.bestbuy_sub_busi (busi_id,sub_busi_name,busi_id_third,create_time) "+ "values('999','" + thirdBusi.get("busiName") + "','" + thirdBusi.get("busiId") + "', NOW())"</initialize>
<initialize name="delelt"></initialize>
<initialize name="update"></initialize>
<initialize name="select" value="sqlRs">"selecrt * from word"</initialize>
</initializes>
<handleInput_Disable>true</handleInput_Disable>
<handleInput_replaces>
<handleInput_replace name="auditRecordId" type="code" >thirdBusi.get("busiId")</handleInput_replace>
</handleInput_replaces>
<handleInputs_Verifications>
<handleInputs_Verification name="audit_result"></handleInputs_Verification>
<handleInputs_Verification name="engine_result"></handleInputs_Verification>
</handleInputs_Verifications>
<SendRequest_Disable>true</SendRequest_Disable>
<SendRequest name="Post"></SendRequest>
<handleOutput_Disable>true</handleOutput_Disable>
<handleOutput_saves>
<handleOutput_save name="productId">
<handleOutput>prod_ids.add(productId);</handleOutput>
<handleOutput>data_ext.put("productId", productId);</handleOutput>
</handleOutput_save>
</handleOutput_saves>
<handleOutput_Table name="huimai.bestbuy_goods">"id=" + productId</handleOutput_Table>
</package_name>
<?xml version="1.0" encoding="UTF-8"?>
<package_name name="com.puhui.api.rgxs">
<class_name name="commitOrderApprove"></class_name>
<father_class_name name="GM"></father_class_name>
<implements_name name="订单模式,人工信审-结论"></implements_name>
<!-- 参数:name是参数名,标签内容是备注-->
<parameters>
<parameter name="Description">用例名称</parameter>
<parameter name="auditRecordId">人工信审工单处理记录表ID</parameter>
<parameter name="audit_result">人工信审结论</parameter>
<parameter name="engine_result">决策引擎结论</parameter>
</parameters>
<initialize_Disable>false</initialize_Disable>
<initializes>
<initialize name="insert">"insert into huimai.bestbuy_sub_busi (busi_id,sub_busi_name,busi_id_third,create_time) "+ "values('999','" + thirdBusi.get("busiName") + "','" + thirdBusi.get("busiId") + "', NOW())"</initialize>
<initialize name="delelt"></initialize>
<initialize name="update"></initialize>
<initialize name="select" value="sqlRs">"selecrt * from word"</initialize>
</initializes>
<handleInput_Disable>true</handleInput_Disable>
<handleInput_replaces>
<handleInput_replace name="auditRecordId" type="code" >thirdBusi.get("busiId")</handleInput_replace>
</handleInput_replaces>
<handleInputs_Verifications>
<handleInputs_Verification name="audit_result"></handleInputs_Verification>
<handleInputs_Verification name="engine_result"></handleInputs_Verification>
</handleInputs_Verifications>
<SendRequest_Disable>true</SendRequest_Disable>
<SendRequest name="Post"></SendRequest>
<handleOutput_Disable>true</handleOutput_Disable>
<handleOutput_saves>
<handleOutput_save name="productId">
<handleOutput>prod_ids.add(productId);</handleOutput>
<handleOutput>data_ext.put("productId", productId);</handleOutput>
</handleOutput_save>
</handleOutput_saves>
<handleOutput_Table name="huimai.bestbuy_goods">"id=" + productId</handleOutput_Table>
</package_name>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment